diff --git a/baystation12.dme b/baystation12.dme index 88f0457b33e..ce76bfb1871 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -849,6 +849,7 @@ #include "code\modules\events\rogue_drones.dm" #include "code\modules\events\space_ninja.dm" #include "code\modules\events\spontaneous_appendicitis.dm" +#include "code\modules\events\tear.dm" #include "code\modules\events\viral_infection.dm" #include "code\modules\events\viral_outbreak.dm" #include "code\modules\events\wallrot.dm" diff --git a/code/modules/events/event.dm b/code/modules/events/event.dm index 0fd307637f3..c4982352377 100644 --- a/code/modules/events/event.dm +++ b/code/modules/events/event.dm @@ -5,7 +5,7 @@ var/oneShot = 0 //If true, then the event removes itself from the list of potential events on creation. var/activeFor = 0 //How long the event has existed. You don't need to change this. - + var/area/impact_area //Called first before processing. //Allows you to setup your event, such as randomly //setting the startWhen and or announceWhen variables. @@ -87,4 +87,5 @@ for(var/mob/living/carbon/human/P in player_list) if(P.client) players++ - return players \ No newline at end of file + return players + diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 1e3f3ca130f..9ace886d024 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -105,7 +105,7 @@ var/global/list/possibleEvents = list() possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5) possibleEvents[/datum/event/undead] = active_with_role["Security"] * 10 possibleEvents[/datum/event/ghosts] = active_with_role["Security"] * 25 - + possibleEvents[/datum/event/tear] = active_with_role["Security"] * 25 for(var/event_type in event_last_fired) if(possibleEvents[event_type]) var/time_passed = world.time - event_last_fired[event_type] diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 62646a5e351..472e64c0d58 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -91,4 +91,5 @@ var/scheduledEvent = null /area/engine/chiefs_office) //Need to locate() as it's just a list of paths. - return locate(pick((the_station_areas - safe_areas) + danger_areas)) \ No newline at end of file + return locate(pick((the_station_areas - safe_areas) + danger_areas)) + diff --git a/code/modules/events/tear.dm b/code/modules/events/tear.dm new file mode 100644 index 00000000000..45ac0a2de0d --- /dev/null +++ b/code/modules/events/tear.dm @@ -0,0 +1,73 @@ +/datum/event/tear + startWhen = 3 + announceWhen = 20 + endWhen = 50 + var/obj/effect/tear/TE + +/datum/event/tear/announce() + command_alert("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert") + score_eventsendured++ + +/datum/event/tear/start() + var/turf/T = pick(get_area_turfs(impact_area)) + if(T) + TE = new /obj/effect/tear(T.loc) + + +/datum/event/tear/setup() + impact_area = findEventArea() + +/datum/event/tear/end() + if(TE) + del(TE) + +/obj/effect/tear + name="Dimensional Tear" + desc="A tear in the dimensional fabric of space and time." + icon='icons/effects/tear.dmi' + icon_state="tear" + unacidable = 1 + density = 0 + anchored = 1 + luminosity = 3 + +/obj/effect/tear/New() + ..() + var/atom/movable/overlay/animation = null + animation = new(loc) + animation.icon_state = "newtear" + animation.icon = 'icons/effects/tear.dmi' + animation.master = src +// flick("newtear",usr) + spawn(15) + if(animation) del(animation) + + + spawn(rand(30,120)) + var/blocked = list(/mob/living/simple_animal/hostile, + /mob/living/simple_animal/hostile/pirate, + /mob/living/simple_animal/hostile/pirate/ranged, + /mob/living/simple_animal/hostile/russian, + /mob/living/simple_animal/hostile/russian/ranged, + /mob/living/simple_animal/hostile/syndicate, + /mob/living/simple_animal/hostile/syndicate/melee, + /mob/living/simple_animal/hostile/syndicate/melee/space, + /mob/living/simple_animal/hostile/syndicate/ranged, + /mob/living/simple_animal/hostile/syndicate/ranged/space, + /mob/living/simple_animal/hostile/alien/queen/large, + /mob/living/simple_animal/hostile/faithless, + /mob/living/simple_animal/hostile/panther, + /mob/living/simple_animal/hostile/snake, + /mob/living/simple_animal/hostile/retaliate, + /mob/living/simple_animal/hostile/retaliate/clown + )//exclusion list for things you don't want the reaction to create. + var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs + + for(var/i = 1, i <= 5, i++) + var/chosen = pick(critters) + var/mob/living/simple_animal/hostile/C = new chosen + C.faction = "slimesummon" + C.loc = src.loc + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(C, pick(NORTH,SOUTH,EAST,WEST)) diff --git a/code/modules/events/tgevents/anomaly.dm b/code/modules/events/tgevents/anomaly.dm index f75784c9108..3e19744d519 100644 --- a/code/modules/events/tgevents/anomaly.dm +++ b/code/modules/events/tgevents/anomaly.dm @@ -1,5 +1,5 @@ /datum/event/anomaly - var/area/impact_area + var/obj/effect/anomaly/newAnomaly diff --git a/icons/effects/tear.dmi b/icons/effects/tear.dmi new file mode 100644 index 00000000000..db544043ed0 Binary files /dev/null and b/icons/effects/tear.dmi differ