-
Notifications
You must be signed in to change notification settings - Fork 71
bomb sarcophagus & sarcophagus random event #1042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
cb2a0f3
4802010
3816f36
ba0b322
e419e11
e9446e2
82c18d6
0b80b90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,56 @@ | ||||||
| /datum/round_event_control/darkpack/sarcophagus | ||||||
| name = "Sarcophagus" | ||||||
| typepath = /datum/round_event/sarcophagus | ||||||
| weight = 1 | ||||||
| min_players = 20 | ||||||
| max_occurrences = 1 | ||||||
| earliest_start = 70 MINUTES | ||||||
| category = EVENT_CATEGORY_INVASION | ||||||
| description = "A strange sarcophagus has appeared in the city..." | ||||||
| darkpack_allowed = TRUE | ||||||
|
|
||||||
| /datum/round_event_control/darkpack/sarcophagus/can_spawn_event(players_amt, allow_magic) | ||||||
| . = ..() | ||||||
| var/sarcophagus_spawns = 0 | ||||||
| for(var/obj/effect/landmark/event_spawn/sarcophagus/L in GLOB.generic_event_spawns) | ||||||
| sarcophagus_spawns++ | ||||||
| if(sarcophagus_spawns >= 2) | ||||||
| return TRUE | ||||||
| return FALSE | ||||||
|
|
||||||
| /datum/round_event/sarcophagus | ||||||
| start_when = 1 | ||||||
| announce_when = 5 | ||||||
|
|
||||||
| /datum/round_event/sarcophagus/announce(fake) | ||||||
| priority_announce( | ||||||
| "You receive a notification about a viral Endpost - a respected archaeologist notes that the location of a long-lost Assyrian sarcophagus alongside it's key, which was famously stolen, seems to be in your city according to newly published criminological records tracking the suspected thief.", | ||||||
| "Viral News Story", | ||||||
| 'modular_darkpack/modules/events/sounds/news_notification.ogg', | ||||||
| ANNOUNCEMENT_TYPE_PRIORITY, | ||||||
| color_override = "yellow", | ||||||
| ) | ||||||
|
|
||||||
| /datum/round_event/sarcophagus/start() | ||||||
| var/list/landmarks = list() | ||||||
| for(var/obj/effect/landmark/event_spawn/sarcophagus/L in GLOB.generic_event_spawns) | ||||||
| // dont spawn if a player is nearby we don't need them popping in unrealistically | ||||||
| var/player_nearby = FALSE | ||||||
| for(var/mob/living/nearby_mob in view(DEFAULT_SIGHT_DISTANCE, L.loc)) | ||||||
| if(nearby_mob.client) | ||||||
| player_nearby = TRUE | ||||||
| break | ||||||
| if(player_nearby) | ||||||
| continue | ||||||
| landmarks += L | ||||||
|
Comment on lines
+36
to
+45
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should prob be used in the canspawn logic as well. |
||||||
|
|
||||||
| if(length(landmarks) < 2) | ||||||
| return | ||||||
|
Comment on lines
+47
to
+48
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If someone wants to trigger this as an admin and force it to spawn in one spot. thats prob fine
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the below logic assumes two different landmarks since line 51 and i could be wrong but if i get rid of the pick() and landmarks -= logic then it would be likely that the key and the sarcophagus would spawn on top of each other more often than desired which kinda takes away alot of the suspense of the ideal whatever of the event |
||||||
|
|
||||||
| var/obj/effect/landmark/event_spawn/sarcophagus/sarcophagus_landmark = pick(landmarks) | ||||||
| landmarks -= sarcophagus_landmark | ||||||
| var/obj/effect/landmark/event_spawn/sarcophagus/key_landmark = pick(landmarks) | ||||||
|
|
||||||
| var/sarcophagus_type = pick(list(/obj/sarcophagus/bomb, /obj/sarcophagus, /obj/sarcophagus/empty)) | ||||||
| new sarcophagus_type(sarcophagus_landmark.loc) | ||||||
| new /obj/item/sarcophagus_key(key_landmark.loc) | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this SHOULD work? dont see why we would remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was getting out of index errors with the above lists
the logic is super hard to track but basically i was getting negative indices on the above alists