Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into modularer
This commit is contained in:
@@ -1,37 +1,37 @@
|
||||
/obj/effect/bump_teleporter
|
||||
name = "bump-teleporter"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
var/id = null //id of this bump_teleporter.
|
||||
var/id_target = null //id of bump_teleporter which this moves you to.
|
||||
invisibility = INVISIBILITY_ABSTRACT //nope, can't see this
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
|
||||
var/static/list/AllTeleporters
|
||||
|
||||
/obj/effect/bump_teleporter/Initialize()
|
||||
. = ..()
|
||||
LAZYADD(AllTeleporters, src)
|
||||
|
||||
/obj/effect/bump_teleporter/Destroy()
|
||||
LAZYREMOVE(AllTeleporters, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/effect/bump_teleporter/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/bump_teleporter/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/bump_teleporter/Bumped(atom/movable/AM)
|
||||
if(!ismob(AM))
|
||||
return
|
||||
if(!id_target)
|
||||
return
|
||||
|
||||
for(var/obj/effect/bump_teleporter/BT in AllTeleporters)
|
||||
if(BT.id == src.id_target)
|
||||
AM.forceMove(BT.loc) //Teleport to location with correct id.
|
||||
/obj/effect/bump_teleporter
|
||||
name = "bump-teleporter"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
var/id = null //id of this bump_teleporter.
|
||||
var/id_target = null //id of bump_teleporter which this moves you to.
|
||||
invisibility = INVISIBILITY_ABSTRACT //nope, can't see this
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
|
||||
var/static/list/AllTeleporters
|
||||
|
||||
/obj/effect/bump_teleporter/Initialize()
|
||||
. = ..()
|
||||
LAZYADD(AllTeleporters, src)
|
||||
|
||||
/obj/effect/bump_teleporter/Destroy()
|
||||
LAZYREMOVE(AllTeleporters, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/effect/bump_teleporter/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/bump_teleporter/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/bump_teleporter/Bumped(atom/movable/AM)
|
||||
if(!ismob(AM))
|
||||
return
|
||||
if(!id_target)
|
||||
return
|
||||
|
||||
for(var/obj/effect/bump_teleporter/BT in AllTeleporters)
|
||||
if(BT.id == src.id_target)
|
||||
AM.forceMove(BT.loc) //Teleport to location with correct id.
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
/obj/effect/decal/cleanable
|
||||
gender = PLURAL
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
var/list/random_icon_states = null
|
||||
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
|
||||
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
||||
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
|
||||
|
||||
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
LAZYINITLIST(blood_DNA) //Kinda needed
|
||||
if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
|
||||
icon_state = pick(random_icon_states)
|
||||
create_reagents(300)
|
||||
if(loc && isturf(loc))
|
||||
for(var/obj/effect/decal/cleanable/C in loc)
|
||||
if(C != src && C.type == type && !QDELETED(C))
|
||||
if (replace_decal(C))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
if(LAZYLEN(diseases))
|
||||
var/list/datum/disease/diseases_to_add = list()
|
||||
for(var/datum/disease/D in diseases)
|
||||
if(D.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS)
|
||||
diseases_to_add += D
|
||||
if(LAZYLEN(diseases_to_add))
|
||||
AddComponent(/datum/component/infective, diseases_to_add)
|
||||
|
||||
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
|
||||
if(mergeable_decal)
|
||||
qdel(C)
|
||||
|
||||
/obj/effect/decal/cleanable/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/reagent_containers/glass) || istype(W, /obj/item/reagent_containers/food/drinks))
|
||||
if(src.reagents && W.reagents)
|
||||
. = 1 //so the containers don't splash their content on the src while scooping.
|
||||
if(!src.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] isn't thick enough to scoop up!</span>")
|
||||
return
|
||||
if(W.reagents.total_volume >= W.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[W] is full!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You scoop up [src] into [W]!</span>")
|
||||
reagents.trans_to(W, reagents.total_volume)
|
||||
if(!reagents.total_volume) //scooped up all of it
|
||||
qdel(src)
|
||||
return
|
||||
if(W.get_temperature()) //todo: make heating a reagent holder proc
|
||||
if(istype(W, /obj/item/clothing/mask/cigarette))
|
||||
return
|
||||
else
|
||||
var/hotness = W.get_temperature()
|
||||
reagents.expose_temperature(hotness)
|
||||
to_chat(user, "<span class='notice'>You heat [name] with [W]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/fire_act(exposed_temperature, exposed_volume)
|
||||
if(reagents)
|
||||
reagents.expose_temperature(exposed_temperature)
|
||||
..()
|
||||
|
||||
|
||||
//Add "bloodiness" of this blood's type, to the human's shoes
|
||||
//This is on /cleanable because fuck this ancient mess
|
||||
/obj/effect/decal/cleanable/Crossed(atom/movable/O)
|
||||
..()
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
if(H.shoes && blood_state && bloodiness && !HAS_TRAIT(H, TRAIT_LIGHT_STEP))
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
var/add_blood = 0
|
||||
if(bloodiness >= BLOOD_GAIN_PER_STEP)
|
||||
add_blood = BLOOD_GAIN_PER_STEP
|
||||
else
|
||||
add_blood = bloodiness
|
||||
bloodiness -= add_blood
|
||||
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS,S.bloody_shoes[blood_state]+add_blood)
|
||||
if(blood_DNA && blood_DNA.len)
|
||||
S.add_blood_DNA(blood_DNA)
|
||||
S.add_blood_overlay()
|
||||
S.blood_state = blood_state
|
||||
update_icon()
|
||||
H.update_inv_shoes()
|
||||
|
||||
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
|
||||
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
||||
return bloodiness
|
||||
else
|
||||
return FALSE
|
||||
/obj/effect/decal/cleanable
|
||||
gender = PLURAL
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
var/list/random_icon_states = null
|
||||
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
|
||||
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
||||
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
|
||||
|
||||
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
LAZYINITLIST(blood_DNA) //Kinda needed
|
||||
if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
|
||||
icon_state = pick(random_icon_states)
|
||||
create_reagents(300)
|
||||
if(loc && isturf(loc))
|
||||
for(var/obj/effect/decal/cleanable/C in loc)
|
||||
if(C != src && C.type == type && !QDELETED(C))
|
||||
if (replace_decal(C))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
if(LAZYLEN(diseases))
|
||||
var/list/datum/disease/diseases_to_add = list()
|
||||
for(var/datum/disease/D in diseases)
|
||||
if(D.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS)
|
||||
diseases_to_add += D
|
||||
if(LAZYLEN(diseases_to_add))
|
||||
AddComponent(/datum/component/infective, diseases_to_add)
|
||||
|
||||
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
|
||||
if(mergeable_decal)
|
||||
qdel(C)
|
||||
|
||||
/obj/effect/decal/cleanable/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/reagent_containers/glass) || istype(W, /obj/item/reagent_containers/food/drinks))
|
||||
if(src.reagents && W.reagents)
|
||||
. = 1 //so the containers don't splash their content on the src while scooping.
|
||||
if(!src.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] isn't thick enough to scoop up!</span>")
|
||||
return
|
||||
if(W.reagents.total_volume >= W.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[W] is full!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You scoop up [src] into [W]!</span>")
|
||||
reagents.trans_to(W, reagents.total_volume)
|
||||
if(!reagents.total_volume) //scooped up all of it
|
||||
qdel(src)
|
||||
return
|
||||
if(W.get_temperature()) //todo: make heating a reagent holder proc
|
||||
if(istype(W, /obj/item/clothing/mask/cigarette))
|
||||
return
|
||||
else
|
||||
var/hotness = W.get_temperature()
|
||||
reagents.expose_temperature(hotness)
|
||||
to_chat(user, "<span class='notice'>You heat [name] with [W]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/fire_act(exposed_temperature, exposed_volume)
|
||||
if(reagents)
|
||||
reagents.expose_temperature(exposed_temperature)
|
||||
..()
|
||||
|
||||
|
||||
//Add "bloodiness" of this blood's type, to the human's shoes
|
||||
//This is on /cleanable because fuck this ancient mess
|
||||
/obj/effect/decal/cleanable/Crossed(atom/movable/O)
|
||||
..()
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
if(H.shoes && blood_state && bloodiness && !HAS_TRAIT(H, TRAIT_LIGHT_STEP))
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
var/add_blood = 0
|
||||
if(bloodiness >= BLOOD_GAIN_PER_STEP)
|
||||
add_blood = BLOOD_GAIN_PER_STEP
|
||||
else
|
||||
add_blood = bloodiness
|
||||
bloodiness -= add_blood
|
||||
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS,S.bloody_shoes[blood_state]+add_blood)
|
||||
if(blood_DNA && blood_DNA.len)
|
||||
S.add_blood_DNA(blood_DNA)
|
||||
S.add_blood_overlay()
|
||||
S.blood_state = blood_state
|
||||
update_icon()
|
||||
H.update_inv_shoes()
|
||||
|
||||
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
|
||||
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
||||
return bloodiness
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xeno
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
color = BLOOD_COLOR_XENO
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter/xeno
|
||||
color = BLOOD_COLOR_XENO
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno
|
||||
color = BLOOD_COLOR_XENO
|
||||
gibs_reagent_id = /datum/reagent/liquidgibs/xeno
|
||||
gibs_bloodtype = "X*"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/update_icon()
|
||||
add_atom_colour(blood_DNA_to_color(), FIXED_COLOUR_PRIORITY)
|
||||
cut_overlays()
|
||||
var/mutable_appearance/flesh = mutable_appearance(icon, "[icon_state]x_flesh")
|
||||
flesh.appearance_flags = RESET_COLOR
|
||||
flesh.color = body_colors
|
||||
add_overlay(flesh)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/streak(list/directions)
|
||||
set waitfor = FALSE
|
||||
var/list/diseases = list()
|
||||
SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases)
|
||||
var/direction = pick(directions)
|
||||
for(var/i in 0 to pick(0, 200; 1, 150; 2, 50))
|
||||
sleep(2)
|
||||
if(i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/splatter/xeno/splat = new /obj/effect/decal/cleanable/blood/splatter/xeno(loc, diseases)
|
||||
splat.transfer_blood_dna(blood_DNA, diseases)
|
||||
if(!step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/body
|
||||
random_icon_states = list("gibhead", "gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/torso
|
||||
random_icon_states = list("gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/limb
|
||||
random_icon_states = list("gibleg", "gibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/core
|
||||
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/larva
|
||||
random_icon_states = list("xgiblarva1", "xgiblarva2")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/larva/body
|
||||
random_icon_states = list("xgiblarvahead", "xgiblarvatorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "tracks"
|
||||
random_icon_states = null
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks/Initialize()
|
||||
add_blood_DNA(list("UNKNOWN DNA" = "X*"))
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xeno
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
color = BLOOD_COLOR_XENO
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter/xeno
|
||||
color = BLOOD_COLOR_XENO
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno
|
||||
color = BLOOD_COLOR_XENO
|
||||
gibs_reagent_id = /datum/reagent/liquidgibs/xeno
|
||||
gibs_bloodtype = "X*"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/update_icon()
|
||||
add_atom_colour(blood_DNA_to_color(), FIXED_COLOUR_PRIORITY)
|
||||
cut_overlays()
|
||||
var/mutable_appearance/flesh = mutable_appearance(icon, "[icon_state]x_flesh")
|
||||
flesh.appearance_flags = RESET_COLOR
|
||||
flesh.color = body_colors
|
||||
add_overlay(flesh)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/streak(list/directions)
|
||||
set waitfor = FALSE
|
||||
var/list/diseases = list()
|
||||
SEND_SIGNAL(src, COMSIG_GIBS_STREAK, directions, diseases)
|
||||
var/direction = pick(directions)
|
||||
for(var/i in 0 to pick(0, 200; 1, 150; 2, 50))
|
||||
sleep(2)
|
||||
if(i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/splatter/xeno/splat = new /obj/effect/decal/cleanable/blood/splatter/xeno(loc, diseases)
|
||||
splat.transfer_blood_dna(blood_DNA, diseases)
|
||||
if(!step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/body
|
||||
random_icon_states = list("gibhead", "gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/torso
|
||||
random_icon_states = list("gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/limb
|
||||
random_icon_states = list("gibleg", "gibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/core
|
||||
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/larva
|
||||
random_icon_states = list("xgiblarva1", "xgiblarva2")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/larva/body
|
||||
random_icon_states = list("xgiblarvahead", "xgiblarvatorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "tracks"
|
||||
random_icon_states = null
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks/Initialize()
|
||||
add_blood_DNA(list("UNKNOWN DNA" = "X*"))
|
||||
. = ..()
|
||||
@@ -1,192 +1,192 @@
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's gooey. Perhaps it's the chef's cooking?"
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
blood_state = BLOOD_STATE_BLOOD
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
color = BLOOD_COLOR_HUMAN //default so we don't have white splotches everywhere.
|
||||
|
||||
/obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C)
|
||||
if (C.blood_DNA)
|
||||
blood_DNA |= C.blood_DNA.Copy()
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/transfer_blood_dna()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/transfer_mob_blood_dna()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/update_icon()
|
||||
color = blood_DNA_to_color()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/old
|
||||
name = "dried blood"
|
||||
desc = "Looks like it's been here a while. Eew."
|
||||
bloodiness = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/old/Initialize(mapload, list/datum/disease/diseases)
|
||||
..()
|
||||
icon_state += "-old"
|
||||
add_blood_DNA(list("Non-human DNA" = "A+"))
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splats
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("splatter1", "splatter2", "splatter3", "splatter4", "splatter5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
random_icon_states = null
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder //not a child of blood on purpose
|
||||
name = "blood"
|
||||
icon_state = "ltrails_1"
|
||||
desc = "Your instincts say you shouldn't be following these."
|
||||
random_icon_states = null
|
||||
var/list/existing_dirs = list()
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/update_icon()
|
||||
color = blood_DNA_to_color()
|
||||
|
||||
/obj/effect/cleanable/trail_holder/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/can_bloodcrawl_in()
|
||||
return TRUE
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/transfer_blood_dna()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/transfer_mob_blood_dna()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
//BLOODY FOOTPRINTS
|
||||
/obj/effect/decal/cleanable/blood/footprints
|
||||
name = "footprints"
|
||||
icon = 'icons/effects/footprints.dmi'
|
||||
icon_state = "nothingwhatsoever"
|
||||
desc = "WHOSE FOOTPRINTS ARE THESE?"
|
||||
random_icon_states = null
|
||||
var/entered_dirs = 0
|
||||
var/exited_dirs = 0
|
||||
blood_state = BLOOD_STATE_BLOOD //the icon state to load images from
|
||||
var/list/shoe_types = list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/Crossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
if(color != bloodtype_to_color(S.last_bloodtype))
|
||||
return
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
shoe_types |= S.type
|
||||
if (!(entered_dirs & H.dir))
|
||||
entered_dirs |= H.dir
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
if(color != bloodtype_to_color(S.last_bloodtype))//last entry - we check its color
|
||||
return
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
shoe_types |= S.type
|
||||
if (!(exited_dirs & H.dir))
|
||||
exited_dirs |= H.dir
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
for(var/Ddir in GLOB.cardinals)
|
||||
if(entered_dirs & Ddir)
|
||||
var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"]
|
||||
if(!bloodstep_overlay)
|
||||
GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]1", dir = Ddir)
|
||||
add_overlay(bloodstep_overlay)
|
||||
if(exited_dirs & Ddir)
|
||||
var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"]
|
||||
if(!bloodstep_overlay)
|
||||
GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]2", dir = Ddir)
|
||||
add_overlay(bloodstep_overlay)
|
||||
|
||||
alpha = BLOODY_FOOTPRINT_BASE_ALPHA + bloodiness
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/examine(mob/user)
|
||||
. = ..()
|
||||
if(shoe_types.len)
|
||||
. += "You recognise the footprints as belonging to:"
|
||||
for(var/shoe in shoe_types)
|
||||
var/obj/item/clothing/shoes/S = shoe
|
||||
. += "some <B>[initial(S.name)]</B> [icon2html(initial(S.icon), user)]"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/replace_decal(obj/effect/decal/cleanable/C)
|
||||
if(blood_state != C.blood_state) //We only replace footprints of the same type as us
|
||||
return
|
||||
if(color != C.color)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/can_bloodcrawl_in()
|
||||
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/* Eventually TODO: make snowflake trails like baycode's
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/shoe
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by footwear."
|
||||
icon_state = FOOTPRINT_SHOE
|
||||
print_state = FOOTPRINT_SHOE
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/foot
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by a bare foot."
|
||||
icon_state = FOOTPRINT_FOOT
|
||||
print_state = FOOTPRINT_FOOT
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/snake
|
||||
name = "tracks"
|
||||
desc = "They look like tracks left by a giant snake."
|
||||
icon_state = FOOTPRINT_SNAKE
|
||||
print_state = FOOTPRINT_SNAKE
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/paw
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by paws."
|
||||
icon_state = FOOTPRINT_PAW
|
||||
print_state = FOOTPRINT_PAW
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/claw
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by claws."
|
||||
icon_state = FOOTPRINT_CLAW
|
||||
print_state = FOOTPRINT_CLAW
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/wheels
|
||||
name = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
gender = PLURAL
|
||||
icon_state = FOOTPRINT_WHEEL
|
||||
print_state = FOOTPRINT_WHEEL
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/body
|
||||
name = "trails"
|
||||
desc = "A trail left by something being dragged."
|
||||
icon_state = FOOTPRINT_DRAG
|
||||
print_state = FOOTPRINT_DRAG */
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's gooey. Perhaps it's the chef's cooking?"
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
blood_state = BLOOD_STATE_BLOOD
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
color = BLOOD_COLOR_HUMAN //default so we don't have white splotches everywhere.
|
||||
|
||||
/obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C)
|
||||
if (C.blood_DNA)
|
||||
blood_DNA |= C.blood_DNA.Copy()
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/transfer_blood_dna()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/transfer_mob_blood_dna()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/update_icon()
|
||||
color = blood_DNA_to_color()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/old
|
||||
name = "dried blood"
|
||||
desc = "Looks like it's been here a while. Eew."
|
||||
bloodiness = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/old/Initialize(mapload, list/datum/disease/diseases)
|
||||
..()
|
||||
icon_state += "-old"
|
||||
add_blood_DNA(list("Non-human DNA" = "A+"))
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splats
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("splatter1", "splatter2", "splatter3", "splatter4", "splatter5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
random_icon_states = null
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder //not a child of blood on purpose
|
||||
name = "blood"
|
||||
icon_state = "ltrails_1"
|
||||
desc = "Your instincts say you shouldn't be following these."
|
||||
random_icon_states = null
|
||||
var/list/existing_dirs = list()
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/update_icon()
|
||||
color = blood_DNA_to_color()
|
||||
|
||||
/obj/effect/cleanable/trail_holder/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/can_bloodcrawl_in()
|
||||
return TRUE
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/transfer_blood_dna()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/transfer_mob_blood_dna()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
//BLOODY FOOTPRINTS
|
||||
/obj/effect/decal/cleanable/blood/footprints
|
||||
name = "footprints"
|
||||
icon = 'icons/effects/footprints.dmi'
|
||||
icon_state = "nothingwhatsoever"
|
||||
desc = "WHOSE FOOTPRINTS ARE THESE?"
|
||||
random_icon_states = null
|
||||
var/entered_dirs = 0
|
||||
var/exited_dirs = 0
|
||||
blood_state = BLOOD_STATE_BLOOD //the icon state to load images from
|
||||
var/list/shoe_types = list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/Crossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
if(color != bloodtype_to_color(S.last_bloodtype))
|
||||
return
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
shoe_types |= S.type
|
||||
if (!(entered_dirs & H.dir))
|
||||
entered_dirs |= H.dir
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
if(color != bloodtype_to_color(S.last_bloodtype))//last entry - we check its color
|
||||
return
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
shoe_types |= S.type
|
||||
if (!(exited_dirs & H.dir))
|
||||
exited_dirs |= H.dir
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
for(var/Ddir in GLOB.cardinals)
|
||||
if(entered_dirs & Ddir)
|
||||
var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"]
|
||||
if(!bloodstep_overlay)
|
||||
GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]1", dir = Ddir)
|
||||
add_overlay(bloodstep_overlay)
|
||||
if(exited_dirs & Ddir)
|
||||
var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"]
|
||||
if(!bloodstep_overlay)
|
||||
GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"] = bloodstep_overlay = image(icon, "[blood_state]2", dir = Ddir)
|
||||
add_overlay(bloodstep_overlay)
|
||||
|
||||
alpha = BLOODY_FOOTPRINT_BASE_ALPHA + bloodiness
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/examine(mob/user)
|
||||
. = ..()
|
||||
if(shoe_types.len)
|
||||
. += "You recognise the footprints as belonging to:"
|
||||
for(var/shoe in shoe_types)
|
||||
var/obj/item/clothing/shoes/S = shoe
|
||||
. += "some <B>[initial(S.name)]</B> [icon2html(initial(S.icon), user)]"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/replace_decal(obj/effect/decal/cleanable/C)
|
||||
if(blood_state != C.blood_state) //We only replace footprints of the same type as us
|
||||
return
|
||||
if(color != C.color)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/can_bloodcrawl_in()
|
||||
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/* Eventually TODO: make snowflake trails like baycode's
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/shoe
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by footwear."
|
||||
icon_state = FOOTPRINT_SHOE
|
||||
print_state = FOOTPRINT_SHOE
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/foot
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by a bare foot."
|
||||
icon_state = FOOTPRINT_FOOT
|
||||
print_state = FOOTPRINT_FOOT
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/snake
|
||||
name = "tracks"
|
||||
desc = "They look like tracks left by a giant snake."
|
||||
icon_state = FOOTPRINT_SNAKE
|
||||
print_state = FOOTPRINT_SNAKE
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/paw
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by paws."
|
||||
icon_state = FOOTPRINT_PAW
|
||||
print_state = FOOTPRINT_PAW
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/claw
|
||||
name = "footprints"
|
||||
desc = "They look like tracks left by claws."
|
||||
icon_state = FOOTPRINT_CLAW
|
||||
print_state = FOOTPRINT_CLAW
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/wheels
|
||||
name = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
gender = PLURAL
|
||||
icon_state = FOOTPRINT_WHEEL
|
||||
print_state = FOOTPRINT_WHEEL
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/tracks/body
|
||||
name = "trails"
|
||||
desc = "A trail left by something being dragged."
|
||||
icon_state = FOOTPRINT_DRAG
|
||||
print_state = FOOTPRINT_DRAG */
|
||||
|
||||
@@ -1,235 +1,235 @@
|
||||
/obj/effect/decal/cleanable/generic
|
||||
name = "clutter"
|
||||
desc = "Someone should clean that up."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "shards"
|
||||
|
||||
/obj/effect/decal/cleanable/ash
|
||||
name = "ashes"
|
||||
desc = "Ashes to ashes, dust to dust, and into space."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/ash/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/ash, 30)
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/effect/decal/cleanable/ash/crematorium
|
||||
//crematoriums need their own ash cause default ash deletes itself if created in an obj
|
||||
turf_loc_check = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/ash/large
|
||||
name = "large pile of ashes"
|
||||
icon_state = "big_ash"
|
||||
|
||||
/obj/effect/decal/cleanable/ash/large/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/ash, 30) //double the amount of ash.
|
||||
|
||||
/obj/effect/decal/cleanable/glass
|
||||
name = "tiny shards"
|
||||
desc = "Back to sand."
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "tiny"
|
||||
|
||||
/obj/effect/decal/cleanable/glass/Initialize()
|
||||
. = ..()
|
||||
setDir(pick(GLOB.cardinals))
|
||||
|
||||
/obj/effect/decal/cleanable/glass/ex_act()
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/glass/plasma
|
||||
icon_state = "plasmatiny"
|
||||
|
||||
/obj/effect/decal/cleanable/dirt
|
||||
name = "dirt"
|
||||
desc = "Someone should clean that up."
|
||||
icon_state = "dirt"
|
||||
canSmoothWith = list(/obj/effect/decal/cleanable/dirt, /turf/closed/wall, /obj/structure/falsewall)
|
||||
smooth = SMOOTH_FALSE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.tiled_dirt)
|
||||
smooth = SMOOTH_MORE
|
||||
icon = 'icons/effects/dirt.dmi'
|
||||
icon_state = ""
|
||||
queue_smooth(src)
|
||||
queue_smooth_neighbors(src)
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/Destroy()
|
||||
queue_smooth_neighbors(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/flour
|
||||
name = "flour"
|
||||
desc = "It's still good. Four second rule!"
|
||||
icon_state = "flour"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ecto
|
||||
name = "ectoplasmic puddle"
|
||||
desc = "You know who to call."
|
||||
light_power = 2
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
name = "glowing goo"
|
||||
desc = "Jeez. I hope that's not for lunch."
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
icon_state = "greenglow"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/Initialize(mapload)
|
||||
. = ..()
|
||||
set_light(2, 0.8, "#22FFAA")
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
gender = NEUTER
|
||||
layer = WALL_OBJ_LAYER
|
||||
icon_state = "cobweb1"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb/cobweb2
|
||||
icon_state = "cobweb2"
|
||||
|
||||
/obj/effect/decal/cleanable/molten_object
|
||||
name = "gooey grey mass"
|
||||
desc = "It looks like a melted... something."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "molten"
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/molten_object/large
|
||||
name = "big gooey grey mass"
|
||||
icon_state = "big_molten"
|
||||
|
||||
//Vomit (sorry)
|
||||
/obj/effect/decal/cleanable/vomit
|
||||
name = "vomit"
|
||||
desc = "Gosh, how unpleasant."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "vomit_1"
|
||||
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(isflyperson(H))
|
||||
playsound(get_turf(src), 'sound/items/drink.ogg', 50, 1) //slurp
|
||||
H.visible_message("<span class='alert'>[H] extends a small proboscis into the vomit pool, sucking it with a slurping sound.</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/consumable/R in reagents.reagent_list)
|
||||
if(R.nutriment_factor > 0)
|
||||
H.nutrition += R.nutriment_factor * R.volume
|
||||
reagents.del_reagent(R.type)
|
||||
reagents.trans_to(H, reagents.total_volume)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/old
|
||||
name = "crusty dried vomit"
|
||||
desc = "You try not to look at the chunks, and fail."
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/old/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
icon_state += "-old"
|
||||
|
||||
/obj/effect/decal/cleanable/tomato_smudge
|
||||
name = "tomato smudge"
|
||||
desc = "It's red."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
|
||||
|
||||
/obj/effect/decal/cleanable/plant_smudge
|
||||
name = "plant smudge"
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_plant")
|
||||
|
||||
/obj/effect/decal/cleanable/egg_smudge
|
||||
name = "smashed egg"
|
||||
desc = "Seems like this one won't hatch."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
|
||||
|
||||
/obj/effect/decal/cleanable/pie_smudge //honk
|
||||
name = "smashed pie"
|
||||
desc = "It's pie cream from a cream pie."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_pie")
|
||||
|
||||
/obj/effect/decal/cleanable/chem_pile
|
||||
name = "chemical pile"
|
||||
desc = "A pile of chemicals. You can't quite tell what's inside it."
|
||||
gender = NEUTER
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
|
||||
/obj/effect/decal/cleanable/shreds
|
||||
name = "shreds"
|
||||
desc = "The shredded remains of what appears to be clothing."
|
||||
icon_state = "shreds"
|
||||
gender = PLURAL
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/ex_act(severity, target)
|
||||
if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion.
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/Initialize()
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/salt
|
||||
name = "salt pile"
|
||||
desc = "A sizable pile of table salt. Someone must be upset."
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
icon_state = "salt_pile"
|
||||
gender = NEUTER
|
||||
|
||||
/obj/effect/decal/cleanable/glitter
|
||||
name = "generic glitter pile"
|
||||
desc = "The herpes of arts and crafts."
|
||||
icon = 'icons/effects/atmospherics.dmi'
|
||||
gender = NEUTER
|
||||
|
||||
/obj/effect/decal/cleanable/glitter/pink
|
||||
name = "pink glitter"
|
||||
icon_state = "plasma_old"
|
||||
|
||||
/obj/effect/decal/cleanable/glitter/white
|
||||
name = "white glitter"
|
||||
icon_state = "nitrous_oxide_old"
|
||||
|
||||
/obj/effect/decal/cleanable/glitter/blue
|
||||
name = "blue glitter"
|
||||
icon_state = "freon_old"
|
||||
|
||||
/obj/effect/decal/cleanable/plasma
|
||||
name = "stabilized plasma"
|
||||
desc = "A puddle of stabilized plasma."
|
||||
icon_state = "flour"
|
||||
color = "#9e0089"
|
||||
|
||||
/obj/effect/decal/cleanable/insectguts
|
||||
name = "insect guts"
|
||||
desc = "One bug squashed. Four more will rise in its place."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
/obj/effect/decal/cleanable/generic
|
||||
name = "clutter"
|
||||
desc = "Someone should clean that up."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "shards"
|
||||
|
||||
/obj/effect/decal/cleanable/ash
|
||||
name = "ashes"
|
||||
desc = "Ashes to ashes, dust to dust, and into space."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/ash/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/ash, 30)
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/effect/decal/cleanable/ash/crematorium
|
||||
//crematoriums need their own ash cause default ash deletes itself if created in an obj
|
||||
turf_loc_check = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/ash/large
|
||||
name = "large pile of ashes"
|
||||
icon_state = "big_ash"
|
||||
|
||||
/obj/effect/decal/cleanable/ash/large/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/ash, 30) //double the amount of ash.
|
||||
|
||||
/obj/effect/decal/cleanable/glass
|
||||
name = "tiny shards"
|
||||
desc = "Back to sand."
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "tiny"
|
||||
|
||||
/obj/effect/decal/cleanable/glass/Initialize()
|
||||
. = ..()
|
||||
setDir(pick(GLOB.cardinals))
|
||||
|
||||
/obj/effect/decal/cleanable/glass/ex_act()
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/glass/plasma
|
||||
icon_state = "plasmatiny"
|
||||
|
||||
/obj/effect/decal/cleanable/dirt
|
||||
name = "dirt"
|
||||
desc = "Someone should clean that up."
|
||||
icon_state = "dirt"
|
||||
canSmoothWith = list(/obj/effect/decal/cleanable/dirt, /turf/closed/wall, /obj/structure/falsewall)
|
||||
smooth = SMOOTH_FALSE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.tiled_dirt)
|
||||
smooth = SMOOTH_MORE
|
||||
icon = 'icons/effects/dirt.dmi'
|
||||
icon_state = ""
|
||||
queue_smooth(src)
|
||||
queue_smooth_neighbors(src)
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/Destroy()
|
||||
queue_smooth_neighbors(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/flour
|
||||
name = "flour"
|
||||
desc = "It's still good. Four second rule!"
|
||||
icon_state = "flour"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ecto
|
||||
name = "ectoplasmic puddle"
|
||||
desc = "You know who to call."
|
||||
light_power = 2
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
name = "glowing goo"
|
||||
desc = "Jeez. I hope that's not for lunch."
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
icon_state = "greenglow"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/Initialize(mapload)
|
||||
. = ..()
|
||||
set_light(2, 0.8, "#22FFAA")
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
gender = NEUTER
|
||||
layer = WALL_OBJ_LAYER
|
||||
icon_state = "cobweb1"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb/cobweb2
|
||||
icon_state = "cobweb2"
|
||||
|
||||
/obj/effect/decal/cleanable/molten_object
|
||||
name = "gooey grey mass"
|
||||
desc = "It looks like a melted... something."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "molten"
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/molten_object/large
|
||||
name = "big gooey grey mass"
|
||||
icon_state = "big_molten"
|
||||
|
||||
//Vomit (sorry)
|
||||
/obj/effect/decal/cleanable/vomit
|
||||
name = "vomit"
|
||||
desc = "Gosh, how unpleasant."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "vomit_1"
|
||||
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(isflyperson(H))
|
||||
playsound(get_turf(src), 'sound/items/drink.ogg', 50, 1) //slurp
|
||||
H.visible_message("<span class='alert'>[H] extends a small proboscis into the vomit pool, sucking it with a slurping sound.</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/consumable/R in reagents.reagent_list)
|
||||
if(R.nutriment_factor > 0)
|
||||
H.nutrition += R.nutriment_factor * R.volume
|
||||
reagents.del_reagent(R.type)
|
||||
reagents.trans_to(H, reagents.total_volume)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/old
|
||||
name = "crusty dried vomit"
|
||||
desc = "You try not to look at the chunks, and fail."
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/old/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
icon_state += "-old"
|
||||
|
||||
/obj/effect/decal/cleanable/tomato_smudge
|
||||
name = "tomato smudge"
|
||||
desc = "It's red."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
|
||||
|
||||
/obj/effect/decal/cleanable/plant_smudge
|
||||
name = "plant smudge"
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_plant")
|
||||
|
||||
/obj/effect/decal/cleanable/egg_smudge
|
||||
name = "smashed egg"
|
||||
desc = "Seems like this one won't hatch."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
|
||||
|
||||
/obj/effect/decal/cleanable/pie_smudge //honk
|
||||
name = "smashed pie"
|
||||
desc = "It's pie cream from a cream pie."
|
||||
gender = NEUTER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_pie")
|
||||
|
||||
/obj/effect/decal/cleanable/chem_pile
|
||||
name = "chemical pile"
|
||||
desc = "A pile of chemicals. You can't quite tell what's inside it."
|
||||
gender = NEUTER
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
|
||||
/obj/effect/decal/cleanable/shreds
|
||||
name = "shreds"
|
||||
desc = "The shredded remains of what appears to be clothing."
|
||||
icon_state = "shreds"
|
||||
gender = PLURAL
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/ex_act(severity, target)
|
||||
if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion.
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/Initialize()
|
||||
pixel_x = rand(-10, 10)
|
||||
pixel_y = rand(-10, 10)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/salt
|
||||
name = "salt pile"
|
||||
desc = "A sizable pile of table salt. Someone must be upset."
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
icon_state = "salt_pile"
|
||||
gender = NEUTER
|
||||
|
||||
/obj/effect/decal/cleanable/glitter
|
||||
name = "generic glitter pile"
|
||||
desc = "The herpes of arts and crafts."
|
||||
icon = 'icons/effects/atmospherics.dmi'
|
||||
gender = NEUTER
|
||||
|
||||
/obj/effect/decal/cleanable/glitter/pink
|
||||
name = "pink glitter"
|
||||
icon_state = "plasma_old"
|
||||
|
||||
/obj/effect/decal/cleanable/glitter/white
|
||||
name = "white glitter"
|
||||
icon_state = "nitrous_oxide_old"
|
||||
|
||||
/obj/effect/decal/cleanable/glitter/blue
|
||||
name = "blue glitter"
|
||||
icon_state = "freon_old"
|
||||
|
||||
/obj/effect/decal/cleanable/plasma
|
||||
name = "stabilized plasma"
|
||||
desc = "A puddle of stabilized plasma."
|
||||
icon_state = "flour"
|
||||
color = "#9e0089"
|
||||
|
||||
/obj/effect/decal/cleanable/insectguts
|
||||
name = "insect guts"
|
||||
desc = "One bug squashed. Four more will rise in its place."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris
|
||||
name = "robot debris"
|
||||
desc = "It's a useless heap of junk... <i>or is it?</i>"
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "gib1"
|
||||
layer = LOW_OBJ_LAYER
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
|
||||
blood_state = BLOOD_STATE_OIL
|
||||
bloodiness = BLOOD_AMOUNT_PER_DECAL
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/liquidgibs, 5)
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
|
||||
set waitfor = 0
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
|
||||
sleep(2)
|
||||
if (i > 0)
|
||||
if (prob(40))
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
else if (prob(10))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if (!step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
random_icon_states = list("gibarm", "gibleg")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/oil
|
||||
name = "motor oil"
|
||||
desc = "It's black and greasy. Looks like Beepsky made another mess."
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
blood_state = BLOOD_STATE_OIL
|
||||
bloodiness = BLOOD_AMOUNT_PER_DECAL
|
||||
|
||||
/obj/effect/decal/cleanable/oil/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/oil, 30)
|
||||
reagents.add_reagent(/datum/reagent/liquidgibs/oil, 5)
|
||||
|
||||
/obj/effect/decal/cleanable/oil/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
|
||||
/obj/effect/decal/cleanable/oil/slippery
|
||||
|
||||
/obj/effect/decal/cleanable/oil/slippery/Initialize()
|
||||
AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE))
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris
|
||||
name = "robot debris"
|
||||
desc = "It's a useless heap of junk... <i>or is it?</i>"
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "gib1"
|
||||
layer = LOW_OBJ_LAYER
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
|
||||
blood_state = BLOOD_STATE_OIL
|
||||
bloodiness = BLOOD_AMOUNT_PER_DECAL
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/liquidgibs, 5)
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
|
||||
set waitfor = 0
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
|
||||
sleep(2)
|
||||
if (i > 0)
|
||||
if (prob(40))
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
else if (prob(10))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if (!step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
random_icon_states = list("gibarm", "gibleg")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/oil
|
||||
name = "motor oil"
|
||||
desc = "It's black and greasy. Looks like Beepsky made another mess."
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
blood_state = BLOOD_STATE_OIL
|
||||
bloodiness = BLOOD_AMOUNT_PER_DECAL
|
||||
|
||||
/obj/effect/decal/cleanable/oil/Initialize()
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/oil, 30)
|
||||
reagents.add_reagent(/datum/reagent/liquidgibs/oil, 5)
|
||||
|
||||
/obj/effect/decal/cleanable/oil/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
|
||||
/obj/effect/decal/cleanable/oil/slippery
|
||||
|
||||
/obj/effect/decal/cleanable/oil/slippery/Initialize()
|
||||
AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE))
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/obj/effect/decal/cleanable/crayon
|
||||
name = "rune"
|
||||
desc = "Graffiti. Damn kids."
|
||||
icon = 'icons/effects/crayondecal.dmi'
|
||||
icon_state = "rune1"
|
||||
plane = GAME_PLANE //makes the graffiti visible over a wall.
|
||||
gender = NEUTER
|
||||
mergeable_decal = FALSE
|
||||
var/do_icon_rotate = TRUE
|
||||
var/rotation = 0
|
||||
var/paint_colour = "#FFFFFF"
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main, type, e_name, graf_rot, alt_icon = null)
|
||||
. = ..()
|
||||
|
||||
if(e_name)
|
||||
name = e_name
|
||||
desc = "A [name] vandalizing the station."
|
||||
if(alt_icon)
|
||||
icon = alt_icon
|
||||
if(type)
|
||||
icon_state = type
|
||||
if(graf_rot)
|
||||
rotation = graf_rot
|
||||
if(rotation && do_icon_rotate)
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(rotation)
|
||||
src.transform = M
|
||||
if(main)
|
||||
paint_colour = main
|
||||
add_atom_colour(paint_colour, FIXED_COLOUR_PRIORITY)
|
||||
/obj/effect/decal/cleanable/crayon
|
||||
name = "rune"
|
||||
desc = "Graffiti. Damn kids."
|
||||
icon = 'icons/effects/crayondecal.dmi'
|
||||
icon_state = "rune1"
|
||||
plane = GAME_PLANE //makes the graffiti visible over a wall.
|
||||
gender = NEUTER
|
||||
mergeable_decal = FALSE
|
||||
var/do_icon_rotate = TRUE
|
||||
var/rotation = 0
|
||||
var/paint_colour = "#FFFFFF"
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main, type, e_name, graf_rot, alt_icon = null)
|
||||
. = ..()
|
||||
|
||||
if(e_name)
|
||||
name = e_name
|
||||
desc = "A [name] vandalizing the station."
|
||||
if(alt_icon)
|
||||
icon = alt_icon
|
||||
if(type)
|
||||
icon_state = type
|
||||
if(graf_rot)
|
||||
rotation = graf_rot
|
||||
if(rotation && do_icon_rotate)
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(rotation)
|
||||
src.transform = M
|
||||
if(main)
|
||||
paint_colour = main
|
||||
add_atom_colour(paint_colour, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
/obj/effect/decal
|
||||
name = "decal"
|
||||
plane = FLOOR_PLANE
|
||||
anchored = TRUE
|
||||
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/turf_loc_check = TRUE
|
||||
|
||||
/obj/effect/decal/Initialize()
|
||||
. = ..()
|
||||
if(turf_loc_check && (!isturf(loc) || NeverShouldHaveComeHere(loc)))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/decal/blob_act(obj/structure/blob/B)
|
||||
if(B && B.loc == loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/proc/NeverShouldHaveComeHere(turf/T)
|
||||
return isclosedturf(T) || isgroundlessturf(T)
|
||||
|
||||
/obj/effect/decal/ex_act(severity, target)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/fire_act(exposed_temperature, exposed_volume)
|
||||
if(!(resistance_flags & FIRE_PROOF)) //non fire proof decal or being burned by lava
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/HandleTurfChange(turf/T)
|
||||
..()
|
||||
if(T == loc && NeverShouldHaveComeHere(T))
|
||||
qdel(src)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/effect/turf_decal
|
||||
icon = 'icons/turf/decals.dmi'
|
||||
icon_state = "warningline"
|
||||
layer = TURF_DECAL_LAYER
|
||||
|
||||
/obj/effect/turf_decal/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/turf_decal/ComponentInitialize()
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
if(!istype(T)) //you know this will happen somehow
|
||||
CRASH("Turf decal initialized in an object/nullspace")
|
||||
T.AddComponent(/datum/component/decal, icon, icon_state, dir, CLEAN_GOD, color, null, null, alpha)
|
||||
/obj/effect/decal
|
||||
name = "decal"
|
||||
plane = FLOOR_PLANE
|
||||
anchored = TRUE
|
||||
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/turf_loc_check = TRUE
|
||||
|
||||
/obj/effect/decal/Initialize()
|
||||
. = ..()
|
||||
if(turf_loc_check && (!isturf(loc) || NeverShouldHaveComeHere(loc)))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/decal/blob_act(obj/structure/blob/B)
|
||||
if(B && B.loc == loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/proc/NeverShouldHaveComeHere(turf/T)
|
||||
return isclosedturf(T) || isgroundlessturf(T)
|
||||
|
||||
/obj/effect/decal/ex_act(severity, target)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/fire_act(exposed_temperature, exposed_volume)
|
||||
if(!(resistance_flags & FIRE_PROOF)) //non fire proof decal or being burned by lava
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/HandleTurfChange(turf/T)
|
||||
..()
|
||||
if(T == loc && NeverShouldHaveComeHere(T))
|
||||
qdel(src)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/effect/turf_decal
|
||||
icon = 'icons/turf/decals.dmi'
|
||||
icon_state = "warningline"
|
||||
layer = TURF_DECAL_LAYER
|
||||
|
||||
/obj/effect/turf_decal/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/turf_decal/ComponentInitialize()
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
if(!istype(T)) //you know this will happen somehow
|
||||
CRASH("Turf decal initialized in an object/nullspace")
|
||||
T.AddComponent(/datum/component/decal, icon, icon_state, dir, CLEAN_GOD, color, null, null, alpha)
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/obj/effect/temp_visual/point
|
||||
name = "pointer"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = POINT_LAYER
|
||||
duration = 25
|
||||
|
||||
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
|
||||
. = ..()
|
||||
var/atom/old_loc = loc
|
||||
loc = get_turf(src) // We don't want to actualy trigger anything when it moves
|
||||
pixel_x = old_loc.pixel_x
|
||||
pixel_y = old_loc.pixel_y
|
||||
invisibility = set_invis
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/effect/decal/chempuff/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/effect/decal/fakelattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = TRUE
|
||||
/obj/effect/temp_visual/point
|
||||
name = "pointer"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = POINT_LAYER
|
||||
duration = 25
|
||||
|
||||
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
|
||||
. = ..()
|
||||
var/atom/old_loc = loc
|
||||
loc = get_turf(src) // We don't want to actualy trigger anything when it moves
|
||||
pixel_x = old_loc.pixel_x
|
||||
pixel_y = old_loc.pixel_y
|
||||
invisibility = set_invis
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/effect/decal/chempuff/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/effect/decal/fakelattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = TRUE
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/obj/effect/decal/remains
|
||||
name = "remains"
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
|
||||
/obj/effect/decal/remains/acid_act()
|
||||
visible_message("<span class='warning'>[src] dissolve[gender==PLURAL?"":"s"] into a puddle of sizzling goop!</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 150, 1)
|
||||
new /obj/effect/decal/cleanable/greenglow(drop_location())
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/remains/human
|
||||
desc = "They look like human remains. They have a strange aura about them."
|
||||
icon_state = "remains"
|
||||
|
||||
/obj/effect/decal/remains/plasma
|
||||
icon_state = "remainsplasma"
|
||||
|
||||
/obj/effect/decal/remains/xeno
|
||||
desc = "They look like the remains of something... alien. They have a strange aura about them."
|
||||
icon_state = "remainsxeno"
|
||||
|
||||
/obj/effect/decal/remains/xeno/larva
|
||||
icon_state = "remainslarva"
|
||||
|
||||
/obj/effect/decal/remains/robot
|
||||
desc = "They look like the remains of something mechanical. They have a strange aura about them."
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "remainsrobot"
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/old
|
||||
name = "dusty robot debris"
|
||||
desc = "Looks like nobody has touched this in a while."
|
||||
/obj/effect/decal/remains
|
||||
name = "remains"
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
|
||||
/obj/effect/decal/remains/acid_act()
|
||||
visible_message("<span class='warning'>[src] dissolve[gender==PLURAL?"":"s"] into a puddle of sizzling goop!</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 150, 1)
|
||||
new /obj/effect/decal/cleanable/greenglow(drop_location())
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/remains/human
|
||||
desc = "They look like human remains. They have a strange aura about them."
|
||||
icon_state = "remains"
|
||||
|
||||
/obj/effect/decal/remains/plasma
|
||||
icon_state = "remainsplasma"
|
||||
|
||||
/obj/effect/decal/remains/xeno
|
||||
desc = "They look like the remains of something... alien. They have a strange aura about them."
|
||||
icon_state = "remainsxeno"
|
||||
|
||||
/obj/effect/decal/remains/xeno/larva
|
||||
icon_state = "remainslarva"
|
||||
|
||||
/obj/effect/decal/remains/robot
|
||||
desc = "They look like the remains of something mechanical. They have a strange aura about them."
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "remainsrobot"
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/old
|
||||
name = "dusty robot debris"
|
||||
desc = "Looks like nobody has touched this in a while."
|
||||
|
||||
@@ -1,347 +1,347 @@
|
||||
// Foam
|
||||
// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin.
|
||||
#define ALUMINUM_FOAM 1
|
||||
#define IRON_FOAM 2
|
||||
#define RESIN_FOAM 3
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = EDGED_TURF_LAYER
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
var/amount = 3
|
||||
animate_movement = 0
|
||||
var/metal = 0
|
||||
var/lifetime = 40
|
||||
var/reagent_divisor = 7
|
||||
var/static/list/blacklisted_turfs = typecacheof(list(
|
||||
/turf/open/space/transit,
|
||||
/turf/open/chasm,
|
||||
/turf/open/lava))
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting
|
||||
name = "firefighting foam"
|
||||
lifetime = 20 //doesn't last as long as normal foam
|
||||
amount = 0 //no spread
|
||||
var/absorbed_plasma = 0
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/MakeSlippery()
|
||||
return
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/process()
|
||||
..()
|
||||
|
||||
var/turf/open/T = get_turf(src)
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot && istype(T) && T.air)
|
||||
qdel(hotspot)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
var/plas_amt = min(30,G.gases[/datum/gas/plasma]) //Absorb some plasma
|
||||
G.gases[/datum/gas/plasma] -= plas_amt
|
||||
absorbed_plasma += plas_amt
|
||||
if(G.temperature > T20C)
|
||||
G.temperature = max(G.temperature/2,T20C)
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
T.air_update_turf()
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/kill_foam()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
if(absorbed_plasma)
|
||||
var/obj/effect/decal/cleanable/plasma/P = (locate(/obj/effect/decal/cleanable/plasma) in get_turf(src))
|
||||
if(!P)
|
||||
P = new(loc)
|
||||
P.reagents.add_reagent(/datum/reagent/stable_plasma, absorbed_plasma)
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/foam_mob(mob/living/L)
|
||||
if(!istype(L))
|
||||
return
|
||||
L.adjust_fire_stacks(-2)
|
||||
L.ExtinguishMob()
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
/obj/effect/particle_effect/foam/metal
|
||||
name = "aluminium foam"
|
||||
metal = ALUMINUM_FOAM
|
||||
icon_state = "mfoam"
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/MakeSlippery()
|
||||
return
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/smart
|
||||
name = "smart foam"
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/iron
|
||||
name = "iron foam"
|
||||
metal = IRON_FOAM
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/resin
|
||||
name = "resin foam"
|
||||
metal = RESIN_FOAM
|
||||
|
||||
/obj/effect/particle_effect/foam/long_life
|
||||
lifetime = 150
|
||||
|
||||
/obj/effect/particle_effect/foam/Initialize()
|
||||
. = ..()
|
||||
MakeSlippery()
|
||||
create_reagents(1000) //limited by the size of the reagent holder anyway.
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/MakeSlippery()
|
||||
AddComponent(/datum/component/slippery, 100)
|
||||
|
||||
/obj/effect/particle_effect/foam/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/kill_foam()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
switch(metal)
|
||||
if(ALUMINUM_FOAM)
|
||||
new /obj/structure/foamedmetal(get_turf(src))
|
||||
if(IRON_FOAM)
|
||||
new /obj/structure/foamedmetal/iron(get_turf(src))
|
||||
if(RESIN_FOAM)
|
||||
new /obj/structure/foamedmetal/resin(get_turf(src))
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/obj/effect/particle_effect/foam/smart/kill_foam() //Smart foam adheres to area borders for walls
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
if(metal)
|
||||
var/turf/T = get_turf(src)
|
||||
if(isspaceturf(T)) //Block up any exposed space
|
||||
T.PlaceOnTop(/turf/open/floor/plating/foam, flags = CHANGETURF_INHERIT_AIR)
|
||||
for(var/direction in GLOB.cardinals)
|
||||
var/turf/cardinal_turf = get_step(T, direction)
|
||||
if(get_area(cardinal_turf) != get_area(T)) //We're at an area boundary, so let's block off this turf!
|
||||
new/obj/structure/foamedmetal(T)
|
||||
break
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/obj/effect/particle_effect/foam/process()
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_foam()
|
||||
return
|
||||
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
for(var/obj/O in range(0,src))
|
||||
if(O.type == src.type)
|
||||
continue
|
||||
if(isturf(O.loc))
|
||||
var/turf/T = O.loc
|
||||
if(T.intact && O.level == 1) //hidden under the floor
|
||||
continue
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(O, VAPOR, fraction)
|
||||
var/hit = 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
hit += foam_mob(L)
|
||||
if(hit)
|
||||
lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate.
|
||||
var/T = get_turf(src)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(T, VAPOR, fraction)
|
||||
|
||||
if(--amount < 0)
|
||||
return
|
||||
spread_foam()
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(!istype(L))
|
||||
return 0
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(L, VAPOR, fraction)
|
||||
lifetime--
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/spread_foam()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
var/obj/effect/particle_effect/foam/foundfoam = locate() in T //Don't spread foam where there's already foam!
|
||||
if(foundfoam)
|
||||
continue
|
||||
|
||||
if(is_type_in_typecache(T, blacklisted_turfs))
|
||||
continue
|
||||
|
||||
for(var/mob/living/L in T)
|
||||
foam_mob(L)
|
||||
var/obj/effect/particle_effect/foam/F = new src.type(T)
|
||||
F.amount = amount
|
||||
reagents.copy_to(F, (reagents.total_volume))
|
||||
F.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
F.metal = metal
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(prob(max(0, exposed_temperature - 475))) //foam dissolves when heated
|
||||
kill_foam()
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
|
||||
///////////////////////////////////////////////
|
||||
//FOAM EFFECT DATUM
|
||||
/datum/effect_system/foam_spread
|
||||
var/amount = 10 // the size of the foam spread.
|
||||
var/obj/chemholder
|
||||
effect_type = /obj/effect/particle_effect/foam
|
||||
var/metal = 0
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/metal
|
||||
effect_type = /obj/effect/particle_effect/foam/metal
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/metal/smart
|
||||
effect_type = /obj/effect/particle_effect/foam/smart
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/long
|
||||
effect_type = /obj/effect/particle_effect/foam/long_life
|
||||
|
||||
/datum/effect_system/foam_spread/New()
|
||||
..()
|
||||
chemholder = new /obj()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
/datum/effect_system/foam_spread/Destroy()
|
||||
qdel(chemholder)
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
amount = round(sqrt(amt / 2), 1)
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
|
||||
/datum/effect_system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype)
|
||||
..()
|
||||
metal = metaltype
|
||||
|
||||
/datum/effect_system/foam_spread/start()
|
||||
var/obj/effect/particle_effect/foam/F = new effect_type(location)
|
||||
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount)
|
||||
F.add_atom_colour(foamcolor, FIXED_COLOUR_PRIORITY)
|
||||
F.amount = amount
|
||||
F.metal = metal
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// FOAM STRUCTURE. Formed by metal foams. Dense and opaque, but easy to break
|
||||
/obj/structure/foamedmetal
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "metalfoam"
|
||||
density = TRUE
|
||||
opacity = 1 // changed in New()
|
||||
anchored = TRUE
|
||||
layer = EDGED_TURF_LAYER
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
gender = PLURAL
|
||||
max_integrity = 20
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
|
||||
/obj/structure/foamedmetal/Initialize()
|
||||
. = ..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/foamedmetal/Move()
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/foamedmetal/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
to_chat(user, "<span class='warning'>You hit [src] but bounce off it!</span>")
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target)
|
||||
return !density
|
||||
|
||||
/obj/structure/foamedmetal/iron
|
||||
max_integrity = 50
|
||||
icon_state = "ironfoam"
|
||||
|
||||
//Atmos Backpack Resin, transparent, prevents atmos and filters the air
|
||||
/obj/structure/foamedmetal/resin
|
||||
name = "\improper ATMOS Resin"
|
||||
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature."
|
||||
opacity = FALSE
|
||||
icon_state = "atmos_resin"
|
||||
alpha = 120
|
||||
max_integrity = 10
|
||||
|
||||
/obj/structure/foamedmetal/resin/Initialize()
|
||||
. = ..()
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/O = loc
|
||||
O.ClearWet()
|
||||
if(O.air)
|
||||
var/datum/gas_mixture/G = O.air
|
||||
G.temperature = 293.15
|
||||
for(var/obj/effect/hotspot/H in O)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
for(var/I in G_gases)
|
||||
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
|
||||
continue
|
||||
G_gases[I] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
O.air_update_turf()
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in O)
|
||||
if(!U.welded)
|
||||
U.welded = TRUE
|
||||
U.update_icon()
|
||||
U.visible_message("<span class='danger'>[U] sealed shut!</span>")
|
||||
for(var/mob/living/L in O)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in O)
|
||||
Item.extinguish()
|
||||
|
||||
/obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSGLASS))
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
#undef ALUMINUM_FOAM
|
||||
#undef IRON_FOAM
|
||||
#undef RESIN_FOAM
|
||||
// Foam
|
||||
// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin.
|
||||
#define ALUMINUM_FOAM 1
|
||||
#define IRON_FOAM 2
|
||||
#define RESIN_FOAM 3
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = EDGED_TURF_LAYER
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
var/amount = 3
|
||||
animate_movement = 0
|
||||
var/metal = 0
|
||||
var/lifetime = 40
|
||||
var/reagent_divisor = 7
|
||||
var/static/list/blacklisted_turfs = typecacheof(list(
|
||||
/turf/open/space/transit,
|
||||
/turf/open/chasm,
|
||||
/turf/open/lava))
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting
|
||||
name = "firefighting foam"
|
||||
lifetime = 20 //doesn't last as long as normal foam
|
||||
amount = 0 //no spread
|
||||
var/absorbed_plasma = 0
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/MakeSlippery()
|
||||
return
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/process()
|
||||
..()
|
||||
|
||||
var/turf/open/T = get_turf(src)
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot && istype(T) && T.air)
|
||||
qdel(hotspot)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
var/plas_amt = min(30,G.gases[/datum/gas/plasma]) //Absorb some plasma
|
||||
G.gases[/datum/gas/plasma] -= plas_amt
|
||||
absorbed_plasma += plas_amt
|
||||
if(G.temperature > T20C)
|
||||
G.temperature = max(G.temperature/2,T20C)
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
T.air_update_turf()
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/kill_foam()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
if(absorbed_plasma)
|
||||
var/obj/effect/decal/cleanable/plasma/P = (locate(/obj/effect/decal/cleanable/plasma) in get_turf(src))
|
||||
if(!P)
|
||||
P = new(loc)
|
||||
P.reagents.add_reagent(/datum/reagent/stable_plasma, absorbed_plasma)
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/foam_mob(mob/living/L)
|
||||
if(!istype(L))
|
||||
return
|
||||
L.adjust_fire_stacks(-2)
|
||||
L.ExtinguishMob()
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
/obj/effect/particle_effect/foam/metal
|
||||
name = "aluminium foam"
|
||||
metal = ALUMINUM_FOAM
|
||||
icon_state = "mfoam"
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/MakeSlippery()
|
||||
return
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/smart
|
||||
name = "smart foam"
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/iron
|
||||
name = "iron foam"
|
||||
metal = IRON_FOAM
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/resin
|
||||
name = "resin foam"
|
||||
metal = RESIN_FOAM
|
||||
|
||||
/obj/effect/particle_effect/foam/long_life
|
||||
lifetime = 150
|
||||
|
||||
/obj/effect/particle_effect/foam/Initialize()
|
||||
. = ..()
|
||||
MakeSlippery()
|
||||
create_reagents(1000) //limited by the size of the reagent holder anyway.
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/MakeSlippery()
|
||||
AddComponent(/datum/component/slippery, 100)
|
||||
|
||||
/obj/effect/particle_effect/foam/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/kill_foam()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
switch(metal)
|
||||
if(ALUMINUM_FOAM)
|
||||
new /obj/structure/foamedmetal(get_turf(src))
|
||||
if(IRON_FOAM)
|
||||
new /obj/structure/foamedmetal/iron(get_turf(src))
|
||||
if(RESIN_FOAM)
|
||||
new /obj/structure/foamedmetal/resin(get_turf(src))
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/obj/effect/particle_effect/foam/smart/kill_foam() //Smart foam adheres to area borders for walls
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
if(metal)
|
||||
var/turf/T = get_turf(src)
|
||||
if(isspaceturf(T)) //Block up any exposed space
|
||||
T.PlaceOnTop(/turf/open/floor/plating/foam, flags = CHANGETURF_INHERIT_AIR)
|
||||
for(var/direction in GLOB.cardinals)
|
||||
var/turf/cardinal_turf = get_step(T, direction)
|
||||
if(get_area(cardinal_turf) != get_area(T)) //We're at an area boundary, so let's block off this turf!
|
||||
new/obj/structure/foamedmetal(T)
|
||||
break
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/obj/effect/particle_effect/foam/process()
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_foam()
|
||||
return
|
||||
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
for(var/obj/O in range(0,src))
|
||||
if(O.type == src.type)
|
||||
continue
|
||||
if(isturf(O.loc))
|
||||
var/turf/T = O.loc
|
||||
if(T.intact && O.level == 1) //hidden under the floor
|
||||
continue
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(O, VAPOR, fraction)
|
||||
var/hit = 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
hit += foam_mob(L)
|
||||
if(hit)
|
||||
lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate.
|
||||
var/T = get_turf(src)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(T, VAPOR, fraction)
|
||||
|
||||
if(--amount < 0)
|
||||
return
|
||||
spread_foam()
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(!istype(L))
|
||||
return 0
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(L, VAPOR, fraction)
|
||||
lifetime--
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/spread_foam()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
var/obj/effect/particle_effect/foam/foundfoam = locate() in T //Don't spread foam where there's already foam!
|
||||
if(foundfoam)
|
||||
continue
|
||||
|
||||
if(is_type_in_typecache(T, blacklisted_turfs))
|
||||
continue
|
||||
|
||||
for(var/mob/living/L in T)
|
||||
foam_mob(L)
|
||||
var/obj/effect/particle_effect/foam/F = new src.type(T)
|
||||
F.amount = amount
|
||||
reagents.copy_to(F, (reagents.total_volume))
|
||||
F.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
F.metal = metal
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(prob(max(0, exposed_temperature - 475))) //foam dissolves when heated
|
||||
kill_foam()
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
|
||||
///////////////////////////////////////////////
|
||||
//FOAM EFFECT DATUM
|
||||
/datum/effect_system/foam_spread
|
||||
var/amount = 10 // the size of the foam spread.
|
||||
var/obj/chemholder
|
||||
effect_type = /obj/effect/particle_effect/foam
|
||||
var/metal = 0
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/metal
|
||||
effect_type = /obj/effect/particle_effect/foam/metal
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/metal/smart
|
||||
effect_type = /obj/effect/particle_effect/foam/smart
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/long
|
||||
effect_type = /obj/effect/particle_effect/foam/long_life
|
||||
|
||||
/datum/effect_system/foam_spread/New()
|
||||
..()
|
||||
chemholder = new /obj()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
/datum/effect_system/foam_spread/Destroy()
|
||||
qdel(chemholder)
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
amount = round(sqrt(amt / 2), 1)
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
|
||||
/datum/effect_system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype)
|
||||
..()
|
||||
metal = metaltype
|
||||
|
||||
/datum/effect_system/foam_spread/start()
|
||||
var/obj/effect/particle_effect/foam/F = new effect_type(location)
|
||||
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount)
|
||||
F.add_atom_colour(foamcolor, FIXED_COLOUR_PRIORITY)
|
||||
F.amount = amount
|
||||
F.metal = metal
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// FOAM STRUCTURE. Formed by metal foams. Dense and opaque, but easy to break
|
||||
/obj/structure/foamedmetal
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "metalfoam"
|
||||
density = TRUE
|
||||
opacity = 1 // changed in New()
|
||||
anchored = TRUE
|
||||
layer = EDGED_TURF_LAYER
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
gender = PLURAL
|
||||
max_integrity = 20
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
|
||||
/obj/structure/foamedmetal/Initialize()
|
||||
. = ..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/foamedmetal/Move()
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/foamedmetal/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
to_chat(user, "<span class='warning'>You hit [src] but bounce off it!</span>")
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target)
|
||||
return !density
|
||||
|
||||
/obj/structure/foamedmetal/iron
|
||||
max_integrity = 50
|
||||
icon_state = "ironfoam"
|
||||
|
||||
//Atmos Backpack Resin, transparent, prevents atmos and filters the air
|
||||
/obj/structure/foamedmetal/resin
|
||||
name = "\improper ATMOS Resin"
|
||||
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature."
|
||||
opacity = FALSE
|
||||
icon_state = "atmos_resin"
|
||||
alpha = 120
|
||||
max_integrity = 10
|
||||
|
||||
/obj/structure/foamedmetal/resin/Initialize()
|
||||
. = ..()
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/O = loc
|
||||
O.ClearWet()
|
||||
if(O.air)
|
||||
var/datum/gas_mixture/G = O.air
|
||||
G.temperature = 293.15
|
||||
for(var/obj/effect/hotspot/H in O)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
for(var/I in G_gases)
|
||||
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
|
||||
continue
|
||||
G_gases[I] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
O.air_update_turf()
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in O)
|
||||
if(!U.welded)
|
||||
U.welded = TRUE
|
||||
U.update_icon()
|
||||
U.visible_message("<span class='danger'>[U] sealed shut!</span>")
|
||||
for(var/mob/living/L in O)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in O)
|
||||
Item.extinguish()
|
||||
|
||||
/obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSGLASS))
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
#undef ALUMINUM_FOAM
|
||||
#undef IRON_FOAM
|
||||
#undef RESIN_FOAM
|
||||
|
||||
@@ -104,15 +104,4 @@
|
||||
if(explosion_message)
|
||||
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
|
||||
"<span class='italics'>You hear an explosion!</span>")
|
||||
if (amount < 1)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/mob/living/L in viewers(1, location))
|
||||
if(prob(50 * amount))
|
||||
to_chat(L, "<span class='danger'>The explosion knocks you down.</span>")
|
||||
L.Knockdown(rand(20,100))
|
||||
return
|
||||
else
|
||||
dyn_explosion(location, amount, flashing_factor)
|
||||
dyn_explosion(location, amount, flashing_factor)
|
||||
@@ -1,328 +1,328 @@
|
||||
/////////////////////////////////////////////
|
||||
//// SMOKE SYSTEMS
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke
|
||||
name = "smoke"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "smoke"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
opacity = 0
|
||||
layer = FLY_LAYER
|
||||
anchored = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
animate_movement = 0
|
||||
var/amount = 4
|
||||
var/lifetime = 5
|
||||
var/opaque = 1 //whether the smoke can block the view when in enough amount
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16)
|
||||
if(alpha == 0) //Handle already transparent case
|
||||
return
|
||||
if(frames == 0)
|
||||
frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame".
|
||||
var/step = alpha / frames
|
||||
for(var/i = 0, i < frames, i++)
|
||||
alpha -= step
|
||||
if(alpha < 160)
|
||||
set_opacity(0) //if we were blocking view, we aren't now because we're fading out
|
||||
stoplag()
|
||||
|
||||
/obj/effect/particle_effect/smoke/Initialize()
|
||||
. = ..()
|
||||
create_reagents(500)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/kill_smoke()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
INVOKE_ASYNC(src, .proc/fade_out)
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/particle_effect/smoke/process()
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_smoke()
|
||||
return 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
smoke_mob(L)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C)
|
||||
if(!istype(C))
|
||||
return 0
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
if(C.smoke_delay)
|
||||
return 0
|
||||
C.smoke_delay++
|
||||
addtimer(CALLBACK(src, .proc/remove_smoke_delay, C), 10)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
|
||||
if(C)
|
||||
C.smoke_delay = 0
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/spread_smoke()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
if(!t_loc)
|
||||
return
|
||||
var/list/newsmokes = list()
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
var/obj/effect/particle_effect/smoke/foundsmoke = locate() in T //Don't spread smoke where there's already smoke!
|
||||
if(foundsmoke)
|
||||
continue
|
||||
for(var/mob/living/L in T)
|
||||
smoke_mob(L)
|
||||
var/obj/effect/particle_effect/smoke/S = new type(T)
|
||||
reagents.copy_to(S, reagents.total_volume)
|
||||
S.setDir(pick(GLOB.cardinals))
|
||||
S.amount = amount-1
|
||||
S.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
S.lifetime = lifetime
|
||||
if(S.amount>0)
|
||||
if(opaque)
|
||||
S.set_opacity(TRUE)
|
||||
newsmokes.Add(S)
|
||||
|
||||
if(newsmokes.len)
|
||||
spawn(1) //the smoke spreads rapidly but not instantly
|
||||
for(var/obj/effect/particle_effect/smoke/SM in newsmokes)
|
||||
SM.spread_smoke()
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread
|
||||
var/amount = 10
|
||||
effect_type = /obj/effect/particle_effect/smoke
|
||||
|
||||
/datum/effect_system/smoke_spread/set_up(radius = 5, loca)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
amount = radius
|
||||
|
||||
/datum/effect_system/smoke_spread/start()
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/S = new effect_type(location)
|
||||
S.amount = amount
|
||||
if(S.amount)
|
||||
S.spread_smoke()
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Bad smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad
|
||||
lifetime = 8
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.drop_all_held_items()
|
||||
M.adjustOxyLoss(1)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/beam/B = mover
|
||||
B.damage = (B.damage/2)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/bad
|
||||
effect_type = /obj/effect/particle_effect/smoke/bad
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Nanofrost smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/freezing
|
||||
name = "nanofrost smoke"
|
||||
color = "#B2FFFF"
|
||||
opaque = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing
|
||||
effect_type = /obj/effect/particle_effect/smoke/freezing
|
||||
var/blast = 0
|
||||
var/temperature = 2
|
||||
var/weldvents = TRUE
|
||||
var/distcheck = TRUE
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
|
||||
if(isopenturf(A))
|
||||
var/turf/open/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(!distcheck || get_dist(T, location) < blast) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = temperature
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
if(G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/nitrogen] += (G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/plasma] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
if (weldvents)
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
|
||||
U.welded = TRUE
|
||||
U.update_icon()
|
||||
U.visible_message("<span class='danger'>[U] was frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in T)
|
||||
Item.extinguish()
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/set_up(radius = 5, loca, blast_radius = 0)
|
||||
..()
|
||||
blast = blast_radius
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/start()
|
||||
if(blast)
|
||||
for(var/turf/T in RANGE_TURFS(blast, location))
|
||||
Chilled(T)
|
||||
..()
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/decon
|
||||
temperature = 293.15
|
||||
distcheck = FALSE
|
||||
weldvents = FALSE
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Sleep smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping
|
||||
color = "#9C3636"
|
||||
lifetime = 10
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.Sleeping(200)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/datum/effect_system/smoke_spread/sleeping
|
||||
effect_type = /obj/effect/particle_effect/smoke/sleeping
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Chem smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem
|
||||
lifetime = 10
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/process()
|
||||
if(..())
|
||||
var/turf/T = get_turf(src)
|
||||
var/fraction = 1/initial(lifetime)
|
||||
for(var/atom/movable/AM in T)
|
||||
if(AM.type == src.type)
|
||||
continue
|
||||
if(T.intact && AM.level == 1) //hidden under the floor
|
||||
continue
|
||||
reagents.reaction(AM, TOUCH, fraction)
|
||||
|
||||
reagents.reaction(T, TOUCH, fraction)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(!istype(M))
|
||||
return 0
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
var/fraction = 1/initial(lifetime)
|
||||
reagents.copy_to(C, fraction*reagents.total_volume)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/chem
|
||||
var/obj/chemholder
|
||||
effect_type = /obj/effect/particle_effect/smoke/chem
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/New()
|
||||
..()
|
||||
chemholder = new /obj()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/Destroy()
|
||||
qdel(chemholder)
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = FALSE)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
amount = radius
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
|
||||
if(!silent)
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
|
||||
var/where = "[AREACOORD(location)]"
|
||||
if(carry.my_atom && carry.my_atom.fingerprintslast)
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "[ADMIN_LOOKUPFLW(M)] "
|
||||
message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. Key: [more ? more : carry.my_atom.fingerprintslast].")
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. No associated key.")
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/start()
|
||||
var/mixcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location)
|
||||
|
||||
if(chemholder.reagents.total_volume > 1) // can't split 1 very well
|
||||
chemholder.reagents.copy_to(S, chemholder.reagents.total_volume)
|
||||
|
||||
if(mixcolor)
|
||||
S.add_atom_colour(mixcolor, FIXED_COLOUR_PRIORITY) // give the smoke color, if it has any to begin with
|
||||
S.amount = amount
|
||||
if(S.amount)
|
||||
S.spread_smoke() //calling process right now so the smoke immediately attacks mobs.
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Transparent smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
//Same as the base type, but the smoke produced is not opaque
|
||||
/datum/effect_system/smoke_spread/transparent
|
||||
effect_type = /obj/effect/particle_effect/smoke/transparent
|
||||
|
||||
/obj/effect/particle_effect/smoke/transparent
|
||||
opaque = FALSE
|
||||
/////////////////////////////////////////////
|
||||
//// SMOKE SYSTEMS
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke
|
||||
name = "smoke"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "smoke"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
opacity = 0
|
||||
layer = FLY_LAYER
|
||||
anchored = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
animate_movement = 0
|
||||
var/amount = 4
|
||||
var/lifetime = 5
|
||||
var/opaque = 1 //whether the smoke can block the view when in enough amount
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16)
|
||||
if(alpha == 0) //Handle already transparent case
|
||||
return
|
||||
if(frames == 0)
|
||||
frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame".
|
||||
var/step = alpha / frames
|
||||
for(var/i = 0, i < frames, i++)
|
||||
alpha -= step
|
||||
if(alpha < 160)
|
||||
set_opacity(0) //if we were blocking view, we aren't now because we're fading out
|
||||
stoplag()
|
||||
|
||||
/obj/effect/particle_effect/smoke/Initialize()
|
||||
. = ..()
|
||||
create_reagents(500)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/kill_smoke()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
INVOKE_ASYNC(src, .proc/fade_out)
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/particle_effect/smoke/process()
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_smoke()
|
||||
return 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
smoke_mob(L)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C)
|
||||
if(!istype(C))
|
||||
return 0
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
if(C.smoke_delay)
|
||||
return 0
|
||||
C.smoke_delay++
|
||||
addtimer(CALLBACK(src, .proc/remove_smoke_delay, C), 10)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
|
||||
if(C)
|
||||
C.smoke_delay = 0
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/spread_smoke()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
if(!t_loc)
|
||||
return
|
||||
var/list/newsmokes = list()
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
var/obj/effect/particle_effect/smoke/foundsmoke = locate() in T //Don't spread smoke where there's already smoke!
|
||||
if(foundsmoke)
|
||||
continue
|
||||
for(var/mob/living/L in T)
|
||||
smoke_mob(L)
|
||||
var/obj/effect/particle_effect/smoke/S = new type(T)
|
||||
reagents.copy_to(S, reagents.total_volume)
|
||||
S.setDir(pick(GLOB.cardinals))
|
||||
S.amount = amount-1
|
||||
S.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
S.lifetime = lifetime
|
||||
if(S.amount>0)
|
||||
if(opaque)
|
||||
S.set_opacity(TRUE)
|
||||
newsmokes.Add(S)
|
||||
|
||||
if(newsmokes.len)
|
||||
spawn(1) //the smoke spreads rapidly but not instantly
|
||||
for(var/obj/effect/particle_effect/smoke/SM in newsmokes)
|
||||
SM.spread_smoke()
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread
|
||||
var/amount = 10
|
||||
effect_type = /obj/effect/particle_effect/smoke
|
||||
|
||||
/datum/effect_system/smoke_spread/set_up(radius = 5, loca)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
amount = radius
|
||||
|
||||
/datum/effect_system/smoke_spread/start()
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/S = new effect_type(location)
|
||||
S.amount = amount
|
||||
if(S.amount)
|
||||
S.spread_smoke()
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Bad smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad
|
||||
lifetime = 8
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.drop_all_held_items()
|
||||
M.adjustOxyLoss(1)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/beam/B = mover
|
||||
B.damage = (B.damage/2)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/bad
|
||||
effect_type = /obj/effect/particle_effect/smoke/bad
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Nanofrost smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/freezing
|
||||
name = "nanofrost smoke"
|
||||
color = "#B2FFFF"
|
||||
opaque = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing
|
||||
effect_type = /obj/effect/particle_effect/smoke/freezing
|
||||
var/blast = 0
|
||||
var/temperature = 2
|
||||
var/weldvents = TRUE
|
||||
var/distcheck = TRUE
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
|
||||
if(isopenturf(A))
|
||||
var/turf/open/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(!distcheck || get_dist(T, location) < blast) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = temperature
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
if(G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/nitrogen] += (G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/plasma] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
if (weldvents)
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
|
||||
U.welded = TRUE
|
||||
U.update_icon()
|
||||
U.visible_message("<span class='danger'>[U] was frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in T)
|
||||
Item.extinguish()
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/set_up(radius = 5, loca, blast_radius = 0)
|
||||
..()
|
||||
blast = blast_radius
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/start()
|
||||
if(blast)
|
||||
for(var/turf/T in RANGE_TURFS(blast, location))
|
||||
Chilled(T)
|
||||
..()
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/decon
|
||||
temperature = 293.15
|
||||
distcheck = FALSE
|
||||
weldvents = FALSE
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Sleep smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping
|
||||
color = "#9C3636"
|
||||
lifetime = 10
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.Sleeping(200)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/datum/effect_system/smoke_spread/sleeping
|
||||
effect_type = /obj/effect/particle_effect/smoke/sleeping
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Chem smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem
|
||||
lifetime = 10
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/process()
|
||||
if(..())
|
||||
var/turf/T = get_turf(src)
|
||||
var/fraction = 1/initial(lifetime)
|
||||
for(var/atom/movable/AM in T)
|
||||
if(AM.type == src.type)
|
||||
continue
|
||||
if(T.intact && AM.level == 1) //hidden under the floor
|
||||
continue
|
||||
reagents.reaction(AM, TOUCH, fraction)
|
||||
|
||||
reagents.reaction(T, TOUCH, fraction)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(!istype(M))
|
||||
return 0
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
var/fraction = 1/initial(lifetime)
|
||||
reagents.copy_to(C, fraction*reagents.total_volume)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/chem
|
||||
var/obj/chemholder
|
||||
effect_type = /obj/effect/particle_effect/smoke/chem
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/New()
|
||||
..()
|
||||
chemholder = new /obj()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/Destroy()
|
||||
qdel(chemholder)
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = FALSE)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
amount = radius
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
|
||||
if(!silent)
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
|
||||
var/where = "[AREACOORD(location)]"
|
||||
if(carry.my_atom && carry.my_atom.fingerprintslast)
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "[ADMIN_LOOKUPFLW(M)] "
|
||||
message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. Key: [more ? more : carry.my_atom.fingerprintslast].")
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. No associated key.")
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/start()
|
||||
var/mixcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location)
|
||||
|
||||
if(chemholder.reagents.total_volume > 1) // can't split 1 very well
|
||||
chemholder.reagents.copy_to(S, chemholder.reagents.total_volume)
|
||||
|
||||
if(mixcolor)
|
||||
S.add_atom_colour(mixcolor, FIXED_COLOUR_PRIORITY) // give the smoke color, if it has any to begin with
|
||||
S.amount = amount
|
||||
if(S.amount)
|
||||
S.spread_smoke() //calling process right now so the smoke immediately attacks mobs.
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Transparent smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
//Same as the base type, but the smoke produced is not opaque
|
||||
/datum/effect_system/smoke_spread/transparent
|
||||
effect_type = /obj/effect/particle_effect/smoke/transparent
|
||||
|
||||
/obj/effect/particle_effect/smoke/transparent
|
||||
opaque = FALSE
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
/obj/effect/forcefield
|
||||
desc = "A space wizard's magic wall."
|
||||
name = "FORCEWALL"
|
||||
icon_state = "m_shield"
|
||||
anchored = TRUE
|
||||
opacity = 0
|
||||
density = TRUE
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
var/timeleft = 300 //Set to 0 for permanent forcefields (ugh)
|
||||
|
||||
/obj/effect/forcefield/Initialize()
|
||||
. = ..()
|
||||
if(timeleft)
|
||||
QDEL_IN(src, timeleft)
|
||||
|
||||
/obj/effect/forcefield/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/forcefield/cult
|
||||
desc = "An unholy shield that blocks all attacks."
|
||||
name = "glowing wall"
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
icon_state = "cultshield"
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
timeleft = 200
|
||||
|
||||
///////////Mimewalls///////////
|
||||
|
||||
/obj/effect/forcefield/mime
|
||||
icon_state = "nothing"
|
||||
name = "invisible wall"
|
||||
desc = "You have a bad feeling about this."
|
||||
|
||||
/obj/effect/forcefield/mime/advanced
|
||||
name = "invisible blockade"
|
||||
desc = "You're gonna be here awhile."
|
||||
timeleft = 600
|
||||
/obj/effect/forcefield
|
||||
desc = "A space wizard's magic wall."
|
||||
name = "FORCEWALL"
|
||||
icon_state = "m_shield"
|
||||
anchored = TRUE
|
||||
opacity = 0
|
||||
density = TRUE
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
var/timeleft = 300 //Set to 0 for permanent forcefields (ugh)
|
||||
|
||||
/obj/effect/forcefield/Initialize()
|
||||
. = ..()
|
||||
if(timeleft)
|
||||
QDEL_IN(src, timeleft)
|
||||
|
||||
/obj/effect/forcefield/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/forcefield/cult
|
||||
desc = "An unholy shield that blocks all attacks."
|
||||
name = "glowing wall"
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
icon_state = "cultshield"
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
timeleft = 200
|
||||
|
||||
///////////Mimewalls///////////
|
||||
|
||||
/obj/effect/forcefield/mime
|
||||
icon_state = "nothing"
|
||||
name = "invisible wall"
|
||||
desc = "You have a bad feeling about this."
|
||||
|
||||
/obj/effect/forcefield/mime/advanced
|
||||
name = "invisible blockade"
|
||||
desc = "You're gonna be here awhile."
|
||||
timeleft = 600
|
||||
|
||||
@@ -1,483 +1,483 @@
|
||||
/obj/effect/landmark
|
||||
name = "landmark"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "x2"
|
||||
anchored = TRUE
|
||||
layer = MID_LANDMARK_LAYER
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/effect/landmark/singularity_act()
|
||||
return
|
||||
|
||||
// Please stop bombing the Observer-Start landmark.
|
||||
/obj/effect/landmark/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/landmark/singularity_pull()
|
||||
return
|
||||
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/landmark)
|
||||
|
||||
/obj/effect/landmark/Initialize()
|
||||
. = ..()
|
||||
GLOB.landmarks_list += src
|
||||
|
||||
/obj/effect/landmark/Destroy()
|
||||
GLOB.landmarks_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
icon = 'icons/mob/landmarks.dmi'
|
||||
icon_state = "x"
|
||||
anchored = TRUE
|
||||
layer = MOB_LAYER
|
||||
var/jobspawn_override = FALSE
|
||||
var/delete_after_roundstart = TRUE
|
||||
var/used = FALSE
|
||||
|
||||
/obj/effect/landmark/start/proc/after_round_start()
|
||||
if(delete_after_roundstart)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
GLOB.start_landmarks_list += src
|
||||
if(jobspawn_override)
|
||||
if(!GLOB.jobspawn_overrides[name])
|
||||
GLOB.jobspawn_overrides[name] = list()
|
||||
GLOB.jobspawn_overrides[name] += src
|
||||
..()
|
||||
if(name != "start")
|
||||
tag = "start*[name]"
|
||||
|
||||
/obj/effect/landmark/start/Destroy()
|
||||
GLOB.start_landmarks_list -= src
|
||||
if(jobspawn_override)
|
||||
GLOB.jobspawn_overrides[name] -= src
|
||||
return ..()
|
||||
|
||||
// START LANDMARKS FOLLOW. Don't change the names unless
|
||||
// you are refactoring shitty landmark code.
|
||||
/obj/effect/landmark/start/assistant
|
||||
name = "Assistant"
|
||||
icon_state = "Assistant"
|
||||
|
||||
/obj/effect/landmark/start/assistant/override
|
||||
jobspawn_override = TRUE
|
||||
delete_after_roundstart = FALSE
|
||||
|
||||
/obj/effect/landmark/start/janitor
|
||||
name = "Janitor"
|
||||
icon_state = "Janitor"
|
||||
|
||||
/obj/effect/landmark/start/cargo_technician
|
||||
name = "Cargo Technician"
|
||||
icon_state = "Cargo Technician"
|
||||
|
||||
/obj/effect/landmark/start/bartender
|
||||
name = "Bartender"
|
||||
icon_state = "Bartender"
|
||||
|
||||
/obj/effect/landmark/start/clown
|
||||
name = "Clown"
|
||||
icon_state = "Clown"
|
||||
|
||||
/obj/effect/landmark/start/mime
|
||||
name = "Mime"
|
||||
icon_state = "Mime"
|
||||
|
||||
/obj/effect/landmark/start/quartermaster
|
||||
name = "Quartermaster"
|
||||
icon_state = "Quartermaster"
|
||||
|
||||
/obj/effect/landmark/start/atmospheric_technician
|
||||
name = "Atmospheric Technician"
|
||||
icon_state = "Atmospheric Technician"
|
||||
|
||||
/obj/effect/landmark/start/cook
|
||||
name = "Cook"
|
||||
icon_state = "Cook"
|
||||
|
||||
/obj/effect/landmark/start/shaft_miner
|
||||
name = "Shaft Miner"
|
||||
icon_state = "Shaft Miner"
|
||||
|
||||
/obj/effect/landmark/start/security_officer
|
||||
name = "Security Officer"
|
||||
icon_state = "Security Officer"
|
||||
|
||||
/obj/effect/landmark/start/botanist
|
||||
name = "Botanist"
|
||||
icon_state = "Botanist"
|
||||
|
||||
/obj/effect/landmark/start/head_of_security
|
||||
name = "Head of Security"
|
||||
icon_state = "Head of Security"
|
||||
|
||||
/obj/effect/landmark/start/captain
|
||||
name = "Captain"
|
||||
icon_state = "Captain"
|
||||
|
||||
/obj/effect/landmark/start/detective
|
||||
name = "Detective"
|
||||
icon_state = "Detective"
|
||||
|
||||
/obj/effect/landmark/start/warden
|
||||
name = "Warden"
|
||||
icon_state = "Warden"
|
||||
|
||||
/obj/effect/landmark/start/chief_engineer
|
||||
name = "Chief Engineer"
|
||||
icon_state = "Chief Engineer"
|
||||
|
||||
/obj/effect/landmark/start/head_of_personnel
|
||||
name = "Head of Personnel"
|
||||
icon_state = "Head of Personnel"
|
||||
|
||||
/obj/effect/landmark/start/librarian
|
||||
name = "Curator"
|
||||
icon_state = "Curator"
|
||||
|
||||
/obj/effect/landmark/start/lawyer
|
||||
name = "Lawyer"
|
||||
icon_state = "Lawyer"
|
||||
|
||||
/obj/effect/landmark/start/station_engineer
|
||||
name = "Station Engineer"
|
||||
icon_state = "Station Engineer"
|
||||
|
||||
/obj/effect/landmark/start/medical_doctor
|
||||
name = "Medical Doctor"
|
||||
icon_state = "Medical Doctor"
|
||||
|
||||
/obj/effect/landmark/start/scientist
|
||||
name = "Scientist"
|
||||
icon_state = "Scientist"
|
||||
|
||||
/obj/effect/landmark/start/chemist
|
||||
name = "Chemist"
|
||||
icon_state = "Chemist"
|
||||
|
||||
/obj/effect/landmark/start/roboticist
|
||||
name = "Roboticist"
|
||||
icon_state = "Roboticist"
|
||||
|
||||
/obj/effect/landmark/start/research_director
|
||||
name = "Research Director"
|
||||
icon_state = "Research Director"
|
||||
|
||||
/obj/effect/landmark/start/geneticist
|
||||
name = "Geneticist"
|
||||
icon_state = "Geneticist"
|
||||
|
||||
/obj/effect/landmark/start/chief_medical_officer
|
||||
name = "Chief Medical Officer"
|
||||
icon_state = "Chief Medical Officer"
|
||||
|
||||
/obj/effect/landmark/start/virologist
|
||||
name = "Virologist"
|
||||
icon_state = "Virologist"
|
||||
|
||||
/obj/effect/landmark/start/chaplain
|
||||
name = "Chaplain"
|
||||
icon_state = "Chaplain"
|
||||
|
||||
/obj/effect/landmark/start/cyborg
|
||||
name = "Cyborg"
|
||||
icon_state = "Cyborg"
|
||||
|
||||
/obj/effect/landmark/start/ai
|
||||
name = "AI"
|
||||
icon_state = "AI"
|
||||
delete_after_roundstart = FALSE
|
||||
var/primary_ai = TRUE
|
||||
var/latejoin_active = TRUE
|
||||
|
||||
/obj/effect/landmark/start/ai/after_round_start()
|
||||
if(latejoin_active && !used)
|
||||
new /obj/structure/AIcore/latejoin_inactive(loc)
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start/ai/secondary
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "ai_spawn"
|
||||
primary_ai = FALSE
|
||||
latejoin_active = FALSE
|
||||
|
||||
//Department Security spawns
|
||||
|
||||
/obj/effect/landmark/start/depsec
|
||||
name = "department_sec"
|
||||
icon_state = "Security Officer"
|
||||
|
||||
/obj/effect/landmark/start/depsec/New()
|
||||
..()
|
||||
GLOB.department_security_spawns += src
|
||||
|
||||
/obj/effect/landmark/start/depsec/Destroy()
|
||||
GLOB.department_security_spawns -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start/depsec/supply
|
||||
name = "supply_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/medical
|
||||
name = "medical_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/engineering
|
||||
name = "engineering_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/science
|
||||
name = "science_sec"
|
||||
|
||||
/obj/effect/landmark/start/wizard
|
||||
name = "wizard"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "wiznerd_spawn"
|
||||
|
||||
/obj/effect/landmark/start/wizard/Initialize()
|
||||
..()
|
||||
GLOB.wizardstart += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/start/nukeop
|
||||
name = "nukeop"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "snukeop_spawn"
|
||||
|
||||
/obj/effect/landmark/start/nukeop/Initialize()
|
||||
..()
|
||||
GLOB.nukeop_start += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/start/nukeop_leader
|
||||
name = "nukeop leader"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "snukeop_leader_spawn"
|
||||
|
||||
/obj/effect/landmark/start/nukeop_leader/Initialize()
|
||||
..()
|
||||
GLOB.nukeop_leader_start += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// Must be immediate because players will
|
||||
// join before SSatom initializes everything.
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
|
||||
|
||||
/obj/effect/landmark/start/new_player
|
||||
name = "New Player"
|
||||
|
||||
/obj/effect/landmark/start/new_player/Initialize()
|
||||
..()
|
||||
GLOB.newplayer_start += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/latejoin
|
||||
name = "JoinLate"
|
||||
|
||||
/obj/effect/landmark/latejoin/Initialize(mapload)
|
||||
..()
|
||||
SSjob.latejoin_trackers += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// carp.
|
||||
/obj/effect/landmark/carpspawn
|
||||
name = "carpspawn"
|
||||
icon_state = "carp_spawn"
|
||||
|
||||
// observer-start.
|
||||
/obj/effect/landmark/observer_start
|
||||
name = "Observer-Start"
|
||||
icon_state = "observer_start"
|
||||
|
||||
// xenos.
|
||||
/obj/effect/landmark/xeno_spawn
|
||||
name = "xeno_spawn"
|
||||
icon_state = "xeno_spawn"
|
||||
|
||||
/obj/effect/landmark/xeno_spawn/Initialize(mapload)
|
||||
..()
|
||||
GLOB.xeno_spawn += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// blobs.
|
||||
/obj/effect/landmark/blobstart
|
||||
name = "blobstart"
|
||||
icon_state = "blob_start"
|
||||
|
||||
/obj/effect/landmark/blobstart/Initialize(mapload)
|
||||
..()
|
||||
GLOB.blobstart += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/secequipment
|
||||
name = "secequipment"
|
||||
icon_state = "secequipment"
|
||||
|
||||
/obj/effect/landmark/secequipment/Initialize(mapload)
|
||||
..()
|
||||
GLOB.secequipment += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/prisonwarp
|
||||
name = "prisonwarp"
|
||||
icon_state = "prisonwarp"
|
||||
|
||||
/obj/effect/landmark/prisonwarp/Initialize(mapload)
|
||||
..()
|
||||
GLOB.prisonwarp += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/ert_spawn
|
||||
name = "Emergencyresponseteam"
|
||||
icon_state = "ert_spawn"
|
||||
|
||||
/obj/effect/landmark/ert_spawn/Initialize(mapload)
|
||||
..()
|
||||
GLOB.emergencyresponseteamspawn += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/holding_facility
|
||||
name = "Holding Facility"
|
||||
icon_state = "holding_facility"
|
||||
|
||||
/obj/effect/landmark/holding_facility/Initialize(mapload)
|
||||
..()
|
||||
GLOB.holdingfacility += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/observe
|
||||
name = "tdomeobserve"
|
||||
icon_state = "tdome_observer"
|
||||
|
||||
/obj/effect/landmark/thunderdome/observe/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdomeobserve += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/one
|
||||
name = "tdome1"
|
||||
icon_state = "tdome_t1"
|
||||
|
||||
/obj/effect/landmark/thunderdome/one/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdome1 += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/two
|
||||
name = "tdome2"
|
||||
icon_state = "tdome_t2"
|
||||
|
||||
/obj/effect/landmark/thunderdome/two/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdome2 += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/admin
|
||||
name = "tdomeadmin"
|
||||
icon_state = "tdome_admin"
|
||||
|
||||
/obj/effect/landmark/thunderdome/admin/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdomeadmin += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
//Servant spawn locations
|
||||
/obj/effect/landmark/servant_of_ratvar
|
||||
name = "servant of ratvar spawn"
|
||||
icon_state = "clockwork_orange"
|
||||
layer = MOB_LAYER
|
||||
|
||||
/obj/effect/landmark/servant_of_ratvar/Initialize(mapload)
|
||||
..()
|
||||
GLOB.servant_spawns += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
//City of Cogs entrances
|
||||
/obj/effect/landmark/city_of_cogs
|
||||
name = "city of cogs entrance"
|
||||
icon_state = "city_of_cogs"
|
||||
|
||||
/obj/effect/landmark/city_of_cogs/Initialize(mapload)
|
||||
..()
|
||||
GLOB.city_of_cogs_spawns += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
//generic event spawns
|
||||
/obj/effect/landmark/event_spawn
|
||||
name = "generic event spawn"
|
||||
icon_state = "generic_event"
|
||||
layer = HIGH_LANDMARK_LAYER
|
||||
|
||||
|
||||
/obj/effect/landmark/event_spawn/New()
|
||||
..()
|
||||
GLOB.generic_event_spawns += src
|
||||
|
||||
/obj/effect/landmark/event_spawn/Destroy()
|
||||
GLOB.generic_event_spawns -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/ruin
|
||||
var/datum/map_template/ruin/ruin_template
|
||||
|
||||
/obj/effect/landmark/ruin/New(loc, my_ruin_template)
|
||||
name = "ruin_[GLOB.ruin_landmarks.len + 1]"
|
||||
..(loc)
|
||||
ruin_template = my_ruin_template
|
||||
GLOB.ruin_landmarks |= src
|
||||
|
||||
/obj/effect/landmark/ruin/Destroy()
|
||||
GLOB.ruin_landmarks -= src
|
||||
ruin_template = null
|
||||
. = ..()
|
||||
|
||||
//------Station Rooms Landmarks------------//
|
||||
/obj/effect/landmark/stationroom
|
||||
var/list/templates = list()
|
||||
layer = BULLET_HOLE_LAYER
|
||||
|
||||
/obj/effect/landmark/stationroom/New()
|
||||
..()
|
||||
GLOB.stationroom_landmarks += src
|
||||
|
||||
/obj/effect/landmark/stationroom/Destroy()
|
||||
if(src in GLOB.stationroom_landmarks)
|
||||
GLOB.stationroom_landmarks -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/stationroom/proc/load(template_name)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return FALSE
|
||||
if(!template_name)
|
||||
for(var/t in templates)
|
||||
if(!SSmapping.station_room_templates[t])
|
||||
log_world("Station room spawner placed at ([T.x], [T.y], [T.z]) has invalid ruin name of \"[t]\" in its list")
|
||||
templates -= t
|
||||
template_name = pickweight(templates)
|
||||
if(!template_name)
|
||||
GLOB.stationroom_landmarks -= src
|
||||
qdel(src)
|
||||
return FALSE
|
||||
var/datum/map_template/template = SSmapping.station_room_templates[template_name]
|
||||
if(!template)
|
||||
return FALSE
|
||||
testing("Room \"[template_name]\" placed at ([T.x], [T.y], [T.z])")
|
||||
template.load(T, centered = FALSE)
|
||||
template.loaded++
|
||||
GLOB.stationroom_landmarks -= src
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
// The landmark for the Engine on Box
|
||||
|
||||
/obj/effect/landmark/stationroom/box/engine
|
||||
templates = list("Engine SM" = 3, "Engine Singulo" = 3, "Engine Tesla" = 3)
|
||||
icon = 'icons/rooms/box/engine.dmi'
|
||||
|
||||
|
||||
/obj/effect/landmark/stationroom/box/engine/New()
|
||||
. = ..()
|
||||
templates = CONFIG_GET(keyed_list/box_random_engine)
|
||||
/obj/effect/landmark
|
||||
name = "landmark"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "x2"
|
||||
anchored = TRUE
|
||||
layer = MID_LANDMARK_LAYER
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/effect/landmark/singularity_act()
|
||||
return
|
||||
|
||||
// Please stop bombing the Observer-Start landmark.
|
||||
/obj/effect/landmark/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/landmark/singularity_pull()
|
||||
return
|
||||
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/landmark)
|
||||
|
||||
/obj/effect/landmark/Initialize()
|
||||
. = ..()
|
||||
GLOB.landmarks_list += src
|
||||
|
||||
/obj/effect/landmark/Destroy()
|
||||
GLOB.landmarks_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
icon = 'icons/mob/landmarks.dmi'
|
||||
icon_state = "x"
|
||||
anchored = TRUE
|
||||
layer = MOB_LAYER
|
||||
var/jobspawn_override = FALSE
|
||||
var/delete_after_roundstart = TRUE
|
||||
var/used = FALSE
|
||||
|
||||
/obj/effect/landmark/start/proc/after_round_start()
|
||||
if(delete_after_roundstart)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
GLOB.start_landmarks_list += src
|
||||
if(jobspawn_override)
|
||||
if(!GLOB.jobspawn_overrides[name])
|
||||
GLOB.jobspawn_overrides[name] = list()
|
||||
GLOB.jobspawn_overrides[name] += src
|
||||
..()
|
||||
if(name != "start")
|
||||
tag = "start*[name]"
|
||||
|
||||
/obj/effect/landmark/start/Destroy()
|
||||
GLOB.start_landmarks_list -= src
|
||||
if(jobspawn_override)
|
||||
GLOB.jobspawn_overrides[name] -= src
|
||||
return ..()
|
||||
|
||||
// START LANDMARKS FOLLOW. Don't change the names unless
|
||||
// you are refactoring shitty landmark code.
|
||||
/obj/effect/landmark/start/assistant
|
||||
name = "Assistant"
|
||||
icon_state = "Assistant"
|
||||
|
||||
/obj/effect/landmark/start/assistant/override
|
||||
jobspawn_override = TRUE
|
||||
delete_after_roundstart = FALSE
|
||||
|
||||
/obj/effect/landmark/start/janitor
|
||||
name = "Janitor"
|
||||
icon_state = "Janitor"
|
||||
|
||||
/obj/effect/landmark/start/cargo_technician
|
||||
name = "Cargo Technician"
|
||||
icon_state = "Cargo Technician"
|
||||
|
||||
/obj/effect/landmark/start/bartender
|
||||
name = "Bartender"
|
||||
icon_state = "Bartender"
|
||||
|
||||
/obj/effect/landmark/start/clown
|
||||
name = "Clown"
|
||||
icon_state = "Clown"
|
||||
|
||||
/obj/effect/landmark/start/mime
|
||||
name = "Mime"
|
||||
icon_state = "Mime"
|
||||
|
||||
/obj/effect/landmark/start/quartermaster
|
||||
name = "Quartermaster"
|
||||
icon_state = "Quartermaster"
|
||||
|
||||
/obj/effect/landmark/start/atmospheric_technician
|
||||
name = "Atmospheric Technician"
|
||||
icon_state = "Atmospheric Technician"
|
||||
|
||||
/obj/effect/landmark/start/cook
|
||||
name = "Cook"
|
||||
icon_state = "Cook"
|
||||
|
||||
/obj/effect/landmark/start/shaft_miner
|
||||
name = "Shaft Miner"
|
||||
icon_state = "Shaft Miner"
|
||||
|
||||
/obj/effect/landmark/start/security_officer
|
||||
name = "Security Officer"
|
||||
icon_state = "Security Officer"
|
||||
|
||||
/obj/effect/landmark/start/botanist
|
||||
name = "Botanist"
|
||||
icon_state = "Botanist"
|
||||
|
||||
/obj/effect/landmark/start/head_of_security
|
||||
name = "Head of Security"
|
||||
icon_state = "Head of Security"
|
||||
|
||||
/obj/effect/landmark/start/captain
|
||||
name = "Captain"
|
||||
icon_state = "Captain"
|
||||
|
||||
/obj/effect/landmark/start/detective
|
||||
name = "Detective"
|
||||
icon_state = "Detective"
|
||||
|
||||
/obj/effect/landmark/start/warden
|
||||
name = "Warden"
|
||||
icon_state = "Warden"
|
||||
|
||||
/obj/effect/landmark/start/chief_engineer
|
||||
name = "Chief Engineer"
|
||||
icon_state = "Chief Engineer"
|
||||
|
||||
/obj/effect/landmark/start/head_of_personnel
|
||||
name = "Head of Personnel"
|
||||
icon_state = "Head of Personnel"
|
||||
|
||||
/obj/effect/landmark/start/librarian
|
||||
name = "Curator"
|
||||
icon_state = "Curator"
|
||||
|
||||
/obj/effect/landmark/start/lawyer
|
||||
name = "Lawyer"
|
||||
icon_state = "Lawyer"
|
||||
|
||||
/obj/effect/landmark/start/station_engineer
|
||||
name = "Station Engineer"
|
||||
icon_state = "Station Engineer"
|
||||
|
||||
/obj/effect/landmark/start/medical_doctor
|
||||
name = "Medical Doctor"
|
||||
icon_state = "Medical Doctor"
|
||||
|
||||
/obj/effect/landmark/start/scientist
|
||||
name = "Scientist"
|
||||
icon_state = "Scientist"
|
||||
|
||||
/obj/effect/landmark/start/chemist
|
||||
name = "Chemist"
|
||||
icon_state = "Chemist"
|
||||
|
||||
/obj/effect/landmark/start/roboticist
|
||||
name = "Roboticist"
|
||||
icon_state = "Roboticist"
|
||||
|
||||
/obj/effect/landmark/start/research_director
|
||||
name = "Research Director"
|
||||
icon_state = "Research Director"
|
||||
|
||||
/obj/effect/landmark/start/geneticist
|
||||
name = "Geneticist"
|
||||
icon_state = "Geneticist"
|
||||
|
||||
/obj/effect/landmark/start/chief_medical_officer
|
||||
name = "Chief Medical Officer"
|
||||
icon_state = "Chief Medical Officer"
|
||||
|
||||
/obj/effect/landmark/start/virologist
|
||||
name = "Virologist"
|
||||
icon_state = "Virologist"
|
||||
|
||||
/obj/effect/landmark/start/chaplain
|
||||
name = "Chaplain"
|
||||
icon_state = "Chaplain"
|
||||
|
||||
/obj/effect/landmark/start/cyborg
|
||||
name = "Cyborg"
|
||||
icon_state = "Cyborg"
|
||||
|
||||
/obj/effect/landmark/start/ai
|
||||
name = "AI"
|
||||
icon_state = "AI"
|
||||
delete_after_roundstart = FALSE
|
||||
var/primary_ai = TRUE
|
||||
var/latejoin_active = TRUE
|
||||
|
||||
/obj/effect/landmark/start/ai/after_round_start()
|
||||
if(latejoin_active && !used)
|
||||
new /obj/structure/AIcore/latejoin_inactive(loc)
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start/ai/secondary
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "ai_spawn"
|
||||
primary_ai = FALSE
|
||||
latejoin_active = FALSE
|
||||
|
||||
//Department Security spawns
|
||||
|
||||
/obj/effect/landmark/start/depsec
|
||||
name = "department_sec"
|
||||
icon_state = "Security Officer"
|
||||
|
||||
/obj/effect/landmark/start/depsec/New()
|
||||
..()
|
||||
GLOB.department_security_spawns += src
|
||||
|
||||
/obj/effect/landmark/start/depsec/Destroy()
|
||||
GLOB.department_security_spawns -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start/depsec/supply
|
||||
name = "supply_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/medical
|
||||
name = "medical_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/engineering
|
||||
name = "engineering_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/science
|
||||
name = "science_sec"
|
||||
|
||||
/obj/effect/landmark/start/wizard
|
||||
name = "wizard"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "wiznerd_spawn"
|
||||
|
||||
/obj/effect/landmark/start/wizard/Initialize()
|
||||
..()
|
||||
GLOB.wizardstart += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/start/nukeop
|
||||
name = "nukeop"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "snukeop_spawn"
|
||||
|
||||
/obj/effect/landmark/start/nukeop/Initialize()
|
||||
..()
|
||||
GLOB.nukeop_start += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/start/nukeop_leader
|
||||
name = "nukeop leader"
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "snukeop_leader_spawn"
|
||||
|
||||
/obj/effect/landmark/start/nukeop_leader/Initialize()
|
||||
..()
|
||||
GLOB.nukeop_leader_start += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// Must be immediate because players will
|
||||
// join before SSatom initializes everything.
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
|
||||
|
||||
/obj/effect/landmark/start/new_player
|
||||
name = "New Player"
|
||||
|
||||
/obj/effect/landmark/start/new_player/Initialize()
|
||||
..()
|
||||
GLOB.newplayer_start += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/latejoin
|
||||
name = "JoinLate"
|
||||
|
||||
/obj/effect/landmark/latejoin/Initialize(mapload)
|
||||
..()
|
||||
SSjob.latejoin_trackers += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// carp.
|
||||
/obj/effect/landmark/carpspawn
|
||||
name = "carpspawn"
|
||||
icon_state = "carp_spawn"
|
||||
|
||||
// observer-start.
|
||||
/obj/effect/landmark/observer_start
|
||||
name = "Observer-Start"
|
||||
icon_state = "observer_start"
|
||||
|
||||
// xenos.
|
||||
/obj/effect/landmark/xeno_spawn
|
||||
name = "xeno_spawn"
|
||||
icon_state = "xeno_spawn"
|
||||
|
||||
/obj/effect/landmark/xeno_spawn/Initialize(mapload)
|
||||
..()
|
||||
GLOB.xeno_spawn += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// blobs.
|
||||
/obj/effect/landmark/blobstart
|
||||
name = "blobstart"
|
||||
icon_state = "blob_start"
|
||||
|
||||
/obj/effect/landmark/blobstart/Initialize(mapload)
|
||||
..()
|
||||
GLOB.blobstart += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/secequipment
|
||||
name = "secequipment"
|
||||
icon_state = "secequipment"
|
||||
|
||||
/obj/effect/landmark/secequipment/Initialize(mapload)
|
||||
..()
|
||||
GLOB.secequipment += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/prisonwarp
|
||||
name = "prisonwarp"
|
||||
icon_state = "prisonwarp"
|
||||
|
||||
/obj/effect/landmark/prisonwarp/Initialize(mapload)
|
||||
..()
|
||||
GLOB.prisonwarp += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/ert_spawn
|
||||
name = "Emergencyresponseteam"
|
||||
icon_state = "ert_spawn"
|
||||
|
||||
/obj/effect/landmark/ert_spawn/Initialize(mapload)
|
||||
..()
|
||||
GLOB.emergencyresponseteamspawn += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/holding_facility
|
||||
name = "Holding Facility"
|
||||
icon_state = "holding_facility"
|
||||
|
||||
/obj/effect/landmark/holding_facility/Initialize(mapload)
|
||||
..()
|
||||
GLOB.holdingfacility += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/observe
|
||||
name = "tdomeobserve"
|
||||
icon_state = "tdome_observer"
|
||||
|
||||
/obj/effect/landmark/thunderdome/observe/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdomeobserve += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/one
|
||||
name = "tdome1"
|
||||
icon_state = "tdome_t1"
|
||||
|
||||
/obj/effect/landmark/thunderdome/one/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdome1 += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/two
|
||||
name = "tdome2"
|
||||
icon_state = "tdome_t2"
|
||||
|
||||
/obj/effect/landmark/thunderdome/two/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdome2 += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/thunderdome/admin
|
||||
name = "tdomeadmin"
|
||||
icon_state = "tdome_admin"
|
||||
|
||||
/obj/effect/landmark/thunderdome/admin/Initialize(mapload)
|
||||
..()
|
||||
GLOB.tdomeadmin += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
//Servant spawn locations
|
||||
/obj/effect/landmark/servant_of_ratvar
|
||||
name = "servant of ratvar spawn"
|
||||
icon_state = "clockwork_orange"
|
||||
layer = MOB_LAYER
|
||||
|
||||
/obj/effect/landmark/servant_of_ratvar/Initialize(mapload)
|
||||
..()
|
||||
GLOB.servant_spawns += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
//City of Cogs entrances
|
||||
/obj/effect/landmark/city_of_cogs
|
||||
name = "city of cogs entrance"
|
||||
icon_state = "city_of_cogs"
|
||||
|
||||
/obj/effect/landmark/city_of_cogs/Initialize(mapload)
|
||||
..()
|
||||
GLOB.city_of_cogs_spawns += loc
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
//generic event spawns
|
||||
/obj/effect/landmark/event_spawn
|
||||
name = "generic event spawn"
|
||||
icon_state = "generic_event"
|
||||
layer = HIGH_LANDMARK_LAYER
|
||||
|
||||
|
||||
/obj/effect/landmark/event_spawn/New()
|
||||
..()
|
||||
GLOB.generic_event_spawns += src
|
||||
|
||||
/obj/effect/landmark/event_spawn/Destroy()
|
||||
GLOB.generic_event_spawns -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/ruin
|
||||
var/datum/map_template/ruin/ruin_template
|
||||
|
||||
/obj/effect/landmark/ruin/New(loc, my_ruin_template)
|
||||
name = "ruin_[GLOB.ruin_landmarks.len + 1]"
|
||||
..(loc)
|
||||
ruin_template = my_ruin_template
|
||||
GLOB.ruin_landmarks |= src
|
||||
|
||||
/obj/effect/landmark/ruin/Destroy()
|
||||
GLOB.ruin_landmarks -= src
|
||||
ruin_template = null
|
||||
. = ..()
|
||||
|
||||
//------Station Rooms Landmarks------------//
|
||||
/obj/effect/landmark/stationroom
|
||||
var/list/templates = list()
|
||||
layer = BULLET_HOLE_LAYER
|
||||
|
||||
/obj/effect/landmark/stationroom/New()
|
||||
..()
|
||||
GLOB.stationroom_landmarks += src
|
||||
|
||||
/obj/effect/landmark/stationroom/Destroy()
|
||||
if(src in GLOB.stationroom_landmarks)
|
||||
GLOB.stationroom_landmarks -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/stationroom/proc/load(template_name)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return FALSE
|
||||
if(!template_name)
|
||||
for(var/t in templates)
|
||||
if(!SSmapping.station_room_templates[t])
|
||||
log_world("Station room spawner placed at ([T.x], [T.y], [T.z]) has invalid ruin name of \"[t]\" in its list")
|
||||
templates -= t
|
||||
template_name = pickweight(templates)
|
||||
if(!template_name)
|
||||
GLOB.stationroom_landmarks -= src
|
||||
qdel(src)
|
||||
return FALSE
|
||||
var/datum/map_template/template = SSmapping.station_room_templates[template_name]
|
||||
if(!template)
|
||||
return FALSE
|
||||
testing("Room \"[template_name]\" placed at ([T.x], [T.y], [T.z])")
|
||||
template.load(T, centered = FALSE)
|
||||
template.loaded++
|
||||
GLOB.stationroom_landmarks -= src
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
// The landmark for the Engine on Box
|
||||
|
||||
/obj/effect/landmark/stationroom/box/engine
|
||||
templates = list("Engine SM" = 3, "Engine Singulo" = 3, "Engine Tesla" = 3)
|
||||
icon = 'icons/rooms/box/engine.dmi'
|
||||
|
||||
|
||||
/obj/effect/landmark/stationroom/box/engine/New()
|
||||
. = ..()
|
||||
templates = CONFIG_GET(keyed_list/box_random_engine)
|
||||
|
||||
+176
-176
@@ -1,176 +1,176 @@
|
||||
/obj/effect/mine
|
||||
name = "dummy mine"
|
||||
desc = "Better stay away from that thing."
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "uglymine"
|
||||
var/triggered = 0
|
||||
|
||||
/obj/effect/mine/proc/mineEffect(mob/victim)
|
||||
to_chat(victim, "<span class='danger'>*click*</span>")
|
||||
|
||||
/obj/effect/mine/Crossed(AM as mob|obj)
|
||||
if(isturf(loc))
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
triggermine(AM)
|
||||
else
|
||||
triggermine(AM)
|
||||
|
||||
/obj/effect/mine/proc/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
visible_message("<span class='danger'>[victim] sets off [icon2html(src, viewers(src))] [src]!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
mineEffect(victim)
|
||||
triggered = 1
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/explosive
|
||||
name = "explosive mine"
|
||||
var/range_devastation = 0
|
||||
var/range_heavy = 1
|
||||
var/range_light = 2
|
||||
var/range_flash = 3
|
||||
|
||||
/obj/effect/mine/explosive/mineEffect(mob/victim)
|
||||
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
|
||||
|
||||
|
||||
/obj/effect/mine/stun
|
||||
name = "stun mine"
|
||||
var/stun_time = 80
|
||||
|
||||
/obj/effect/mine/stun/mineEffect(mob/living/victim)
|
||||
if(isliving(victim))
|
||||
victim.Knockdown(stun_time)
|
||||
|
||||
/obj/effect/mine/kickmine
|
||||
name = "kick mine"
|
||||
|
||||
/obj/effect/mine/kickmine/mineEffect(mob/victim)
|
||||
if(isliving(victim) && victim.client)
|
||||
to_chat(victim, "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>")
|
||||
qdel(victim.client)
|
||||
|
||||
|
||||
/obj/effect/mine/gas
|
||||
name = "oxygen mine"
|
||||
var/gas_amount = 360
|
||||
var/gas_type = "o2"
|
||||
|
||||
/obj/effect/mine/gas/mineEffect(mob/victim)
|
||||
atmos_spawn_air("[gas_type]=[gas_amount]")
|
||||
|
||||
|
||||
/obj/effect/mine/gas/plasma
|
||||
name = "plasma mine"
|
||||
gas_type = "plasma"
|
||||
|
||||
|
||||
/obj/effect/mine/gas/n2o
|
||||
name = "\improper N2O mine"
|
||||
gas_type = "n2o"
|
||||
|
||||
|
||||
/obj/effect/mine/sound
|
||||
name = "honkblaster 1000"
|
||||
var/sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/effect/mine/sound/mineEffect(mob/victim)
|
||||
playsound(loc, sound, 100, 1)
|
||||
|
||||
|
||||
/obj/effect/mine/sound/bwoink
|
||||
name = "bwoink mine"
|
||||
sound = 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/obj/effect/mine/pickup
|
||||
name = "pickup"
|
||||
desc = "pick me up"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "electricity2"
|
||||
density = FALSE
|
||||
var/duration = 0
|
||||
|
||||
/obj/effect/mine/pickup/Initialize()
|
||||
. = ..()
|
||||
animate(src, pixel_y = 4, time = 20, loop = -1)
|
||||
|
||||
/obj/effect/mine/pickup/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
triggered = 1
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
mineEffect(victim)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath
|
||||
name = "Red Orb"
|
||||
desc = "You feel angry just looking at it."
|
||||
duration = 1200 //2min
|
||||
color = "#FF0000"
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
||||
var/old_color = victim.client.color
|
||||
var/static/list/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
||||
var/static/list/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
||||
|
||||
spawn(0)
|
||||
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
|
||||
|
||||
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
victim.log_message("entered a blood frenzy", LOG_ATTACK)
|
||||
|
||||
ADD_TRAIT(chainsaw, TRAIT_NODROP, CHAINSAW_FRENZY_TRAIT)
|
||||
victim.drop_all_held_items()
|
||||
victim.put_in_hands(chainsaw, forced = TRUE)
|
||||
chainsaw.attack_self(victim)
|
||||
chainsaw.wield(victim)
|
||||
victim.reagents.add_reagent(/datum/reagent/medicine/adminordrazine,25)
|
||||
to_chat(victim, "<span class='warning'>KILL, KILL, KILL! YOU HAVE NO ALLIES ANYMORE, KILL THEM ALL!</span>")
|
||||
|
||||
victim.client.color = pure_red
|
||||
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.</span>")
|
||||
qdel(chainsaw)
|
||||
victim.log_message("exited a blood frenzy", LOG_ATTACK)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/mine/pickup/healing
|
||||
name = "Blue Orb"
|
||||
desc = "You feel better just looking at it."
|
||||
color = "#0000FF"
|
||||
|
||||
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel great!</span>")
|
||||
victim.revive(full_heal = 1, admin_revive = 1)
|
||||
|
||||
/obj/effect/mine/pickup/speed
|
||||
name = "Yellow Orb"
|
||||
desc = "You feel faster just looking at it."
|
||||
color = "#FFFF00"
|
||||
duration = 300
|
||||
|
||||
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel fast!</span>")
|
||||
victim.add_movespeed_modifier(MOVESPEED_ID_YELLOW_ORB, update=TRUE, priority=100, multiplicative_slowdown=-2, blacklisted_movetypes=(FLYING|FLOATING))
|
||||
sleep(duration)
|
||||
victim.remove_movespeed_modifier(MOVESPEED_ID_YELLOW_ORB)
|
||||
to_chat(victim, "<span class='notice'>You slow down.</span>")
|
||||
/obj/effect/mine
|
||||
name = "dummy mine"
|
||||
desc = "Better stay away from that thing."
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "uglymine"
|
||||
var/triggered = 0
|
||||
|
||||
/obj/effect/mine/proc/mineEffect(mob/victim)
|
||||
to_chat(victim, "<span class='danger'>*click*</span>")
|
||||
|
||||
/obj/effect/mine/Crossed(AM as mob|obj)
|
||||
if(isturf(loc))
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
triggermine(AM)
|
||||
else
|
||||
triggermine(AM)
|
||||
|
||||
/obj/effect/mine/proc/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
visible_message("<span class='danger'>[victim] sets off [icon2html(src, viewers(src))] [src]!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
mineEffect(victim)
|
||||
triggered = 1
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/explosive
|
||||
name = "explosive mine"
|
||||
var/range_devastation = 0
|
||||
var/range_heavy = 1
|
||||
var/range_light = 2
|
||||
var/range_flash = 3
|
||||
|
||||
/obj/effect/mine/explosive/mineEffect(mob/victim)
|
||||
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
|
||||
|
||||
|
||||
/obj/effect/mine/stun
|
||||
name = "stun mine"
|
||||
var/stun_time = 80
|
||||
|
||||
/obj/effect/mine/stun/mineEffect(mob/living/victim)
|
||||
if(isliving(victim))
|
||||
victim.Knockdown(stun_time)
|
||||
|
||||
/obj/effect/mine/kickmine
|
||||
name = "kick mine"
|
||||
|
||||
/obj/effect/mine/kickmine/mineEffect(mob/victim)
|
||||
if(isliving(victim) && victim.client)
|
||||
to_chat(victim, "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>")
|
||||
qdel(victim.client)
|
||||
|
||||
|
||||
/obj/effect/mine/gas
|
||||
name = "oxygen mine"
|
||||
var/gas_amount = 360
|
||||
var/gas_type = "o2"
|
||||
|
||||
/obj/effect/mine/gas/mineEffect(mob/victim)
|
||||
atmos_spawn_air("[gas_type]=[gas_amount]")
|
||||
|
||||
|
||||
/obj/effect/mine/gas/plasma
|
||||
name = "plasma mine"
|
||||
gas_type = "plasma"
|
||||
|
||||
|
||||
/obj/effect/mine/gas/n2o
|
||||
name = "\improper N2O mine"
|
||||
gas_type = "n2o"
|
||||
|
||||
|
||||
/obj/effect/mine/sound
|
||||
name = "honkblaster 1000"
|
||||
var/sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/effect/mine/sound/mineEffect(mob/victim)
|
||||
playsound(loc, sound, 100, 1)
|
||||
|
||||
|
||||
/obj/effect/mine/sound/bwoink
|
||||
name = "bwoink mine"
|
||||
sound = 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/obj/effect/mine/pickup
|
||||
name = "pickup"
|
||||
desc = "pick me up"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "electricity2"
|
||||
density = FALSE
|
||||
var/duration = 0
|
||||
|
||||
/obj/effect/mine/pickup/Initialize()
|
||||
. = ..()
|
||||
animate(src, pixel_y = 4, time = 20, loop = -1)
|
||||
|
||||
/obj/effect/mine/pickup/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
triggered = 1
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
mineEffect(victim)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath
|
||||
name = "Red Orb"
|
||||
desc = "You feel angry just looking at it."
|
||||
duration = 1200 //2min
|
||||
color = "#FF0000"
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
|
||||
var/old_color = victim.client.color
|
||||
var/static/list/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
||||
var/static/list/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
||||
|
||||
spawn(0)
|
||||
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
|
||||
|
||||
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
victim.log_message("entered a blood frenzy", LOG_ATTACK)
|
||||
|
||||
ADD_TRAIT(chainsaw, TRAIT_NODROP, CHAINSAW_FRENZY_TRAIT)
|
||||
victim.drop_all_held_items()
|
||||
victim.put_in_hands(chainsaw, forced = TRUE)
|
||||
chainsaw.attack_self(victim)
|
||||
chainsaw.wield(victim)
|
||||
victim.reagents.add_reagent(/datum/reagent/medicine/adminordrazine,25)
|
||||
to_chat(victim, "<span class='warning'>KILL, KILL, KILL! YOU HAVE NO ALLIES ANYMORE, KILL THEM ALL!</span>")
|
||||
|
||||
victim.client.color = pure_red
|
||||
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.</span>")
|
||||
qdel(chainsaw)
|
||||
victim.log_message("exited a blood frenzy", LOG_ATTACK)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/mine/pickup/healing
|
||||
name = "Blue Orb"
|
||||
desc = "You feel better just looking at it."
|
||||
color = "#0000FF"
|
||||
|
||||
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel great!</span>")
|
||||
victim.revive(full_heal = 1, admin_revive = 1)
|
||||
|
||||
/obj/effect/mine/pickup/speed
|
||||
name = "Yellow Orb"
|
||||
desc = "You feel faster just looking at it."
|
||||
color = "#FFFF00"
|
||||
duration = 300
|
||||
|
||||
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
to_chat(victim, "<span class='notice'>You feel fast!</span>")
|
||||
victim.add_movespeed_modifier(MOVESPEED_ID_YELLOW_ORB, update=TRUE, priority=100, multiplicative_slowdown=-2, blacklisted_movetypes=(FLYING|FLOATING))
|
||||
sleep(duration)
|
||||
victim.remove_movespeed_modifier(MOVESPEED_ID_YELLOW_ORB)
|
||||
to_chat(victim, "<span class='notice'>You slow down.</span>")
|
||||
|
||||
@@ -1,94 +1,94 @@
|
||||
//The effect when you wrap a dead body in gift wrap
|
||||
/obj/effect/spresent
|
||||
name = "strange present"
|
||||
desc = "It's a ... present?"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "strangepresent"
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
|
||||
/obj/effect/beam
|
||||
name = "beam"
|
||||
var/def_zone
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/obj/effect/beam/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/beam/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/spawner
|
||||
name = "object spawner"
|
||||
|
||||
/obj/effect/list_container
|
||||
name = "list container"
|
||||
|
||||
/obj/effect/list_container/mobl
|
||||
name = "mobl"
|
||||
var/master = null
|
||||
|
||||
var/list/container = list( )
|
||||
|
||||
/obj/effect/overlay/thermite
|
||||
name = "thermite"
|
||||
desc = "Looks hot."
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "2" //what?
|
||||
anchored = TRUE
|
||||
opacity = TRUE
|
||||
density = TRUE
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/effect/supplypod_selector
|
||||
icon_state = "supplypod_selector"
|
||||
layer = FLY_LAYER
|
||||
|
||||
//Makes a tile fully lit no matter what
|
||||
/obj/effect/fullbright
|
||||
icon = 'icons/effects/alphacolors.dmi'
|
||||
icon_state = "white"
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTING_LAYER
|
||||
blend_mode = BLEND_ADD
|
||||
|
||||
/obj/effect/abstract/marker
|
||||
name = "marker"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
anchored = TRUE
|
||||
icon_state = "wave3"
|
||||
layer = RIPPLE_LAYER
|
||||
|
||||
/obj/effect/abstract/marker/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.all_abstract_markers += src
|
||||
|
||||
/obj/effect/abstract/marker/Destroy()
|
||||
GLOB.all_abstract_markers -= src
|
||||
. = ..()
|
||||
|
||||
/obj/effect/abstract/marker/at
|
||||
name = "active turf marker"
|
||||
|
||||
|
||||
/obj/effect/dummy/lighting_obj
|
||||
name = "lighting fx obj"
|
||||
desc = "Tell a coder if you're seeing this."
|
||||
icon_state = "nothing"
|
||||
light_color = "#FFFFFF"
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/dummy/lighting_obj/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
set_light(_range ? _range : light_range, _power ? _power : light_power, _color ? _color : light_color)
|
||||
if(_duration)
|
||||
QDEL_IN(src, _duration)
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight
|
||||
name = "mob lighting fx"
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
if(!ismob(loc))
|
||||
//The effect when you wrap a dead body in gift wrap
|
||||
/obj/effect/spresent
|
||||
name = "strange present"
|
||||
desc = "It's a ... present?"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "strangepresent"
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
|
||||
/obj/effect/beam
|
||||
name = "beam"
|
||||
var/def_zone
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/obj/effect/beam/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/beam/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/spawner
|
||||
name = "object spawner"
|
||||
|
||||
/obj/effect/list_container
|
||||
name = "list container"
|
||||
|
||||
/obj/effect/list_container/mobl
|
||||
name = "mobl"
|
||||
var/master = null
|
||||
|
||||
var/list/container = list( )
|
||||
|
||||
/obj/effect/overlay/thermite
|
||||
name = "thermite"
|
||||
desc = "Looks hot."
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "2" //what?
|
||||
anchored = TRUE
|
||||
opacity = TRUE
|
||||
density = TRUE
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/effect/supplypod_selector
|
||||
icon_state = "supplypod_selector"
|
||||
layer = FLY_LAYER
|
||||
|
||||
//Makes a tile fully lit no matter what
|
||||
/obj/effect/fullbright
|
||||
icon = 'icons/effects/alphacolors.dmi'
|
||||
icon_state = "white"
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTING_LAYER
|
||||
blend_mode = BLEND_ADD
|
||||
|
||||
/obj/effect/abstract/marker
|
||||
name = "marker"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
anchored = TRUE
|
||||
icon_state = "wave3"
|
||||
layer = RIPPLE_LAYER
|
||||
|
||||
/obj/effect/abstract/marker/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.all_abstract_markers += src
|
||||
|
||||
/obj/effect/abstract/marker/Destroy()
|
||||
GLOB.all_abstract_markers -= src
|
||||
. = ..()
|
||||
|
||||
/obj/effect/abstract/marker/at
|
||||
name = "active turf marker"
|
||||
|
||||
|
||||
/obj/effect/dummy/lighting_obj
|
||||
name = "lighting fx obj"
|
||||
desc = "Tell a coder if you're seeing this."
|
||||
icon_state = "nothing"
|
||||
light_color = "#FFFFFF"
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/dummy/lighting_obj/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
set_light(_range ? _range : light_range, _power ? _power : light_power, _color ? _color : light_color)
|
||||
if(_duration)
|
||||
QDEL_IN(src, _duration)
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight
|
||||
name = "mob lighting fx"
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
if(!ismob(loc))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -1,185 +1,185 @@
|
||||
|
||||
/proc/create_portal_pair(turf/source, turf/destination, _creator = null, _lifespan = 300, accuracy = 0, newtype = /obj/effect/portal, atmos_link_override)
|
||||
if(!istype(source) || !istype(destination))
|
||||
return
|
||||
var/turf/actual_destination = get_teleport_turf(destination, accuracy)
|
||||
var/obj/effect/portal/P1 = new newtype(source, _creator, _lifespan, null, FALSE, null, atmos_link_override)
|
||||
var/obj/effect/portal/P2 = new newtype(actual_destination, _creator, _lifespan, P1, TRUE, null, atmos_link_override)
|
||||
if(!istype(P1)||!istype(P2))
|
||||
return
|
||||
P1.link_portal(P2)
|
||||
P1.hardlinked = TRUE
|
||||
return list(P1, P2)
|
||||
|
||||
/obj/effect/portal
|
||||
name = "portal"
|
||||
desc = "Looks unstable. Best to test it with the clown."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "portal"
|
||||
anchored = TRUE
|
||||
var/mech_sized = FALSE
|
||||
var/obj/effect/portal/linked
|
||||
var/hardlinked = TRUE //Requires a linked portal at all times. Destroy if there's no linked portal, if there is destroy it when this one is deleted.
|
||||
var/teleport_channel = TELEPORT_CHANNEL_BLUESPACE
|
||||
var/creator
|
||||
var/turf/hard_target //For when a portal needs a hard target and isn't to be linked.
|
||||
var/atmos_link = FALSE //Link source/destination atmos.
|
||||
var/turf/open/atmos_source //Atmos link source
|
||||
var/turf/open/atmos_destination //Atmos link destination
|
||||
var/allow_anchored = FALSE
|
||||
var/innate_accuracy_penalty = 0
|
||||
var/last_effect = 0
|
||||
|
||||
/obj/effect/portal/anom
|
||||
name = "wormhole"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "anom"
|
||||
mech_sized = TRUE
|
||||
teleport_channel = TELEPORT_CHANNEL_WORMHOLE
|
||||
|
||||
/obj/effect/portal/Move(newloc)
|
||||
for(var/T in newloc)
|
||||
if(istype(T, /obj/effect/portal))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attackby(obj/item/W, mob/user, params)
|
||||
if(user && Adjacent(user))
|
||||
user.forceMove(get_turf(src))
|
||||
return TRUE
|
||||
|
||||
/obj/effect/portal/Crossed(atom/movable/AM, oldloc)
|
||||
if(isobserver(AM))
|
||||
return ..()
|
||||
if(linked && (get_turf(oldloc) == get_turf(linked)))
|
||||
return ..()
|
||||
if(!teleport(AM))
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(get_turf(user) == get_turf(src))
|
||||
teleport(user)
|
||||
if(Adjacent(user))
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
/obj/effect/portal/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override)
|
||||
. = ..()
|
||||
GLOB.portals += src
|
||||
if(!istype(_linked) && automatic_link)
|
||||
. = INITIALIZE_HINT_QDEL
|
||||
CRASH("Somebody fucked up.")
|
||||
if(_lifespan > 0)
|
||||
QDEL_IN(src, _lifespan)
|
||||
if(!isnull(atmos_link_override))
|
||||
atmos_link = atmos_link_override
|
||||
link_portal(_linked)
|
||||
hardlinked = automatic_link
|
||||
creator = _creator
|
||||
if(isturf(hard_target_override))
|
||||
hard_target = hard_target_override
|
||||
|
||||
/obj/effect/portal/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/portal/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/portal/proc/link_portal(obj/effect/portal/newlink)
|
||||
linked = newlink
|
||||
if(atmos_link)
|
||||
link_atmos()
|
||||
|
||||
/obj/effect/portal/proc/link_atmos()
|
||||
if(atmos_source || atmos_destination)
|
||||
unlink_atmos()
|
||||
if(!isopenturf(get_turf(src)))
|
||||
return FALSE
|
||||
if(linked)
|
||||
if(isopenturf(get_turf(linked)))
|
||||
atmos_source = get_turf(src)
|
||||
atmos_destination = get_turf(linked)
|
||||
else if(hard_target)
|
||||
if(isopenturf(hard_target))
|
||||
atmos_source = get_turf(src)
|
||||
atmos_destination = hard_target
|
||||
else
|
||||
return FALSE
|
||||
if(!istype(atmos_source) || !istype(atmos_destination))
|
||||
return FALSE
|
||||
LAZYINITLIST(atmos_source.atmos_adjacent_turfs)
|
||||
LAZYINITLIST(atmos_destination.atmos_adjacent_turfs)
|
||||
if(atmos_source.atmos_adjacent_turfs[atmos_destination] || atmos_destination.atmos_adjacent_turfs[atmos_source]) //Already linked!
|
||||
return FALSE
|
||||
atmos_source.atmos_adjacent_turfs[atmos_destination] = TRUE
|
||||
atmos_destination.atmos_adjacent_turfs[atmos_source] = TRUE
|
||||
atmos_source.air_update_turf(FALSE)
|
||||
atmos_destination.air_update_turf(FALSE)
|
||||
|
||||
/obj/effect/portal/proc/unlink_atmos()
|
||||
if(istype(atmos_source))
|
||||
if(istype(atmos_destination) && !atmos_source.Adjacent(atmos_destination) && !CANATMOSPASS(atmos_destination, atmos_source))
|
||||
LAZYREMOVE(atmos_source.atmos_adjacent_turfs, atmos_destination)
|
||||
atmos_source = null
|
||||
if(istype(atmos_destination))
|
||||
if(istype(atmos_source) && !atmos_destination.Adjacent(atmos_source) && !CANATMOSPASS(atmos_source, atmos_destination))
|
||||
LAZYREMOVE(atmos_destination.atmos_adjacent_turfs, atmos_source)
|
||||
atmos_destination = null
|
||||
|
||||
/obj/effect/portal/Destroy() //Calls on_portal_destroy(destroyed portal, location of destroyed portal) on creator if creator has such call.
|
||||
if(creator && hascall(creator, "on_portal_destroy"))
|
||||
call(creator, "on_portal_destroy")(src, src.loc)
|
||||
creator = null
|
||||
GLOB.portals -= src
|
||||
unlink_atmos()
|
||||
if(hardlinked && !QDELETED(linked))
|
||||
QDEL_NULL(linked)
|
||||
else
|
||||
linked = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_ghost(mob/dead/observer/O)
|
||||
if(!teleport(O, TRUE))
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M, force = FALSE)
|
||||
if(!force && (!istype(M) || iseffect(M) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M)))) //Things that shouldn't teleport.
|
||||
return
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(!force && (!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored))
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_VERBOSEJMP(src)] made by [usr].")
|
||||
var/no_effect = FALSE
|
||||
if(last_effect == world.time)
|
||||
no_effect = TRUE
|
||||
else
|
||||
last_effect = world.time
|
||||
if(do_teleport(M, real_target, innate_accuracy_penalty, no_effects = no_effect, channel = teleport_channel))
|
||||
if(istype(M, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = M
|
||||
P.ignore_source_check = TRUE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/effect/portal/proc/get_link_target_turf()
|
||||
var/turf/real_target
|
||||
if(!istype(linked) || QDELETED(linked))
|
||||
if(hardlinked)
|
||||
qdel(src)
|
||||
if(!istype(hard_target) || QDELETED(hard_target))
|
||||
hard_target = null
|
||||
return
|
||||
else
|
||||
real_target = hard_target
|
||||
linked = null
|
||||
else
|
||||
real_target = get_turf(linked)
|
||||
return real_target
|
||||
|
||||
/proc/create_portal_pair(turf/source, turf/destination, _creator = null, _lifespan = 300, accuracy = 0, newtype = /obj/effect/portal, atmos_link_override)
|
||||
if(!istype(source) || !istype(destination))
|
||||
return
|
||||
var/turf/actual_destination = get_teleport_turf(destination, accuracy)
|
||||
var/obj/effect/portal/P1 = new newtype(source, _creator, _lifespan, null, FALSE, null, atmos_link_override)
|
||||
var/obj/effect/portal/P2 = new newtype(actual_destination, _creator, _lifespan, P1, TRUE, null, atmos_link_override)
|
||||
if(!istype(P1)||!istype(P2))
|
||||
return
|
||||
P1.link_portal(P2)
|
||||
P1.hardlinked = TRUE
|
||||
return list(P1, P2)
|
||||
|
||||
/obj/effect/portal
|
||||
name = "portal"
|
||||
desc = "Looks unstable. Best to test it with the clown."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "portal"
|
||||
anchored = TRUE
|
||||
var/mech_sized = FALSE
|
||||
var/obj/effect/portal/linked
|
||||
var/hardlinked = TRUE //Requires a linked portal at all times. Destroy if there's no linked portal, if there is destroy it when this one is deleted.
|
||||
var/teleport_channel = TELEPORT_CHANNEL_BLUESPACE
|
||||
var/creator
|
||||
var/turf/hard_target //For when a portal needs a hard target and isn't to be linked.
|
||||
var/atmos_link = FALSE //Link source/destination atmos.
|
||||
var/turf/open/atmos_source //Atmos link source
|
||||
var/turf/open/atmos_destination //Atmos link destination
|
||||
var/allow_anchored = FALSE
|
||||
var/innate_accuracy_penalty = 0
|
||||
var/last_effect = 0
|
||||
|
||||
/obj/effect/portal/anom
|
||||
name = "wormhole"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "anom"
|
||||
mech_sized = TRUE
|
||||
teleport_channel = TELEPORT_CHANNEL_WORMHOLE
|
||||
|
||||
/obj/effect/portal/Move(newloc)
|
||||
for(var/T in newloc)
|
||||
if(istype(T, /obj/effect/portal))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attackby(obj/item/W, mob/user, params)
|
||||
if(user && Adjacent(user))
|
||||
user.forceMove(get_turf(src))
|
||||
return TRUE
|
||||
|
||||
/obj/effect/portal/Crossed(atom/movable/AM, oldloc)
|
||||
if(isobserver(AM))
|
||||
return ..()
|
||||
if(linked && (get_turf(oldloc) == get_turf(linked)))
|
||||
return ..()
|
||||
if(!teleport(AM))
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(get_turf(user) == get_turf(src))
|
||||
teleport(user)
|
||||
if(Adjacent(user))
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
/obj/effect/portal/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override)
|
||||
. = ..()
|
||||
GLOB.portals += src
|
||||
if(!istype(_linked) && automatic_link)
|
||||
. = INITIALIZE_HINT_QDEL
|
||||
CRASH("Somebody fucked up.")
|
||||
if(_lifespan > 0)
|
||||
QDEL_IN(src, _lifespan)
|
||||
if(!isnull(atmos_link_override))
|
||||
atmos_link = atmos_link_override
|
||||
link_portal(_linked)
|
||||
hardlinked = automatic_link
|
||||
creator = _creator
|
||||
if(isturf(hard_target_override))
|
||||
hard_target = hard_target_override
|
||||
|
||||
/obj/effect/portal/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/portal/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/portal/proc/link_portal(obj/effect/portal/newlink)
|
||||
linked = newlink
|
||||
if(atmos_link)
|
||||
link_atmos()
|
||||
|
||||
/obj/effect/portal/proc/link_atmos()
|
||||
if(atmos_source || atmos_destination)
|
||||
unlink_atmos()
|
||||
if(!isopenturf(get_turf(src)))
|
||||
return FALSE
|
||||
if(linked)
|
||||
if(isopenturf(get_turf(linked)))
|
||||
atmos_source = get_turf(src)
|
||||
atmos_destination = get_turf(linked)
|
||||
else if(hard_target)
|
||||
if(isopenturf(hard_target))
|
||||
atmos_source = get_turf(src)
|
||||
atmos_destination = hard_target
|
||||
else
|
||||
return FALSE
|
||||
if(!istype(atmos_source) || !istype(atmos_destination))
|
||||
return FALSE
|
||||
LAZYINITLIST(atmos_source.atmos_adjacent_turfs)
|
||||
LAZYINITLIST(atmos_destination.atmos_adjacent_turfs)
|
||||
if(atmos_source.atmos_adjacent_turfs[atmos_destination] || atmos_destination.atmos_adjacent_turfs[atmos_source]) //Already linked!
|
||||
return FALSE
|
||||
atmos_source.atmos_adjacent_turfs[atmos_destination] = TRUE
|
||||
atmos_destination.atmos_adjacent_turfs[atmos_source] = TRUE
|
||||
atmos_source.air_update_turf(FALSE)
|
||||
atmos_destination.air_update_turf(FALSE)
|
||||
|
||||
/obj/effect/portal/proc/unlink_atmos()
|
||||
if(istype(atmos_source))
|
||||
if(istype(atmos_destination) && !atmos_source.Adjacent(atmos_destination) && !CANATMOSPASS(atmos_destination, atmos_source))
|
||||
LAZYREMOVE(atmos_source.atmos_adjacent_turfs, atmos_destination)
|
||||
atmos_source = null
|
||||
if(istype(atmos_destination))
|
||||
if(istype(atmos_source) && !atmos_destination.Adjacent(atmos_source) && !CANATMOSPASS(atmos_source, atmos_destination))
|
||||
LAZYREMOVE(atmos_destination.atmos_adjacent_turfs, atmos_source)
|
||||
atmos_destination = null
|
||||
|
||||
/obj/effect/portal/Destroy() //Calls on_portal_destroy(destroyed portal, location of destroyed portal) on creator if creator has such call.
|
||||
if(creator && hascall(creator, "on_portal_destroy"))
|
||||
call(creator, "on_portal_destroy")(src, src.loc)
|
||||
creator = null
|
||||
GLOB.portals -= src
|
||||
unlink_atmos()
|
||||
if(hardlinked && !QDELETED(linked))
|
||||
QDEL_NULL(linked)
|
||||
else
|
||||
linked = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_ghost(mob/dead/observer/O)
|
||||
if(!teleport(O, TRUE))
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M, force = FALSE)
|
||||
if(!force && (!istype(M) || iseffect(M) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M)))) //Things that shouldn't teleport.
|
||||
return
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(!force && (!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored))
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_VERBOSEJMP(src)] made by [usr].")
|
||||
var/no_effect = FALSE
|
||||
if(last_effect == world.time)
|
||||
no_effect = TRUE
|
||||
else
|
||||
last_effect = world.time
|
||||
if(do_teleport(M, real_target, innate_accuracy_penalty, no_effects = no_effect, channel = teleport_channel))
|
||||
if(istype(M, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = M
|
||||
P.ignore_source_check = TRUE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/effect/portal/proc/get_link_target_turf()
|
||||
var/turf/real_target
|
||||
if(!istype(linked) || QDELETED(linked))
|
||||
if(hardlinked)
|
||||
qdel(src)
|
||||
if(!istype(hard_target) || QDELETED(hard_target))
|
||||
hard_target = null
|
||||
return
|
||||
else
|
||||
real_target = hard_target
|
||||
linked = null
|
||||
else
|
||||
real_target = get_turf(linked)
|
||||
return real_target
|
||||
|
||||
@@ -1,112 +1,112 @@
|
||||
/datum/proximity_monitor
|
||||
var/atom/host //the atom we are tracking
|
||||
var/atom/hasprox_receiver //the atom that will receive HasProximity calls.
|
||||
var/atom/last_host_loc
|
||||
var/list/checkers //list of /obj/effect/abstract/proximity_checkers
|
||||
var/current_range
|
||||
var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf
|
||||
|
||||
/datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
|
||||
checkers = list()
|
||||
last_host_loc = _host.loc
|
||||
ignore_if_not_on_turf = _ignore_if_not_on_turf
|
||||
current_range = range
|
||||
SetHost(_host)
|
||||
|
||||
/datum/proximity_monitor/proc/SetHost(atom/H,atom/R)
|
||||
if(H == host)
|
||||
return
|
||||
if(host)
|
||||
UnregisterSignal(host, COMSIG_MOVABLE_MOVED)
|
||||
if(R)
|
||||
hasprox_receiver = R
|
||||
else if(hasprox_receiver == host) //Default case
|
||||
hasprox_receiver = H
|
||||
host = H
|
||||
RegisterSignal(host, COMSIG_MOVABLE_MOVED, .proc/HandleMove)
|
||||
last_host_loc = host.loc
|
||||
SetRange(current_range,TRUE)
|
||||
|
||||
/datum/proximity_monitor/Destroy()
|
||||
host = null
|
||||
last_host_loc = null
|
||||
hasprox_receiver = null
|
||||
QDEL_LIST(checkers)
|
||||
return ..()
|
||||
|
||||
/datum/proximity_monitor/proc/HandleMove()
|
||||
var/atom/_host = host
|
||||
var/atom/new_host_loc = _host.loc
|
||||
if(last_host_loc != new_host_loc)
|
||||
last_host_loc = new_host_loc //hopefully this won't cause GC issues with containers
|
||||
var/curr_range = current_range
|
||||
SetRange(curr_range, TRUE)
|
||||
if(curr_range)
|
||||
testing("HasProx: [host] -> [host]")
|
||||
hasprox_receiver.HasProximity(host) //if we are processing, we're guaranteed to be a movable
|
||||
|
||||
/datum/proximity_monitor/proc/SetRange(range, force_rebuild = FALSE)
|
||||
if(!force_rebuild && range == current_range)
|
||||
return FALSE
|
||||
. = TRUE
|
||||
|
||||
current_range = range
|
||||
|
||||
var/list/checkers_local = checkers
|
||||
var/old_checkers_len = checkers_local.len
|
||||
|
||||
var/atom/_host = host
|
||||
|
||||
var/atom/loc_to_use = ignore_if_not_on_turf ? _host.loc : get_turf(_host)
|
||||
if(!isturf(loc_to_use)) //only check the host's loc
|
||||
if(range)
|
||||
var/obj/effect/abstract/proximity_checker/pc
|
||||
if(old_checkers_len)
|
||||
pc = checkers_local[old_checkers_len]
|
||||
--checkers_local.len
|
||||
QDEL_LIST(checkers_local)
|
||||
else
|
||||
pc = new(loc_to_use, src)
|
||||
|
||||
checkers_local += pc //only check the host's loc
|
||||
return
|
||||
|
||||
var/list/turfs = RANGE_TURFS(range, loc_to_use)
|
||||
var/turfs_len = turfs.len
|
||||
var/old_checkers_used = min(turfs_len, old_checkers_len)
|
||||
|
||||
//reuse what we can
|
||||
for(var/I in 1 to old_checkers_len)
|
||||
if(I <= old_checkers_used)
|
||||
var/obj/effect/abstract/proximity_checker/pc = checkers_local[I]
|
||||
pc.forceMove(turfs[I])
|
||||
else
|
||||
qdel(checkers_local[I]) //delete the leftovers
|
||||
|
||||
if(old_checkers_len < turfs_len)
|
||||
//create what we lack
|
||||
for(var/I in (old_checkers_used + 1) to turfs_len)
|
||||
checkers_local += new /obj/effect/abstract/proximity_checker(turfs[I], src)
|
||||
else
|
||||
checkers_local.Cut(old_checkers_used + 1, old_checkers_len)
|
||||
|
||||
/obj/effect/abstract/proximity_checker
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
anchored = TRUE
|
||||
var/datum/proximity_monitor/monitor
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Initialize(mapload, datum/proximity_monitor/_monitor)
|
||||
. = ..()
|
||||
if(_monitor)
|
||||
monitor = _monitor
|
||||
else
|
||||
stack_trace("proximity_checker created without host")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Destroy()
|
||||
monitor = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM)
|
||||
set waitfor = FALSE
|
||||
monitor.hasprox_receiver.HasProximity(AM)
|
||||
/datum/proximity_monitor
|
||||
var/atom/host //the atom we are tracking
|
||||
var/atom/hasprox_receiver //the atom that will receive HasProximity calls.
|
||||
var/atom/last_host_loc
|
||||
var/list/checkers //list of /obj/effect/abstract/proximity_checkers
|
||||
var/current_range
|
||||
var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf
|
||||
|
||||
/datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
|
||||
checkers = list()
|
||||
last_host_loc = _host.loc
|
||||
ignore_if_not_on_turf = _ignore_if_not_on_turf
|
||||
current_range = range
|
||||
SetHost(_host)
|
||||
|
||||
/datum/proximity_monitor/proc/SetHost(atom/H,atom/R)
|
||||
if(H == host)
|
||||
return
|
||||
if(host)
|
||||
UnregisterSignal(host, COMSIG_MOVABLE_MOVED)
|
||||
if(R)
|
||||
hasprox_receiver = R
|
||||
else if(hasprox_receiver == host) //Default case
|
||||
hasprox_receiver = H
|
||||
host = H
|
||||
RegisterSignal(host, COMSIG_MOVABLE_MOVED, .proc/HandleMove)
|
||||
last_host_loc = host.loc
|
||||
SetRange(current_range,TRUE)
|
||||
|
||||
/datum/proximity_monitor/Destroy()
|
||||
host = null
|
||||
last_host_loc = null
|
||||
hasprox_receiver = null
|
||||
QDEL_LIST(checkers)
|
||||
return ..()
|
||||
|
||||
/datum/proximity_monitor/proc/HandleMove()
|
||||
var/atom/_host = host
|
||||
var/atom/new_host_loc = _host.loc
|
||||
if(last_host_loc != new_host_loc)
|
||||
last_host_loc = new_host_loc //hopefully this won't cause GC issues with containers
|
||||
var/curr_range = current_range
|
||||
SetRange(curr_range, TRUE)
|
||||
if(curr_range)
|
||||
testing("HasProx: [host] -> [host]")
|
||||
hasprox_receiver.HasProximity(host) //if we are processing, we're guaranteed to be a movable
|
||||
|
||||
/datum/proximity_monitor/proc/SetRange(range, force_rebuild = FALSE)
|
||||
if(!force_rebuild && range == current_range)
|
||||
return FALSE
|
||||
. = TRUE
|
||||
|
||||
current_range = range
|
||||
|
||||
var/list/checkers_local = checkers
|
||||
var/old_checkers_len = checkers_local.len
|
||||
|
||||
var/atom/_host = host
|
||||
|
||||
var/atom/loc_to_use = ignore_if_not_on_turf ? _host.loc : get_turf(_host)
|
||||
if(!isturf(loc_to_use)) //only check the host's loc
|
||||
if(range)
|
||||
var/obj/effect/abstract/proximity_checker/pc
|
||||
if(old_checkers_len)
|
||||
pc = checkers_local[old_checkers_len]
|
||||
--checkers_local.len
|
||||
QDEL_LIST(checkers_local)
|
||||
else
|
||||
pc = new(loc_to_use, src)
|
||||
|
||||
checkers_local += pc //only check the host's loc
|
||||
return
|
||||
|
||||
var/list/turfs = RANGE_TURFS(range, loc_to_use)
|
||||
var/turfs_len = turfs.len
|
||||
var/old_checkers_used = min(turfs_len, old_checkers_len)
|
||||
|
||||
//reuse what we can
|
||||
for(var/I in 1 to old_checkers_len)
|
||||
if(I <= old_checkers_used)
|
||||
var/obj/effect/abstract/proximity_checker/pc = checkers_local[I]
|
||||
pc.forceMove(turfs[I])
|
||||
else
|
||||
qdel(checkers_local[I]) //delete the leftovers
|
||||
|
||||
if(old_checkers_len < turfs_len)
|
||||
//create what we lack
|
||||
for(var/I in (old_checkers_used + 1) to turfs_len)
|
||||
checkers_local += new /obj/effect/abstract/proximity_checker(turfs[I], src)
|
||||
else
|
||||
checkers_local.Cut(old_checkers_used + 1, old_checkers_len)
|
||||
|
||||
/obj/effect/abstract/proximity_checker
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
anchored = TRUE
|
||||
var/datum/proximity_monitor/monitor
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Initialize(mapload, datum/proximity_monitor/_monitor)
|
||||
. = ..()
|
||||
if(_monitor)
|
||||
monitor = _monitor
|
||||
else
|
||||
stack_trace("proximity_checker created without host")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Destroy()
|
||||
monitor = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM)
|
||||
set waitfor = FALSE
|
||||
monitor.hasprox_receiver.HasProximity(AM)
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C)
|
||||
|
||||
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma]) / (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma] + (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen] / CELSIUS_TO_KELVIN(TEMP_O)))
|
||||
#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O))
|
||||
|
||||
/obj/effect/spawner/newbomb
|
||||
name = "bomb"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
var/temp_p = 1500
|
||||
var/temp_o = 1000 // tank temperatures
|
||||
var/pressure_p = 10 * ONE_ATMOSPHERE
|
||||
var/pressure_o = 10 * ONE_ATMOSPHERE //tank pressures
|
||||
var/assembly_type
|
||||
|
||||
/obj/effect/spawner/newbomb/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/transfer_valve/V = new(src.loc)
|
||||
var/obj/item/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
PT.air_contents.gases[/datum/gas/plasma] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
|
||||
PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
|
||||
|
||||
OT.air_contents.gases[/datum/gas/oxygen] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
|
||||
OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
|
||||
|
||||
V.tank_one = PT
|
||||
V.tank_two = OT
|
||||
PT.master = V
|
||||
OT.master = V
|
||||
|
||||
if(assembly_type)
|
||||
var/obj/item/assembly/A = new assembly_type(V)
|
||||
V.attached_device = A
|
||||
A.holder = V
|
||||
|
||||
V.update_icon()
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/spawner/newbomb/timer/syndicate/Initialize()
|
||||
temp_p = (OPTIMAL_TEMP_K_PLA_BURN_SCALE(pressure_p, pressure_o, temp_o)/2 + OPTIMAL_TEMP_K_PLA_BURN_RATIO(pressure_p, pressure_o, temp_o)/2) - T0C
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/newbomb/timer
|
||||
assembly_type = /obj/item/assembly/timer
|
||||
|
||||
/obj/effect/spawner/newbomb/timer/syndicate
|
||||
pressure_o = TANK_LEAK_PRESSURE - 1
|
||||
temp_o = 20
|
||||
|
||||
pressure_p = TANK_LEAK_PRESSURE - 1
|
||||
|
||||
/obj/effect/spawner/newbomb/proximity
|
||||
assembly_type = /obj/item/assembly/prox_sensor
|
||||
|
||||
/obj/effect/spawner/newbomb/radio
|
||||
assembly_type = /obj/item/assembly/signaler
|
||||
|
||||
|
||||
#undef CELSIUS_TO_KELVIN
|
||||
|
||||
#undef OPTIMAL_TEMP_K_PLA_BURN_SCALE
|
||||
#undef OPTIMAL_TEMP_K_PLA_BURN_RATIO
|
||||
#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C)
|
||||
|
||||
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma]) / (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma] + (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen] / CELSIUS_TO_KELVIN(TEMP_O)))
|
||||
#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O))
|
||||
|
||||
/obj/effect/spawner/newbomb
|
||||
name = "bomb"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
var/temp_p = 1500
|
||||
var/temp_o = 1000 // tank temperatures
|
||||
var/pressure_p = 10 * ONE_ATMOSPHERE
|
||||
var/pressure_o = 10 * ONE_ATMOSPHERE //tank pressures
|
||||
var/assembly_type
|
||||
|
||||
/obj/effect/spawner/newbomb/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/transfer_valve/V = new(src.loc)
|
||||
var/obj/item/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
PT.air_contents.gases[/datum/gas/plasma] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
|
||||
PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
|
||||
|
||||
OT.air_contents.gases[/datum/gas/oxygen] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
|
||||
OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
|
||||
|
||||
V.tank_one = PT
|
||||
V.tank_two = OT
|
||||
PT.master = V
|
||||
OT.master = V
|
||||
|
||||
if(assembly_type)
|
||||
var/obj/item/assembly/A = new assembly_type(V)
|
||||
V.attached_device = A
|
||||
A.holder = V
|
||||
|
||||
V.update_icon()
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/spawner/newbomb/timer/syndicate/Initialize()
|
||||
temp_p = (OPTIMAL_TEMP_K_PLA_BURN_SCALE(pressure_p, pressure_o, temp_o)/2 + OPTIMAL_TEMP_K_PLA_BURN_RATIO(pressure_p, pressure_o, temp_o)/2) - T0C
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/newbomb/timer
|
||||
assembly_type = /obj/item/assembly/timer
|
||||
|
||||
/obj/effect/spawner/newbomb/timer/syndicate
|
||||
pressure_o = TANK_LEAK_PRESSURE - 1
|
||||
temp_o = 20
|
||||
|
||||
pressure_p = TANK_LEAK_PRESSURE - 1
|
||||
|
||||
/obj/effect/spawner/newbomb/proximity
|
||||
assembly_type = /obj/item/assembly/prox_sensor
|
||||
|
||||
/obj/effect/spawner/newbomb/radio
|
||||
assembly_type = /obj/item/assembly/signaler
|
||||
|
||||
|
||||
#undef CELSIUS_TO_KELVIN
|
||||
|
||||
#undef OPTIMAL_TEMP_K_PLA_BURN_SCALE
|
||||
#undef OPTIMAL_TEMP_K_PLA_BURN_RATIO
|
||||
|
||||
@@ -1,240 +1,240 @@
|
||||
|
||||
/obj/effect/gibspawner
|
||||
var/sparks = FALSE //whether sparks spread
|
||||
var/virusProb = 20 //the chance for viruses to spread on the gibs
|
||||
var/gib_mob_type //generate a fake mob to transfer DNA from if we weren't passed a mob.
|
||||
var/gib_mob_species //We'll want to nip-pick their species for blood type stuff
|
||||
var/sound_to_play = 'sound/effects/blobattack.ogg'
|
||||
var/sound_vol = 60
|
||||
var/list/gibtypes = list() //typepaths of the gib decals to spawn
|
||||
var/list/gibamounts = list() //amount to spawn for each gib decal type we'll spawn.
|
||||
var/list/gibdirections = list() //of lists of possible directions to spread each gib decal type towards.
|
||||
|
||||
/obj/effect/gibspawner/Initialize(mapload, mob/living/source_mob, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
if(gibtypes.len != gibamounts.len)
|
||||
stack_trace("Gib list amount length mismatch!")
|
||||
return
|
||||
if(gibamounts.len != gibdirections.len)
|
||||
stack_trace("Gib list dir length mismatch!")
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
|
||||
if(sound_to_play && isnum(sound_vol))
|
||||
playsound(src, sound_to_play, sound_vol, TRUE)
|
||||
|
||||
if(sparks)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, loc)
|
||||
s.start()
|
||||
|
||||
var/list/dna_to_add //find the dna to pass to the spawned gibs. do note this can be null if the mob doesn't have blood. add_blood_DNA() has built in null handling.
|
||||
var/body_coloring = ""
|
||||
if(source_mob)
|
||||
if(!issilicon(source_mob))
|
||||
dna_to_add = source_mob.get_blood_dna_list() //ez pz
|
||||
if(ishuman(source_mob))
|
||||
var/mob/living/carbon/human/H = source_mob
|
||||
if(H.dna.species.use_skintones)
|
||||
body_coloring = "#[skintone2hex(H.skin_tone)]"
|
||||
else
|
||||
body_coloring = "#[H.dna.features["mcolor"]]"
|
||||
|
||||
else if(gib_mob_type)
|
||||
var/mob/living/temp_mob = new gib_mob_type(src) //generate a fake mob so that we pull the right type of DNA for the gibs.
|
||||
if(gib_mob_species)
|
||||
if(ishuman(temp_mob))
|
||||
var/mob/living/carbon/human/H = temp_mob
|
||||
H.set_species(gib_mob_species)
|
||||
dna_to_add = temp_mob.get_blood_dna_list()
|
||||
if(H.dna.species.use_skintones)
|
||||
body_coloring = "#[skintone2hex(H.skin_tone)]"
|
||||
else
|
||||
body_coloring = "#[H.dna.features["mcolor"]]"
|
||||
else
|
||||
dna_to_add = temp_mob.get_blood_dna_list()
|
||||
else if(!issilicon(temp_mob))
|
||||
dna_to_add = temp_mob.get_blood_dna_list()
|
||||
qdel(temp_mob)
|
||||
else
|
||||
dna_to_add = list("Non-human DNA" = random_blood_type()) //else, generate a random bloodtype for it.
|
||||
|
||||
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(loc, diseases)
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/digester = loc
|
||||
digester.stomach_contents += gib
|
||||
|
||||
if(dna_to_add && dna_to_add.len)
|
||||
gib.add_blood_DNA(dna_to_add)
|
||||
gib.body_colors = body_coloring
|
||||
gib.update_icon()
|
||||
|
||||
var/list/directions = gibdirections[i]
|
||||
if(isturf(loc))
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
/obj/effect/gibspawner/generic
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs, /obj/effect/decal/cleanable/blood/gibs, /obj/effect/decal/cleanable/blood/gibs/core)
|
||||
gibamounts = list(2, 2, 1)
|
||||
sound_vol = 40
|
||||
|
||||
/obj/effect/gibspawner/generic/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/generic/animal
|
||||
gib_mob_type = /mob/living/simple_animal/pet
|
||||
|
||||
/obj/effect/gibspawner/human
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human/up, /obj/effect/decal/cleanable/blood/gibs/human/down, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/body, /obj/effect/decal/cleanable/blood/gibs/human/limb, /obj/effect/decal/cleanable/blood/gibs/human/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human
|
||||
gib_mob_species = /datum/species/human
|
||||
sound_vol = 50
|
||||
|
||||
/obj/effect/gibspawner/human/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/human/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/core, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/core, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/human/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/lizard
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human/lizard/up, /obj/effect/decal/cleanable/blood/gibs/human/lizard/down, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/body, /obj/effect/decal/cleanable/blood/gibs/human/lizard/limb, /obj/effect/decal/cleanable/blood/gibs/human/lizard/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human/species/lizard
|
||||
gib_mob_species = /datum/species/lizard
|
||||
sound_vol = 50
|
||||
|
||||
/obj/effect/gibspawner/lizard/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/lizard/bodypartless
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/core, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/core, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/lizard/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/slime
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/slime/up, /obj/effect/decal/cleanable/blood/gibs/slime/down, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/body, /obj/effect/decal/cleanable/blood/gibs/slime/limb, /obj/effect/decal/cleanable/blood/gibs/slime/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human/species/roundstartslime
|
||||
gib_mob_species = /datum/species/jelly/roundstartslime
|
||||
sound_vol = 50
|
||||
|
||||
/obj/effect/gibspawner/slime/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/slime/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/core, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/core, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/slime/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/ipc
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/ipc/up, /obj/effect/decal/cleanable/blood/gibs/ipc/down, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/body, /obj/effect/decal/cleanable/blood/gibs/ipc/limb, /obj/effect/decal/cleanable/blood/gibs/ipc/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human/species/ipc
|
||||
gib_mob_species = /datum/species/ipc
|
||||
sound_vol = 50
|
||||
sparks = TRUE
|
||||
sound_to_play = 'sound/effects/bang.ogg'
|
||||
|
||||
/obj/effect/gibspawner/ipc/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/ipc/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/core, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/core, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/ipc/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/xeno
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up, /obj/effect/decal/cleanable/blood/gibs/xeno/down, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/body, /obj/effect/decal/cleanable/blood/gibs/xeno/limb, /obj/effect/decal/cleanable/blood/gibs/xeno/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/alien
|
||||
|
||||
/obj/effect/gibspawner/xeno/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/xeno/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/core, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/core, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/xeno/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/xeno/xenoperson
|
||||
gib_mob_type = /mob/living/carbon/human/species/xeno
|
||||
gib_mob_species = /datum/species/xeno
|
||||
|
||||
/obj/effect/gibspawner/xeno/xenoperson/bodypartless
|
||||
|
||||
/obj/effect/gibspawner/larva
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva/body, /obj/effect/decal/cleanable/blood/gibs/xeno/larva/body)
|
||||
gibamounts = list(1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/alien/larva
|
||||
|
||||
/obj/effect/gibspawner/larva/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST), list(), GLOB.alldirs)
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/larva/bodypartless
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva)
|
||||
gibamounts = list(1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/larva/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST), list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/robot
|
||||
sparks = TRUE
|
||||
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up, /obj/effect/decal/cleanable/robot_debris/down, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/robot_debris/limb)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/silicon/robot
|
||||
|
||||
/obj/effect/gibspawner/robot/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
|
||||
gibamounts[6] = pick(0, 1, 2)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/effect/gibspawner
|
||||
var/sparks = FALSE //whether sparks spread
|
||||
var/virusProb = 20 //the chance for viruses to spread on the gibs
|
||||
var/gib_mob_type //generate a fake mob to transfer DNA from if we weren't passed a mob.
|
||||
var/gib_mob_species //We'll want to nip-pick their species for blood type stuff
|
||||
var/sound_to_play = 'sound/effects/blobattack.ogg'
|
||||
var/sound_vol = 60
|
||||
var/list/gibtypes = list() //typepaths of the gib decals to spawn
|
||||
var/list/gibamounts = list() //amount to spawn for each gib decal type we'll spawn.
|
||||
var/list/gibdirections = list() //of lists of possible directions to spread each gib decal type towards.
|
||||
|
||||
/obj/effect/gibspawner/Initialize(mapload, mob/living/source_mob, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
if(gibtypes.len != gibamounts.len)
|
||||
stack_trace("Gib list amount length mismatch!")
|
||||
return
|
||||
if(gibamounts.len != gibdirections.len)
|
||||
stack_trace("Gib list dir length mismatch!")
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
|
||||
if(sound_to_play && isnum(sound_vol))
|
||||
playsound(src, sound_to_play, sound_vol, TRUE)
|
||||
|
||||
if(sparks)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, loc)
|
||||
s.start()
|
||||
|
||||
var/list/dna_to_add //find the dna to pass to the spawned gibs. do note this can be null if the mob doesn't have blood. add_blood_DNA() has built in null handling.
|
||||
var/body_coloring = ""
|
||||
if(source_mob)
|
||||
if(!issilicon(source_mob))
|
||||
dna_to_add = source_mob.get_blood_dna_list() //ez pz
|
||||
if(ishuman(source_mob))
|
||||
var/mob/living/carbon/human/H = source_mob
|
||||
if(H.dna.species.use_skintones)
|
||||
body_coloring = "#[skintone2hex(H.skin_tone)]"
|
||||
else
|
||||
body_coloring = "#[H.dna.features["mcolor"]]"
|
||||
|
||||
else if(gib_mob_type)
|
||||
var/mob/living/temp_mob = new gib_mob_type(src) //generate a fake mob so that we pull the right type of DNA for the gibs.
|
||||
if(gib_mob_species)
|
||||
if(ishuman(temp_mob))
|
||||
var/mob/living/carbon/human/H = temp_mob
|
||||
H.set_species(gib_mob_species)
|
||||
dna_to_add = temp_mob.get_blood_dna_list()
|
||||
if(H.dna.species.use_skintones)
|
||||
body_coloring = "#[skintone2hex(H.skin_tone)]"
|
||||
else
|
||||
body_coloring = "#[H.dna.features["mcolor"]]"
|
||||
else
|
||||
dna_to_add = temp_mob.get_blood_dna_list()
|
||||
else if(!issilicon(temp_mob))
|
||||
dna_to_add = temp_mob.get_blood_dna_list()
|
||||
qdel(temp_mob)
|
||||
else
|
||||
dna_to_add = list("Non-human DNA" = random_blood_type()) //else, generate a random bloodtype for it.
|
||||
|
||||
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(loc, diseases)
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/digester = loc
|
||||
digester.stomach_contents += gib
|
||||
|
||||
if(dna_to_add && dna_to_add.len)
|
||||
gib.add_blood_DNA(dna_to_add)
|
||||
gib.body_colors = body_coloring
|
||||
gib.update_icon()
|
||||
|
||||
var/list/directions = gibdirections[i]
|
||||
if(isturf(loc))
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
/obj/effect/gibspawner/generic
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs, /obj/effect/decal/cleanable/blood/gibs, /obj/effect/decal/cleanable/blood/gibs/core)
|
||||
gibamounts = list(2, 2, 1)
|
||||
sound_vol = 40
|
||||
|
||||
/obj/effect/gibspawner/generic/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/generic/animal
|
||||
gib_mob_type = /mob/living/simple_animal/pet
|
||||
|
||||
/obj/effect/gibspawner/human
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human/up, /obj/effect/decal/cleanable/blood/gibs/human/down, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/body, /obj/effect/decal/cleanable/blood/gibs/human/limb, /obj/effect/decal/cleanable/blood/gibs/human/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human
|
||||
gib_mob_species = /datum/species/human
|
||||
sound_vol = 50
|
||||
|
||||
/obj/effect/gibspawner/human/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/human/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/core, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/core, /obj/effect/decal/cleanable/blood/gibs/human, /obj/effect/decal/cleanable/blood/gibs/human/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/human/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/lizard
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human/lizard/up, /obj/effect/decal/cleanable/blood/gibs/human/lizard/down, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/body, /obj/effect/decal/cleanable/blood/gibs/human/lizard/limb, /obj/effect/decal/cleanable/blood/gibs/human/lizard/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human/species/lizard
|
||||
gib_mob_species = /datum/species/lizard
|
||||
sound_vol = 50
|
||||
|
||||
/obj/effect/gibspawner/lizard/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/lizard/bodypartless
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/core, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/core, /obj/effect/decal/cleanable/blood/gibs/human/lizard, /obj/effect/decal/cleanable/blood/gibs/human/lizard/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/lizard/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/slime
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/slime/up, /obj/effect/decal/cleanable/blood/gibs/slime/down, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/body, /obj/effect/decal/cleanable/blood/gibs/slime/limb, /obj/effect/decal/cleanable/blood/gibs/slime/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human/species/roundstartslime
|
||||
gib_mob_species = /datum/species/jelly/roundstartslime
|
||||
sound_vol = 50
|
||||
|
||||
/obj/effect/gibspawner/slime/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/slime/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/core, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/core, /obj/effect/decal/cleanable/blood/gibs/slime, /obj/effect/decal/cleanable/blood/gibs/slime/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/slime/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/ipc
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/ipc/up, /obj/effect/decal/cleanable/blood/gibs/ipc/down, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/body, /obj/effect/decal/cleanable/blood/gibs/ipc/limb, /obj/effect/decal/cleanable/blood/gibs/ipc/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/human/species/ipc
|
||||
gib_mob_species = /datum/species/ipc
|
||||
sound_vol = 50
|
||||
sparks = TRUE
|
||||
sound_to_play = 'sound/effects/bang.ogg'
|
||||
|
||||
/obj/effect/gibspawner/ipc/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/ipc/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/core, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/core, /obj/effect/decal/cleanable/blood/gibs/ipc, /obj/effect/decal/cleanable/blood/gibs/ipc/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/ipc/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/xeno
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up, /obj/effect/decal/cleanable/blood/gibs/xeno/down, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/body, /obj/effect/decal/cleanable/blood/gibs/xeno/limb, /obj/effect/decal/cleanable/blood/gibs/xeno/core)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/alien
|
||||
|
||||
/obj/effect/gibspawner/xeno/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/xeno/bodypartless //only the gibs that don't look like actual full bodyparts (except torso).
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/core, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/core, /obj/effect/decal/cleanable/blood/gibs/xeno, /obj/effect/decal/cleanable/blood/gibs/xeno/torso)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/xeno/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/xeno/xenoperson
|
||||
gib_mob_type = /mob/living/carbon/human/species/xeno
|
||||
gib_mob_species = /datum/species/xeno
|
||||
|
||||
/obj/effect/gibspawner/xeno/xenoperson/bodypartless
|
||||
|
||||
/obj/effect/gibspawner/larva
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva/body, /obj/effect/decal/cleanable/blood/gibs/xeno/larva/body)
|
||||
gibamounts = list(1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/carbon/alien/larva
|
||||
|
||||
/obj/effect/gibspawner/larva/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST), list(), GLOB.alldirs)
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/larva/bodypartless
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva, /obj/effect/decal/cleanable/blood/gibs/xeno/larva)
|
||||
gibamounts = list(1, 1, 1)
|
||||
|
||||
/obj/effect/gibspawner/larva/bodypartless/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST), list())
|
||||
return ..()
|
||||
|
||||
/obj/effect/gibspawner/robot
|
||||
sparks = TRUE
|
||||
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up, /obj/effect/decal/cleanable/robot_debris/down, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/robot_debris/limb)
|
||||
gibamounts = list(1, 1, 1, 1, 1, 1)
|
||||
gib_mob_type = /mob/living/silicon/robot
|
||||
|
||||
/obj/effect/gibspawner/robot/Initialize()
|
||||
if(!gibdirections.len)
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
|
||||
gibamounts[6] = pick(0, 1, 2)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1,388 +1,388 @@
|
||||
/obj/effect/spawner/lootdrop
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "random_loot"
|
||||
layer = OBJ_LAYER
|
||||
var/lootcount = 1 //how many items will be spawned
|
||||
var/lootdoubles = TRUE //if the same item can be spawned twice
|
||||
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
|
||||
var/fan_out_items = FALSE //Whether the items should be distributed to offsets 0,1,-1,2,-2,3,-3.. This overrides pixel_x/y on the spawner itself
|
||||
|
||||
/obj/effect/spawner/lootdrop/Initialize(mapload)
|
||||
..()
|
||||
if(loot && loot.len)
|
||||
var/turf/T = get_turf(src)
|
||||
var/loot_spawned = 0
|
||||
while((lootcount-loot_spawned) && loot.len)
|
||||
var/lootspawn = pickweight(loot)
|
||||
if(!lootdoubles)
|
||||
loot.Remove(lootspawn)
|
||||
|
||||
if(lootspawn)
|
||||
var/atom/movable/spawned_loot = new lootspawn(T)
|
||||
if (!fan_out_items)
|
||||
if (pixel_x != 0)
|
||||
spawned_loot.pixel_x = pixel_x
|
||||
if (pixel_y != 0)
|
||||
spawned_loot.pixel_y = pixel_y
|
||||
else
|
||||
if (loot_spawned)
|
||||
spawned_loot.pixel_x = spawned_loot.pixel_y = ((!(loot_spawned%2)*loot_spawned/2)*-1)+((loot_spawned%2)*(loot_spawned+1)/2*1)
|
||||
loot_spawned++
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/spawner/lootdrop/bedsheet
|
||||
icon = 'icons/obj/bedsheets.dmi'
|
||||
icon_state = "random_bedsheet"
|
||||
name = "random dorms bedsheet"
|
||||
loot = list(/obj/item/bedsheet = 8, /obj/item/bedsheet/blue = 8, /obj/item/bedsheet/green = 8,
|
||||
/obj/item/bedsheet/grey = 8, /obj/item/bedsheet/orange = 8, /obj/item/bedsheet/purple = 8,
|
||||
/obj/item/bedsheet/red = 8, /obj/item/bedsheet/yellow = 8, /obj/item/bedsheet/brown = 8,
|
||||
/obj/item/bedsheet/black = 8, /obj/item/bedsheet/patriot = 3, /obj/item/bedsheet/rainbow = 3,
|
||||
/obj/item/bedsheet/ian = 3, /obj/item/bedsheet/runtime = 3, /obj/item/bedsheet/nanotrasen = 3,
|
||||
/obj/item/bedsheet/pirate = 1, /obj/item/bedsheet/cosmos = 1, /obj/item/bedsheet/gondola = 1
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband
|
||||
name = "armory contraband gun spawner"
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/item/gun/ballistic/automatic/pistol = 8,
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat = 5,
|
||||
/obj/item/gun/ballistic/revolver/mateba,
|
||||
/obj/item/gun/ballistic/automatic/pistol/deagle
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband/metastation
|
||||
loot = list(/obj/item/gun/ballistic/automatic/pistol = 5,
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat = 5,
|
||||
/obj/item/gun/ballistic/revolver/mateba,
|
||||
/obj/item/gun/ballistic/automatic/pistol/deagle,
|
||||
/obj/item/storage/box/syndie_kit/throwing_weapons = 3)
|
||||
|
||||
/obj/effect/spawner/lootdrop/gambling
|
||||
name = "gambling valuables spawner"
|
||||
loot = list(
|
||||
/obj/item/gun/ballistic/revolver/russian = 5,
|
||||
/obj/item/storage/box/syndie_kit/throwing_weapons = 1,
|
||||
/obj/item/toy/cards/deck/syndicate = 2
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/grille_or_trash
|
||||
name = "maint grille or trash spawner"
|
||||
loot = list(/obj/structure/grille = 5,
|
||||
/obj/item/cigbutt = 1,
|
||||
/obj/item/trash/cheesie = 1,
|
||||
/obj/item/trash/candy = 1,
|
||||
/obj/item/trash/chips = 1,
|
||||
/obj/item/reagent_containers/food/snacks/deadmouse = 1,
|
||||
/obj/item/trash/pistachios = 1,
|
||||
/obj/item/trash/plate = 1,
|
||||
/obj/item/trash/popcorn = 1,
|
||||
/obj/item/trash/raisins = 1,
|
||||
/obj/item/trash/sosjerky = 1,
|
||||
/obj/item/trash/syndi_cakes = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/three_course_meal
|
||||
name = "three course meal spawner"
|
||||
lootcount = 3
|
||||
lootdoubles = FALSE
|
||||
var/soups = list(
|
||||
/obj/item/reagent_containers/food/snacks/soup/beet,
|
||||
/obj/item/reagent_containers/food/snacks/soup/sweetpotato,
|
||||
/obj/item/reagent_containers/food/snacks/soup/stew,
|
||||
/obj/item/reagent_containers/food/snacks/soup/hotchili,
|
||||
/obj/item/reagent_containers/food/snacks/soup/nettle,
|
||||
/obj/item/reagent_containers/food/snacks/soup/meatball)
|
||||
var/salads = list(
|
||||
/obj/item/reagent_containers/food/snacks/salad/herbsalad,
|
||||
/obj/item/reagent_containers/food/snacks/salad/validsalad,
|
||||
/obj/item/reagent_containers/food/snacks/salad/fruit,
|
||||
/obj/item/reagent_containers/food/snacks/salad/jungle,
|
||||
/obj/item/reagent_containers/food/snacks/salad/aesirsalad)
|
||||
var/mains = list(
|
||||
/obj/item/reagent_containers/food/snacks/bearsteak,
|
||||
/obj/item/reagent_containers/food/snacks/enchiladas,
|
||||
/obj/item/reagent_containers/food/snacks/stewedsoymeat,
|
||||
/obj/item/reagent_containers/food/snacks/burger/bigbite,
|
||||
/obj/item/reagent_containers/food/snacks/burger/superbite,
|
||||
/obj/item/reagent_containers/food/snacks/burger/fivealarm)
|
||||
|
||||
/obj/effect/spawner/lootdrop/three_course_meal/Initialize(mapload)
|
||||
loot = list(pick(soups) = 1,pick(salads) = 1,pick(mains) = 1)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance
|
||||
name = "maintenance loot spawner"
|
||||
// see code/_globalvars/lists/maintenance_loot.dm for loot table
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload)
|
||||
loot = GLOB.maintenance_loot
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/glowstick
|
||||
name = "random colored glowstick"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "random_glowstick"
|
||||
|
||||
/obj/effect/spawner/lootdrop/glowstick/Initialize()
|
||||
loot = typesof(/obj/item/flashlight/glowstick)
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/effect/spawner/lootdrop/gloves
|
||||
name = "random gloves"
|
||||
desc = "These gloves are supposed to be a random color..."
|
||||
icon = 'icons/obj/clothing/gloves.dmi'
|
||||
icon_state = "random_gloves"
|
||||
loot = list(
|
||||
/obj/item/clothing/gloves/color/orange = 1,
|
||||
/obj/item/clothing/gloves/color/red = 1,
|
||||
/obj/item/clothing/gloves/color/blue = 1,
|
||||
/obj/item/clothing/gloves/color/purple = 1,
|
||||
/obj/item/clothing/gloves/color/green = 1,
|
||||
/obj/item/clothing/gloves/color/grey = 1,
|
||||
/obj/item/clothing/gloves/color/light_brown = 1,
|
||||
/obj/item/clothing/gloves/color/brown = 1,
|
||||
/obj/item/clothing/gloves/color/white = 1,
|
||||
/obj/item/clothing/gloves/color/rainbow = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/crate_spawner
|
||||
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/structure/closet/crate/secure/loot = 20,
|
||||
"" = 80
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/organ_spawner
|
||||
name = "organ spawner"
|
||||
loot = list(
|
||||
/obj/item/organ/heart/gland/electric = 3,
|
||||
/obj/item/organ/heart/gland/trauma = 4,
|
||||
/obj/item/organ/heart/gland/egg = 7,
|
||||
/obj/item/organ/heart/gland/chem = 5,
|
||||
/obj/item/organ/heart/gland/mindshock = 5,
|
||||
/obj/item/organ/heart/gland/plasma = 7,
|
||||
/obj/item/organ/heart/gland/transform = 5,
|
||||
/obj/item/organ/heart/gland/slime = 4,
|
||||
/obj/item/organ/heart/gland/spiderman = 5,
|
||||
/obj/item/organ/heart/gland/ventcrawling = 1,
|
||||
/obj/item/organ/body_egg/alien_embryo = 1,
|
||||
/obj/item/organ/regenerative_core = 2)
|
||||
lootcount = 3
|
||||
|
||||
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner
|
||||
name = "2% chance xeno egg spawner"
|
||||
loot = list(
|
||||
/obj/effect/decal/remains/xeno = 49,
|
||||
/obj/effect/spawner/xeno_egg_delivery = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume
|
||||
name = "random costume spawner"
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume/Initialize()
|
||||
loot = list()
|
||||
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
|
||||
loot[path] = TRUE
|
||||
. = ..()
|
||||
|
||||
// Minor lootdrops follow
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears
|
||||
name = "beret or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/beret = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/bowler_or_that
|
||||
name = "bowler or top hat spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/bowler = 1,
|
||||
/obj/item/clothing/head/that = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears
|
||||
name = "kitty ears or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/kitty = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana
|
||||
name = "pirate hat or bandana spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/pirate = 1,
|
||||
/obj/item/clothing/head/bandana = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask
|
||||
name = "25% cyborg mask spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/mask/gas/cyborg = 25,
|
||||
"" = 75)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_harmless // These shouldn't allow the AI to start butchering people
|
||||
name = "harmless AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/asimov,
|
||||
/obj/item/aiModule/core/full/asimovpp,
|
||||
/obj/item/aiModule/core/full/hippocratic,
|
||||
/obj/item/aiModule/core/full/paladin_devotion,
|
||||
/obj/item/aiModule/core/full/paladin
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_neutral // These shouldn't allow the AI to start butchering people without reason
|
||||
name = "neutral AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/corp,
|
||||
/obj/item/aiModule/core/full/maintain,
|
||||
/obj/item/aiModule/core/full/drone,
|
||||
/obj/item/aiModule/core/full/peacekeeper,
|
||||
/obj/item/aiModule/core/full/reporter,
|
||||
/obj/item/aiModule/core/full/robocop,
|
||||
/obj/item/aiModule/core/full/liveandletlive,
|
||||
/obj/item/aiModule/core/full/hulkamania
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_harmful // These will get the shuttle called
|
||||
name = "harmful AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/antimov,
|
||||
/obj/item/aiModule/core/full/balance,
|
||||
/obj/item/aiModule/core/full/tyrant,
|
||||
/obj/item/aiModule/core/full/thermurderdynamic,
|
||||
/obj/item/aiModule/core/full/damaged
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/mre
|
||||
name = "random MRE"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "mre"
|
||||
|
||||
/obj/effect/spawner/lootdrop/mre/Initialize()
|
||||
for(var/A in subtypesof(/obj/item/storage/box/mre))
|
||||
var/obj/item/storage/box/mre/M = A
|
||||
var/our_chance = initial(M.spawner_chance)
|
||||
if(our_chance)
|
||||
LAZYSET(loot, M, our_chance)
|
||||
return ..()
|
||||
|
||||
|
||||
// Tech storage circuit board spawners
|
||||
// For these, make sure that lootcount equals the number of list items
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage
|
||||
name = "generic circuit board spawner"
|
||||
lootdoubles = FALSE
|
||||
fan_out_items = TRUE
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/service
|
||||
name = "service circuit board spawner"
|
||||
lootcount = 10
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/arcade/battle,
|
||||
/obj/item/circuitboard/computer/arcade/orion_trail,
|
||||
/obj/item/circuitboard/machine/autolathe,
|
||||
/obj/item/circuitboard/computer/mining,
|
||||
/obj/item/circuitboard/machine/ore_redemption,
|
||||
/obj/item/circuitboard/machine/mining_equipment_vendor,
|
||||
/obj/item/circuitboard/machine/microwave,
|
||||
/obj/item/circuitboard/machine/chem_dispenser/drinks,
|
||||
/obj/item/circuitboard/machine/chem_dispenser/drinks/beer,
|
||||
/obj/item/circuitboard/computer/slot_machine
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/rnd
|
||||
name = "RnD circuit board spawner"
|
||||
lootcount = 8
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/aifixer,
|
||||
/obj/item/circuitboard/machine/rdserver,
|
||||
/obj/item/circuitboard/computer/pandemic,
|
||||
/obj/item/circuitboard/machine/mechfab,
|
||||
/obj/item/circuitboard/machine/circuit_imprinter/department,
|
||||
/obj/item/circuitboard/computer/teleporter,
|
||||
/obj/item/circuitboard/machine/destructive_analyzer,
|
||||
/obj/item/circuitboard/computer/rdconsole
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/security
|
||||
name = "security circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/secure_data,
|
||||
/obj/item/circuitboard/computer/security,
|
||||
/obj/item/circuitboard/computer/prisoner
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/engineering
|
||||
name = "engineering circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/atmos_alert,
|
||||
/obj/item/circuitboard/computer/stationalert,
|
||||
/obj/item/circuitboard/computer/powermonitor
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/tcomms
|
||||
name = "tcomms circuit board spawner"
|
||||
lootcount = 9
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/message_monitor,
|
||||
/obj/item/circuitboard/machine/telecomms/broadcaster,
|
||||
/obj/item/circuitboard/machine/telecomms/bus,
|
||||
/obj/item/circuitboard/machine/telecomms/server,
|
||||
/obj/item/circuitboard/machine/telecomms/receiver,
|
||||
/obj/item/circuitboard/machine/telecomms/processor,
|
||||
/obj/item/circuitboard/machine/announcement_system,
|
||||
/obj/item/circuitboard/computer/comm_server,
|
||||
/obj/item/circuitboard/computer/comm_monitor
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/medical
|
||||
name = "medical circuit board spawner"
|
||||
lootcount = 8
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/cloning,
|
||||
/obj/item/circuitboard/machine/clonepod,
|
||||
/obj/item/circuitboard/machine/chem_dispenser,
|
||||
/obj/item/circuitboard/computer/scan_consolenew,
|
||||
/obj/item/circuitboard/computer/med_data,
|
||||
/obj/item/circuitboard/machine/smoke_machine,
|
||||
/obj/item/circuitboard/machine/chem_master,
|
||||
/obj/item/circuitboard/machine/clonescanner
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/AI
|
||||
name = "secure AI circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/aiupload,
|
||||
/obj/item/circuitboard/computer/borgupload,
|
||||
/obj/item/circuitboard/aicore
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/command
|
||||
name = "secure command circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/crew,
|
||||
/obj/item/circuitboard/computer/communications,
|
||||
/obj/item/circuitboard/computer/card
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/RnD_secure
|
||||
name = "secure RnD circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/mecha_control,
|
||||
/obj/item/circuitboard/computer/apc_control,
|
||||
/obj/item/circuitboard/computer/robotics
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/keg
|
||||
name = "random keg spawner"
|
||||
lootcount = 1
|
||||
loot = list(/obj/structure/reagent_dispensers/keg/mead = 5,
|
||||
/obj/structure/reagent_dispensers/keg/aphro = 2,
|
||||
/obj/structure/reagent_dispensers/keg/aphro/strong = 2,
|
||||
/obj/structure/reagent_dispensers/keg/gargle = 1)
|
||||
/obj/effect/spawner/lootdrop
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "random_loot"
|
||||
layer = OBJ_LAYER
|
||||
var/lootcount = 1 //how many items will be spawned
|
||||
var/lootdoubles = TRUE //if the same item can be spawned twice
|
||||
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
|
||||
var/fan_out_items = FALSE //Whether the items should be distributed to offsets 0,1,-1,2,-2,3,-3.. This overrides pixel_x/y on the spawner itself
|
||||
|
||||
/obj/effect/spawner/lootdrop/Initialize(mapload)
|
||||
..()
|
||||
if(loot && loot.len)
|
||||
var/turf/T = get_turf(src)
|
||||
var/loot_spawned = 0
|
||||
while((lootcount-loot_spawned) && loot.len)
|
||||
var/lootspawn = pickweight(loot)
|
||||
if(!lootdoubles)
|
||||
loot.Remove(lootspawn)
|
||||
|
||||
if(lootspawn)
|
||||
var/atom/movable/spawned_loot = new lootspawn(T)
|
||||
if (!fan_out_items)
|
||||
if (pixel_x != 0)
|
||||
spawned_loot.pixel_x = pixel_x
|
||||
if (pixel_y != 0)
|
||||
spawned_loot.pixel_y = pixel_y
|
||||
else
|
||||
if (loot_spawned)
|
||||
spawned_loot.pixel_x = spawned_loot.pixel_y = ((!(loot_spawned%2)*loot_spawned/2)*-1)+((loot_spawned%2)*(loot_spawned+1)/2*1)
|
||||
loot_spawned++
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/spawner/lootdrop/bedsheet
|
||||
icon = 'icons/obj/bedsheets.dmi'
|
||||
icon_state = "random_bedsheet"
|
||||
name = "random dorms bedsheet"
|
||||
loot = list(/obj/item/bedsheet = 8, /obj/item/bedsheet/blue = 8, /obj/item/bedsheet/green = 8,
|
||||
/obj/item/bedsheet/grey = 8, /obj/item/bedsheet/orange = 8, /obj/item/bedsheet/purple = 8,
|
||||
/obj/item/bedsheet/red = 8, /obj/item/bedsheet/yellow = 8, /obj/item/bedsheet/brown = 8,
|
||||
/obj/item/bedsheet/black = 8, /obj/item/bedsheet/patriot = 3, /obj/item/bedsheet/rainbow = 3,
|
||||
/obj/item/bedsheet/ian = 3, /obj/item/bedsheet/runtime = 3, /obj/item/bedsheet/nanotrasen = 3,
|
||||
/obj/item/bedsheet/pirate = 1, /obj/item/bedsheet/cosmos = 1, /obj/item/bedsheet/gondola = 1
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband
|
||||
name = "armory contraband gun spawner"
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/item/gun/ballistic/automatic/pistol = 8,
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat = 5,
|
||||
/obj/item/gun/ballistic/revolver/mateba,
|
||||
/obj/item/gun/ballistic/automatic/pistol/deagle
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband/metastation
|
||||
loot = list(/obj/item/gun/ballistic/automatic/pistol = 5,
|
||||
/obj/item/gun/ballistic/shotgun/automatic/combat = 5,
|
||||
/obj/item/gun/ballistic/revolver/mateba,
|
||||
/obj/item/gun/ballistic/automatic/pistol/deagle,
|
||||
/obj/item/storage/box/syndie_kit/throwing_weapons = 3)
|
||||
|
||||
/obj/effect/spawner/lootdrop/gambling
|
||||
name = "gambling valuables spawner"
|
||||
loot = list(
|
||||
/obj/item/gun/ballistic/revolver/russian = 5,
|
||||
/obj/item/storage/box/syndie_kit/throwing_weapons = 1,
|
||||
/obj/item/toy/cards/deck/syndicate = 2
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/grille_or_trash
|
||||
name = "maint grille or trash spawner"
|
||||
loot = list(/obj/structure/grille = 5,
|
||||
/obj/item/cigbutt = 1,
|
||||
/obj/item/trash/cheesie = 1,
|
||||
/obj/item/trash/candy = 1,
|
||||
/obj/item/trash/chips = 1,
|
||||
/obj/item/reagent_containers/food/snacks/deadmouse = 1,
|
||||
/obj/item/trash/pistachios = 1,
|
||||
/obj/item/trash/plate = 1,
|
||||
/obj/item/trash/popcorn = 1,
|
||||
/obj/item/trash/raisins = 1,
|
||||
/obj/item/trash/sosjerky = 1,
|
||||
/obj/item/trash/syndi_cakes = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/three_course_meal
|
||||
name = "three course meal spawner"
|
||||
lootcount = 3
|
||||
lootdoubles = FALSE
|
||||
var/soups = list(
|
||||
/obj/item/reagent_containers/food/snacks/soup/beet,
|
||||
/obj/item/reagent_containers/food/snacks/soup/sweetpotato,
|
||||
/obj/item/reagent_containers/food/snacks/soup/stew,
|
||||
/obj/item/reagent_containers/food/snacks/soup/hotchili,
|
||||
/obj/item/reagent_containers/food/snacks/soup/nettle,
|
||||
/obj/item/reagent_containers/food/snacks/soup/meatball)
|
||||
var/salads = list(
|
||||
/obj/item/reagent_containers/food/snacks/salad/herbsalad,
|
||||
/obj/item/reagent_containers/food/snacks/salad/validsalad,
|
||||
/obj/item/reagent_containers/food/snacks/salad/fruit,
|
||||
/obj/item/reagent_containers/food/snacks/salad/jungle,
|
||||
/obj/item/reagent_containers/food/snacks/salad/aesirsalad)
|
||||
var/mains = list(
|
||||
/obj/item/reagent_containers/food/snacks/bearsteak,
|
||||
/obj/item/reagent_containers/food/snacks/enchiladas,
|
||||
/obj/item/reagent_containers/food/snacks/stewedsoymeat,
|
||||
/obj/item/reagent_containers/food/snacks/burger/bigbite,
|
||||
/obj/item/reagent_containers/food/snacks/burger/superbite,
|
||||
/obj/item/reagent_containers/food/snacks/burger/fivealarm)
|
||||
|
||||
/obj/effect/spawner/lootdrop/three_course_meal/Initialize(mapload)
|
||||
loot = list(pick(soups) = 1,pick(salads) = 1,pick(mains) = 1)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance
|
||||
name = "maintenance loot spawner"
|
||||
// see code/_globalvars/lists/maintenance_loot.dm for loot table
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload)
|
||||
loot = GLOB.maintenance_loot
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/glowstick
|
||||
name = "random colored glowstick"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "random_glowstick"
|
||||
|
||||
/obj/effect/spawner/lootdrop/glowstick/Initialize()
|
||||
loot = typesof(/obj/item/flashlight/glowstick)
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/effect/spawner/lootdrop/gloves
|
||||
name = "random gloves"
|
||||
desc = "These gloves are supposed to be a random color..."
|
||||
icon = 'icons/obj/clothing/gloves.dmi'
|
||||
icon_state = "random_gloves"
|
||||
loot = list(
|
||||
/obj/item/clothing/gloves/color/orange = 1,
|
||||
/obj/item/clothing/gloves/color/red = 1,
|
||||
/obj/item/clothing/gloves/color/blue = 1,
|
||||
/obj/item/clothing/gloves/color/purple = 1,
|
||||
/obj/item/clothing/gloves/color/green = 1,
|
||||
/obj/item/clothing/gloves/color/grey = 1,
|
||||
/obj/item/clothing/gloves/color/light_brown = 1,
|
||||
/obj/item/clothing/gloves/color/brown = 1,
|
||||
/obj/item/clothing/gloves/color/white = 1,
|
||||
/obj/item/clothing/gloves/color/rainbow = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/crate_spawner
|
||||
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
|
||||
lootdoubles = FALSE
|
||||
|
||||
loot = list(
|
||||
/obj/structure/closet/crate/secure/loot = 20,
|
||||
"" = 80
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/organ_spawner
|
||||
name = "organ spawner"
|
||||
loot = list(
|
||||
/obj/item/organ/heart/gland/electric = 3,
|
||||
/obj/item/organ/heart/gland/trauma = 4,
|
||||
/obj/item/organ/heart/gland/egg = 7,
|
||||
/obj/item/organ/heart/gland/chem = 5,
|
||||
/obj/item/organ/heart/gland/mindshock = 5,
|
||||
/obj/item/organ/heart/gland/plasma = 7,
|
||||
/obj/item/organ/heart/gland/transform = 5,
|
||||
/obj/item/organ/heart/gland/slime = 4,
|
||||
/obj/item/organ/heart/gland/spiderman = 5,
|
||||
/obj/item/organ/heart/gland/ventcrawling = 1,
|
||||
/obj/item/organ/body_egg/alien_embryo = 1,
|
||||
/obj/item/organ/regenerative_core = 2)
|
||||
lootcount = 3
|
||||
|
||||
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner
|
||||
name = "2% chance xeno egg spawner"
|
||||
loot = list(
|
||||
/obj/effect/decal/remains/xeno = 49,
|
||||
/obj/effect/spawner/xeno_egg_delivery = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume
|
||||
name = "random costume spawner"
|
||||
|
||||
/obj/effect/spawner/lootdrop/costume/Initialize()
|
||||
loot = list()
|
||||
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
|
||||
loot[path] = TRUE
|
||||
. = ..()
|
||||
|
||||
// Minor lootdrops follow
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears
|
||||
name = "beret or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/beret = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/bowler_or_that
|
||||
name = "bowler or top hat spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/bowler = 1,
|
||||
/obj/item/clothing/head/that = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears
|
||||
name = "kitty ears or rabbit ears spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/kitty = 1,
|
||||
/obj/item/clothing/head/rabbitears = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana
|
||||
name = "pirate hat or bandana spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/head/pirate = 1,
|
||||
/obj/item/clothing/head/bandana = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask
|
||||
name = "25% cyborg mask spawner"
|
||||
loot = list(
|
||||
/obj/item/clothing/mask/gas/cyborg = 25,
|
||||
"" = 75)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_harmless // These shouldn't allow the AI to start butchering people
|
||||
name = "harmless AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/asimov,
|
||||
/obj/item/aiModule/core/full/asimovpp,
|
||||
/obj/item/aiModule/core/full/hippocratic,
|
||||
/obj/item/aiModule/core/full/paladin_devotion,
|
||||
/obj/item/aiModule/core/full/paladin
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_neutral // These shouldn't allow the AI to start butchering people without reason
|
||||
name = "neutral AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/corp,
|
||||
/obj/item/aiModule/core/full/maintain,
|
||||
/obj/item/aiModule/core/full/drone,
|
||||
/obj/item/aiModule/core/full/peacekeeper,
|
||||
/obj/item/aiModule/core/full/reporter,
|
||||
/obj/item/aiModule/core/full/robocop,
|
||||
/obj/item/aiModule/core/full/liveandletlive,
|
||||
/obj/item/aiModule/core/full/hulkamania
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/aimodule_harmful // These will get the shuttle called
|
||||
name = "harmful AI module spawner"
|
||||
loot = list(
|
||||
/obj/item/aiModule/core/full/antimov,
|
||||
/obj/item/aiModule/core/full/balance,
|
||||
/obj/item/aiModule/core/full/tyrant,
|
||||
/obj/item/aiModule/core/full/thermurderdynamic,
|
||||
/obj/item/aiModule/core/full/damaged
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/mre
|
||||
name = "random MRE"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "mre"
|
||||
|
||||
/obj/effect/spawner/lootdrop/mre/Initialize()
|
||||
for(var/A in subtypesof(/obj/item/storage/box/mre))
|
||||
var/obj/item/storage/box/mre/M = A
|
||||
var/our_chance = initial(M.spawner_chance)
|
||||
if(our_chance)
|
||||
LAZYSET(loot, M, our_chance)
|
||||
return ..()
|
||||
|
||||
|
||||
// Tech storage circuit board spawners
|
||||
// For these, make sure that lootcount equals the number of list items
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage
|
||||
name = "generic circuit board spawner"
|
||||
lootdoubles = FALSE
|
||||
fan_out_items = TRUE
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/service
|
||||
name = "service circuit board spawner"
|
||||
lootcount = 10
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/arcade/battle,
|
||||
/obj/item/circuitboard/computer/arcade/orion_trail,
|
||||
/obj/item/circuitboard/machine/autolathe,
|
||||
/obj/item/circuitboard/computer/mining,
|
||||
/obj/item/circuitboard/machine/ore_redemption,
|
||||
/obj/item/circuitboard/machine/mining_equipment_vendor,
|
||||
/obj/item/circuitboard/machine/microwave,
|
||||
/obj/item/circuitboard/machine/chem_dispenser/drinks,
|
||||
/obj/item/circuitboard/machine/chem_dispenser/drinks/beer,
|
||||
/obj/item/circuitboard/computer/slot_machine
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/rnd
|
||||
name = "RnD circuit board spawner"
|
||||
lootcount = 8
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/aifixer,
|
||||
/obj/item/circuitboard/machine/rdserver,
|
||||
/obj/item/circuitboard/computer/pandemic,
|
||||
/obj/item/circuitboard/machine/mechfab,
|
||||
/obj/item/circuitboard/machine/circuit_imprinter/department,
|
||||
/obj/item/circuitboard/computer/teleporter,
|
||||
/obj/item/circuitboard/machine/destructive_analyzer,
|
||||
/obj/item/circuitboard/computer/rdconsole
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/security
|
||||
name = "security circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/secure_data,
|
||||
/obj/item/circuitboard/computer/security,
|
||||
/obj/item/circuitboard/computer/prisoner
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/engineering
|
||||
name = "engineering circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/atmos_alert,
|
||||
/obj/item/circuitboard/computer/stationalert,
|
||||
/obj/item/circuitboard/computer/powermonitor
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/tcomms
|
||||
name = "tcomms circuit board spawner"
|
||||
lootcount = 9
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/message_monitor,
|
||||
/obj/item/circuitboard/machine/telecomms/broadcaster,
|
||||
/obj/item/circuitboard/machine/telecomms/bus,
|
||||
/obj/item/circuitboard/machine/telecomms/server,
|
||||
/obj/item/circuitboard/machine/telecomms/receiver,
|
||||
/obj/item/circuitboard/machine/telecomms/processor,
|
||||
/obj/item/circuitboard/machine/announcement_system,
|
||||
/obj/item/circuitboard/computer/comm_server,
|
||||
/obj/item/circuitboard/computer/comm_monitor
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/medical
|
||||
name = "medical circuit board spawner"
|
||||
lootcount = 8
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/cloning,
|
||||
/obj/item/circuitboard/machine/clonepod,
|
||||
/obj/item/circuitboard/machine/chem_dispenser,
|
||||
/obj/item/circuitboard/computer/scan_consolenew,
|
||||
/obj/item/circuitboard/computer/med_data,
|
||||
/obj/item/circuitboard/machine/smoke_machine,
|
||||
/obj/item/circuitboard/machine/chem_master,
|
||||
/obj/item/circuitboard/machine/clonescanner
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/AI
|
||||
name = "secure AI circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/aiupload,
|
||||
/obj/item/circuitboard/computer/borgupload,
|
||||
/obj/item/circuitboard/aicore
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/command
|
||||
name = "secure command circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/crew,
|
||||
/obj/item/circuitboard/computer/communications,
|
||||
/obj/item/circuitboard/computer/card
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/techstorage/RnD_secure
|
||||
name = "secure RnD circuit board spawner"
|
||||
lootcount = 3
|
||||
loot = list(
|
||||
/obj/item/circuitboard/computer/mecha_control,
|
||||
/obj/item/circuitboard/computer/apc_control,
|
||||
/obj/item/circuitboard/computer/robotics
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/keg
|
||||
name = "random keg spawner"
|
||||
lootcount = 1
|
||||
loot = list(/obj/structure/reagent_dispensers/keg/mead = 5,
|
||||
/obj/structure/reagent_dispensers/keg/aphro = 2,
|
||||
/obj/structure/reagent_dispensers/keg/aphro/strong = 2,
|
||||
/obj/structure/reagent_dispensers/keg/gargle = 1)
|
||||
|
||||
@@ -1,237 +1,237 @@
|
||||
//generic procs copied from obj/effect/alien
|
||||
/obj/structure/spider
|
||||
name = "web"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
desc = "It's stringy and sticky."
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
max_integrity = 15
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee")
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
damage_amount *= 2
|
||||
if(BRUTE)
|
||||
damage_amount *= 0.25
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/structure/spider/stickyweb/Initialize()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return TRUE
|
||||
else if(isliving(mover))
|
||||
if(istype(mover.pulledby, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return TRUE
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return FALSE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
desc = "They seem to pulse slightly with an inner life."
|
||||
icon_state = "eggs"
|
||||
var/amount_grown = 0
|
||||
var/player_spiders = 0
|
||||
var/directive = "" //Message from the mother
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/eggcluster/Initialize()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
for(var/i=0, i<num, i++)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
|
||||
S.poison_type = poison_type
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.faction = faction.Copy()
|
||||
S.directive = directive
|
||||
if(player_spiders)
|
||||
S.player_spiders = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
icon_state = "spiderling"
|
||||
anchored = FALSE
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
max_integrity = 3
|
||||
var/amount_grown = 0
|
||||
var/grow_as = null
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/player_spiders = 0
|
||||
var/directive = "" //Message from the mother
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/spiderling/Destroy()
|
||||
new/obj/item/reagent_containers/food/snacks/spiderling(get_turf(src))
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/spiderling/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSobj, src)
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/obj/structure/spider/spiderling/hunter
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
|
||||
|
||||
/obj/structure/spider/spiderling/nurse
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse
|
||||
|
||||
/obj/structure/spider/spiderling/midwife
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife
|
||||
|
||||
/obj/structure/spider/spiderling/viper
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter/viper
|
||||
|
||||
/obj/structure/spider/spiderling/tarantula
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/tarantula
|
||||
|
||||
/obj/structure/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
forceMove(user.loc)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(isturf(loc))
|
||||
travelling_in_vent = 0
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
var/list/vents = list()
|
||||
var/datum/pipeline/entry_vent_parent = entry_vent.parents[1]
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents)
|
||||
if(prob(50))
|
||||
visible_message("<B>[src] scrambles into the ventilation ducts!</B>", \
|
||||
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
|
||||
spawn(rand(20,60))
|
||||
forceMove(exit_vent)
|
||||
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
|
||||
spawn(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
forceMove(entry_vent)
|
||||
entry_vent = null
|
||||
return
|
||||
|
||||
if(prob(50))
|
||||
audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
sleep(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
forceMove(entry_vent)
|
||||
entry_vent = null
|
||||
return
|
||||
forceMove(exit_vent.loc)
|
||||
entry_vent = null
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
//=================
|
||||
|
||||
else if(prob(33))
|
||||
var/list/nearby = oview(10, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom)
|
||||
if(prob(40))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
|
||||
else if(prob(10))
|
||||
//ventcrawl!
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 1)
|
||||
break
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
if(!grow_as)
|
||||
if(prob(3))
|
||||
grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider/tarantula, /mob/living/simple_animal/hostile/poison/giant_spider/hunter/viper, /mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife)
|
||||
else
|
||||
grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider, /mob/living/simple_animal/hostile/poison/giant_spider/hunter, /mob/living/simple_animal/hostile/poison/giant_spider/nurse)
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.poison_type = poison_type
|
||||
S.faction = faction.Copy()
|
||||
S.directive = directive
|
||||
if(player_spiders)
|
||||
S.playable_spider = TRUE
|
||||
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=[REF(S)];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK, ignore_key = POLL_IGNORE_SPIDER, ignore_dnr_observers = TRUE)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon
|
||||
name = "cocoon"
|
||||
desc = "Something wrapped in silky spider web."
|
||||
icon_state = "cocoon1"
|
||||
max_integrity = 60
|
||||
|
||||
/obj/structure/spider/cocoon/Initialize()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/cocoon/container_resist(mob/living/user)
|
||||
var/breakout_time = 600
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [DisplayTimeText(breakout_time)].)</span>")
|
||||
visible_message("You see something struggling and writhing in \the [src]!")
|
||||
if(do_after(user,(breakout_time), target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.forceMove(T)
|
||||
return ..()
|
||||
//generic procs copied from obj/effect/alien
|
||||
/obj/structure/spider
|
||||
name = "web"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
desc = "It's stringy and sticky."
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
max_integrity = 15
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee")
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
damage_amount *= 2
|
||||
if(BRUTE)
|
||||
damage_amount *= 0.25
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/structure/spider/stickyweb/Initialize()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return TRUE
|
||||
else if(isliving(mover))
|
||||
if(istype(mover.pulledby, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return TRUE
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return FALSE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
desc = "They seem to pulse slightly with an inner life."
|
||||
icon_state = "eggs"
|
||||
var/amount_grown = 0
|
||||
var/player_spiders = 0
|
||||
var/directive = "" //Message from the mother
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/eggcluster/Initialize()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
for(var/i=0, i<num, i++)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
|
||||
S.poison_type = poison_type
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.faction = faction.Copy()
|
||||
S.directive = directive
|
||||
if(player_spiders)
|
||||
S.player_spiders = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
icon_state = "spiderling"
|
||||
anchored = FALSE
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
max_integrity = 3
|
||||
var/amount_grown = 0
|
||||
var/grow_as = null
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/player_spiders = 0
|
||||
var/directive = "" //Message from the mother
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/structure/spider/spiderling/Destroy()
|
||||
new/obj/item/reagent_containers/food/snacks/spiderling(get_turf(src))
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/spiderling/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSobj, src)
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/obj/structure/spider/spiderling/hunter
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
|
||||
|
||||
/obj/structure/spider/spiderling/nurse
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse
|
||||
|
||||
/obj/structure/spider/spiderling/midwife
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife
|
||||
|
||||
/obj/structure/spider/spiderling/viper
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter/viper
|
||||
|
||||
/obj/structure/spider/spiderling/tarantula
|
||||
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/tarantula
|
||||
|
||||
/obj/structure/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
forceMove(user.loc)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(isturf(loc))
|
||||
travelling_in_vent = 0
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
var/list/vents = list()
|
||||
var/datum/pipeline/entry_vent_parent = entry_vent.parents[1]
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents)
|
||||
if(prob(50))
|
||||
visible_message("<B>[src] scrambles into the ventilation ducts!</B>", \
|
||||
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
|
||||
spawn(rand(20,60))
|
||||
forceMove(exit_vent)
|
||||
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
|
||||
spawn(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
forceMove(entry_vent)
|
||||
entry_vent = null
|
||||
return
|
||||
|
||||
if(prob(50))
|
||||
audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
sleep(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
forceMove(entry_vent)
|
||||
entry_vent = null
|
||||
return
|
||||
forceMove(exit_vent.loc)
|
||||
entry_vent = null
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
//=================
|
||||
|
||||
else if(prob(33))
|
||||
var/list/nearby = oview(10, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom)
|
||||
if(prob(40))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
|
||||
else if(prob(10))
|
||||
//ventcrawl!
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 1)
|
||||
break
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
if(!grow_as)
|
||||
if(prob(3))
|
||||
grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider/tarantula, /mob/living/simple_animal/hostile/poison/giant_spider/hunter/viper, /mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife)
|
||||
else
|
||||
grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider, /mob/living/simple_animal/hostile/poison/giant_spider/hunter, /mob/living/simple_animal/hostile/poison/giant_spider/nurse)
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.poison_type = poison_type
|
||||
S.faction = faction.Copy()
|
||||
S.directive = directive
|
||||
if(player_spiders)
|
||||
S.playable_spider = TRUE
|
||||
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=[REF(S)];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK, ignore_key = POLL_IGNORE_SPIDER, ignore_dnr_observers = TRUE)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon
|
||||
name = "cocoon"
|
||||
desc = "Something wrapped in silky spider web."
|
||||
icon_state = "cocoon1"
|
||||
max_integrity = 60
|
||||
|
||||
/obj/structure/spider/cocoon/Initialize()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/cocoon/container_resist(mob/living/user)
|
||||
var/breakout_time = 600
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [DisplayTimeText(breakout_time)].)</span>")
|
||||
visible_message("You see something struggling and writhing in \the [src]!")
|
||||
if(do_after(user,(breakout_time), target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.forceMove(T)
|
||||
return ..()
|
||||
|
||||
@@ -1,199 +1,199 @@
|
||||
/* Simple object type, calls a proc when "stepped" on by something */
|
||||
|
||||
/obj/effect/step_trigger
|
||||
var/affect_ghosts = 0
|
||||
var/stopper = 1 // stops throwers
|
||||
var/mobs_only = FALSE
|
||||
invisibility = INVISIBILITY_ABSTRACT // nope cant see this shit
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
|
||||
return 0
|
||||
|
||||
/obj/effect/step_trigger/Crossed(H as mob|obj)
|
||||
..()
|
||||
if(!H)
|
||||
return
|
||||
if(isobserver(H) && !affect_ghosts)
|
||||
return
|
||||
if(!ismob(H) && mobs_only)
|
||||
return
|
||||
Trigger(H)
|
||||
|
||||
|
||||
/obj/effect/step_trigger/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/step_trigger/singularity_pull()
|
||||
return
|
||||
|
||||
/* Sends a message to mob when triggered*/
|
||||
|
||||
/obj/effect/step_trigger/message
|
||||
var/message //the message to give to the mob
|
||||
var/once = 1
|
||||
mobs_only = TRUE
|
||||
|
||||
/obj/effect/step_trigger/message/Trigger(mob/M)
|
||||
if(M.client)
|
||||
to_chat(M, "<span class='info'>[message]</span>")
|
||||
if(once)
|
||||
qdel(src)
|
||||
|
||||
/* Tosses things in a certain direction */
|
||||
|
||||
/obj/effect/step_trigger/thrower
|
||||
var/direction = SOUTH // the direction of throw
|
||||
var/tiles = 3 // if 0: forever until atom hits a stopper
|
||||
var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
|
||||
var/speed = 1 // delay of movement
|
||||
var/facedir = 0 // if 1: atom faces the direction of movement
|
||||
var/nostop = 0 // if 1: will only be stopped by teleporters
|
||||
var/list/affecting = list()
|
||||
|
||||
/obj/effect/step_trigger/thrower/Trigger(atom/A)
|
||||
if(!A || !ismovableatom(A))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
var/stopthrow = 0
|
||||
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 0
|
||||
|
||||
affecting.Add(AM)
|
||||
while(AM && !stopthrow)
|
||||
if(tiles)
|
||||
if(curtiles >= tiles)
|
||||
break
|
||||
if(AM.z != src.z)
|
||||
break
|
||||
|
||||
curtiles++
|
||||
|
||||
sleep(speed)
|
||||
|
||||
// Calculate if we should stop the process
|
||||
if(!nostop)
|
||||
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
|
||||
if(T.stopper && T != src)
|
||||
stopthrow = 1
|
||||
else
|
||||
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
|
||||
if(T.stopper)
|
||||
stopthrow = 1
|
||||
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
step(AM, direction)
|
||||
if(!facedir)
|
||||
AM.setDir(predir)
|
||||
|
||||
|
||||
|
||||
affecting.Remove(AM)
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
|
||||
/* Stops things thrown by a thrower, doesn't do anything */
|
||||
|
||||
/obj/effect/step_trigger/stopper
|
||||
|
||||
/* Instant teleporter */
|
||||
|
||||
/obj/effect/step_trigger/teleporter
|
||||
var/teleport_x = 0 // teleportation coordinates (if one is null, then no teleport!)
|
||||
var/teleport_y = 0
|
||||
var/teleport_z = 0
|
||||
|
||||
/obj/effect/step_trigger/teleporter/Trigger(atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
|
||||
var/turf/T = locate(teleport_x, teleport_y, teleport_z)
|
||||
A.forceMove(T)
|
||||
|
||||
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
|
||||
|
||||
/obj/effect/step_trigger/teleporter/random
|
||||
var/teleport_x_offset = 0
|
||||
var/teleport_y_offset = 0
|
||||
var/teleport_z_offset = 0
|
||||
|
||||
/obj/effect/step_trigger/teleporter/random/Trigger(atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
|
||||
|
||||
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
|
||||
if (T)
|
||||
A.forceMove(T)
|
||||
|
||||
/* Fancy teleporter, creates sparks and smokes when used */
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy
|
||||
var/locationx
|
||||
var/locationy
|
||||
var/uses = 1 //0 for infinite uses
|
||||
var/entersparks = 0
|
||||
var/exitsparks = 0
|
||||
var/entersmoke = 0
|
||||
var/exitsmoke = 0
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy/Trigger(mob/M)
|
||||
var/dest = locate(locationx, locationy, z)
|
||||
M.Move(dest)
|
||||
|
||||
if(entersparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, src)
|
||||
s.start()
|
||||
if(exitsparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, dest)
|
||||
s.start()
|
||||
|
||||
if(entersmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, src, 0)
|
||||
s.start()
|
||||
if(exitsmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, dest, 0)
|
||||
s.start()
|
||||
|
||||
uses--
|
||||
if(uses == 0)
|
||||
qdel(src)
|
||||
|
||||
/* Simple sound player, Mapper friendly! */
|
||||
|
||||
/obj/effect/step_trigger/sound_effect
|
||||
var/sound //eg. path to the sound, inside '' eg: 'growl.ogg'
|
||||
var/volume = 100
|
||||
var/freq_vary = 1 //Should the frequency of the sound vary?
|
||||
var/extra_range = 0 // eg World.view = 7, extra_range = 1, 7+1 = 8, 8 turfs radius
|
||||
var/happens_once = 0
|
||||
var/triggerer_only = 0 //Whether the triggerer is the only person who hears this
|
||||
|
||||
|
||||
/obj/effect/step_trigger/sound_effect/Trigger(atom/movable/A)
|
||||
var/turf/T = get_turf(A)
|
||||
|
||||
if(!T)
|
||||
return
|
||||
|
||||
if(triggerer_only && ismob(A))
|
||||
var/mob/B = A
|
||||
B.playsound_local(T, sound, volume, freq_vary)
|
||||
else
|
||||
playsound(T, sound, volume, freq_vary, extra_range)
|
||||
|
||||
if(happens_once)
|
||||
qdel(src)
|
||||
/* Simple object type, calls a proc when "stepped" on by something */
|
||||
|
||||
/obj/effect/step_trigger
|
||||
var/affect_ghosts = 0
|
||||
var/stopper = 1 // stops throwers
|
||||
var/mobs_only = FALSE
|
||||
invisibility = INVISIBILITY_ABSTRACT // nope cant see this shit
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
|
||||
return 0
|
||||
|
||||
/obj/effect/step_trigger/Crossed(H as mob|obj)
|
||||
..()
|
||||
if(!H)
|
||||
return
|
||||
if(isobserver(H) && !affect_ghosts)
|
||||
return
|
||||
if(!ismob(H) && mobs_only)
|
||||
return
|
||||
Trigger(H)
|
||||
|
||||
|
||||
/obj/effect/step_trigger/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/step_trigger/singularity_pull()
|
||||
return
|
||||
|
||||
/* Sends a message to mob when triggered*/
|
||||
|
||||
/obj/effect/step_trigger/message
|
||||
var/message //the message to give to the mob
|
||||
var/once = 1
|
||||
mobs_only = TRUE
|
||||
|
||||
/obj/effect/step_trigger/message/Trigger(mob/M)
|
||||
if(M.client)
|
||||
to_chat(M, "<span class='info'>[message]</span>")
|
||||
if(once)
|
||||
qdel(src)
|
||||
|
||||
/* Tosses things in a certain direction */
|
||||
|
||||
/obj/effect/step_trigger/thrower
|
||||
var/direction = SOUTH // the direction of throw
|
||||
var/tiles = 3 // if 0: forever until atom hits a stopper
|
||||
var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
|
||||
var/speed = 1 // delay of movement
|
||||
var/facedir = 0 // if 1: atom faces the direction of movement
|
||||
var/nostop = 0 // if 1: will only be stopped by teleporters
|
||||
var/list/affecting = list()
|
||||
|
||||
/obj/effect/step_trigger/thrower/Trigger(atom/A)
|
||||
if(!A || !ismovableatom(A))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
var/stopthrow = 0
|
||||
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 0
|
||||
|
||||
affecting.Add(AM)
|
||||
while(AM && !stopthrow)
|
||||
if(tiles)
|
||||
if(curtiles >= tiles)
|
||||
break
|
||||
if(AM.z != src.z)
|
||||
break
|
||||
|
||||
curtiles++
|
||||
|
||||
sleep(speed)
|
||||
|
||||
// Calculate if we should stop the process
|
||||
if(!nostop)
|
||||
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
|
||||
if(T.stopper && T != src)
|
||||
stopthrow = 1
|
||||
else
|
||||
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
|
||||
if(T.stopper)
|
||||
stopthrow = 1
|
||||
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
step(AM, direction)
|
||||
if(!facedir)
|
||||
AM.setDir(predir)
|
||||
|
||||
|
||||
|
||||
affecting.Remove(AM)
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
|
||||
/* Stops things thrown by a thrower, doesn't do anything */
|
||||
|
||||
/obj/effect/step_trigger/stopper
|
||||
|
||||
/* Instant teleporter */
|
||||
|
||||
/obj/effect/step_trigger/teleporter
|
||||
var/teleport_x = 0 // teleportation coordinates (if one is null, then no teleport!)
|
||||
var/teleport_y = 0
|
||||
var/teleport_z = 0
|
||||
|
||||
/obj/effect/step_trigger/teleporter/Trigger(atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
|
||||
var/turf/T = locate(teleport_x, teleport_y, teleport_z)
|
||||
A.forceMove(T)
|
||||
|
||||
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
|
||||
|
||||
/obj/effect/step_trigger/teleporter/random
|
||||
var/teleport_x_offset = 0
|
||||
var/teleport_y_offset = 0
|
||||
var/teleport_z_offset = 0
|
||||
|
||||
/obj/effect/step_trigger/teleporter/random/Trigger(atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
|
||||
|
||||
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
|
||||
if (T)
|
||||
A.forceMove(T)
|
||||
|
||||
/* Fancy teleporter, creates sparks and smokes when used */
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy
|
||||
var/locationx
|
||||
var/locationy
|
||||
var/uses = 1 //0 for infinite uses
|
||||
var/entersparks = 0
|
||||
var/exitsparks = 0
|
||||
var/entersmoke = 0
|
||||
var/exitsmoke = 0
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy/Trigger(mob/M)
|
||||
var/dest = locate(locationx, locationy, z)
|
||||
M.Move(dest)
|
||||
|
||||
if(entersparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, src)
|
||||
s.start()
|
||||
if(exitsparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, dest)
|
||||
s.start()
|
||||
|
||||
if(entersmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, src, 0)
|
||||
s.start()
|
||||
if(exitsmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, dest, 0)
|
||||
s.start()
|
||||
|
||||
uses--
|
||||
if(uses == 0)
|
||||
qdel(src)
|
||||
|
||||
/* Simple sound player, Mapper friendly! */
|
||||
|
||||
/obj/effect/step_trigger/sound_effect
|
||||
var/sound //eg. path to the sound, inside '' eg: 'growl.ogg'
|
||||
var/volume = 100
|
||||
var/freq_vary = 1 //Should the frequency of the sound vary?
|
||||
var/extra_range = 0 // eg World.view = 7, extra_range = 1, 7+1 = 8, 8 turfs radius
|
||||
var/happens_once = 0
|
||||
var/triggerer_only = 0 //Whether the triggerer is the only person who hears this
|
||||
|
||||
|
||||
/obj/effect/step_trigger/sound_effect/Trigger(atom/movable/A)
|
||||
var/turf/T = get_turf(A)
|
||||
|
||||
if(!T)
|
||||
return
|
||||
|
||||
if(triggerer_only && ismob(A))
|
||||
var/mob/B = A
|
||||
B.playsound_local(T, sound, volume, freq_vary)
|
||||
else
|
||||
playsound(T, sound, volume, freq_vary, extra_range)
|
||||
|
||||
if(happens_once)
|
||||
qdel(src)
|
||||
|
||||
@@ -452,4 +452,45 @@
|
||||
icon_state = "slugboom"
|
||||
randomdir = FALSE
|
||||
duration = 30
|
||||
pixel_x = -24
|
||||
pixel_x = -24
|
||||
|
||||
/obj/effect/constructing_effect
|
||||
icon = 'icons/effects/effects_rcd.dmi'
|
||||
icon_state = ""
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
anchored = TRUE
|
||||
var/status = 0
|
||||
var/delay = 0
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/constructing_effect/Initialize(mapload, rcd_delay, rcd_status)
|
||||
. = ..()
|
||||
status = rcd_status
|
||||
delay = rcd_delay
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon), 11)
|
||||
delay -= 11
|
||||
icon_state = "rcd_end_reverse"
|
||||
else
|
||||
update_icon()
|
||||
|
||||
/obj/effect/constructing_effect/update_icon()
|
||||
icon_state = "rcd"
|
||||
if (delay < 10)
|
||||
icon_state += "_shortest"
|
||||
else if (delay < 20)
|
||||
icon_state += "_shorter"
|
||||
else if (delay < 37)
|
||||
icon_state += "_short"
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
icon_state += "_reverse"
|
||||
|
||||
/obj/effect/constructing_effect/proc/end_animation()
|
||||
if (status == RCD_DECONSTRUCT)
|
||||
qdel(src)
|
||||
else
|
||||
icon_state = "rcd_end"
|
||||
addtimer(CALLBACK(src, .proc/end), 15)
|
||||
|
||||
/obj/effect/constructing_effect/proc/end()
|
||||
qdel(src)
|
||||
Reference in New Issue
Block a user