mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Added 5 new types of random events
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
/obj/machinery/computer3/customs
|
||||
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras)
|
||||
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras)
|
||||
spawn_files = list(/datum/file/program/arcade,/datum/file/program/security,/datum/file/camnet_key/entertainment,/datum/file/program/crew)
|
||||
@@ -10,6 +10,7 @@ var/global/list/mob_list = list() //List of all mobs, including clientless
|
||||
var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
|
||||
|
||||
var/global/list/portals = list() //for use by portals
|
||||
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
|
||||
@@ -48,6 +48,7 @@ datum/controller/game_controller/New()
|
||||
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
|
||||
if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
|
||||
if(!supply_shuttle) supply_shuttle = new /datum/controller/supply_shuttle()
|
||||
|
||||
datum/controller/game_controller/proc/setup()
|
||||
world.tick_lag = config.Ticklag
|
||||
@@ -196,7 +197,7 @@ datum/controller/game_controller/proc/process()
|
||||
timer = world.timeofday
|
||||
process_nano()
|
||||
nano_cost = (world.timeofday - timer) / 10
|
||||
|
||||
|
||||
sleep(breather_ticks)
|
||||
|
||||
//EVENTS
|
||||
|
||||
@@ -23,11 +23,16 @@
|
||||
return
|
||||
|
||||
/obj/effect/portal/New()
|
||||
portals += src
|
||||
spawn(300)
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/Del()
|
||||
portals -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
|
||||
if(istype(M, /obj/effect)) //sparks don't teleport
|
||||
return
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#define SUPPLY_STATION_AREATYPE "/area/supply/station" //Type of the supply shuttle area for station
|
||||
#define SUPPLY_DOCK_AREATYPE "/area/supply/dock" //Type of the supply shuttle area for dock
|
||||
|
||||
var/datum/controller/supply_shuttle/supply_shuttle = new()
|
||||
var/global/datum/controller/supply_shuttle/supply_shuttle
|
||||
//var/datum/controller/supply_shuttle/supply_shuttle = new()
|
||||
|
||||
var/list/mechtoys = list(
|
||||
/obj/item/toy/prize/ripley,
|
||||
|
||||
@@ -52,11 +52,13 @@ var/global/list/possibleEvents = list()
|
||||
possibleEvents[/datum/event/falsealarm] = 300
|
||||
possibleEvents[/datum/event/immovable_rod] = 200
|
||||
possibleEvents[/datum/event/vent_clog] = 300
|
||||
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 150
|
||||
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 100
|
||||
possibleEvents[/datum/event/anomaly/anomaly_flux] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_grav] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_pyro] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_vortex] = 150
|
||||
possibleEvents[/datum/event/weightless] = 150
|
||||
possibleEvents[/datum/event/wormholes] = 150
|
||||
|
||||
possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200)
|
||||
possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50)
|
||||
@@ -65,6 +67,7 @@ var/global/list/possibleEvents = list()
|
||||
|
||||
possibleEvents[/datum/event/carp_migration] = 50 + 50 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/dust] = 50 + 50 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/dust/meaty] = 50 + 50 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Janitor"]
|
||||
|
||||
possibleEvents[/datum/event/rogue_drone] = 25 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"]
|
||||
@@ -76,8 +79,10 @@ var/global/list/possibleEvents = list()
|
||||
possibleEvents[/datum/event/electrical_storm] = 10 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Botanist"]
|
||||
|
||||
|
||||
|
||||
if(!spacevines_spawned)
|
||||
possibleEvents[/datum/event/spacevine] = 5 + 5 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/spacevine] = 25 + 5 * active_with_role["Engineer"]
|
||||
if(minutes_passed >= 30) // Give engineers time to set up engine
|
||||
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/meteor_shower] = 40 * active_with_role["Engineer"]
|
||||
@@ -98,6 +103,9 @@ var/global/list/possibleEvents = list()
|
||||
possibleEvents[/datum/event/alien_infestation] = max(active_with_role["Security"], 5) + 2.5
|
||||
if(!sent_ninja_to_station && toggle_space_ninja)
|
||||
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
|
||||
possibleEvents[/datum/event/undead] = active_with_role["Security"] * 25
|
||||
possibleEvents[/datum/event/ghosts] = 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]
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/datum/event/dust/meaty/announce()
|
||||
if(prob(16))
|
||||
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
else
|
||||
command_alert("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert")
|
||||
world << sound('sound/AI/meteors.ogg')
|
||||
|
||||
/datum/event/dust/meaty/setup()
|
||||
qnty = rand(45,125)
|
||||
|
||||
/datum/event/dust/meaty/start()
|
||||
while(qnty-- > 0)
|
||||
new /obj/effect/space_dust/meaty()
|
||||
if(prob(10))
|
||||
sleep(rand(10,15))
|
||||
|
||||
/obj/effect/space_dust/meaty
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "cow"
|
||||
|
||||
strength = 1
|
||||
life = 3
|
||||
|
||||
Bump(atom/A)
|
||||
if(prob(20))
|
||||
spawn(1)
|
||||
for(var/mob/M in range(10, src))
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai))
|
||||
shake_camera(M, 3, 1)
|
||||
if (A)
|
||||
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
walk(src,0)
|
||||
invisibility = 101
|
||||
new /obj/effect/decal/cleanable/blood(get_turf(A))
|
||||
if(ismob(A))
|
||||
A.meteorhit(src)
|
||||
else
|
||||
spawn(0)
|
||||
if(A)
|
||||
A.ex_act(strength)
|
||||
if(src)
|
||||
walk_towards(src,goal,1)
|
||||
life--
|
||||
if(!life)
|
||||
if(prob(80))
|
||||
gibs(loc)
|
||||
if(prob(45))
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat(loc)
|
||||
else if(prob(10))
|
||||
explosion(get_turf(loc), 0, pick(0,1), pick(2,3), 0)
|
||||
else
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
|
||||
del(src)
|
||||
@@ -0,0 +1,200 @@
|
||||
#define HIJACK_SYNDIE 1
|
||||
#define RUSKY_PARTY 2
|
||||
#define SPIDER_GIFT 3
|
||||
#define DEPARTMENT_RESUPPLY 4
|
||||
|
||||
/datum/event/shuttle_loan
|
||||
endWhen = 500
|
||||
var/dispatch_type = 4
|
||||
var/bonus_points = 100
|
||||
var/thanks_msg = "Have some supply points as thanks (the shuttle will be returned in 5 minutes)."
|
||||
var/dispatched = 0
|
||||
|
||||
/datum/event/shuttle_loan/start()
|
||||
dispatch_type = pick(HIJACK_SYNDIE, RUSKY_PARTY, SPIDER_GIFT, DEPARTMENT_RESUPPLY)
|
||||
|
||||
/datum/event/shuttle_loan/announce()
|
||||
supply_shuttle.shuttle_loan = src
|
||||
switch(dispatch_type)
|
||||
if(HIJACK_SYNDIE)
|
||||
command_alert("The syndicate are trying to infiltrate your station. If you let them hijack your shuttle, you'll save us a headache.","CentComm Counter Intelligence")
|
||||
if(RUSKY_PARTY)
|
||||
command_alert("A group of angry russians want to have a party, can you send them your cargo shuttle then make them disappear?","CentComm Russian Outreach Program")
|
||||
if(SPIDER_GIFT)
|
||||
command_alert("The Spider Clan has sent us a mysterious gift, can we ship it to you to see what's inside?","CentComm Diplomatic Corps")
|
||||
if(DEPARTMENT_RESUPPLY)
|
||||
command_alert("Seems we've ordered doubles of our department resupply packages this month. Can we send them to you?","CentComm Supply Department")
|
||||
thanks_msg = "The shuttle will be returned in 5 minutes."
|
||||
bonus_points = 0
|
||||
|
||||
/datum/event/shuttle_loan/proc/loan_shuttle()
|
||||
command_alert(thanks_msg, "Cargo shuttle commandeered by CentComm.")
|
||||
|
||||
dispatched = 1
|
||||
supply_shuttle.points += bonus_points
|
||||
endWhen = activeFor + 1
|
||||
supply_shuttle.eta_timeofday = (world.timeofday + 3000) % 2160000
|
||||
supply_shuttle.moving = 1
|
||||
|
||||
switch(dispatch_type)
|
||||
if(HIJACK_SYNDIE)
|
||||
supply_shuttle.centcom_message += "<font color=blue>Syndicate hijack team incoming.</font>"
|
||||
if(RUSKY_PARTY)
|
||||
supply_shuttle.centcom_message += "<font color=blue>Partying Russians incoming.</font>"
|
||||
if(SPIDER_GIFT)
|
||||
supply_shuttle.centcom_message += "<font color=blue>Spider Clan gift incoming.</font>"
|
||||
if(DEPARTMENT_RESUPPLY)
|
||||
supply_shuttle.centcom_message += "<font color=blue>Department resupply incoming.</font>"
|
||||
|
||||
/datum/event/shuttle_loan/tick()
|
||||
if(dispatched)
|
||||
if(supply_shuttle.moving)
|
||||
endWhen = activeFor
|
||||
else
|
||||
endWhen = activeFor + 1
|
||||
|
||||
/datum/event/shuttle_loan/end()
|
||||
if(supply_shuttle.shuttle_loan && supply_shuttle.shuttle_loan.dispatched)
|
||||
//make sure the shuttle was dispatched in time
|
||||
supply_shuttle.shuttle_loan = null
|
||||
|
||||
//spawn some stuff as reward
|
||||
var/area/shuttle_at = locate(SUPPLY_DOCK_AREATYPE)
|
||||
var/list/empty_shuttle_turfs = list()
|
||||
for(var/turf/simulated/shuttle/T in shuttle_at)
|
||||
if(T.density)
|
||||
continue
|
||||
empty_shuttle_turfs.Add(T)
|
||||
|
||||
var/list/shuttle_spawns = list()
|
||||
switch(dispatch_type)
|
||||
if(HIJACK_SYNDIE)
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = supply_shuttle.ordernum
|
||||
O.object = new /datum/supply_packs/emergency/specialops()
|
||||
O.orderedby = "Syndicate"
|
||||
supply_shuttle.shoppinglist += O
|
||||
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
|
||||
if(prob(75))
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
|
||||
if(prob(50))
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
|
||||
|
||||
var/turf/T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/blood(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/blood(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/blood(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/oil(T)
|
||||
|
||||
if(RUSKY_PARTY)
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = supply_shuttle.ordernum
|
||||
O.object = new /datum/supply_packs/organic/party()
|
||||
O.orderedby = "Russian Confederation"
|
||||
supply_shuttle.shoppinglist += O
|
||||
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian)
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian/ranged) //drops a mateba
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/bear)
|
||||
if(prob(75))
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian)
|
||||
if(prob(50))
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/bear)
|
||||
|
||||
var/turf/T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/vomit(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/vomit(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/vomit(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/vomit(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/ash(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/decal/cleanable/ash(T)
|
||||
|
||||
if(SPIDER_GIFT)
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = supply_shuttle.ordernum
|
||||
O.object = new /datum/supply_packs/emergency/specialops()
|
||||
O.orderedby = "Spider Clan"
|
||||
supply_shuttle.shoppinglist += O
|
||||
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider)
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider)
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider/nurse)
|
||||
if(prob(50))
|
||||
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider/hunter)
|
||||
|
||||
var/turf/T = pick(empty_shuttle_turfs)
|
||||
empty_shuttle_turfs.Remove(T)
|
||||
|
||||
new /obj/effect/decal/remains/human(T)
|
||||
new /obj/item/clothing/shoes/space_ninja(T)
|
||||
new /obj/item/clothing/mask/balaclava(T)
|
||||
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/spider/stickyweb(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/spider/stickyweb(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/spider/stickyweb(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/spider/stickyweb(T)
|
||||
T = pick(empty_shuttle_turfs)
|
||||
new /obj/effect/spider/stickyweb(T)
|
||||
|
||||
if(DEPARTMENT_RESUPPLY)
|
||||
var/list/crate_types = list()
|
||||
|
||||
crate_types.Add(/datum/supply_packs/emergency/evac)
|
||||
crate_types.Add(/datum/supply_packs/security/supplies)
|
||||
crate_types.Add(/datum/supply_packs/organic/food)
|
||||
crate_types.Add(/datum/supply_packs/emergency/weedcontrol)
|
||||
crate_types.Add(/datum/supply_packs/engineering/tools)
|
||||
crate_types.Add(/datum/supply_packs/engineering/engiequipment)
|
||||
crate_types.Add(/datum/supply_packs/science/robotics)
|
||||
crate_types.Add(/datum/supply_packs/science/plasma)
|
||||
crate_types.Add(/datum/supply_packs/medical/supplies)
|
||||
|
||||
while(crate_types.len > 0)
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = supply_shuttle.ordernum
|
||||
O.orderedby = "CentComm"
|
||||
supply_shuttle.shoppinglist += O
|
||||
|
||||
var/spawn_type = crate_types[crate_types.len]
|
||||
O.object = new spawn_type()
|
||||
crate_types.Cut(crate_types.len, crate_types.len + 1)
|
||||
|
||||
for(var/i=0,i<3,i++)
|
||||
var/turf/T = pick(empty_shuttle_turfs)
|
||||
var/spawn_type = pick(/obj/effect/decal/cleanable/flour, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/oil)
|
||||
new spawn_type(T)
|
||||
|
||||
var/false_positive = 0
|
||||
while(shuttle_spawns.len > 0 && empty_shuttle_turfs.len > 0)
|
||||
var/turf/T = pick(empty_shuttle_turfs)
|
||||
if(T.contents.len && false_positive < 5)
|
||||
false_positive++
|
||||
continue
|
||||
|
||||
var/spawn_type = shuttle_spawns[1]
|
||||
shuttle_spawns.Cut(1, 2)
|
||||
empty_shuttle_turfs.Remove(T)
|
||||
new spawn_type(T)
|
||||
|
||||
supply_shuttle.buy()
|
||||
//supply_shuttle.send()
|
||||
//supply_shuttle.moving = 0
|
||||
|
||||
#undef HIJACK_SYNDIE
|
||||
#undef RUSKY_PARTY
|
||||
#undef SPIDER_GIFT
|
||||
#undef DEPARTMENT_RESUPPLY
|
||||
@@ -0,0 +1,20 @@
|
||||
/datum/event/ghosts
|
||||
announceWhen = 70
|
||||
oneShot = 1
|
||||
|
||||
/datum/event/ghosts/setup()
|
||||
announceWhen = rand(60, 180)
|
||||
|
||||
/datum/event/ghosts/announce()
|
||||
command_alert("Unknown quasi-aetheric entities have been detected near [station_name()], please stand-by.", "Lifesign Alert?")
|
||||
|
||||
|
||||
/datum/event/ghosts/start()
|
||||
var/p = 100
|
||||
if(player_list.len <= 3)
|
||||
p = 25
|
||||
else if(player_list.len <= 6)
|
||||
p = 50
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
if(C.name == "carpspawn" && prob(p))
|
||||
new /mob/living/simple_animal/hostile/retaliate/ghost(C.loc)
|
||||
@@ -0,0 +1,39 @@
|
||||
/datum/event/undead
|
||||
var/spawn_prob = 15
|
||||
startWhen = 2
|
||||
announceWhen = 3
|
||||
oneShot = 1
|
||||
setup()
|
||||
var/datum/event/electrical_storm/RS = new
|
||||
RS.lightsoutAmount = pick(2,2,3)
|
||||
RS.start()
|
||||
RS.kill()
|
||||
start()
|
||||
for(var/area/A)
|
||||
if(A.luminosity) continue
|
||||
// if(A.lighting_space) continue
|
||||
if(A.type == /area) continue
|
||||
var/list/turflist = list()
|
||||
for(var/turf/T in A)
|
||||
if(istype(T,/turf/space) || T.density) continue
|
||||
if(locate(/mob/living) in T) continue
|
||||
var/okay = 1
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
okay = 0
|
||||
break
|
||||
if(okay)
|
||||
turflist += T
|
||||
|
||||
if(!turflist.len) continue
|
||||
var/turfs = round(turflist.len * spawn_prob/100,1)
|
||||
while(turfs > 0 && turflist.len) // safety
|
||||
turfs--
|
||||
var/turf/T = pick_n_take(turflist)
|
||||
var/undeadtype = pick(/mob/living/simple_animal/hostile/retaliate/skeleton,
|
||||
80;/mob/living/simple_animal/hostile/retaliate/zombie,
|
||||
60;/mob/living/simple_animal/hostile/retaliate/ghost)
|
||||
new undeadtype(T)
|
||||
announce()
|
||||
for(var/mob/living/M in player_list)
|
||||
M << "You feel [pick("a chill","a deathly chill","the undead","dirty", "creeped out","afraid","fear")]!"
|
||||
@@ -0,0 +1,26 @@
|
||||
/datum/event/weightless
|
||||
startWhen = 5
|
||||
endWhen = 65
|
||||
|
||||
/datum/event/weightless/setup()
|
||||
startWhen = rand(0,10)
|
||||
endWhen = rand(40,80)
|
||||
|
||||
/datum/event/weightless/announce()
|
||||
command_alert("Warning: Failsafes for the station's artificial gravity arrays have been triggered. Please be aware that if this problem recurs it may result in formation of gravitational anomalies. Nanotrasen wishes to remind you that the unauthorised formation of anomalies within Nanotrasen facilities is strictly prohibited by health and safety regulation [rand(99,9999)][pick("a","b","c")]:subclause[rand(1,20)][pick("a","b","c")].")
|
||||
|
||||
/datum/event/weightless/start()
|
||||
for(var/area/A in world)
|
||||
A.gravitychange(0)
|
||||
/*
|
||||
if(control)
|
||||
control.weight *= 2
|
||||
*/
|
||||
/datum/event/weightless/end()
|
||||
for(var/area/A in world)
|
||||
A.gravitychange(1)
|
||||
|
||||
if(announceWhen >= 0)
|
||||
command_alert("Artificial gravity arrays are now functioning within normal parameters. Please report any irregularities to your respective head of staff.")
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/datum/event/wormholes
|
||||
announceWhen = 10
|
||||
endWhen = 60
|
||||
|
||||
var/list/pick_turfs = list()
|
||||
var/list/wormholes = list()
|
||||
var/shift_frequency = 3
|
||||
var/number_of_wormholes = 400
|
||||
|
||||
/datum/event/wormholes/setup()
|
||||
announceWhen = rand(0, 20)
|
||||
endWhen = rand(40, 80)
|
||||
|
||||
/datum/event/wormholes/start()
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
pick_turfs += T
|
||||
|
||||
for(var/i = 1, i <= number_of_wormholes, i++)
|
||||
var/turf/T = pick(pick_turfs)
|
||||
wormholes += new /obj/effect/portal/wormhole(T, null, null, -1)
|
||||
|
||||
/datum/event/wormholes/announce()
|
||||
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M, /mob/new_player))
|
||||
M << sound('sound/AI/spanomalies.ogg')
|
||||
|
||||
/datum/event/wormholes/tick()
|
||||
if(activeFor % shift_frequency == 0)
|
||||
for(var/obj/effect/portal/wormhole/O in wormholes)
|
||||
var/turf/T = pick(pick_turfs)
|
||||
if(T) O.loc = T
|
||||
|
||||
/datum/event/wormholes/end()
|
||||
portals.Remove(wormholes)
|
||||
for(var/obj/effect/portal/wormhole/O in wormholes)
|
||||
O.loc = null
|
||||
wormholes.Cut()
|
||||
|
||||
|
||||
/obj/effect/portal/wormhole
|
||||
name = "wormhole"
|
||||
desc = "It looks highly unstable; It could close at any moment."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "anom"
|
||||
failchance = 0
|
||||
|
||||
/obj/effect/portal/wormhole/attack_hand(mob/user)
|
||||
teleport(user)
|
||||
|
||||
/obj/effect/portal/wormhole/attackby(obj/item/I, mob/user)
|
||||
teleport(user)
|
||||
|
||||
/obj/effect/portal/wormhole/teleport(atom/movable/M)
|
||||
if(istype(M, /obj/effect)) //sparks don't teleport
|
||||
return
|
||||
if(M.anchored && istype(M, /obj/mecha))
|
||||
return
|
||||
|
||||
if(istype(M, /atom/movable))
|
||||
var/turf/target
|
||||
if(portals.len)
|
||||
var/obj/effect/portal/P = pick(portals)
|
||||
if(P && isturf(P.loc))
|
||||
target = P.loc
|
||||
if(!target) return
|
||||
do_teleport(M, target, 1, 1, 0, 0) ///You will appear adjacent to the beacon
|
||||
@@ -20,6 +20,7 @@
|
||||
anchored = 1
|
||||
var/strength = 2 //ex_act severity number
|
||||
var/life = 2 //how many things we hit before del(src)
|
||||
var/atom/goal = null
|
||||
|
||||
weak
|
||||
strength = 3
|
||||
@@ -62,7 +63,7 @@
|
||||
startx = (TRANSITIONEDGE+1)
|
||||
endy = rand(TRANSITIONEDGE,world.maxy-TRANSITIONEDGE)
|
||||
endx = world.maxx-TRANSITIONEDGE
|
||||
var/goal = locate(endx, endy, 1)
|
||||
goal = locate(endx, endy, 1)
|
||||
src.x = startx
|
||||
src.y = starty
|
||||
src.z = 1
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
// This is important
|
||||
/mob/living/attack_ghost(mob/dead/observer/user)
|
||||
if(prob(80)) return ..()
|
||||
var/found = 0
|
||||
for(var/mob/living/simple_animal/hostile/retaliate/R in range(4,src))
|
||||
if(R.faction != "undead" || R == src || prob(50)) continue
|
||||
found = 1
|
||||
R.enemies ^= src
|
||||
if(src in R.enemies)
|
||||
R.visible_message("[R]'s head swivels eerily towards [src].")
|
||||
else
|
||||
R.visible_message("[R] stares at [src] for a minute before turning away.")
|
||||
if(R.target == src)
|
||||
R.target = null
|
||||
if(!found)
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
name = "ghost"
|
||||
icon_state = "ghost2"
|
||||
icon_living = "ghost2"
|
||||
icon_dead = "ghost"
|
||||
density = 0 // ghost
|
||||
invisibility = 60 // no seriously ghost
|
||||
speak_chance = 0 // fyi, ghost
|
||||
|
||||
|
||||
response_help = "passes through" // by the way ghost
|
||||
response_disarm = "shoves"
|
||||
response_harm = "hits"
|
||||
turns_per_move = 10
|
||||
speed = -1
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
|
||||
harm_intent_damage = 10
|
||||
melee_damage_lower = 2
|
||||
melee_damage_upper = 3
|
||||
attacktext = "grips"
|
||||
attack_sound = 'sound/hallucinations/growl1.ogg'
|
||||
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
|
||||
faction = "undead" // did I mention ghost
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost/Process_Spacemove(var/check_drift = 0)
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost/FindTarget()
|
||||
. = ..()
|
||||
if(.)
|
||||
emote("wails at [.]")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost/Life()
|
||||
if(target)
|
||||
invisibility = pick(0,0,60,invisibility)
|
||||
else
|
||||
invisibility = pick(0,60,60,invisibility)
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost/Die()
|
||||
new /obj/item/weapon/ectoplasm(loc)
|
||||
del src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/skeleton
|
||||
name = "skeleton"
|
||||
icon = 'icons/mob/human.dmi'
|
||||
icon_state = "skeleton_s"
|
||||
icon_living = "skeleton_s"
|
||||
icon_dead = "skeleton_l"
|
||||
speak_chance = 0
|
||||
turns_per_move = 10
|
||||
response_help = "shakes hands with"
|
||||
response_disarm = "shoves"
|
||||
response_harm = "hits"
|
||||
speed = -1
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
|
||||
harm_intent_damage = 10
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 10
|
||||
attacktext = "claws"
|
||||
attack_sound = 'sound/hallucinations/growl1.ogg'
|
||||
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
|
||||
faction = "undead"
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/skeleton/Die()
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
del src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/zombie
|
||||
name = "zombie"
|
||||
icon = 'icons/mob/human.dmi'
|
||||
icon_state = "zombie_s"
|
||||
icon_living = "zombie_s"
|
||||
icon_dead = "zombie_l"
|
||||
speak_chance = 0
|
||||
turns_per_move = 10
|
||||
response_help = "gently prods"
|
||||
response_disarm = "shoves"
|
||||
response_harm = "hits"
|
||||
speed = -1
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
|
||||
harm_intent_damage = 10
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 10
|
||||
attacktext = "claws"
|
||||
attack_sound = 'sound/hallucinations/growl1.ogg'
|
||||
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
|
||||
faction = "undead"
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/zombie/Die()
|
||||
new /obj/effect/decal/cleanable/blood/gibs(loc)
|
||||
del src
|
||||
return
|
||||
Reference in New Issue
Block a user