mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 07:59:08 +01:00
Merge pull request #1323 from ArchieBeepBoop/fuck512
Component Updates - Taking 512 compatibility out back and beating it with a stick
This commit is contained in:
@@ -31,7 +31,6 @@ the new instance inside the host to be updated to the template's stats.
|
||||
var/browser_open = FALSE
|
||||
|
||||
var/mob/living/following_host
|
||||
var/datum/component/redirect/move_listener
|
||||
var/list/disease_instances
|
||||
var/list/hosts //this list is associative, affected_mob -> disease_instance
|
||||
var/datum/disease/advance/sentient_disease/disease_template
|
||||
@@ -260,16 +259,10 @@ the new instance inside the host to be updated to the template's stats.
|
||||
refresh_adaptation_menu()
|
||||
|
||||
/mob/camera/disease/proc/set_following(mob/living/L)
|
||||
if(following_host)
|
||||
UnregisterSignal(following_host, COMSIG_MOVABLE_MOVED)
|
||||
RegisterSignal(L, COMSIG_MOVABLE_MOVED, .proc/follow_mob)
|
||||
following_host = L
|
||||
if(!move_listener)
|
||||
move_listener = L.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/follow_mob)))
|
||||
else
|
||||
if(L)
|
||||
L.TakeComponent(move_listener)
|
||||
if(QDELING(move_listener))
|
||||
move_listener = null
|
||||
else
|
||||
QDEL_NULL(move_listener)
|
||||
follow_mob()
|
||||
|
||||
/mob/camera/disease/proc/follow_next(reverse = FALSE)
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
disease_flags = CURABLE
|
||||
permeability_mod = 1
|
||||
severity = DISEASE_SEVERITY_DANGEROUS
|
||||
var/finalstage = 0 //Because we're spawning off the cure in the final stage, we need to check if we've done the final stage's effects.
|
||||
var/datum/mood_event/revenant_blight/depression
|
||||
var/finalstage = FALSE //Because we're spawning off the cure in the final stage, we need to check if we've done the final stage's effects.
|
||||
var/depression = FALSE
|
||||
|
||||
/datum/disease/revblight/cure()
|
||||
if(affected_mob)
|
||||
@@ -44,7 +44,8 @@
|
||||
affected_mob.emote("pale")
|
||||
if(3)
|
||||
if(!depression)
|
||||
depression = SEND_SIGNAL(affected_mob, COMSIG_ADD_MOOD_EVENT, "rev_blight", /datum/mood_event/revenant_blight)
|
||||
SEND_SIGNAL(affected_mob, COMSIG_ADD_MOOD_EVENT, "rev_blight", /datum/mood_event/revenant_blight)
|
||||
depression = TRUE
|
||||
SEND_SIGNAL(affected_mob, COMSIG_DECREASE_SANITY, 0.12, SANITY_CRAZY)
|
||||
if(prob(10))
|
||||
affected_mob.emote(pick("pale","shiver"))
|
||||
|
||||
+239
-235
@@ -1,235 +1,239 @@
|
||||
/obj/item/assembly/infra
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
icon_state = "infrared"
|
||||
materials = list(MAT_METAL=1000, MAT_GLASS=500)
|
||||
is_position_sensitive = TRUE
|
||||
|
||||
var/on = FALSE
|
||||
var/visible = FALSE
|
||||
var/maxlength = 8
|
||||
var/list/obj/effect/beam/i_beam/beams
|
||||
var/olddir = 0
|
||||
var/datum/component/redirect/listener
|
||||
var/hearing_range = 3
|
||||
|
||||
/obj/item/assembly/infra/Initialize()
|
||||
. = ..()
|
||||
beams = list()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/assembly/infra/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(
|
||||
/datum/component/simple_rotation,
|
||||
ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS,
|
||||
null,
|
||||
null,
|
||||
CALLBACK(src,.proc/after_rotation)
|
||||
)
|
||||
|
||||
/obj/item/assembly/infra/proc/after_rotation()
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(listener)
|
||||
QDEL_LIST(beams)
|
||||
. = ..()
|
||||
|
||||
/obj/item/assembly/infra/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>The infrared trigger is [on?"on":"off"].</span>"
|
||||
|
||||
/obj/item/assembly/infra/activate()
|
||||
if(!..())
|
||||
return FALSE//Cooldown check
|
||||
on = !on
|
||||
refreshBeam()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/infra/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
START_PROCESSING(SSobj, src)
|
||||
refreshBeam()
|
||||
else
|
||||
QDEL_LIST(beams)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
/obj/item/assembly/infra/update_icon()
|
||||
cut_overlays()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
add_overlay("infrared_on")
|
||||
attached_overlays += "infrared_on"
|
||||
if(visible && secured)
|
||||
add_overlay("infrared_visible")
|
||||
attached_overlays += "infrared_visible"
|
||||
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/assembly/infra/dropped()
|
||||
. = ..()
|
||||
if(holder)
|
||||
holder_movement() //sync the dir of the device as well if it's contained in a TTV or an assembly holder
|
||||
else
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/process()
|
||||
if(!on || !secured)
|
||||
refreshBeam()
|
||||
return
|
||||
|
||||
/obj/item/assembly/infra/proc/refreshBeam()
|
||||
QDEL_LIST(beams)
|
||||
if(throwing || !on || !secured)
|
||||
return
|
||||
if(holder)
|
||||
if(holder.master) //incase the sensor is part of an assembly that's contained in another item, such as a single tank bomb
|
||||
if(!holder.master.IsSpecialAssembly() || !isturf(holder.master.loc))
|
||||
return
|
||||
else if(!isturf(holder.loc)) //else just check where the holder is
|
||||
return
|
||||
else if(!isturf(loc)) //or just where the fuck we are in general
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/_dir = dir
|
||||
var/turf/_T = get_step(T, _dir)
|
||||
if(_T)
|
||||
for(var/i in 1 to maxlength)
|
||||
var/obj/effect/beam/i_beam/I = new(T)
|
||||
if(istype(holder, /obj/item/assembly_holder))
|
||||
var/obj/item/assembly_holder/assembly_holder = holder
|
||||
I.icon_state = "[initial(I.icon_state)]_[(assembly_holder.a_left == src) ? "l":"r"]" //Sync the offset of the beam with the position of the sensor.
|
||||
else if(istype(holder, /obj/item/transfer_valve))
|
||||
I.icon_state = "[initial(I.icon_state)]_ttv"
|
||||
I.density = TRUE
|
||||
if(!I.Move(_T))
|
||||
qdel(I)
|
||||
switchListener(_T)
|
||||
break
|
||||
I.density = FALSE
|
||||
beams += I
|
||||
I.master = src
|
||||
I.setDir(_dir)
|
||||
I.invisibility = visible? 0 : INVISIBILITY_ABSTRACT
|
||||
T = _T
|
||||
_T = get_step(_T, _dir)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/item/assembly/infra/on_detach()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/attack_hand()
|
||||
. = ..()
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/Moved()
|
||||
var/t = dir
|
||||
. = ..()
|
||||
setDir(t)
|
||||
|
||||
/obj/item/assembly/infra/throw_at()
|
||||
. = ..()
|
||||
olddir = dir
|
||||
|
||||
/obj/item/assembly/infra/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
. = ..()
|
||||
if(!olddir)
|
||||
return
|
||||
setDir(olddir)
|
||||
olddir = null
|
||||
|
||||
/obj/item/assembly/infra/proc/trigger_beam(atom/movable/AM, turf/location)
|
||||
refreshBeam()
|
||||
switchListener(location)
|
||||
if(!secured || !on || next_activate > world.time)
|
||||
return FALSE
|
||||
pulse(FALSE)
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep* *beep*", null, hearing_range)
|
||||
for(var/CHM in get_hearers_in_view(hearing_range, src))
|
||||
if(ismob(CHM))
|
||||
var/mob/LM = CHM
|
||||
LM.playsound_local(get_turf(src), 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE)
|
||||
next_activate = world.time + 30
|
||||
|
||||
/obj/item/assembly/infra/proc/switchListener(turf/newloc)
|
||||
QDEL_NULL(listener)
|
||||
listener = newloc.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_EXITED = CALLBACK(src, .proc/check_exit)))
|
||||
|
||||
/obj/item/assembly/infra/proc/check_exit(datum/source, atom/movable/offender)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(offender == src || istype(offender,/obj/effect/beam/i_beam))
|
||||
return
|
||||
if (offender && isitem(offender))
|
||||
var/obj/item/I = offender
|
||||
if (I.item_flags & ABSTRACT)
|
||||
return
|
||||
return refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/ui_interact(mob/user)//TODO: change this this to the wire control panel
|
||||
. = ..()
|
||||
if(is_secured(user))
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Infrared Laser</B></TT>"
|
||||
dat += "<BR><B>Status</B>: [on ? "<A href='?src=[REF(src)];state=0'>On</A>" : "<A href='?src=[REF(src)];state=1'>Off</A>"]"
|
||||
dat += "<BR><B>Visibility</B>: [visible ? "<A href='?src=[REF(src)];visible=0'>Visible</A>" : "<A href='?src=[REF(src)];visible=1'>Invisible</A>"]"
|
||||
dat += "<BR><BR><A href='?src=[REF(src)];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=[REF(src)];close=1'>Close</A>"
|
||||
user << browse(dat, "window=infra")
|
||||
onclose(user, "infra")
|
||||
return
|
||||
|
||||
/obj/item/assembly/infra/Topic(href, href_list)
|
||||
..()
|
||||
if(usr.incapacitated() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=infra")
|
||||
onclose(usr, "infra")
|
||||
return
|
||||
if(href_list["state"])
|
||||
on = !(on)
|
||||
update_icon()
|
||||
refreshBeam()
|
||||
if(href_list["visible"])
|
||||
visible = !(visible)
|
||||
update_icon()
|
||||
refreshBeam()
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=infra")
|
||||
return
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/assembly/infra/setDir()
|
||||
. = ..()
|
||||
refreshBeam()
|
||||
|
||||
/***************************IBeam*********************************/
|
||||
|
||||
/obj/effect/beam/i_beam
|
||||
name = "infrared beam"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "ibeam"
|
||||
var/obj/item/assembly/infra/master
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
pass_flags = PASSTABLE|PASSGLASS|PASSGRILLE|LETPASSTHROW
|
||||
|
||||
/obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj)
|
||||
if(istype(AM, /obj/effect/beam))
|
||||
return
|
||||
if (isitem(AM))
|
||||
var/obj/item/I = AM
|
||||
if (I.item_flags & ABSTRACT)
|
||||
return
|
||||
master.trigger_beam(AM, get_turf(src))
|
||||
/obj/item/assembly/infra
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
icon_state = "infrared"
|
||||
materials = list(MAT_METAL=1000, MAT_GLASS=500)
|
||||
is_position_sensitive = TRUE
|
||||
|
||||
var/on = FALSE
|
||||
var/visible = FALSE
|
||||
var/maxlength = 8
|
||||
var/list/obj/effect/beam/i_beam/beams
|
||||
var/olddir = 0
|
||||
var/turf/listeningTo
|
||||
var/hearing_range = 3
|
||||
|
||||
/obj/item/assembly/infra/Initialize()
|
||||
. = ..()
|
||||
beams = list()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/assembly/infra/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(
|
||||
/datum/component/simple_rotation,
|
||||
ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS,
|
||||
null,
|
||||
null,
|
||||
CALLBACK(src,.proc/after_rotation)
|
||||
)
|
||||
|
||||
/obj/item/assembly/infra/proc/after_rotation()
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
listeningTo = null
|
||||
QDEL_LIST(beams)
|
||||
. = ..()
|
||||
|
||||
/obj/item/assembly/infra/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>The infrared trigger is [on?"on":"off"].</span>"
|
||||
|
||||
/obj/item/assembly/infra/activate()
|
||||
if(!..())
|
||||
return FALSE//Cooldown check
|
||||
on = !on
|
||||
refreshBeam()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/infra/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
START_PROCESSING(SSobj, src)
|
||||
refreshBeam()
|
||||
else
|
||||
QDEL_LIST(beams)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
/obj/item/assembly/infra/update_icon()
|
||||
cut_overlays()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
add_overlay("infrared_on")
|
||||
attached_overlays += "infrared_on"
|
||||
if(visible && secured)
|
||||
add_overlay("infrared_visible")
|
||||
attached_overlays += "infrared_visible"
|
||||
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/assembly/infra/dropped()
|
||||
. = ..()
|
||||
if(holder)
|
||||
holder_movement() //sync the dir of the device as well if it's contained in a TTV or an assembly holder
|
||||
else
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/process()
|
||||
if(!on || !secured)
|
||||
refreshBeam()
|
||||
return
|
||||
|
||||
/obj/item/assembly/infra/proc/refreshBeam()
|
||||
QDEL_LIST(beams)
|
||||
if(throwing || !on || !secured)
|
||||
return
|
||||
if(holder)
|
||||
if(holder.master) //incase the sensor is part of an assembly that's contained in another item, such as a single tank bomb
|
||||
if(!holder.master.IsSpecialAssembly() || !isturf(holder.master.loc))
|
||||
return
|
||||
else if(!isturf(holder.loc)) //else just check where the holder is
|
||||
return
|
||||
else if(!isturf(loc)) //or just where the fuck we are in general
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/_dir = dir
|
||||
var/turf/_T = get_step(T, _dir)
|
||||
if(_T)
|
||||
for(var/i in 1 to maxlength)
|
||||
var/obj/effect/beam/i_beam/I = new(T)
|
||||
if(istype(holder, /obj/item/assembly_holder))
|
||||
var/obj/item/assembly_holder/assembly_holder = holder
|
||||
I.icon_state = "[initial(I.icon_state)]_[(assembly_holder.a_left == src) ? "l":"r"]" //Sync the offset of the beam with the position of the sensor.
|
||||
else if(istype(holder, /obj/item/transfer_valve))
|
||||
I.icon_state = "[initial(I.icon_state)]_ttv"
|
||||
I.density = TRUE
|
||||
if(!I.Move(_T))
|
||||
qdel(I)
|
||||
switchListener(_T)
|
||||
break
|
||||
I.density = FALSE
|
||||
beams += I
|
||||
I.master = src
|
||||
I.setDir(_dir)
|
||||
I.invisibility = visible? 0 : INVISIBILITY_ABSTRACT
|
||||
T = _T
|
||||
_T = get_step(_T, _dir)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/item/assembly/infra/on_detach()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/attack_hand()
|
||||
. = ..()
|
||||
refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/Moved()
|
||||
var/t = dir
|
||||
. = ..()
|
||||
setDir(t)
|
||||
|
||||
/obj/item/assembly/infra/throw_at()
|
||||
. = ..()
|
||||
olddir = dir
|
||||
|
||||
/obj/item/assembly/infra/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
. = ..()
|
||||
if(!olddir)
|
||||
return
|
||||
setDir(olddir)
|
||||
olddir = null
|
||||
|
||||
/obj/item/assembly/infra/proc/trigger_beam(atom/movable/AM, turf/location)
|
||||
refreshBeam()
|
||||
switchListener(location)
|
||||
if(!secured || !on || next_activate > world.time)
|
||||
return FALSE
|
||||
pulse(FALSE)
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep* *beep*", null, hearing_range)
|
||||
for(var/CHM in get_hearers_in_view(hearing_range, src))
|
||||
if(ismob(CHM))
|
||||
var/mob/LM = CHM
|
||||
LM.playsound_local(get_turf(src), 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE)
|
||||
next_activate = world.time + 30
|
||||
|
||||
/obj/item/assembly/infra/proc/switchListener(turf/newloc)
|
||||
if(listeningTo == newloc)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_ATOM_EXITED)
|
||||
RegisterSignal(newloc, COMSIG_ATOM_EXITED, .proc/check_exit)
|
||||
listeningTo = newloc
|
||||
|
||||
/obj/item/assembly/infra/proc/check_exit(datum/source, atom/movable/offender)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(offender == src || istype(offender,/obj/effect/beam/i_beam))
|
||||
return
|
||||
if (offender && isitem(offender))
|
||||
var/obj/item/I = offender
|
||||
if (I.item_flags & ABSTRACT)
|
||||
return
|
||||
return refreshBeam()
|
||||
|
||||
/obj/item/assembly/infra/ui_interact(mob/user)//TODO: change this this to the wire control panel
|
||||
. = ..()
|
||||
if(is_secured(user))
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Infrared Laser</B></TT>"
|
||||
dat += "<BR><B>Status</B>: [on ? "<A href='?src=[REF(src)];state=0'>On</A>" : "<A href='?src=[REF(src)];state=1'>Off</A>"]"
|
||||
dat += "<BR><B>Visibility</B>: [visible ? "<A href='?src=[REF(src)];visible=0'>Visible</A>" : "<A href='?src=[REF(src)];visible=1'>Invisible</A>"]"
|
||||
dat += "<BR><BR><A href='?src=[REF(src)];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=[REF(src)];close=1'>Close</A>"
|
||||
user << browse(dat, "window=infra")
|
||||
onclose(user, "infra")
|
||||
return
|
||||
|
||||
/obj/item/assembly/infra/Topic(href, href_list)
|
||||
..()
|
||||
if(usr.incapacitated() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=infra")
|
||||
onclose(usr, "infra")
|
||||
return
|
||||
if(href_list["state"])
|
||||
on = !(on)
|
||||
update_icon()
|
||||
refreshBeam()
|
||||
if(href_list["visible"])
|
||||
visible = !(visible)
|
||||
update_icon()
|
||||
refreshBeam()
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=infra")
|
||||
return
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/assembly/infra/setDir()
|
||||
. = ..()
|
||||
refreshBeam()
|
||||
|
||||
/***************************IBeam*********************************/
|
||||
|
||||
/obj/effect/beam/i_beam
|
||||
name = "infrared beam"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "ibeam"
|
||||
var/obj/item/assembly/infra/master
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
pass_flags = PASSTABLE|PASSGLASS|PASSGRILLE|LETPASSTHROW
|
||||
|
||||
/obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj)
|
||||
if(istype(AM, /obj/effect/beam))
|
||||
return
|
||||
if (isitem(AM))
|
||||
var/obj/item/I = AM
|
||||
if (I.item_flags & ABSTRACT)
|
||||
return
|
||||
master.trigger_beam(AM, get_turf(src))
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/obj/item/clothing/gloves
|
||||
name = "gloves"
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/clothing/gloves.dmi'
|
||||
siemens_coefficient = 0.5
|
||||
body_parts_covered = HANDS
|
||||
slot_flags = ITEM_SLOT_GLOVES
|
||||
attack_verb = list("challenged")
|
||||
var/transfer_prints = FALSE
|
||||
var/transfer_blood = 0
|
||||
strip_delay = 20
|
||||
equip_delay_other = 40
|
||||
|
||||
/obj/item/clothing/gloves/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /obj/item/clothing/gloves/clean_blood)))
|
||||
|
||||
/obj/item/clothing/gloves/clean_blood(datum/source, strength)
|
||||
. = ..()
|
||||
transfer_blood = 0
|
||||
|
||||
/obj/item/clothing/gloves/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>\the [src] are forcing [user]'s hands around [user.p_their()] neck! It looks like the gloves are possessed!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/clothing/gloves/worn_overlays(isinhands = FALSE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves")
|
||||
if(blood_DNA)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = blood_DNA_to_color())
|
||||
|
||||
/obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE)
|
||||
..()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_gloves()
|
||||
|
||||
// Called just before an attack_hand(), in mob/UnarmedAttack()
|
||||
/obj/item/clothing/gloves/proc/Touch(atom/A, proximity)
|
||||
return FALSE // return TRUE to cancel attack_hand()
|
||||
/obj/item/clothing/gloves
|
||||
name = "gloves"
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/clothing/gloves.dmi'
|
||||
siemens_coefficient = 0.5
|
||||
body_parts_covered = HANDS
|
||||
slot_flags = ITEM_SLOT_GLOVES
|
||||
attack_verb = list("challenged")
|
||||
var/transfer_prints = FALSE
|
||||
var/transfer_blood = 0
|
||||
strip_delay = 20
|
||||
equip_delay_other = 40
|
||||
|
||||
/obj/item/clothing/gloves/ComponentInitialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /obj/item/clothing/gloves/clean_blood)
|
||||
|
||||
/obj/item/clothing/gloves/clean_blood(datum/source, strength)
|
||||
. = ..()
|
||||
transfer_blood = 0
|
||||
|
||||
/obj/item/clothing/gloves/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>\the [src] are forcing [user]'s hands around [user.p_their()] neck! It looks like the gloves are possessed!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/clothing/gloves/worn_overlays(isinhands = FALSE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves")
|
||||
if(blood_DNA)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = blood_DNA_to_color())
|
||||
|
||||
/obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE)
|
||||
..()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_gloves()
|
||||
|
||||
// Called just before an attack_hand(), in mob/UnarmedAttack()
|
||||
/obj/item/clothing/gloves/proc/Touch(atom/A, proximity)
|
||||
return FALSE // return TRUE to cancel attack_hand()
|
||||
|
||||
@@ -1,113 +1,113 @@
|
||||
/obj/item/clothing/shoes
|
||||
name = "shoes"
|
||||
icon = 'icons/obj/clothing/shoes.dmi'
|
||||
desc = "Comfortable-looking shoes."
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
var/chained = 0
|
||||
|
||||
body_parts_covered = FEET
|
||||
slot_flags = ITEM_SLOT_FEET
|
||||
|
||||
permeability_coefficient = 0.5
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
var/blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
var/list/bloody_shoes = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
|
||||
var/offset = 0
|
||||
var/equipped_before_drop = FALSE
|
||||
|
||||
//CITADEL EDIT Enables digitigrade shoe styles
|
||||
var/adjusted = NORMAL_STYLE
|
||||
mutantrace_variation = MUTANTRACE_VARIATION
|
||||
var/last_bloodtype = "" //used to track the last bloodtype to have graced these shoes; makes for better performing footprint shenanigans
|
||||
var/last_blood_DNA = "" //same as last one
|
||||
|
||||
/obj/item/clothing/shoes/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /obj/item/clothing/shoes/clean_blood)))
|
||||
|
||||
/obj/item/clothing/shoes/suicide_act(mob/living/carbon/user)
|
||||
if(rand(2)>1)
|
||||
user.visible_message("<span class='suicide'>[user] begins tying \the [src] up waaay too tightly! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
var/obj/item/bodypart/l_leg = user.get_bodypart(BODY_ZONE_L_LEG)
|
||||
var/obj/item/bodypart/r_leg = user.get_bodypart(BODY_ZONE_R_LEG)
|
||||
if(l_leg)
|
||||
l_leg.dismember()
|
||||
playsound(user,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
if(r_leg)
|
||||
r_leg.dismember()
|
||||
playsound(user,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return BRUTELOSS
|
||||
else//didnt realize this suicide act existed (was in miscellaneous.dm) and didnt want to remove it, so made it a 50/50 chance. Why not!
|
||||
user.visible_message("<span class='suicide'>[user] is bashing [user.p_their()] own head in with [src]! Ain't that a kick in the head?</span>")
|
||||
for(var/i = 0, i < 3, i++)
|
||||
sleep(3)
|
||||
playsound(user, 'sound/weapons/genhit2.ogg', 50, 1)
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/clothing/shoes/transfer_blood_dna(list/blood_dna, diseases)
|
||||
..()
|
||||
if(blood_dna.len)
|
||||
last_bloodtype = blood_dna[blood_dna[blood_dna.len]]//trust me this works
|
||||
last_blood_DNA = blood_dna[blood_dna.len]
|
||||
|
||||
/obj/item/clothing/shoes/worn_overlays(isinhands = FALSE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
var/bloody = FALSE
|
||||
if(blood_DNA)
|
||||
bloody = TRUE
|
||||
else
|
||||
bloody = bloody_shoes[BLOOD_STATE_BLOOD]
|
||||
|
||||
if(damaged_clothes)
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedshoe")
|
||||
if(bloody)
|
||||
if(adjusted == NORMAL_STYLE)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "shoeblood", color = blood_DNA_to_color())
|
||||
else
|
||||
. += mutable_appearance('modular_citadel/icons/mob/digishoes.dmi', "shoeblood", color = blood_DNA_to_color())
|
||||
|
||||
/obj/item/clothing/shoes/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
|
||||
if(mutantrace_variation && ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(DIGITIGRADE in H.dna.species.species_traits)
|
||||
adjusted = ALT_STYLE
|
||||
H.update_inv_shoes()
|
||||
else if(adjusted == ALT_STYLE)
|
||||
adjusted = NORMAL_STYLE
|
||||
H.update_inv_shoes()
|
||||
|
||||
if(offset && slot_flags & slotdefine2slotbit(slot))
|
||||
user.pixel_y += offset
|
||||
worn_y_dimension -= (offset * 2)
|
||||
user.update_inv_shoes()
|
||||
equipped_before_drop = TRUE
|
||||
|
||||
/obj/item/clothing/shoes/proc/restore_offsets(mob/user)
|
||||
equipped_before_drop = FALSE
|
||||
user.pixel_y -= offset
|
||||
worn_y_dimension = world.icon_size
|
||||
|
||||
/obj/item/clothing/shoes/dropped(mob/user)
|
||||
if(offset && equipped_before_drop)
|
||||
restore_offsets(user)
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/shoes/update_clothes_damaged_state(damaging = TRUE)
|
||||
..()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_shoes()
|
||||
|
||||
/obj/item/clothing/shoes/clean_blood(datum/source, strength)
|
||||
. = ..()
|
||||
bloody_shoes = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
|
||||
blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_shoes()
|
||||
|
||||
/obj/item/proc/negates_gravity()
|
||||
return FALSE
|
||||
/obj/item/clothing/shoes
|
||||
name = "shoes"
|
||||
icon = 'icons/obj/clothing/shoes.dmi'
|
||||
desc = "Comfortable-looking shoes."
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
var/chained = 0
|
||||
|
||||
body_parts_covered = FEET
|
||||
slot_flags = ITEM_SLOT_FEET
|
||||
|
||||
permeability_coefficient = 0.5
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
var/blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
var/list/bloody_shoes = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
|
||||
var/offset = 0
|
||||
var/equipped_before_drop = FALSE
|
||||
|
||||
//CITADEL EDIT Enables digitigrade shoe styles
|
||||
var/adjusted = NORMAL_STYLE
|
||||
mutantrace_variation = MUTANTRACE_VARIATION
|
||||
var/last_bloodtype = "" //used to track the last bloodtype to have graced these shoes; makes for better performing footprint shenanigans
|
||||
var/last_blood_DNA = "" //same as last one
|
||||
|
||||
/obj/item/clothing/shoes/ComponentInitialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /obj/item/clothing/shoes/clean_blood)
|
||||
|
||||
/obj/item/clothing/shoes/suicide_act(mob/living/carbon/user)
|
||||
if(rand(2)>1)
|
||||
user.visible_message("<span class='suicide'>[user] begins tying \the [src] up waaay too tightly! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
var/obj/item/bodypart/l_leg = user.get_bodypart(BODY_ZONE_L_LEG)
|
||||
var/obj/item/bodypart/r_leg = user.get_bodypart(BODY_ZONE_R_LEG)
|
||||
if(l_leg)
|
||||
l_leg.dismember()
|
||||
playsound(user,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
if(r_leg)
|
||||
r_leg.dismember()
|
||||
playsound(user,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return BRUTELOSS
|
||||
else//didnt realize this suicide act existed (was in miscellaneous.dm) and didnt want to remove it, so made it a 50/50 chance. Why not!
|
||||
user.visible_message("<span class='suicide'>[user] is bashing [user.p_their()] own head in with [src]! Ain't that a kick in the head?</span>")
|
||||
for(var/i = 0, i < 3, i++)
|
||||
sleep(3)
|
||||
playsound(user, 'sound/weapons/genhit2.ogg', 50, 1)
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/clothing/shoes/transfer_blood_dna(list/blood_dna, diseases)
|
||||
..()
|
||||
if(blood_dna.len)
|
||||
last_bloodtype = blood_dna[blood_dna[blood_dna.len]]//trust me this works
|
||||
last_blood_DNA = blood_dna[blood_dna.len]
|
||||
|
||||
/obj/item/clothing/shoes/worn_overlays(isinhands = FALSE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
var/bloody = FALSE
|
||||
if(blood_DNA)
|
||||
bloody = TRUE
|
||||
else
|
||||
bloody = bloody_shoes[BLOOD_STATE_BLOOD]
|
||||
|
||||
if(damaged_clothes)
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedshoe")
|
||||
if(bloody)
|
||||
if(adjusted == NORMAL_STYLE)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "shoeblood", color = blood_DNA_to_color())
|
||||
else
|
||||
. += mutable_appearance('modular_citadel/icons/mob/digishoes.dmi', "shoeblood", color = blood_DNA_to_color())
|
||||
|
||||
/obj/item/clothing/shoes/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
|
||||
if(mutantrace_variation && ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(DIGITIGRADE in H.dna.species.species_traits)
|
||||
adjusted = ALT_STYLE
|
||||
H.update_inv_shoes()
|
||||
else if(adjusted == ALT_STYLE)
|
||||
adjusted = NORMAL_STYLE
|
||||
H.update_inv_shoes()
|
||||
|
||||
if(offset && slot_flags & slotdefine2slotbit(slot))
|
||||
user.pixel_y += offset
|
||||
worn_y_dimension -= (offset * 2)
|
||||
user.update_inv_shoes()
|
||||
equipped_before_drop = TRUE
|
||||
|
||||
/obj/item/clothing/shoes/proc/restore_offsets(mob/user)
|
||||
equipped_before_drop = FALSE
|
||||
user.pixel_y -= offset
|
||||
worn_y_dimension = world.icon_size
|
||||
|
||||
/obj/item/clothing/shoes/dropped(mob/user)
|
||||
if(offset && equipped_before_drop)
|
||||
restore_offsets(user)
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/shoes/update_clothes_damaged_state(damaging = TRUE)
|
||||
..()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_shoes()
|
||||
|
||||
/obj/item/clothing/shoes/clean_blood(datum/source, strength)
|
||||
. = ..()
|
||||
bloody_shoes = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
|
||||
blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_shoes()
|
||||
|
||||
/obj/item/proc/negates_gravity()
|
||||
return FALSE
|
||||
|
||||
@@ -604,7 +604,6 @@
|
||||
armor = list("melee" = 30, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 75)
|
||||
item_color = "ancient"
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/datum/component/mobhook
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ancient
|
||||
name = "prototype RIG hardsuit"
|
||||
@@ -616,7 +615,7 @@
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/footstep = 1
|
||||
var/datum/component/mobhook
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ancient/mason
|
||||
name = "M.A.S.O.N RIG"
|
||||
@@ -673,20 +672,24 @@
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ancient/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if (slot == SLOT_WEAR_SUIT)
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/on_mob_move)))
|
||||
else
|
||||
QDEL_NULL(mobhook)
|
||||
if(slot != SLOT_WEAR_SUIT)
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
return
|
||||
if(listeningTo == user)
|
||||
return
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move)
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ancient/dropped()
|
||||
. = ..()
|
||||
QDEL_NULL(mobhook)
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ancient/Destroy()
|
||||
QDEL_NULL(mobhook) // mobhook is not our component
|
||||
listeningTo = null
|
||||
return ..()
|
||||
|
||||
/////////////SHIELDED//////////////////////////////////
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
var/field_type = /datum/proximity_monitor/advanced/debug
|
||||
var/operating = FALSE
|
||||
var/datum/proximity_monitor/advanced/current = null
|
||||
var/datum/component/mobhook
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/multitool/field_debug/Initialize()
|
||||
. = ..()
|
||||
@@ -292,7 +292,7 @@
|
||||
/obj/item/multitool/field_debug/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(current)
|
||||
QDEL_NULL(mobhook)
|
||||
listeningTo = null
|
||||
return ..()
|
||||
|
||||
/obj/item/multitool/field_debug/proc/setup_debug_field()
|
||||
@@ -303,16 +303,20 @@
|
||||
/obj/item/multitool/field_debug/attack_self(mob/user)
|
||||
operating = !operating
|
||||
to_chat(user, "You turn [src] [operating? "on":"off"].")
|
||||
QDEL_NULL(mobhook)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
if(!istype(current) && operating)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/on_mob_move)))
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move)
|
||||
listeningTo = user
|
||||
setup_debug_field()
|
||||
else if(!operating)
|
||||
QDEL_NULL(current)
|
||||
|
||||
/obj/item/multitool/field_debug/dropped()
|
||||
. = ..()
|
||||
QDEL_NULL(mobhook)
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
|
||||
/obj/item/multitool/field_debug/proc/on_mob_move()
|
||||
check_turf(get_turf(src))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT = CALLBACK(src, /mob/living/carbon/human/clean_blood)))
|
||||
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /mob/living/carbon/human/clean_blood)
|
||||
|
||||
|
||||
/mob/living/carbon/human/ComponentInitialize()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -64,10 +64,9 @@
|
||||
var/interrupted = FALSE
|
||||
var/mob/target
|
||||
var/icon/bluespace
|
||||
var/datum/weakref/redirect_component
|
||||
|
||||
/datum/status_effect/slimerecall/on_apply()
|
||||
redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/resistField))))
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/resistField)
|
||||
to_chat(owner, "<span class='danger'>You feel a sudden tug from an unknown force, and feel a pull to bluespace!</span>")
|
||||
to_chat(owner, "<span class='notice'>Resist if you wish avoid the force!</span>")
|
||||
bluespace = icon('icons/effects/effects.dmi',"chronofield")
|
||||
@@ -77,9 +76,9 @@
|
||||
/datum/status_effect/slimerecall/proc/resistField()
|
||||
interrupted = TRUE
|
||||
owner.remove_status_effect(src)
|
||||
|
||||
/datum/status_effect/slimerecall/on_remove()
|
||||
qdel(redirect_component.resolve())
|
||||
redirect_component = null
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
owner.cut_overlay(bluespace)
|
||||
if(interrupted || !ismob(target))
|
||||
to_chat(owner, "<span class='warning'>The bluespace tug fades away, and you feel that the force has passed you by.</span>")
|
||||
@@ -98,10 +97,9 @@
|
||||
duration = -1 //Will remove self when block breaks.
|
||||
alert_type = /obj/screen/alert/status_effect/freon/stasis
|
||||
var/obj/structure/ice_stasis/cube
|
||||
var/datum/weakref/redirect_component
|
||||
|
||||
/datum/status_effect/frozenstasis/on_apply()
|
||||
redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/breakCube))))
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/breakCube)
|
||||
cube = new /obj/structure/ice_stasis(get_turf(owner))
|
||||
owner.forceMove(cube)
|
||||
owner.status_flags |= GODMODE
|
||||
@@ -118,8 +116,7 @@
|
||||
if(cube)
|
||||
qdel(cube)
|
||||
owner.status_flags &= ~GODMODE
|
||||
qdel(redirect_component.resolve())
|
||||
redirect_component = null
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
|
||||
/datum/status_effect/slime_clone
|
||||
id = "slime_cloned"
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
circuit = /obj/item/circuitboard/computer/xenobiology
|
||||
var/datum/action/innate/hotkey_help/hotkey_help
|
||||
|
||||
var/datum/component/redirect/listener
|
||||
|
||||
var/obj/machinery/monkey_recycler/connected_recycler
|
||||
var/list/stored_slimes
|
||||
var/obj/item/slimepotion/slime/current_potion
|
||||
@@ -41,7 +39,7 @@
|
||||
. = ..()
|
||||
hotkey_help = new
|
||||
stored_slimes = list()
|
||||
listener = AddComponent(/datum/component/redirect, list(COMSIG_ATOM_CONTENTS_DEL = CALLBACK(src, .proc/on_contents_del)))
|
||||
RegisterSignal(src, COMSIG_ATOM_CONTENTS_DEL, .proc/on_contents_del)
|
||||
for(var/obj/machinery/monkey_recycler/recycler in GLOB.monkey_recyclers)
|
||||
if(get_area(src) == get_area(recycler))
|
||||
connected_recycler = recycler
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//include unit test files in this module in this ifdef
|
||||
//Keep this sorted alphabetically
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
#include "anchored_mobs.dm"
|
||||
#include "component_tests.dm"
|
||||
#include "reagent_id_typos.dm"
|
||||
#include "reagent_recipe_collisions.dm"
|
||||
#include "spawn_humans.dm"
|
||||
#include "subsystem_init.dm"
|
||||
#include "timer_sanity.dm"
|
||||
#include "unit_test.dm"
|
||||
#endif
|
||||
//include unit test files in this module in this ifdef
|
||||
//Keep this sorted alphabetically
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
#include "anchored_mobs.dm"
|
||||
#include "component_tests.dm"
|
||||
#include "reagent_id_typos.dm"
|
||||
#include "reagent_recipe_collisions.dm"
|
||||
#include "spawn_humans.dm"
|
||||
#include "subsystem_init.dm"
|
||||
#include "timer_sanity.dm"
|
||||
#include "unit_test.dm"
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/datum/unit_test/component_duping/Run()
|
||||
var/list/bad_dms = list()
|
||||
var/list/bad_dts = list()
|
||||
for(var/t in typesof(/datum/component))
|
||||
var/datum/component/comp = t
|
||||
if(!isnum(initial(comp.dupe_mode)))
|
||||
bad_dms += t
|
||||
var/dupe_type = initial(comp.dupe_type)
|
||||
if(dupe_type && !ispath(dupe_type))
|
||||
bad_dts += t
|
||||
if(length(bad_dms) || length(bad_dts))
|
||||
Fail("Components with invalid dupe modes: ([bad_dms.Join(",")]) ||| Components with invalid dupe types: ([bad_dts.Join(",")])")
|
||||
Reference in New Issue
Block a user