-
Notifications
You must be signed in to change notification settings - Fork 542
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blood moon rising #16344
Merged
PJB3005
merged 4 commits into
vgstation-coders:Bleeding-Edge
from
MadmanMartian:helloween
Oct 30, 2017
Merged
Blood moon rising #16344
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a716703
and I heard as it were the noise of thunder
MadmanMartian 9019730
One of the four beasts saying 'come and see'
MadmanMartian 0616529
And I looked, and behold a pale horse
MadmanMartian 6640caa
and his name that sat on him was Death
MadmanMartian File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/obj/effect/gravestone | ||
name = "gravestone" | ||
desc = "Whoever lies here must sure be confused as to how they were buried in a space station." | ||
icon = 'icons/obj/halloween.dmi' | ||
icon_state = "gravestone_wood" | ||
anchored = 1 | ||
|
||
/obj/effect/gravestone/New() | ||
gravestone_flick() | ||
..() | ||
|
||
/obj/effect/gravestone/proc/gravestone_flick() | ||
return | ||
|
||
/obj/effect/gravestone/stone | ||
icon_state = "gravestone_stone" | ||
|
||
var/list/halloween_spawns = list( | ||
"default" = list(/mob/living/simple_animal/hostile/humanoid/skellington), | ||
|
||
"cargo" = list(/mob/living/simple_animal/hostile/humanoid/mummy, /mob/living/simple_animal/hostile/mimic/crate/chest,\ | ||
/mob/living/simple_animal/hostile/mimic/crate/item) + typesof(/mob/living/simple_animal/hostile/humanoid/jackal), | ||
|
||
"kitchen" = list(/mob/living/simple_animal/hostile/humanoid/kitchen/poutine, /mob/living/simple_animal/hostile/humanoid/kitchen/meatballer), | ||
|
||
"library" = list(/mob/living/simple_animal/hostile/scarybat/book, /mob/living/simple_animal/hostile/mannequin/cult), | ||
|
||
"medical" = list(/mob/living/simple_animal/hostile/blood_splot, /obj/structure/skele_stand, /mob/living/simple_animal/hostile/monster/cyber_horror)\ | ||
+ typesof(/mob/living/simple_animal/hostile/necro/zombie), | ||
|
||
"maintenance" = list(/mob/living/simple_animal/hostile/humanoid/vampire, /mob/living/simple_animal/hostile/gremlin/greytide,\ | ||
/mob/living/simple_animal/hostile/gremlin, /mob/living/simple_animal/hostile/necro/zombie/putrid), | ||
|
||
"engineering" = list(/mob/living/simple_animal/hostile/humanoid/supermatter, /mob/living/simple_animal/hostile/syphoner), | ||
|
||
) | ||
|
||
/obj/effect/gravestone/halloween | ||
name = "strange gravestone" | ||
|
||
/obj/effect/gravestone/halloween/New() | ||
icon_state = pick("gravestone_wood","gravestone_stone") | ||
..() | ||
spawn_enemies() | ||
|
||
/obj/effect/gravestone/halloween/gravestone_flick() | ||
flick("[icon_state]_new", src) | ||
|
||
/obj/effect/gravestone/halloween/proc/spawn_enemies() | ||
set waitfor = 0 | ||
var/our_area = get_area_string() | ||
|
||
if(our_area == "space" || our_area == "chapel") | ||
animate(src, alpha = 0, time = 1 SECONDS) | ||
sleep(1 SECONDS) | ||
qdel(src) | ||
return | ||
|
||
var/list/possible_spawns = halloween_spawns["default"] + halloween_spawns[our_area] | ||
|
||
spawn(rand(15 SECONDS, 30 SECONDS)) | ||
var/to_spawn = pick(possible_spawns) | ||
if(to_spawn) | ||
new to_spawn(get_turf(src)) | ||
animate(src, alpha = 0, time = 3 SECONDS) | ||
spawn(3 SECONDS) | ||
qdel(src) | ||
|
||
/obj/effect/gravestone/halloween/proc/get_area_string() | ||
. = "default" | ||
|
||
var/area/A = get_area(src) | ||
if(isspace(A)) | ||
. = "space" | ||
else if(istype(A,/area/engine) || istype(A,/area/engineering) || istype(A,/area/construction)) | ||
. = "engineering" | ||
else if(istype(A,/area/medical)) | ||
. = "medical" | ||
else if(istype(A,/area/chapel)) | ||
. = "chapel" | ||
else if(istype(A,/area/library)) | ||
. = "library" | ||
else if(istype(A, /area/maintenance)) | ||
. = "maintenance" | ||
else if(istype(A, /area/supply)) | ||
. = "cargo" | ||
else if(istype(A,/area/crew_quarters/kitchen) || istype(A,/area/hydroponics)) | ||
. = "kitchen" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/* Halloween Rising | ||
* Kill the lights, kill the power, ruin the APCs | ||
* Shuttle is called for 10 minutes | ||
* Sprinkle the station with monsters of halloween variety (Vampires, mummies, zombies, etc.) | ||
* Have some area-specific monsters, such as the Poutine Titan for the kitchen | ||
*/ | ||
|
||
/datum/universal_state/halloween | ||
name = "All Hallows Eve" | ||
desc = "Double, double toil and Trouble. Fire burn and Cauldron bubble." | ||
|
||
decay_rate = 0 | ||
|
||
/datum/universal_state/halloween/OnShuttleCall(var/mob/user) | ||
return 1 | ||
|
||
/datum/universal_state/halloween/DecayTurf(var/turf/T) | ||
if(!T.holy) | ||
T.cultify() | ||
for(var/obj/machinery/light/L in T.contents) | ||
L.broken() | ||
|
||
/datum/universal_state/halloween/OnTurfChange(var/turf/T) | ||
if(T.name == "space") | ||
T.overlays += image(icon = T.icon, icon_state = "hell01") | ||
T.underlays -= "hell01" | ||
else | ||
T.overlays -= image(icon = T.icon, icon_state = "hell01") | ||
|
||
/datum/universal_state/halloween/OnEnter() | ||
set background = 1 | ||
/* | ||
if(emergency_shuttle.direction==2) | ||
captain_announce("The emergency shuttle has returned due to bluespace distortion.") | ||
|
||
emergency_shuttle.force_shutdown() | ||
*/ | ||
|
||
escape_list = get_area_turfs(locate(/area/hallway/secondary/exit)) | ||
CHECK_TICK | ||
suspend_alert = 1 | ||
|
||
convert_all_parallax() | ||
//separated into separate procs for profiling | ||
AreaSet() | ||
MiscSet() | ||
APCSet() | ||
OverlayAndAmbientSet() | ||
|
||
ticker.StartThematic("endgame") | ||
|
||
|
||
/datum/universal_state/halloween/proc/AreaSet() | ||
for(var/area/A in areas) | ||
if(!istype(A,/area) || isspace(A)) | ||
continue | ||
|
||
// No cheating~ | ||
A.jammed=2 | ||
|
||
// Reset all alarms. | ||
A.fire = null | ||
A.atmos = 1 | ||
A.atmosalm = 0 | ||
A.poweralm = 1 | ||
A.party = null | ||
A.radalert = 0 | ||
A.updateicon() | ||
CHECK_TICK | ||
|
||
|
||
/datum/universal_state/halloween/OverlayAndAmbientSet() | ||
set waitfor = FALSE | ||
for(var/turf/T in world) | ||
if(istype(T, /turf/space)) | ||
T.overlays += image(icon = T.icon, icon_state = "hell01") | ||
else | ||
if(!T.holy && prob(5) && T.z == STATION_Z && istype(T, /turf/simulated/floor)) | ||
new /obj/effect/gravestone/halloween(T) | ||
T.underlays += "hell01" | ||
CHECK_TICK | ||
|
||
for(var/datum/lighting_corner/C in global.all_lighting_corners) | ||
if (!C.active) | ||
continue | ||
|
||
C.update_lumcount(0.5, 0, 0) | ||
CHECK_TICK | ||
|
||
/datum/universal_state/halloween/proc/MiscSet() | ||
for (var/obj/machinery/firealarm/alm in machines) | ||
if (!(alm.stat & BROKEN)) | ||
alm.ex_act(2) | ||
CHECK_TICK | ||
|
||
/datum/universal_state/halloween/proc/APCSet() | ||
for (var/obj/machinery/power/apc/APC in power_machines) | ||
if (!(APC.stat & BROKEN) && !(istype(APC.areaMaster,/area/turret_protected/ai) || istype(APC.areaMaster, /area/engineering/engine))) | ||
APC.chargemode = 0 | ||
if(APC.cell) | ||
APC.cell.charge = 0 | ||
APC.emagged = 1 | ||
APC.queue_icon_update() | ||
CHECK_TICK | ||
|
||
/datum/universal_state/halloween/proc/convert_all_parallax() | ||
for(var/client/C in clients) | ||
var/obj/abstract/screen/plane_master/parallax_spacemaster/PS = locate() in C.screen | ||
if(PS) | ||
convert_parallax(PS) | ||
CHECK_TICK | ||
|
||
/datum/universal_state/halloween/convert_parallax(obj/abstract/screen/plane_master/parallax_spacemaster/PS) | ||
PS.color = list( | ||
0,0,0,0, | ||
0,0,0,0, | ||
0,0,0,0, | ||
1,0,0,1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could
to_spawn
ever return null here?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.
It did, and I was unable to reproduce why and/or how. Happened both on the test_tiny and boxstation
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.
Huh. Weird.