diff --git a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm index 783cfdd930..fb0bdfb6f9 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm @@ -34,17 +34,13 @@ var/list/spawn_locs = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/obj/effect/landmark/revenantspawn/L in GLOB.landmarks_list) if(isturf(L.loc)) - switch(L.name) - if("revenantspawn") - spawn_locs += L.loc + spawn_locs += L.loc if(!spawn_locs.len) //If we can't find any revenant spawns, try the carp spawns - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list) if(isturf(L.loc)) - switch(L.name) - if("carpspawn") - spawn_locs += L.loc + spawn_locs += L.loc if(!spawn_locs.len) //If we can't find either, just spawn the revenant at the player's location spawn_locs += get_turf(selected) if(!spawn_locs.len) //If we can't find THAT, then just give up and cry diff --git a/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm b/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm index 888a10669e..4d85744738 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm @@ -23,11 +23,9 @@ player_mind.active = 1 var/list/spawn_locs = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list) if(isturf(L.loc)) - switch(L.name) - if("carpspawn") - spawn_locs += L.loc + spawn_locs += L.loc if(!spawn_locs) message_admins("No valid spawn locations found, aborting...") diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 34e5d5e9a2..ca6cd782fc 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -1,28 +1,25 @@ -/datum/round_event_control/carp_migration - name = "Carp Migration" - typepath = /datum/round_event/carp_migration - weight = 15 - min_players = 2 - earliest_start = 6000 - max_occurrences = 6 - -/datum/round_event/carp_migration - announceWhen = 3 - startWhen = 50 - -/datum/round_event/carp_migration/setup() - startWhen = rand(40, 60) - -/datum/round_event/carp_migration/announce() - priority_announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") - - -/datum/round_event/carp_migration/start() - for(var/obj/effect/landmark/C in GLOB.landmarks_list) - if(C.name == "carpspawn") - if(prob(95)) - new /mob/living/simple_animal/hostile/carp(C.loc) - else - new /mob/living/simple_animal/hostile/carp/megacarp(C.loc) - - +/datum/round_event_control/carp_migration + name = "Carp Migration" + typepath = /datum/round_event/carp_migration + weight = 15 + min_players = 2 + earliest_start = 6000 + max_occurrences = 6 + +/datum/round_event/carp_migration + announceWhen = 3 + startWhen = 50 + +/datum/round_event/carp_migration/setup() + startWhen = rand(40, 60) + +/datum/round_event/carp_migration/announce() + priority_announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") + + +/datum/round_event/carp_migration/start() + for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list) + if(prob(95)) + new /mob/living/simple_animal/hostile/carp(C.loc) + else + new /mob/living/simple_animal/hostile/carp/megacarp(C.loc) diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm index 0f1af1f8f9..a10e42d754 100644 --- a/code/modules/events/electrical_storm.dm +++ b/code/modules/events/electrical_storm.dm @@ -1,36 +1,36 @@ -/datum/round_event_control/electrical_storm - name = "Electrical Storm" - typepath = /datum/round_event/electrical_storm - earliest_start = 6000 - min_players = 5 - weight = 40 - alertadmins = 0 - -/datum/round_event/electrical_storm - var/lightsoutAmount = 1 - var/lightsoutRange = 25 - announceWhen = 1 - -/datum/round_event/electrical_storm/announce() - priority_announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") - - -/datum/round_event/electrical_storm/start() - var/list/epicentreList = list() - - for(var/i=1, i <= lightsoutAmount, i++) - var/list/possibleEpicentres = list() - for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list) - if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList)) - possibleEpicentres += newEpicentre - if(possibleEpicentres.len) - epicentreList += pick(possibleEpicentres) - else - break - - if(!epicentreList.len) - return - - for(var/obj/effect/landmark/epicentre in epicentreList) - for(var/obj/machinery/power/apc/apc in urange(lightsoutRange, epicentre)) - apc.overload_lighting() +/datum/round_event_control/electrical_storm + name = "Electrical Storm" + typepath = /datum/round_event/electrical_storm + earliest_start = 6000 + min_players = 5 + weight = 40 + alertadmins = 0 + +/datum/round_event/electrical_storm + var/lightsoutAmount = 1 + var/lightsoutRange = 25 + announceWhen = 1 + +/datum/round_event/electrical_storm/announce() + priority_announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert") + + +/datum/round_event/electrical_storm/start() + var/list/epicentreList = list() + + for(var/i=1, i <= lightsoutAmount, i++) + var/list/possibleEpicentres = list() + for(var/obj/effect/landmark/lightsout/newEpicentre in GLOB.landmarks_list) + if(!(newEpicentre in epicentreList)) + possibleEpicentres += newEpicentre + if(possibleEpicentres.len) + epicentreList += pick(possibleEpicentres) + else + break + + if(!epicentreList.len) + return + + for(var/obj/effect/landmark/epicentre in epicentreList) + for(var/obj/machinery/power/apc/apc in urange(lightsoutRange, epicentre)) + apc.overload_lighting() diff --git a/code/modules/events/holiday/halloween.dm b/code/modules/events/holiday/halloween.dm index 843f043bfa..5415eab386 100644 --- a/code/modules/events/holiday/halloween.dm +++ b/code/modules/events/holiday/halloween.dm @@ -1,138 +1,137 @@ -/datum/round_event_control/spooky - name = "2 SPOOKY! (Halloween)" - holidayID = HALLOWEEN - typepath = /datum/round_event/spooky - weight = -1 //forces it to be called, regardless of weight - max_occurrences = 1 - earliest_start = 0 - -/datum/round_event/spooky/start() - ..() - for(var/mob/living/carbon/human/H in GLOB.mob_list) - var/obj/item/storage/backpack/b = locate() in H.contents - new /obj/item/storage/spooky(b) - if(ishuman(H) || islizard(H)) - if(prob(50)) - H.set_species(/datum/species/skeleton) - else - H.set_species(/datum/species/zombie) - - for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_list) - Ian.place_on_head(new /obj/item/bedsheet(Ian)) - for(var/mob/living/simple_animal/parrot/Poly/Poly in GLOB.mob_list) - new /mob/living/simple_animal/parrot/Poly/ghost(Poly.loc) - qdel(Poly) - -/datum/round_event/spooky/announce() - priority_announce(pick("RATTLE ME BONES!","THE RIDE NEVER ENDS!", "A SKELETON POPS OUT!", "SPOOKY SCARY SKELETONS!", "CREWMEMBERS BEWARE, YOU'RE IN FOR A SCARE!") , "THE CALL IS COMING FROM INSIDE THE HOUSE") - -//Eyeball migration -/datum/round_event_control/carp_migration/eyeballs - name = "Eyeball Migration" - typepath = /datum/round_event/carp_migration/eyeballs - holidayID = HALLOWEEN - weight = 25 - earliest_start = 0 - -/datum/round_event/carp_migration/eyeballs/start() - for(var/obj/effect/landmark/C in GLOB.landmarks_list) - if(C.name == "carpspawn") - new /mob/living/simple_animal/hostile/carp/eyeball(C.loc) - -//Pumpking meteors waves -/datum/round_event_control/meteor_wave/spooky - name = "Pumpkin Wave" - typepath = /datum/round_event/meteor_wave/spooky - holidayID = HALLOWEEN - weight = 20 - max_occurrences = 2 - -/datum/round_event/meteor_wave/spooky - endWhen = 40 - -/datum/round_event/meteor_wave/spooky/tick() - if(IsMultiple(activeFor, 4)) - spawn_meteors(3, GLOB.meteorsSPOOKY) //meteor list types defined in gamemode/meteor/meteors.dm - -//Creepy clown invasion -/datum/round_event_control/creepy_clowns - name = "Clowns" - typepath = /datum/round_event/creepy_clowns - holidayID = HALLOWEEN - weight = 20 - earliest_start = 0 - -/datum/round_event/creepy_clowns - endWhen = 40 - -/datum/round_event/creepy_clowns/start() - for(var/mob/living/carbon/human/H in GLOB.living_mob_list) - if(!H.client || !istype(H)) - return - to_chat(H, "Honk...") +/datum/round_event_control/spooky + name = "2 SPOOKY! (Halloween)" + holidayID = HALLOWEEN + typepath = /datum/round_event/spooky + weight = -1 //forces it to be called, regardless of weight + max_occurrences = 1 + earliest_start = 0 + +/datum/round_event/spooky/start() + ..() + for(var/mob/living/carbon/human/H in GLOB.mob_list) + var/obj/item/storage/backpack/b = locate() in H.contents + new /obj/item/storage/spooky(b) + if(ishuman(H) || islizard(H)) + if(prob(50)) + H.set_species(/datum/species/skeleton) + else + H.set_species(/datum/species/zombie) + + for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_list) + Ian.place_on_head(new /obj/item/bedsheet(Ian)) + for(var/mob/living/simple_animal/parrot/Poly/Poly in GLOB.mob_list) + new /mob/living/simple_animal/parrot/Poly/ghost(Poly.loc) + qdel(Poly) + +/datum/round_event/spooky/announce() + priority_announce(pick("RATTLE ME BONES!","THE RIDE NEVER ENDS!", "A SKELETON POPS OUT!", "SPOOKY SCARY SKELETONS!", "CREWMEMBERS BEWARE, YOU'RE IN FOR A SCARE!") , "THE CALL IS COMING FROM INSIDE THE HOUSE") + +//Eyeball migration +/datum/round_event_control/carp_migration/eyeballs + name = "Eyeball Migration" + typepath = /datum/round_event/carp_migration/eyeballs + holidayID = HALLOWEEN + weight = 25 + earliest_start = 0 + +/datum/round_event/carp_migration/eyeballs/start() + for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list) + new /mob/living/simple_animal/hostile/carp/eyeball(C.loc) + +//Pumpking meteors waves +/datum/round_event_control/meteor_wave/spooky + name = "Pumpkin Wave" + typepath = /datum/round_event/meteor_wave/spooky + holidayID = HALLOWEEN + weight = 20 + max_occurrences = 2 + +/datum/round_event/meteor_wave/spooky + endWhen = 40 + +/datum/round_event/meteor_wave/spooky/tick() + if(IsMultiple(activeFor, 4)) + spawn_meteors(3, GLOB.meteorsSPOOKY) //meteor list types defined in gamemode/meteor/meteors.dm + +//Creepy clown invasion +/datum/round_event_control/creepy_clowns + name = "Clowns" + typepath = /datum/round_event/creepy_clowns + holidayID = HALLOWEEN + weight = 20 + earliest_start = 0 + +/datum/round_event/creepy_clowns + endWhen = 40 + +/datum/round_event/creepy_clowns/start() + for(var/mob/living/carbon/human/H in GLOB.living_mob_list) + if(!H.client || !istype(H)) + return + to_chat(H, "Honk...") SEND_SOUND(H, sound('sound/spookoween/scary_clown_appear.ogg')) - var/turf/T = get_turf(H) - if(T) - new /obj/effect/hallucination/simple/clown(T, H, 50) - -/datum/round_event/creepy_clowns/tick() - if(IsMultiple(activeFor, 4)) - for(var/mob/living/carbon/human/H in GLOB.living_mob_list) - if (prob(66)) - playsound(H.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 100, 1) - if (prob(33)) - var/turf/T = get_turf(H) - if(T) - new /obj/effect/hallucination/simple/clown(T, H, 25) - else if (prob(25)) - var/turf/T = get_turf(H) - if(T) - new /obj/effect/hallucination/simple/clown/scary(T, H, 25) - else if (prob(5)) - var/turf/T = get_turf(H) - if(T) - spawn_atom_to_turf(/obj/effect/mob_spawn/human/clown/corpse, H, 1) - else if (prob(1)) - spawn_atom_to_turf(/mob/living/simple_animal/hostile/retaliate/clown, H, 1) - -/datum/round_event/creepy_clowns/announce() - priority_announce("Honk... Honk... honk... HONK! HONK! HONKHONKHONKHONKHONK", "HONK!", 'sound/spookoween/scary_horn.ogg') - -//spooky foods (you can't actually make these when it's not halloween) -/obj/item/reagent_containers/food/snacks/sugarcookie/spookyskull - name = "skull cookie" - desc = "Spooky! It's got delicious calcium flavouring!" - icon = 'icons/obj/halloween_items.dmi' - icon_state = "skeletoncookie" - -/obj/item/reagent_containers/food/snacks/sugarcookie/spookycoffin - name = "coffin cookie" - desc = "Spooky! It's got delicious coffee flavouring!" - icon = 'icons/obj/halloween_items.dmi' - icon_state = "coffincookie" - - -//spooky items - -/obj/item/storage/spooky - name = "trick-o-treat bag" - desc = "A pumpkin-shaped bag that holds all sorts of goodies!" - icon = 'icons/obj/halloween_items.dmi' - icon_state = "treatbag" - -/obj/item/storage/spooky/New() - ..() - for(var/distrobuteinbag=0 to 5) - var/type = pick(/obj/item/reagent_containers/food/snacks/sugarcookie/spookyskull, - /obj/item/reagent_containers/food/snacks/sugarcookie/spookycoffin, - /obj/item/reagent_containers/food/snacks/candy_corn, - /obj/item/reagent_containers/food/snacks/candy, - /obj/item/reagent_containers/food/snacks/candiedapple, - /obj/item/reagent_containers/food/snacks/chocolatebar, - /obj/item/organ/brain ) // OH GOD THIS ISN'T CANDY! - new type(src) - -/obj/item/card/emag/halloween - name = "hack-o'-lantern" - desc = "It's a pumpkin with a cryptographic sequencer sticking out." - icon_state = "hack_o_lantern" + var/turf/T = get_turf(H) + if(T) + new /obj/effect/hallucination/simple/clown(T, H, 50) + +/datum/round_event/creepy_clowns/tick() + if(IsMultiple(activeFor, 4)) + for(var/mob/living/carbon/human/H in GLOB.living_mob_list) + if (prob(66)) + playsound(H.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 100, 1) + if (prob(33)) + var/turf/T = get_turf(H) + if(T) + new /obj/effect/hallucination/simple/clown(T, H, 25) + else if (prob(25)) + var/turf/T = get_turf(H) + if(T) + new /obj/effect/hallucination/simple/clown/scary(T, H, 25) + else if (prob(5)) + var/turf/T = get_turf(H) + if(T) + spawn_atom_to_turf(/obj/effect/mob_spawn/human/clown/corpse, H, 1) + else if (prob(1)) + spawn_atom_to_turf(/mob/living/simple_animal/hostile/retaliate/clown, H, 1) + +/datum/round_event/creepy_clowns/announce() + priority_announce("Honk... Honk... honk... HONK! HONK! HONKHONKHONKHONKHONK", "HONK!", 'sound/spookoween/scary_horn.ogg') + +//spooky foods (you can't actually make these when it's not halloween) +/obj/item/reagent_containers/food/snacks/sugarcookie/spookyskull + name = "skull cookie" + desc = "Spooky! It's got delicious calcium flavouring!" + icon = 'icons/obj/halloween_items.dmi' + icon_state = "skeletoncookie" + +/obj/item/reagent_containers/food/snacks/sugarcookie/spookycoffin + name = "coffin cookie" + desc = "Spooky! It's got delicious coffee flavouring!" + icon = 'icons/obj/halloween_items.dmi' + icon_state = "coffincookie" + + +//spooky items + +/obj/item/storage/spooky + name = "trick-o-treat bag" + desc = "A pumpkin-shaped bag that holds all sorts of goodies!" + icon = 'icons/obj/halloween_items.dmi' + icon_state = "treatbag" + +/obj/item/storage/spooky/New() + ..() + for(var/distrobuteinbag=0 to 5) + var/type = pick(/obj/item/reagent_containers/food/snacks/sugarcookie/spookyskull, + /obj/item/reagent_containers/food/snacks/sugarcookie/spookycoffin, + /obj/item/reagent_containers/food/snacks/candy_corn, + /obj/item/reagent_containers/food/snacks/candy, + /obj/item/reagent_containers/food/snacks/candiedapple, + /obj/item/reagent_containers/food/snacks/chocolatebar, + /obj/item/organ/brain ) // OH GOD THIS ISN'T CANDY! + new type(src) + +/obj/item/card/emag/halloween + name = "hack-o'-lantern" + desc = "It's a pumpkin with a cryptographic sequencer sticking out." + icon_state = "hack_o_lantern" diff --git a/code/modules/events/operative.dm b/code/modules/events/operative.dm index 4db2029ce7..0841a2fdbb 100644 --- a/code/modules/events/operative.dm +++ b/code/modules/events/operative.dm @@ -16,9 +16,8 @@ var/mob/dead/selected = pick_n_take(candidates) var/list/spawn_locs = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) - if(L.name in list("ninjaspawn","carpspawn")) - spawn_locs += L.loc + for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list) + spawn_locs += L.loc if(!spawn_locs.len) return MAP_ERROR diff --git a/code/modules/events/wizard/magicarp.dm b/code/modules/events/wizard/magicarp.dm index cc632d9c87..5cebc55cbd 100644 --- a/code/modules/events/wizard/magicarp.dm +++ b/code/modules/events/wizard/magicarp.dm @@ -16,12 +16,11 @@ priority_announce("Unknown magical entities have been detected near [station_name()], please stand-by.", "Lifesign Alert") /datum/round_event/wizard/magicarp/start() - for(var/obj/effect/landmark/C in GLOB.landmarks_list) - if(C.name == "carpspawn") - if(prob(5)) - new /mob/living/simple_animal/hostile/carp/ranged/chaos(C.loc) - else - new /mob/living/simple_animal/hostile/carp/ranged(C.loc) + for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list) + if(prob(5)) + new /mob/living/simple_animal/hostile/carp/ranged/chaos(C.loc) + else + new /mob/living/simple_animal/hostile/carp/ranged(C.loc) /mob/living/simple_animal/hostile/carp/ranged name = "magicarp" diff --git a/code/modules/mob/dead/new_player/login.dm b/code/modules/mob/dead/new_player/login.dm index b684e1ef28..26d05c6ff0 100644 --- a/code/modules/mob/dead/new_player/login.dm +++ b/code/modules/mob/dead/new_player/login.dm @@ -21,15 +21,6 @@ sight |= SEE_TURFS -/* - var/list/watch_locations = list() - for(var/obj/effect/landmark/landmark in landmarks_list) - if(landmark.tag == "landmark*new_player") - watch_locations += landmark.loc - - if(watch_locations.len>0) - loc = pick(watch_locations) -*/ new_player_panel() client.playtitlemusic() if(SSticker.current_state < GAME_STATE_SETTING_UP) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index a543e0825b..dc87736e5d 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -329,16 +329,14 @@ continue loc_landmark = sloc.loc if(!loc_landmark) - for(var/obj/effect/landmark/tripai in GLOB.landmarks_list) - if(tripai.name == "tripai") - if(locate(/mob/living/silicon/ai) in tripai.loc) - continue - loc_landmark = tripai.loc + for(var/obj/effect/landmark/tripai/L in GLOB.landmarks_list) + if(locate(/mob/living/silicon/ai) in L.loc) + continue + loc_landmark = L.loc if(!loc_landmark) to_chat(src, "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone.") - for(var/obj/effect/landmark/start/sloc in GLOB.landmarks_list) - if (sloc.name == "AI") - loc_landmark = sloc.loc + for(var/obj/effect/landmark/start/ai/sloc in GLOB.landmarks_list) + loc_landmark = sloc.loc if(!transfer_after) mind.active = FALSE diff --git a/code/modules/ninja/ninja_event.dm b/code/modules/ninja/ninja_event.dm index a3184cbb20..1656a43505 100644 --- a/code/modules/ninja/ninja_event.dm +++ b/code/modules/ninja/ninja_event.dm @@ -39,11 +39,9 @@ Contents: //selecting a spawn_loc if(!spawn_loc) var/list/spawn_locs = list() - for(var/obj/effect/landmark/L in GLOB.landmarks_list) + for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list) if(isturf(L.loc)) - switch(L.name) - if("ninjaspawn","carpspawn") - spawn_locs += L.loc + spawn_locs += L.loc if(!spawn_locs.len) return kill() spawn_loc = pick(spawn_locs)