@@ -245,6 +245,14 @@
|
||||
/datum/action/item_action/toggle_helmet_light
|
||||
name = "Toggle Helmet Light"
|
||||
|
||||
/datum/action/item_action/toggle_welding_screen
|
||||
name = "Toggle Welding Screen"
|
||||
|
||||
/datum/action/item_action/toggle_welding_screen/Trigger()
|
||||
var/obj/item/clothing/head/hardhat/weldhat/H = target
|
||||
if(istype(H))
|
||||
H.toggle_welding_screen(owner)
|
||||
|
||||
/datum/action/item_action/toggle_headphones
|
||||
name = "Toggle Headphones"
|
||||
desc = "UNTZ UNTZ UNTZ"
|
||||
|
||||
+45
-45
@@ -1,70 +1,70 @@
|
||||
#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]"
|
||||
|
||||
/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
|
||||
|
||||
/datum/armor
|
||||
datum_flags = DF_USE_TAG
|
||||
var/melee
|
||||
var/bullet
|
||||
var/laser
|
||||
var/energy
|
||||
var/bomb
|
||||
var/bio
|
||||
var/rad
|
||||
var/fire
|
||||
var/acid
|
||||
var/magic
|
||||
datum_flags = DF_USE_TAG
|
||||
var/melee
|
||||
var/bullet
|
||||
var/laser
|
||||
var/energy
|
||||
var/bomb
|
||||
var/bio
|
||||
var/rad
|
||||
var/fire
|
||||
var/acid
|
||||
var/magic
|
||||
|
||||
/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
|
||||
src.melee = melee
|
||||
src.bullet = bullet
|
||||
src.laser = laser
|
||||
src.energy = energy
|
||||
src.bomb = bomb
|
||||
src.bio = bio
|
||||
src.rad = rad
|
||||
src.fire = fire
|
||||
src.acid = acid
|
||||
src.magic = magic
|
||||
tag = ARMORID
|
||||
src.melee = melee
|
||||
src.bullet = bullet
|
||||
src.laser = laser
|
||||
src.energy = energy
|
||||
src.bomb = bomb
|
||||
src.bio = bio
|
||||
src.rad = rad
|
||||
src.fire = fire
|
||||
src.acid = acid
|
||||
src.magic = magic
|
||||
tag = ARMORID
|
||||
|
||||
/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
|
||||
return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic)
|
||||
return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic)
|
||||
|
||||
/datum/armor/proc/modifyAllRatings(modifier = 0)
|
||||
return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier)
|
||||
return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier)
|
||||
|
||||
/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
|
||||
return getArmor((isnull(melee) ? src.melee : melee),\
|
||||
(isnull(bullet) ? src.bullet : bullet),\
|
||||
(isnull(laser) ? src.laser : laser),\
|
||||
(isnull(energy) ? src.energy : energy),\
|
||||
(isnull(bomb) ? src.bomb : bomb),\
|
||||
(isnull(bio) ? src.bio : bio),\
|
||||
(isnull(rad) ? src.rad : rad),\
|
||||
(isnull(fire) ? src.fire : fire),\
|
||||
(isnull(acid) ? src.acid : acid),\
|
||||
(isnull(magic) ? src.magic : magic))
|
||||
return getArmor((isnull(melee) ? src.melee : melee),\
|
||||
(isnull(bullet) ? src.bullet : bullet),\
|
||||
(isnull(laser) ? src.laser : laser),\
|
||||
(isnull(energy) ? src.energy : energy),\
|
||||
(isnull(bomb) ? src.bomb : bomb),\
|
||||
(isnull(bio) ? src.bio : bio),\
|
||||
(isnull(rad) ? src.rad : rad),\
|
||||
(isnull(fire) ? src.fire : fire),\
|
||||
(isnull(acid) ? src.acid : acid),\
|
||||
(isnull(magic) ? src.magic : magic))
|
||||
|
||||
/datum/armor/proc/getRating(rating)
|
||||
return vars[rating]
|
||||
return vars[rating]
|
||||
|
||||
/datum/armor/proc/getList()
|
||||
return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic)
|
||||
return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic)
|
||||
|
||||
/datum/armor/proc/attachArmor(datum/armor/AA)
|
||||
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic)
|
||||
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic)
|
||||
|
||||
/datum/armor/proc/detachArmor(datum/armor/AA)
|
||||
return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic)
|
||||
return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic)
|
||||
|
||||
/datum/armor/vv_edit_var(var_name, var_value)
|
||||
if (var_name == NAMEOF(src, tag))
|
||||
return FALSE
|
||||
. = ..()
|
||||
tag = ARMORID // update tag in case armor values were edited
|
||||
if (var_name == NAMEOF(src, tag))
|
||||
return FALSE
|
||||
. = ..()
|
||||
tag = ARMORID // update tag in case armor values were edited
|
||||
|
||||
#undef ARMORID
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
.=..()
|
||||
opentime = 0
|
||||
|
||||
/datum/browser/modal/open()
|
||||
/datum/browser/modal/open(use_onclose = 1)
|
||||
set waitfor = 0
|
||||
opentime = world.time
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
var/dupe_mode = COMPONENT_DUPE_HIGHLANDER
|
||||
var/dupe_type
|
||||
var/datum/parent
|
||||
//only set to true if you are able to properly transfer this component
|
||||
//At a minimum RegisterWithParent and UnregisterFromParent should be used
|
||||
//Make sure you also implement PostTransfer for any post transfer handling
|
||||
var/can_transfer = FALSE
|
||||
|
||||
/datum/component/New(datum/P, ...)
|
||||
parent = P
|
||||
@@ -83,7 +87,7 @@
|
||||
/datum/component/proc/UnregisterFromParent()
|
||||
return
|
||||
|
||||
/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proc_or_callback, override = FALSE)
|
||||
/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE)
|
||||
if(QDELETED(src) || QDELETED(target))
|
||||
return
|
||||
|
||||
@@ -96,15 +100,12 @@
|
||||
if(!lookup)
|
||||
target.comp_lookup = lookup = list()
|
||||
|
||||
if(!istype(proc_or_callback, /datum/callback)) //if it wasnt a callback before, it is now
|
||||
proc_or_callback = CALLBACK(src, proc_or_callback)
|
||||
|
||||
var/list/sig_types = islist(sig_type_or_types) ? sig_type_or_types : list(sig_type_or_types)
|
||||
for(var/sig_type in sig_types)
|
||||
if(!override && procs[target][sig_type])
|
||||
stack_trace("[sig_type] overridden. Use override = TRUE to suppress this warning")
|
||||
|
||||
procs[target][sig_type] = proc_or_callback
|
||||
procs[target][sig_type] = proctype
|
||||
|
||||
if(!lookup[sig_type]) // Nothing has registered here yet
|
||||
lookup[sig_type] = src
|
||||
@@ -154,7 +155,7 @@
|
||||
return
|
||||
|
||||
/datum/component/proc/PostTransfer()
|
||||
return
|
||||
return COMPONENT_INCOMPATIBLE //Do not support transfer by default as you must properly support it
|
||||
|
||||
/datum/component/proc/_GetInverseTypeList(our_type = type)
|
||||
//we can do this one simple trick
|
||||
@@ -171,17 +172,20 @@
|
||||
var/datum/C = target
|
||||
if(!C.signal_enabled)
|
||||
return NONE
|
||||
var/datum/callback/CB = C.signal_procs[src][sigtype]
|
||||
return CB.InvokeAsync(arglist(arguments))
|
||||
var/proctype = C.signal_procs[src][sigtype]
|
||||
return NONE | CallAsync(C, proctype, arguments)
|
||||
. = NONE
|
||||
for(var/I in target)
|
||||
var/datum/C = I
|
||||
if(!C.signal_enabled)
|
||||
continue
|
||||
var/datum/callback/CB = C.signal_procs[src][sigtype]
|
||||
. |= CB.InvokeAsync(arglist(arguments))
|
||||
var/proctype = C.signal_procs[src][sigtype]
|
||||
. |= CallAsync(C, proctype, arguments)
|
||||
|
||||
/datum/proc/GetComponent(c_type)
|
||||
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
|
||||
/datum/proc/GetComponent(datum/component/c_type)
|
||||
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED)
|
||||
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
|
||||
var/list/dc = datum_components
|
||||
if(!dc)
|
||||
return null
|
||||
@@ -220,10 +224,6 @@
|
||||
if(ispath(nt))
|
||||
if(nt == /datum/component)
|
||||
CRASH("[nt] attempted instantiation!")
|
||||
if(!isnum(dm))
|
||||
CRASH("[nt]: Invalid dupe_mode ([dm])!")
|
||||
if(dt && !ispath(dt))
|
||||
CRASH("[nt]: Invalid dupe_type ([dt])!")
|
||||
else
|
||||
new_comp = nt
|
||||
nt = new_comp.type
|
||||
@@ -285,10 +285,13 @@
|
||||
if(target.parent)
|
||||
target.RemoveComponent()
|
||||
target.parent = src
|
||||
if(target.PostTransfer() == COMPONENT_INCOMPATIBLE)
|
||||
var/c_type = target.type
|
||||
qdel(target)
|
||||
CRASH("Incompatible [c_type] transfer attempt to a [type]!")
|
||||
var/result = target.PostTransfer()
|
||||
switch(result)
|
||||
if(COMPONENT_INCOMPATIBLE)
|
||||
var/c_type = target.type
|
||||
qdel(target)
|
||||
CRASH("Incompatible [c_type] transfer attempt to a [type]!")
|
||||
|
||||
if(target == AddComponent(target))
|
||||
target._JoinParent()
|
||||
|
||||
@@ -298,10 +301,13 @@
|
||||
return
|
||||
var/comps = dc[/datum/component]
|
||||
if(islist(comps))
|
||||
for(var/I in comps)
|
||||
target.TakeComponent(I)
|
||||
for(var/datum/component/I in comps)
|
||||
if(I.can_transfer)
|
||||
target.TakeComponent(I)
|
||||
else
|
||||
target.TakeComponent(comps)
|
||||
var/datum/component/C = comps
|
||||
if(C.can_transfer)
|
||||
target.TakeComponent(comps)
|
||||
|
||||
/datum/component/ui_host()
|
||||
return parent
|
||||
|
||||
@@ -1,26 +1,48 @@
|
||||
/datum/component/anti_magic
|
||||
var/magic = FALSE
|
||||
var/holy = FALSE
|
||||
var/psychic = FALSE
|
||||
var/allowed_slots = ~ITEM_SLOT_BACKPACK
|
||||
var/charges = INFINITY
|
||||
var/blocks_self = TRUE
|
||||
var/datum/callback/reaction
|
||||
var/datum/callback/expire
|
||||
|
||||
/datum/component/anti_magic/Initialize(_magic = FALSE, _holy = FALSE)
|
||||
/datum/component/anti_magic/Initialize(_magic = FALSE, _holy = FALSE, _psychic = FALSE, _allowed_slots, _charges, _blocks_self = TRUE, datum/callback/_reaction, datum/callback/_expire)
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
else if(ismob(parent))
|
||||
RegisterSignal(parent, COMSIG_MOB_RECEIVE_MAGIC, .proc/can_protect)
|
||||
RegisterSignal(parent, COMSIG_MOB_RECEIVE_MAGIC, .proc/protect)
|
||||
else
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
magic = _magic
|
||||
holy = _holy
|
||||
psychic = _psychic
|
||||
if(_allowed_slots)
|
||||
allowed_slots = _allowed_slots
|
||||
if(!isnull(_charges))
|
||||
charges = _charges
|
||||
blocks_self = _blocks_self
|
||||
reaction = _reaction
|
||||
expire = _expire
|
||||
|
||||
/datum/component/anti_magic/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
RegisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC, .proc/can_protect, TRUE)
|
||||
if(!CHECK_BITFIELD(allowed_slots, slotdefine2slotbit(slot))) //Check that the slot is valid for antimagic
|
||||
UnregisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC)
|
||||
return
|
||||
RegisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC, .proc/protect, TRUE)
|
||||
|
||||
/datum/component/anti_magic/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOB_RECEIVE_MAGIC)
|
||||
|
||||
/datum/component/anti_magic/proc/can_protect(datum/source, _magic, _holy, list/protection_sources)
|
||||
if((_magic && magic) || (_holy && holy))
|
||||
/datum/component/anti_magic/proc/protect(datum/source, mob/user, _magic, _holy, _psychic, chargecost = 1, self, list/protection_sources)
|
||||
if(((_magic && magic) || (_holy && holy) || (_psychic && psychic)) && (!self || blocks_self))
|
||||
protection_sources += parent
|
||||
reaction?.Invoke(user, chargecost)
|
||||
charges -= chargecost
|
||||
if(charges <= 0)
|
||||
expire?.Invoke(user)
|
||||
qdel(src)
|
||||
return COMPONENT_BLOCK_MAGIC
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/datum/component/bane
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
|
||||
var/mobtype
|
||||
var/speciestype
|
||||
var/damage_multiplier
|
||||
|
||||
/datum/component/bane/Initialize(mobtype, damage_multiplier=1)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
if(ispath(mobtype, /mob/living))
|
||||
src.mobtype = mobtype
|
||||
else if(ispath(mobtype, /datum/species))
|
||||
speciestype = mobtype
|
||||
else
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.damage_multiplier = damage_multiplier
|
||||
|
||||
/datum/component/bane/RegisterWithParent()
|
||||
if(speciestype)
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/speciesCheck)
|
||||
else
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/mobCheck)
|
||||
|
||||
/datum/component/bane/UnregisterFromParent()
|
||||
UnregisterSignal(parent, COMSIG_ITEM_AFTERATTACK)
|
||||
|
||||
/datum/component/bane/proc/speciesCheck(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!is_species(target, speciestype))
|
||||
return
|
||||
activate(source, target, user)
|
||||
|
||||
/datum/component/bane/proc/mobCheck(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!istype(target, mobtype))
|
||||
return
|
||||
activate(source, target, user)
|
||||
|
||||
/datum/component/bane/proc/activate(obj/item/source, mob/living/target, mob/attacker)
|
||||
if(attacker.a_intent != INTENT_HARM)
|
||||
return
|
||||
|
||||
var/extra_damage = max(0, source.force * damage_multiplier)
|
||||
target.apply_damage(extra_damage, source.damtype, attacker.zone_selected)
|
||||
@@ -37,9 +37,9 @@
|
||||
if(O.status == BODYPART_ROBOTIC)
|
||||
return
|
||||
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET) || (H.shoes && (H.shoes.body_parts_covered & FEET)))
|
||||
|
||||
if(!(flags & CALTROP_BYPASS_SHOES) && (H.shoes || feetCover))
|
||||
if(!(flags & CALTROP_BYPASS_SHOES) && feetCover)
|
||||
return
|
||||
|
||||
if((H.movement_type & FLYING) || H.buckled)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
return FALSE
|
||||
if(!isliving(AM) && !isobj(AM))
|
||||
return FALSE
|
||||
if(is_type_in_typecache(AM, forbidden_types) || AM.throwing || AM.floating)
|
||||
if(is_type_in_typecache(AM, forbidden_types) || AM.throwing || (AM.movement_type & FLOATING))
|
||||
return FALSE
|
||||
//Flies right over the chasm
|
||||
if(ismob(AM))
|
||||
|
||||
@@ -8,32 +8,39 @@
|
||||
|
||||
/datum/component/cleaning/proc/Clean()
|
||||
var/atom/movable/AM = parent
|
||||
var/turf/tile = AM.loc
|
||||
if(!isturf(tile))
|
||||
return
|
||||
|
||||
SEND_SIGNAL(tile, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
for(var/A in tile)
|
||||
var/turf/T = AM.loc
|
||||
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
for(var/A in T)
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
else if(istype(A, /obj/item))
|
||||
var/obj/item/I = A
|
||||
SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
if(ismob(I.loc))
|
||||
var/mob/M = I.loc
|
||||
else if(isitem(A))
|
||||
var/obj/item/cleaned_item = A
|
||||
SEND_SIGNAL(cleaned_item, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_item.clean_blood()
|
||||
if(ismob(cleaned_item.loc))
|
||||
var/mob/M = cleaned_item.loc
|
||||
M.regenerate_icons()
|
||||
else if(ishuman(A))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.head.clean_blood()
|
||||
cleaned_human.update_inv_head()
|
||||
if(cleaned_human.wear_suit)
|
||||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.wear_suit.clean_blood()
|
||||
cleaned_human.update_inv_wear_suit()
|
||||
else if(cleaned_human.w_uniform)
|
||||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.w_uniform.clean_blood()
|
||||
cleaned_human.update_inv_w_uniform()
|
||||
if(cleaned_human.shoes)
|
||||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes()
|
||||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human.regenerate_icons()
|
||||
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")
|
||||
to_chat(cleaned_human, "<span class='danger'>[src] cleans your face!</span>")
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/component/decal
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
|
||||
can_transfer = TRUE
|
||||
var/cleanable
|
||||
var/description
|
||||
var/mutable_appearance/pic
|
||||
|
||||
@@ -7,33 +7,7 @@
|
||||
. = ..()
|
||||
RegisterSignal(parent, COMSIG_ATOM_GET_EXAMINE_NAME, .proc/get_examine_name)
|
||||
|
||||
/datum/component/decal/blood/generate_appearance(_icon, _icon_state, _dir, _layer, _color)
|
||||
var/obj/item/I = parent
|
||||
if(!_icon)
|
||||
_icon = 'icons/effects/blood.dmi'
|
||||
if(!_icon_state)
|
||||
_icon_state = "itemblood"
|
||||
var/icon = initial(I.icon)
|
||||
var/icon_state = initial(I.icon_state)
|
||||
if(!icon || !icon_state)
|
||||
// It's something which takes on the look of other items, probably
|
||||
icon = I.icon
|
||||
icon_state = I.icon_state
|
||||
var/static/list/blood_splatter_appearances = list()
|
||||
//try to find a pre-processed blood-splatter. otherwise, make a new one
|
||||
var/index = "[REF(icon)]-[icon_state]"
|
||||
pic = blood_splatter_appearances[index]
|
||||
|
||||
if(!pic)
|
||||
var/icon/blood_splatter_icon = icon(initial(I.icon), initial(I.icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object
|
||||
blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent)
|
||||
blood_splatter_icon.Blend(icon(_icon, _icon_state), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
pic = mutable_appearance(blood_splatter_icon, initial(I.icon_state))
|
||||
blood_splatter_appearances[index] = pic
|
||||
return TRUE
|
||||
|
||||
/datum/component/decal/blood/proc/get_examine_name(datum/source, mob/user, list/override)
|
||||
var/atom/A = parent
|
||||
override[EXAMINE_POSITION_ARTICLE] = A.gender == PLURAL? "some" : "a"
|
||||
override[EXAMINE_POSITION_BEFORE] = " blood-stained "
|
||||
|
||||
return COMPONENT_EXNAME_CHANGED
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/datum/component/wearertargeting/earprotection
|
||||
signals = list(COMSIG_CARBON_SOUNDBANG)
|
||||
mobtype = /mob/living/carbon
|
||||
proctype = .proc/reducebang
|
||||
|
||||
/datum/component/wearertargeting/earprotection/Initialize(_valid_slots)
|
||||
. = ..()
|
||||
valid_slots = _valid_slots
|
||||
callback = CALLBACK(src, .proc/reducebang)
|
||||
|
||||
/datum/component/wearertargeting/earprotection/proc/reducebang(datum/source, list/reflist)
|
||||
reflist[1]--
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
/datum/component/fantasy
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
|
||||
var/quality
|
||||
|
||||
var/canFail
|
||||
var/announce
|
||||
|
||||
var/originalName
|
||||
var/list/affixes
|
||||
var/list/appliedComponents
|
||||
|
||||
var/static/list/affixListing
|
||||
|
||||
/datum/component/fantasy/Initialize(quality, list/affixes = list(), canFail=FALSE, announce=FALSE)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.quality = quality || randomQuality()
|
||||
src.canFail = canFail
|
||||
src.announce = announce
|
||||
|
||||
src.affixes = affixes
|
||||
appliedComponents = list()
|
||||
randomAffixes()
|
||||
|
||||
/datum/component/fantasy/Destroy()
|
||||
unmodify()
|
||||
affixes = null
|
||||
return ..()
|
||||
|
||||
/datum/component/fantasy/RegisterWithParent()
|
||||
var/obj/item/master = parent
|
||||
originalName = master.name
|
||||
modify()
|
||||
|
||||
/datum/component/fantasy/UnregisterFromParent()
|
||||
unmodify()
|
||||
|
||||
/datum/component/fantasy/InheritComponent(datum/component/fantasy/newComp, original, list/arguments)
|
||||
unmodify()
|
||||
if(newComp)
|
||||
quality += newComp.quality
|
||||
canFail = newComp.canFail
|
||||
announce = newComp.announce
|
||||
else
|
||||
arguments.len = 5 // This is done to replicate what happens when an arglist smaller than the necessary arguments is given
|
||||
quality += arguments[1]
|
||||
canFail = arguments[4] || canFail
|
||||
announce = arguments[5] || announce
|
||||
modify()
|
||||
|
||||
/datum/component/fantasy/proc/randomQuality()
|
||||
var/quality = pick(1;15, 2;14, 2;13, 2;12, 3;11, 3;10, 3;9, 4;8, 4;7, 4;6, 5;5, 5;4, 5;3, 6;2, 6;1, 6;0)
|
||||
if(prob(50))
|
||||
quality = -quality
|
||||
return quality
|
||||
|
||||
/datum/component/fantasy/proc/randomAffixes(force)
|
||||
if(!affixListing)
|
||||
affixListing = list()
|
||||
for(var/T in subtypesof(/datum/fantasy_affix))
|
||||
var/datum/fantasy_affix/affix = new T
|
||||
affixListing[affix] = affix.weight
|
||||
|
||||
if(length(affixes))
|
||||
if(!force)
|
||||
return
|
||||
affixes = list()
|
||||
|
||||
var/alignment
|
||||
if(quality >= 0)
|
||||
alignment |= AFFIX_GOOD
|
||||
if(quality <= 0)
|
||||
alignment |= AFFIX_EVIL
|
||||
|
||||
var/usedSlots = NONE
|
||||
for(var/i in 1 to max(1, abs(quality))) // We want at least 1 affix applied
|
||||
var/datum/fantasy_affix/affix = pickweight(affixListing)
|
||||
if(affix.placement & usedSlots)
|
||||
continue
|
||||
if(!(affix.alignment & alignment))
|
||||
continue
|
||||
if(!affix.validate(src))
|
||||
continue
|
||||
affixes += affix
|
||||
usedSlots |= affix.placement
|
||||
|
||||
/datum/component/fantasy/proc/modify()
|
||||
var/obj/item/master = parent
|
||||
|
||||
master.force = max(0, master.force + quality)
|
||||
master.throwforce = max(0, master.throwforce + quality)
|
||||
master.armor = master.armor?.modifyAllRatings(quality)
|
||||
|
||||
var/newName = originalName
|
||||
for(var/i in affixes)
|
||||
var/datum/fantasy_affix/affix = i
|
||||
newName = affix.apply(src, newName)
|
||||
|
||||
if(quality != 0)
|
||||
newName = "[newName] [quality > 0 ? "+" : ""][quality]"
|
||||
|
||||
if(canFail && prob((quality - 9)*10))
|
||||
var/turf/place = get_turf(parent)
|
||||
place.visible_message("<span class='danger'>[parent] <span class='blue'>violently glows blue</span> for a while, then evaporates.</span>")
|
||||
master.burn()
|
||||
return
|
||||
else if(announce)
|
||||
announce()
|
||||
|
||||
master.name = newName
|
||||
|
||||
/datum/component/fantasy/proc/unmodify()
|
||||
var/obj/item/master = parent
|
||||
|
||||
for(var/i in affixes)
|
||||
var/datum/fantasy_affix/affix = i
|
||||
affix.remove(src)
|
||||
for(var/i in appliedComponents)
|
||||
qdel(i)
|
||||
|
||||
master.force = max(0, master.force - quality)
|
||||
master.throwforce = max(0, master.throwforce - quality)
|
||||
master.armor = master.armor?.modifyAllRatings(-quality)
|
||||
|
||||
master.name = originalName
|
||||
|
||||
/datum/component/fantasy/proc/announce()
|
||||
var/turf/location = get_turf(parent)
|
||||
var/span
|
||||
var/effect_description
|
||||
if(quality >= 0)
|
||||
span = "<span class='notice'>"
|
||||
effect_description = "<span class='heavy_brass'>shimmering golden glow</span>"
|
||||
else
|
||||
span = "<span class='danger'>"
|
||||
effect_description = "<span class='bold'>mottled black glow</span>"
|
||||
|
||||
location.visible_message("[span][originalName] is covered by a [effect_description] and then transforms into [parent]!</span>")
|
||||
@@ -0,0 +1,13 @@
|
||||
/datum/fantasy_affix
|
||||
var/placement // A bitflag of "slots" this affix takes up, for example pre/suffix
|
||||
var/alignment
|
||||
var/weight = 10
|
||||
|
||||
// For those occasional affixes which only make sense in certain circumstances
|
||||
/datum/fantasy_affix/proc/validate(datum/component/fantasy/comp)
|
||||
return TRUE
|
||||
|
||||
/datum/fantasy_affix/proc/apply(datum/component/fantasy/comp, newName)
|
||||
return newName
|
||||
|
||||
/datum/fantasy_affix/proc/remove(datum/component/fantasy/comp)
|
||||
@@ -0,0 +1,68 @@
|
||||
/datum/fantasy_affix/cosmetic_prefixes
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD | AFFIX_EVIL
|
||||
|
||||
var/list/goodPrefixes
|
||||
var/list/badPrefixes
|
||||
|
||||
/datum/fantasy_affix/cosmetic_prefixes/New()
|
||||
goodPrefixes = list(
|
||||
"greater",
|
||||
"major",
|
||||
"blessed",
|
||||
"superior",
|
||||
"empowered",
|
||||
"honed",
|
||||
"true",
|
||||
"glorious",
|
||||
"robust",
|
||||
)
|
||||
badPrefixes = list(
|
||||
"lesser",
|
||||
"minor",
|
||||
"blighted",
|
||||
"inferior",
|
||||
"enfeebled",
|
||||
"rusted",
|
||||
"unsteady",
|
||||
"tragic",
|
||||
"gimped",
|
||||
"cursed",
|
||||
)
|
||||
|
||||
weight = (length(goodPrefixes) + length(badPrefixes)) * 10
|
||||
|
||||
/datum/fantasy_affix/cosmetic_prefixes/apply(datum/component/fantasy/comp, newName)
|
||||
if(comp.quality > 0 || (comp.quality == 0 && prob(50)))
|
||||
return "[pick(goodPrefixes)] [newName]"
|
||||
else
|
||||
return "[pick(badPrefixes)] [newName]"
|
||||
|
||||
/datum/fantasy_affix/tactical
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 1 // Very powerful, no one should have such power
|
||||
|
||||
/datum/fantasy_affix/tactical/apply(datum/component/fantasy/comp, newName)
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/tactical)
|
||||
return "tactical [newName]"
|
||||
|
||||
/datum/fantasy_affix/pyromantic
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD
|
||||
|
||||
/datum/fantasy_affix/pyromantic/apply(datum/component/fantasy/comp, newName)
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/igniter, CLAMP(comp.quality, 1, 10))
|
||||
return "pyromantic [newName]"
|
||||
|
||||
/datum/fantasy_affix/vampiric
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 5
|
||||
|
||||
/datum/fantasy_affix/vampiric/apply(datum/component/fantasy/comp, newName)
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/lifesteal, comp.quality)
|
||||
return "vampiric [newName]"
|
||||
@@ -0,0 +1,170 @@
|
||||
/datum/fantasy_affix/cosmetic_suffixes
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD | AFFIX_EVIL
|
||||
|
||||
var/list/goodSuffixes
|
||||
var/list/badSuffixes
|
||||
|
||||
/datum/fantasy_affix/cosmetic_suffixes/New()
|
||||
goodSuffixes = list(
|
||||
"dexterity",
|
||||
"constitution",
|
||||
"intelligence",
|
||||
"wisdom",
|
||||
"charisma",
|
||||
"the forest",
|
||||
"the hills",
|
||||
"the plains",
|
||||
"the sea",
|
||||
"the sun",
|
||||
"the moon",
|
||||
"the void",
|
||||
"the world",
|
||||
"many secrets",
|
||||
"many tales",
|
||||
"many colors",
|
||||
"rending",
|
||||
"sundering",
|
||||
"the night",
|
||||
"the day",
|
||||
)
|
||||
badSuffixes = list(
|
||||
"draining",
|
||||
"burden",
|
||||
"discomfort",
|
||||
"awkwardness",
|
||||
"poor hygiene",
|
||||
"timidity",
|
||||
)
|
||||
|
||||
weight = (length(goodSuffixes) + length(badSuffixes)) * 10
|
||||
|
||||
/datum/fantasy_affix/cosmetic_suffixes/apply(datum/component/fantasy/comp, newName)
|
||||
if(comp.quality > 0 || (comp.quality == 0 && prob(50)))
|
||||
return "[newName] of [pick(goodSuffixes)]"
|
||||
else
|
||||
return "[newName] of [pick(badSuffixes)]"
|
||||
|
||||
//////////// Good suffixes
|
||||
/datum/fantasy_affix/bane
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 20
|
||||
|
||||
/datum/fantasy_affix/bane/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
// This is set up to be easy to add to these lists as I expect it will need modifications
|
||||
var/static/list/possible_mobtypes
|
||||
if(!possible_mobtypes)
|
||||
// The base list of allowed mob/species types
|
||||
possible_mobtypes = typecacheof(list(
|
||||
/mob/living/simple_animal,
|
||||
/mob/living/carbon,
|
||||
/datum/species,
|
||||
))
|
||||
// Some particular types to disallow if they're too broad/abstract
|
||||
possible_mobtypes -= list(
|
||||
/mob/living/simple_animal/hostile,
|
||||
)
|
||||
// Some types to remove them and their subtypes
|
||||
possible_mobtypes -= typecacheof(list(
|
||||
/mob/living/carbon/human/species,
|
||||
))
|
||||
|
||||
var/mob/picked_mobtype = pick(possible_mobtypes)
|
||||
// This works even with the species picks since we're only accessing the name
|
||||
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/bane, picked_mobtype)
|
||||
return "[newName] of [initial(picked_mobtype.name)] slaying"
|
||||
|
||||
/datum/fantasy_affix/summoning
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 5
|
||||
|
||||
/datum/fantasy_affix/summoning/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
// This is set up to be easy to add to these lists as I expect it will need modifications
|
||||
var/static/list/possible_mobtypes
|
||||
if(!possible_mobtypes)
|
||||
// The base list of allowed mob/species types
|
||||
possible_mobtypes = typecacheof(list(
|
||||
/mob/living/simple_animal,
|
||||
/mob/living/carbon,
|
||||
/datum/species,
|
||||
))
|
||||
// Some particular types to disallow if they're too broad/abstract
|
||||
possible_mobtypes -= list(
|
||||
/mob/living/simple_animal/hostile,
|
||||
)
|
||||
// Some types to remove them and their subtypes
|
||||
possible_mobtypes -= typecacheof(list(
|
||||
/mob/living/carbon/human/species,
|
||||
/mob/living/simple_animal/hostile/megafauna,
|
||||
))
|
||||
|
||||
var/mob/picked_mobtype = pick(possible_mobtypes)
|
||||
// This works even with the species picks since we're only accessing the name
|
||||
|
||||
var/obj/item/master = comp.parent
|
||||
var/max_mobs = max(CEILING(comp.quality/2, 1), 1)
|
||||
var/spawn_delay = 300 - 30 * comp.quality
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/summoning, list(picked_mobtype), 100, max_mobs, spawn_delay)
|
||||
return "[newName] of [initial(picked_mobtype.name)] summoning"
|
||||
|
||||
/datum/fantasy_affix/shrapnel
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
|
||||
/datum/fantasy_affix/shrapnel/validate(datum/component/fantasy/comp)
|
||||
if(isgun(comp.parent))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/fantasy_affix/shrapnel/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
// higher means more likely
|
||||
var/list/weighted_projectile_types = list(/obj/item/projectile/meteor = 1,
|
||||
/obj/item/projectile/energy/nuclear_particle = 1,
|
||||
/obj/item/projectile/beam/pulse = 1,
|
||||
/obj/item/projectile/bullet/honker = 15,
|
||||
/obj/item/projectile/temp = 15,
|
||||
/obj/item/projectile/ion = 15,
|
||||
/obj/item/projectile/magic/door = 15,
|
||||
/obj/item/projectile/magic/locker = 15,
|
||||
// /obj/item/projectile/magic/fetch = 15,
|
||||
/obj/item/projectile/beam/emitter = 15,
|
||||
// /obj/item/projectile/magic/flying = 15,
|
||||
/obj/item/projectile/energy/net = 15,
|
||||
/obj/item/projectile/bullet/incendiary/c9mm = 15,
|
||||
/obj/item/projectile/temp/hot = 15,
|
||||
/obj/item/projectile/beam/disabler = 15)
|
||||
|
||||
var/obj/item/projectile/picked_projectiletype = pickweight(weighted_projectile_types)
|
||||
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/shrapnel, picked_projectiletype)
|
||||
return "[newName] of [initial(picked_projectiletype.name)] shrapnel"
|
||||
|
||||
/datum/fantasy_affix/strength
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
|
||||
/datum/fantasy_affix/strength/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/knockback, CEILING(comp.quality/2, 1), FLOOR(comp.quality/10, 1))
|
||||
return "[newName] of strength"
|
||||
|
||||
//////////// Bad suffixes
|
||||
|
||||
/datum/fantasy_affix/fool
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_EVIL
|
||||
|
||||
/datum/fantasy_affix/fool/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
|
||||
return "[newName] of the fool"
|
||||
@@ -89,19 +89,19 @@
|
||||
return
|
||||
if(ishuman(LM)) //for proper humans, they're special
|
||||
var/mob/living/carbon/human/H = LM
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET) || (H.shoes && (H.shoes.body_parts_covered & FEET)))
|
||||
|
||||
if (H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle") //are we a naga or tentacle taur creature
|
||||
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
||||
return
|
||||
|
||||
if(H.shoes || feetCover) //are we wearing shoes
|
||||
if(feetCover) //are we wearing shoes
|
||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||
GLOB.footstep[T.footstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.footstep[T.footstep][3] + e)
|
||||
|
||||
if((!H.shoes && !feetCover)) //are we NOT wearing shoes
|
||||
if(!feetCover) //are we NOT wearing shoes
|
||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||
TRUE,
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
/datum/component/forensics
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/list/fingerprints //assoc print = print
|
||||
var/list/hiddenprints //assoc ckey = realname/gloves/ckey
|
||||
var/list/blood_DNA //assoc dna = bloodtype
|
||||
var/list/fibers //assoc print = print
|
||||
|
||||
/datum/component/forensics/InheritComponent(datum/component/forensics/F, original) //Use of | and |= being different here is INTENTIONAL.
|
||||
fingerprints = fingerprints | F.fingerprints
|
||||
hiddenprints = hiddenprints | F.hiddenprints
|
||||
blood_DNA = blood_DNA | F.blood_DNA
|
||||
fibers = fibers | F.fibers
|
||||
check_blood()
|
||||
return ..()
|
||||
|
||||
/datum/component/forensics/Initialize(new_fingerprints, new_hiddenprints, new_blood_DNA, new_fibers)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
fingerprints = new_fingerprints
|
||||
hiddenprints = new_hiddenprints
|
||||
blood_DNA = new_blood_DNA
|
||||
fibers = new_fibers
|
||||
check_blood()
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_act)
|
||||
|
||||
/datum/component/forensics/proc/wipe_fingerprints()
|
||||
fingerprints = null
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/wipe_hiddenprints()
|
||||
return //no.
|
||||
|
||||
/datum/component/forensics/proc/wipe_blood_DNA()
|
||||
blood_DNA = null
|
||||
if(isitem(parent))
|
||||
qdel(parent.GetComponent(/datum/component/decal/blood))
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/wipe_fibers()
|
||||
fibers = null
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/clean_act(datum/source, strength)
|
||||
if(strength >= CLEAN_STRENGTH_FINGERPRINTS)
|
||||
wipe_fingerprints()
|
||||
if(strength >= CLEAN_STRENGTH_BLOOD)
|
||||
wipe_blood_DNA()
|
||||
if(strength >= CLEAN_STRENGTH_FIBERS)
|
||||
wipe_fibers()
|
||||
|
||||
/datum/component/forensics/proc/add_fingerprint_list(list/_fingerprints) //list(text)
|
||||
if(!length(_fingerprints))
|
||||
return
|
||||
LAZYINITLIST(fingerprints)
|
||||
for(var/i in _fingerprints) //We use an associative list, make sure we don't just merge a non-associative list into ours.
|
||||
fingerprints[i] = i
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_fingerprint(mob/living/M, ignoregloves = FALSE)
|
||||
if(!M)
|
||||
return
|
||||
add_hiddenprint(M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
add_fibers(H)
|
||||
if(H.gloves) //Check if the gloves (if any) hide fingerprints
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(G.transfer_prints)
|
||||
ignoregloves = TRUE
|
||||
if(!ignoregloves)
|
||||
H.gloves.add_fingerprint(H, TRUE) //ignoregloves = 1 to avoid infinite loop.
|
||||
return
|
||||
var/full_print = md5(H.dna.uni_identity)
|
||||
LAZYSET(fingerprints, full_print, full_print)
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_fiber_list(list/_fibertext) //list(text)
|
||||
if(!length(_fibertext))
|
||||
return
|
||||
LAZYINITLIST(fibers)
|
||||
for(var/i in _fibertext) //We use an associative list, make sure we don't just merge a non-associative list into ours.
|
||||
fibers[i] = i
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_fibers(mob/living/carbon/human/M)
|
||||
var/fibertext
|
||||
var/item_multiplier = isitem(src)?1.2:1
|
||||
if(M.wear_suit)
|
||||
fibertext = "Material from \a [M.wear_suit]."
|
||||
if(prob(10*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
if(!(M.wear_suit.body_parts_covered & CHEST))
|
||||
if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
if(prob(12*item_multiplier) && !LAZYACCESS(fibers, fibertext)) //Wearing a suit means less of the uniform exposed.
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
if(!(M.wear_suit.body_parts_covered & HANDS))
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
else if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
if(prob(15*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
// "Added fibertext: [fibertext]"
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
else if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_hiddenprint_list(list/_hiddenprints) //list(ckey = text)
|
||||
if(!length(_hiddenprints))
|
||||
return
|
||||
LAZYINITLIST(hiddenprints)
|
||||
for(var/i in _hiddenprints) //We use an associative list, make sure we don't just merge a non-associative list into ours.
|
||||
hiddenprints[i] = _hiddenprints[i]
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_hiddenprint(mob/living/M)
|
||||
if(!M || !M.key)
|
||||
return
|
||||
var/hasgloves = ""
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.gloves)
|
||||
hasgloves = "(gloves)"
|
||||
var/current_time = TIME_STAMP("hh:mm:ss", FALSE)
|
||||
if(!LAZYACCESS(hiddenprints, M.key))
|
||||
LAZYSET(hiddenprints, M.key, "First: [M.real_name]\[[current_time]\][hasgloves]. Ckey: [M.ckey]")
|
||||
else
|
||||
var/laststamppos = findtext(LAZYACCESS(hiddenprints, M.key), " Last: ")
|
||||
if(laststamppos)
|
||||
LAZYSET(hiddenprints, M.key, copytext(hiddenprints[M.key], 1, laststamppos))
|
||||
hiddenprints[M.key] += " Last: [M.real_name]\[[current_time]\][hasgloves]. Ckey: [M.ckey]" //made sure to be existing by if(!LAZYACCESS);else
|
||||
var/atom/A = parent
|
||||
A.fingerprintslast = M.ckey
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_blood_DNA(list/dna) //list(dna_enzymes = type)
|
||||
if(!length(dna))
|
||||
return
|
||||
LAZYINITLIST(blood_DNA)
|
||||
for(var/i in dna)
|
||||
blood_DNA[i] = dna[i]
|
||||
check_blood()
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/check_blood()
|
||||
if(!isitem(parent))
|
||||
return
|
||||
if(!length(blood_DNA))
|
||||
return
|
||||
parent.LoadComponent(/datum/component/decal/blood)
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
/datum/component/igniter
|
||||
var/fire_stacks
|
||||
|
||||
/datum/component/igniter/Initialize(fire_stacks=1)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.fire_stacks = fire_stacks
|
||||
|
||||
/datum/component/igniter/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/igniter/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/igniter/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_igniter(target)
|
||||
|
||||
/datum/component/igniter/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_igniter(target)
|
||||
|
||||
/datum/component/igniter/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_igniter(target)
|
||||
|
||||
/datum/component/igniter/proc/do_igniter(atom/target)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.adjust_fire_stacks(fire_stacks)
|
||||
L.IgniteMob()
|
||||
@@ -6,21 +6,28 @@
|
||||
|
||||
/datum/component/infective/Initialize(list/datum/disease/_diseases, expire_in)
|
||||
if(islist(_diseases))
|
||||
diseases = diseases
|
||||
diseases = _diseases
|
||||
else
|
||||
diseases = list(_diseases)
|
||||
if(expire_in)
|
||||
expire_time = world.time + expire_in
|
||||
QDEL_IN(src, expire_in)
|
||||
|
||||
if(!ismovableatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/try_infect_buckle)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/try_infect_collide)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/try_infect_crossed)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_IMPACT_ZONE, .proc/try_infect_impact_zone)
|
||||
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat)
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped)
|
||||
if(istype(parent, /obj/item/reagent_containers/food/snacks))
|
||||
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat)
|
||||
else if(istype(parent, /obj/effect/decal/cleanable/blood/gibs))
|
||||
RegisterSignal(parent, COMSIG_GIBS_STREAK, .proc/try_infect_streak)
|
||||
|
||||
/datum/component/infective/proc/try_infect_eat(datum/source, mob/living/eater, mob/living/feeder)
|
||||
for(var/V in diseases)
|
||||
@@ -73,6 +80,9 @@
|
||||
if(isliving(M))
|
||||
try_infect(M, BODY_ZONE_PRECISE_L_FOOT)
|
||||
|
||||
/datum/component/infective/proc/try_infect_streak(datum/source, list/directions, list/output_diseases)
|
||||
output_diseases |= diseases
|
||||
|
||||
/datum/component/infective/proc/try_infect(mob/living/L, target_zone)
|
||||
for(var/V in diseases)
|
||||
L.ContactContractDisease(V, target_zone)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
var/knockdown_chance = (target_buckled? mounted_knockdown_chance_per_tile : unmounted_knockdown_chance_per_tile) * current
|
||||
var/knockdown_time = (target_buckled? mounted_knockdown_time : unmounted_knockdown_time)
|
||||
var/damage = (target_buckled? mounted_damage_boost_per_tile : unmounted_damage_boost_per_tile) * current
|
||||
var/sharp = I.is_sharp()
|
||||
var/sharp = I.get_sharpness()
|
||||
var/msg
|
||||
if(damage)
|
||||
msg += "[user] [sharp? "impales" : "slams into"] [target] [sharp? "on" : "with"] their [parent]"
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/datum/component/knockback
|
||||
var/throw_distance
|
||||
var/throw_anchored
|
||||
|
||||
/datum/component/knockback/Initialize(throw_distance=1)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.throw_distance = throw_distance
|
||||
src.throw_anchored = throw_anchored
|
||||
|
||||
/datum/component/knockback/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/knockback/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/knockback/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_knockback(target, user, get_dir(source, target))
|
||||
|
||||
/datum/component/knockback/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_knockback(target, attacker, get_dir(attacker, target))
|
||||
|
||||
/datum/component/knockback/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_knockback(target, null, angle2dir(Angle))
|
||||
|
||||
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
|
||||
if(!ismovableatom(target) || throw_dir == null)
|
||||
return
|
||||
var/atom/movable/throwee = target
|
||||
if(throwee.anchored && !throw_anchored)
|
||||
return
|
||||
if(throw_distance < 0)
|
||||
throw_dir = turn(throw_dir, 180)
|
||||
throw_distance *= -1
|
||||
var/atom/throw_target = get_edge_target_turf(throwee, throw_dir)
|
||||
throwee.safe_throw_at(throw_target, throw_distance, 1, thrower)
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
/datum/component/lifesteal
|
||||
var/flat_heal // heals a constant amount every time a hit occurs
|
||||
var/static/list/damage_heal_order = list(BRUTE, BURN, OXY)
|
||||
|
||||
/datum/component/lifesteal/Initialize(flat_heal=0)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.flat_heal = flat_heal
|
||||
|
||||
/datum/component/lifesteal/RegisterWithParent()
|
||||
if(isgun(parent))
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/lifesteal/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/lifesteal/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_lifesteal(user, target)
|
||||
|
||||
/datum/component/lifesteal/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_lifesteal(attacker, target)
|
||||
|
||||
/datum/component/lifesteal/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_lifesteal(firer, target)
|
||||
|
||||
/datum/component/lifesteal/proc/do_lifesteal(atom/heal_target, atom/damage_target)
|
||||
if(isliving(heal_target) && isliving(damage_target))
|
||||
var/mob/living/healing = heal_target
|
||||
var/mob/living/damaging = damage_target
|
||||
if(damaging.stat != DEAD)
|
||||
healing.heal_ordered_damage(flat_heal, damage_heal_order)
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/datum/component/lockon_aiming
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
var/lock_icon = 'icons/mob/blob.dmi'
|
||||
var/lock_icon = 'icons/mob/cameramob.dmi'
|
||||
var/lock_icon_state = "marker"
|
||||
var/mutable_appearance/lock_appearance
|
||||
var/list/image/lock_images
|
||||
@@ -237,6 +237,3 @@
|
||||
LOCKON_RANGING_BREAK_CHECK
|
||||
cd++
|
||||
CHECK_TICK
|
||||
|
||||
/datum/component/lockon_aiming/PostTransfer(datum/new_parent)
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/datum/component/mirage_border
|
||||
can_transfer = TRUE
|
||||
var/obj/effect/abstract/mirage_holder/holder
|
||||
|
||||
/datum/component/mirage_border/Initialize(turf/target, direction, range=world.view)
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
var/mood_level = 5 //To track what stage of moodies they're on
|
||||
var/sanity_level = 5 //To track what stage of sanity they're on
|
||||
var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets
|
||||
var/datum/mood_event/list/mood_events = list()
|
||||
var/list/datum/mood_event/mood_events = list()
|
||||
var/insanity_effect = 0 //is the owner being punished for low mood? If so, how much?
|
||||
var/holdmyinsanityeffect = 0 //before we edit our sanity lets take a look
|
||||
var/obj/screen/mood/screen_obj
|
||||
|
||||
/datum/component/mood/Initialize()
|
||||
@@ -21,8 +20,7 @@
|
||||
|
||||
RegisterSignal(parent, COMSIG_ADD_MOOD_EVENT, .proc/add_event)
|
||||
RegisterSignal(parent, COMSIG_CLEAR_MOOD_EVENT, .proc/clear_event)
|
||||
RegisterSignal(parent, COMSIG_INCREASE_SANITY, .proc/IncreaseSanity)
|
||||
RegisterSignal(parent, COMSIG_DECREASE_SANITY, .proc/DecreaseSanity)
|
||||
RegisterSignal(parent, COMSIG_MODIFY_SANITY, .proc/modify_sanity)
|
||||
|
||||
RegisterSignal(parent, COMSIG_MOB_HUD_CREATED, .proc/modify_hud)
|
||||
var/mob/living/owner = parent
|
||||
@@ -127,33 +125,30 @@
|
||||
screen_obj.icon_state = "mood[mood_level]"
|
||||
|
||||
/datum/component/mood/process() //Called on SSmood process
|
||||
if(QDELETED(parent)) // workaround to an obnoxious sneaky periodical runtime.
|
||||
qdel(src)
|
||||
return
|
||||
var/mob/living/owner = parent
|
||||
|
||||
switch(mood_level)
|
||||
if(1)
|
||||
DecreaseSanity(src, 0.2)
|
||||
setSanity(sanity-0.2)
|
||||
if(2)
|
||||
DecreaseSanity(src, 0.125, SANITY_CRAZY)
|
||||
setSanity(sanity-0.125, minimum=SANITY_CRAZY)
|
||||
if(3)
|
||||
DecreaseSanity(src, 0.075, SANITY_UNSTABLE)
|
||||
setSanity(sanity-0.075, minimum=SANITY_UNSTABLE)
|
||||
if(4)
|
||||
DecreaseSanity(src, 0.025, SANITY_DISTURBED)
|
||||
setSanity(sanity-0.025, minimum=SANITY_DISTURBED)
|
||||
if(5)
|
||||
IncreaseSanity(src, 0.1)
|
||||
setSanity(sanity+0.1)
|
||||
if(6)
|
||||
IncreaseSanity(src, 0.15)
|
||||
setSanity(sanity+0.15)
|
||||
if(7)
|
||||
IncreaseSanity(src, 0.20)
|
||||
setSanity(sanity+0.20)
|
||||
if(8)
|
||||
IncreaseSanity(src, 0.25, SANITY_GREAT)
|
||||
setSanity(sanity+0.25, maximum=SANITY_GREAT)
|
||||
if(9)
|
||||
IncreaseSanity(src, 0.4, SANITY_GREAT)
|
||||
|
||||
if(insanity_effect != holdmyinsanityeffect)
|
||||
if(insanity_effect > holdmyinsanityeffect)
|
||||
owner.crit_threshold += (insanity_effect - holdmyinsanityeffect)
|
||||
else
|
||||
owner.crit_threshold -= (holdmyinsanityeffect - insanity_effect)
|
||||
setSanity(sanity+0.4, maximum=SANITY_GREAT)
|
||||
|
||||
if(HAS_TRAIT(owner, TRAIT_DEPRESSION))
|
||||
if(prob(0.05))
|
||||
@@ -164,8 +159,6 @@
|
||||
add_event(null, "jolly", /datum/mood_event/jolly)
|
||||
clear_event(null, "depression")
|
||||
|
||||
holdmyinsanityeffect = insanity_effect
|
||||
|
||||
HandleNutrition(owner)
|
||||
|
||||
/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_NEUTRAL)//I'm sure bunging this in here will have no negative repercussions.
|
||||
@@ -187,7 +180,7 @@
|
||||
sanity = amount
|
||||
|
||||
switch(sanity)
|
||||
if(SANITY_INSANE to SANITY_CRAZY)
|
||||
if(-INFINITY to SANITY_CRAZY)
|
||||
setInsanityEffect(MAJOR_INSANITY_PEN)
|
||||
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1.5) //Did we change something ? movetypes is runtiming, movetypes=(~FLYING))
|
||||
sanity_level = 6
|
||||
@@ -216,35 +209,12 @@
|
||||
/datum/component/mood/proc/setInsanityEffect(newval)//More code so that the previous proc works
|
||||
if(newval == insanity_effect)
|
||||
return
|
||||
var/mob/living/master = parent
|
||||
master.crit_threshold = (master.crit_threshold - insanity_effect) + newval
|
||||
//var/mob/living/master = parent
|
||||
//master.crit_threshold = (master.crit_threshold - insanity_effect) + newval
|
||||
insanity_effect = newval
|
||||
|
||||
/datum/component/mood/proc/DecreaseSanity(datum/source, amount, minimum = SANITY_INSANE)
|
||||
if(sanity < minimum) //This might make KevinZ stop fucking pinging me.
|
||||
IncreaseSanity(src, 0.5)
|
||||
else
|
||||
sanity = max(minimum, sanity - amount)
|
||||
if(sanity < SANITY_UNSTABLE)
|
||||
if(sanity < SANITY_CRAZY)
|
||||
insanity_effect = (MAJOR_INSANITY_PEN)
|
||||
else
|
||||
insanity_effect = (MINOR_INSANITY_PEN)
|
||||
|
||||
/datum/component/mood/proc/IncreaseSanity(datum/source, amount, maximum = SANITY_NEUTRAL)
|
||||
// Disturbed stops you from getting any more sane - I'm just gonna bung this in here
|
||||
var/mob/living/owner = parent
|
||||
if(HAS_TRAIT(owner, TRAIT_UNSTABLE))
|
||||
return
|
||||
if(sanity > maximum)
|
||||
DecreaseSanity(src, 0.5) //Removes some sanity to go back to our current limit.
|
||||
else
|
||||
sanity = min(maximum, sanity + amount)
|
||||
if(sanity > SANITY_CRAZY)
|
||||
if(sanity > SANITY_UNSTABLE)
|
||||
insanity_effect = 0
|
||||
else
|
||||
insanity_effect = MINOR_INSANITY_PEN
|
||||
/datum/component/mood/proc/modify_sanity(datum/source, amount, minimum = -INFINITY, maximum = INFINITY)
|
||||
setSanity(sanity + amount, minimum, maximum)
|
||||
|
||||
/datum/component/mood/proc/add_event(datum/source, category, type, param) //Category will override any events in the same category, should be unique unless the event is based on the same thing like hunger.
|
||||
var/datum/mood_event/the_event
|
||||
@@ -264,8 +234,6 @@
|
||||
if(the_event.timeout)
|
||||
addtimer(CALLBACK(src, .proc/clear_event, null, category), the_event.timeout, TIMER_UNIQUE|TIMER_OVERRIDE)
|
||||
|
||||
return the_event
|
||||
|
||||
/datum/component/mood/proc/clear_event(datum/source, category)
|
||||
var/datum/mood_event/event = mood_events[category]
|
||||
if(!event)
|
||||
@@ -284,7 +252,7 @@
|
||||
RegisterSignal(screen_obj, COMSIG_CLICK, .proc/hud_click)
|
||||
|
||||
/datum/component/mood/proc/unmodify_hud(datum/source)
|
||||
if(!screen_obj)
|
||||
if(!screen_obj || !parent)
|
||||
return
|
||||
var/mob/living/owner = parent
|
||||
var/datum/hud/hud = owner.hud_used
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
|
||||
/datum/proc/ntnet_send(datum/netdata/data, netid)
|
||||
GET_COMPONENT(NIC, /datum/component/ntnet_interface)
|
||||
var/datum/component/ntnet_interface/NIC = GetComponent(/datum/component/ntnet_interface)
|
||||
if(!NIC)
|
||||
return FALSE
|
||||
return NIC.__network_send(data, netid)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/datum/component/orbiter
|
||||
can_transfer = TRUE
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
var/list/orbiters
|
||||
var/datum/callback/orbiter_spy
|
||||
var/datum/callback/orbited_spy
|
||||
|
||||
//radius: range to orbit at, radius of the circle formed by orbiting (in pixels)
|
||||
//clockwise: whether you orbit clockwise or anti clockwise
|
||||
@@ -14,8 +13,6 @@
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
orbiters = list()
|
||||
orbiter_spy = CALLBACK(src, .proc/orbiter_move_react)
|
||||
orbited_spy = CALLBACK(src, .proc/move_react)
|
||||
|
||||
var/atom/master = parent
|
||||
master.orbiters = src
|
||||
@@ -25,7 +22,7 @@
|
||||
/datum/component/orbiter/RegisterWithParent()
|
||||
var/atom/target = parent
|
||||
while(ismovableatom(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
||||
target = target.loc
|
||||
|
||||
/datum/component/orbiter/UnregisterFromParent()
|
||||
@@ -40,8 +37,6 @@
|
||||
for(var/i in orbiters)
|
||||
end_orbit(i)
|
||||
orbiters = null
|
||||
QDEL_NULL(orbiter_spy)
|
||||
QDEL_NULL(orbited_spy)
|
||||
return ..()
|
||||
|
||||
/datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, list/arguments)
|
||||
@@ -64,7 +59,7 @@
|
||||
orbiter.orbiting.end_orbit(orbiter)
|
||||
orbiters[orbiter] = TRUE
|
||||
orbiter.orbiting = src
|
||||
RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, orbiter_spy)
|
||||
RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, .proc/orbiter_move_react)
|
||||
var/matrix/initial_transform = matrix(orbiter.transform)
|
||||
|
||||
// Head first!
|
||||
@@ -120,7 +115,7 @@
|
||||
if(orbited?.loc && orbited.loc != newturf) // We want to know when anything holding us moves too
|
||||
var/atom/target = orbited.loc
|
||||
while(ismovableatom(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy, TRUE)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react, TRUE)
|
||||
target = target.loc
|
||||
|
||||
var/atom/curloc = master.loc
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//This component applies a customizable drop_shadow filter to its wearer when they toggle combat mode on or off. This can stack.
|
||||
|
||||
/datum/component/wearertargeting/phantomthief
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
signals = list(COMSIG_COMBAT_TOGGLED)
|
||||
proctype = .proc/handlefilterstuff
|
||||
var/filter_x
|
||||
var/filter_y
|
||||
var/filter_size
|
||||
var/filter_color
|
||||
|
||||
/datum/component/wearertargeting/phantomthief/Initialize(_x = -2, _y = 0, _size = 0, _color = "#E62111", list/_valid_slots = list(SLOT_GLASSES))
|
||||
. = ..()
|
||||
if(. == COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
filter_x = _x
|
||||
filter_y = _y
|
||||
filter_size = _size
|
||||
filter_color = _color
|
||||
valid_slots = _valid_slots
|
||||
|
||||
/datum/component/wearertargeting/phantomthief/proc/handlefilterstuff(datum/source, mob/user, combatmodestate)
|
||||
if(!combatmodestate)
|
||||
user.remove_filter("phantomthief")
|
||||
else
|
||||
user.add_filter("phantomthief", 4, list(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, color = filter_color))
|
||||
|
||||
/datum/component/wearertargeting/phantomthief/on_drop(datum/source, mob/user)
|
||||
. = ..()
|
||||
user.remove_filter("phantomthief")
|
||||
@@ -18,6 +18,7 @@
|
||||
var/ride_check_rider_incapacitated = FALSE
|
||||
var/ride_check_rider_restrained = FALSE
|
||||
var/ride_check_ridden_incapacitated = FALSE
|
||||
var/list/offhands = list() // keyed list containing all the current riding offsets associated by mob
|
||||
|
||||
/datum/component/riding/Initialize()
|
||||
if(!ismovableatom(parent))
|
||||
@@ -299,36 +300,34 @@
|
||||
M.throw_at(target, 14, 5, AM)
|
||||
M.Knockdown(60)
|
||||
|
||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, riding_target_override = null)
|
||||
var/atom/movable/AM = parent
|
||||
var/amount_equipped = 0
|
||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, mob/living/riding_target_override)
|
||||
var/list/equipped
|
||||
var/mob/living/L = riding_target_override ? riding_target_override : user
|
||||
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
|
||||
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
|
||||
if(!riding_target_override)
|
||||
inhand.rider = user
|
||||
else
|
||||
inhand.rider = riding_target_override
|
||||
inhand.parent = AM
|
||||
if(user.put_in_hands(inhand, TRUE))
|
||||
amount_equipped++
|
||||
else
|
||||
var/obj/item/riding_offhand/inhand = new
|
||||
inhand.rider = L
|
||||
inhand.parent = parent
|
||||
if(!user.put_in_hands(inhand, TRUE))
|
||||
qdel(inhand) // it isn't going to be added to offhands anyway
|
||||
break
|
||||
LAZYADD(equipped, inhand)
|
||||
var/amount_equipped = LAZYLEN(equipped)
|
||||
if(amount_equipped)
|
||||
LAZYADD(offhands[L], equipped)
|
||||
if(amount_equipped >= amount_required)
|
||||
return TRUE
|
||||
else
|
||||
unequip_buckle_inhands(user)
|
||||
return FALSE
|
||||
unequip_buckle_inhands(L)
|
||||
return FALSE
|
||||
|
||||
/datum/component/riding/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
||||
var/atom/movable/AM = parent
|
||||
for(var/obj/item/riding_offhand/O in user.contents)
|
||||
if(O.parent != AM)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
continue
|
||||
if(O.selfdeleting)
|
||||
continue
|
||||
else
|
||||
qdel(O)
|
||||
for(var/a in offhands[user])
|
||||
LAZYREMOVE(offhands[user], a)
|
||||
if(a) //edge cases null entries
|
||||
var/obj/item/riding_offhand/O = a
|
||||
if(O.parent != parent)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
else if(!O.selfdeleting)
|
||||
qdel(O)
|
||||
return TRUE
|
||||
|
||||
/obj/item/riding_offhand
|
||||
|
||||
@@ -44,19 +44,21 @@
|
||||
if(src.rotation_flags & ROTATION_CLOCKWISE)
|
||||
default_rotation_direction = ROTATION_CLOCKWISE
|
||||
|
||||
if(src.rotation_flags & ROTATION_ALTCLICK)
|
||||
/datum/component/simple_rotation/proc/add_signals()
|
||||
if(rotation_flags & ROTATION_ALTCLICK)
|
||||
RegisterSignal(parent, COMSIG_CLICK_ALT, .proc/HandRot)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/ExamineMessage)
|
||||
if(src.rotation_flags & ROTATION_WRENCH)
|
||||
if(rotation_flags & ROTATION_WRENCH)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/WrenchRot)
|
||||
|
||||
if(src.rotation_flags & ROTATION_VERBS)
|
||||
/datum/component/simple_rotation/proc/add_verbs()
|
||||
if(rotation_flags & ROTATION_VERBS)
|
||||
var/atom/movable/AM = parent
|
||||
if(src.rotation_flags & ROTATION_FLIP)
|
||||
if(rotation_flags & ROTATION_FLIP)
|
||||
AM.verbs += /atom/movable/proc/simple_rotate_flip
|
||||
if(src.rotation_flags & ROTATION_CLOCKWISE)
|
||||
if(rotation_flags & ROTATION_CLOCKWISE)
|
||||
AM.verbs += /atom/movable/proc/simple_rotate_clockwise
|
||||
if(src.rotation_flags & ROTATION_COUNTERCLOCKWISE)
|
||||
if(rotation_flags & ROTATION_COUNTERCLOCKWISE)
|
||||
AM.verbs += /atom/movable/proc/simple_rotate_counterclockwise
|
||||
|
||||
/datum/component/simple_rotation/proc/remove_verbs()
|
||||
@@ -66,11 +68,30 @@
|
||||
AM.verbs -= /atom/movable/proc/simple_rotate_clockwise
|
||||
AM.verbs -= /atom/movable/proc/simple_rotate_counterclockwise
|
||||
|
||||
/datum/component/simple_rotation/Destroy()
|
||||
/datum/component/simple_rotation/proc/remove_signals()
|
||||
UnregisterSignal(parent, list(COMSIG_CLICK_ALT, COMSIG_PARENT_EXAMINE, COMSIG_PARENT_ATTACKBY))
|
||||
|
||||
/datum/component/simple_rotation/RegisterWithParent()
|
||||
add_verbs()
|
||||
add_signals()
|
||||
. = ..()
|
||||
|
||||
/datum/component/simple_rotation/PostTransfer()
|
||||
//Because of the callbacks which we don't track cleanly we can't transfer this
|
||||
//item cleanly, better to let the new of the new item create a new rotation datum
|
||||
//instead (there's no real state worth transferring)
|
||||
return COMPONENT_NOTRANSFER
|
||||
|
||||
/datum/component/simple_rotation/UnregisterFromParent()
|
||||
remove_verbs()
|
||||
remove_signals()
|
||||
. = ..()
|
||||
|
||||
/datum/component/simple_rotation/Destroy()
|
||||
QDEL_NULL(can_user_rotate)
|
||||
QDEL_NULL(can_be_rotated)
|
||||
QDEL_NULL(after_rotation)
|
||||
//Signals + verbs removed via UnRegister
|
||||
. = ..()
|
||||
|
||||
/datum/component/simple_rotation/RemoveComponent()
|
||||
@@ -122,22 +143,22 @@
|
||||
set name = "Rotate Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
GET_COMPONENT(rotcomp,/datum/component/simple_rotation)
|
||||
var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation)
|
||||
if(rotcomp)
|
||||
rotcomp.HandRot(usr,ROTATION_CLOCKWISE)
|
||||
rotcomp.HandRot(null,usr,ROTATION_CLOCKWISE)
|
||||
|
||||
/atom/movable/proc/simple_rotate_counterclockwise()
|
||||
set name = "Rotate Counter-Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
GET_COMPONENT(rotcomp,/datum/component/simple_rotation)
|
||||
var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation)
|
||||
if(rotcomp)
|
||||
rotcomp.HandRot(usr,ROTATION_COUNTERCLOCKWISE)
|
||||
rotcomp.HandRot(null,usr,ROTATION_COUNTERCLOCKWISE)
|
||||
|
||||
/atom/movable/proc/simple_rotate_flip()
|
||||
set name = "Flip"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
GET_COMPONENT(rotcomp,/datum/component/simple_rotation)
|
||||
var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation)
|
||||
if(rotcomp)
|
||||
rotcomp.HandRot(usr,ROTATION_FLIP)
|
||||
rotcomp.HandRot(null,usr,ROTATION_FLIP)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
/datum/component/shrapnel
|
||||
var/projectile_type
|
||||
var/radius // shoots a projectile for every turf on this radius from the hit target
|
||||
var/override_projectile_range
|
||||
|
||||
/datum/component/shrapnel/Initialize(projectile_type, radius=1, override_projectile_range)
|
||||
if(!isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.projectile_type = projectile_type
|
||||
src.radius = radius
|
||||
src.override_projectile_range = override_projectile_range
|
||||
|
||||
/datum/component/shrapnel/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
|
||||
/datum/component/shrapnel/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/shrapnel/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_shrapnel(firer, target)
|
||||
|
||||
/datum/component/shrapnel/proc/do_shrapnel(mob/firer, atom/target)
|
||||
if(radius < 1)
|
||||
return
|
||||
var/turf/target_turf = get_turf(target)
|
||||
for(var/turf/shootat_turf in RANGE_TURFS(radius, target) - RANGE_TURFS(radius-1, target))
|
||||
var/obj/item/projectile/P = new projectile_type(target_turf)
|
||||
|
||||
//Shooting Code:
|
||||
P.range = radius+1
|
||||
if(override_projectile_range)
|
||||
P.range = override_projectile_range
|
||||
P.preparePixelProjectile(shootat_turf, target)
|
||||
P.firer = firer // don't hit ourself that would be really annoying
|
||||
P.permutated += target // don't hit the target we hit already with the flak
|
||||
P.fire()
|
||||
@@ -1,33 +0,0 @@
|
||||
// This should only be used by non components trying to listen to a signal
|
||||
// If you use this inside a component I will replace your eyes with lemons ~ninjanomnom
|
||||
|
||||
/datum/component/redirect
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
var/list/signals
|
||||
var/datum/callback/turfchangeCB
|
||||
|
||||
/datum/component/redirect/Initialize(list/_signals, flags=NONE)
|
||||
//It's not our job to verify the right signals are registered here, just do it.
|
||||
if(!LAZYLEN(_signals))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
if(flags & REDIRECT_TRANSFER_WITH_TURF && isturf(parent))
|
||||
// If they also want to listen to the turf change then we need to set it up so both callbacks run
|
||||
if(_signals[COMSIG_TURF_CHANGE])
|
||||
turfchangeCB = _signals[COMSIG_TURF_CHANGE]
|
||||
if(!istype(turfchangeCB))
|
||||
. = COMPONENT_INCOMPATIBLE
|
||||
CRASH("Redirect components must be given instanced callbacks, not proc paths.")
|
||||
_signals[COMSIG_TURF_CHANGE] = CALLBACK(src, .proc/turf_change)
|
||||
|
||||
signals = _signals
|
||||
|
||||
/datum/component/redirect/RegisterWithParent()
|
||||
for(var/signal in signals)
|
||||
RegisterSignal(parent, signal, signals[signal])
|
||||
|
||||
/datum/component/redirect/UnregisterFromParent()
|
||||
UnregisterSignal(parent, signals)
|
||||
|
||||
/datum/component/redirect/proc/turf_change(datum/source, path, new_baseturfs, flags, list/transfers)
|
||||
transfers += src
|
||||
return turfchangeCB?.InvokeAsync(arglist(args))
|
||||
@@ -4,6 +4,7 @@
|
||||
// /mob/living/Move() in /modules/mob/living/living.dm - hiding storage boxes on mob movement
|
||||
|
||||
/datum/component/storage/concrete
|
||||
can_transfer = TRUE
|
||||
var/drop_all_on_deconstruct = TRUE
|
||||
var/drop_all_on_destroy = FALSE
|
||||
var/drop_all_on_break = FALSE
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
/obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector,
|
||||
/obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper,
|
||||
/obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini,
|
||||
/obj/item/firing_pin
|
||||
/obj/item/firing_pin, /obj/item/gun/ballistic/automatic/pistol
|
||||
))
|
||||
|
||||
/datum/component/storage/concrete/pockets/shoes/clown/Initialize()
|
||||
@@ -67,7 +67,7 @@
|
||||
/obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector,
|
||||
/obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper,
|
||||
/obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini,
|
||||
/obj/item/firing_pin, /obj/item/bikehorn))
|
||||
/obj/item/firing_pin, /obj/item/bikehorn, /obj/item/gun/ballistic/automatic/pistol))
|
||||
|
||||
/datum/component/storage/concrete/pockets/pocketprotector
|
||||
max_items = 3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/component/storage/concrete/secret_satchel/can_be_inserted(I,msg,user)
|
||||
/datum/component/storage/concrete/secret_satchel/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M)
|
||||
if(SSpersistence.spawned_objects[I])
|
||||
to_chat(user, "<span class='warning'>[I] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
|
||||
to_chat(M, "<span class='warning'>[I] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -57,6 +57,10 @@
|
||||
var/screen_start_x = 4 //These two are where the storage starts being rendered, screen_loc wise.
|
||||
var/screen_start_y = 2
|
||||
//End
|
||||
|
||||
var/limited_random_access = FALSE //Quick if statement in accessible_items to determine if we care at all about what people can access at once.
|
||||
var/limited_random_access_stack_position = 0 //If >0, can only access top <x> items
|
||||
var/limited_random_access_stack_bottom_up = FALSE //If TRUE, above becomes bottom <x> items
|
||||
|
||||
/datum/component/storage/Initialize(datum/component/storage/concrete/master)
|
||||
if(!isatom(parent))
|
||||
@@ -96,6 +100,7 @@
|
||||
RegisterSignal(parent, COMSIG_ITEM_PICKUP, .proc/signal_on_pickup)
|
||||
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_POST_THROW, .proc/close_all)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/check_views)
|
||||
|
||||
RegisterSignal(parent, COMSIG_CLICK_ALT, .proc/on_alt_click)
|
||||
RegisterSignal(parent, COMSIG_MOUSEDROP_ONTO, .proc/mousedrop_onto)
|
||||
@@ -145,6 +150,19 @@
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
return master? master.real_location() : null
|
||||
|
||||
//What players can access
|
||||
//this proc can probably eat a refactor at some point.
|
||||
/datum/component/storage/proc/accessible_items(random_access = TRUE)
|
||||
var/list/contents = contents()
|
||||
if(contents)
|
||||
if(limited_random_access && random_access)
|
||||
if(limited_random_access_stack_position && (length(contents) > limited_random_access_stack_position))
|
||||
if(limited_random_access_stack_bottom_up)
|
||||
contents.Cut(1, limited_random_access_stack_position + 1)
|
||||
else
|
||||
contents.Cut(1, length(contents) - limited_random_access_stack_position + 1)
|
||||
return contents
|
||||
|
||||
/datum/component/storage/proc/canreach_react(datum/source, list/next)
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
if(!master)
|
||||
@@ -283,8 +301,7 @@
|
||||
|
||||
/datum/component/storage/proc/_process_numerical_display()
|
||||
. = list()
|
||||
var/atom/real_location = real_location()
|
||||
for(var/obj/item/I in real_location.contents)
|
||||
for(var/obj/item/I in accessible_items())
|
||||
if(QDELETED(I))
|
||||
continue
|
||||
if(!.[I.type])
|
||||
@@ -296,8 +313,8 @@
|
||||
|
||||
//This proc determines the size of the inventory to be displayed. Please touch it only if you know what you're doing.
|
||||
/datum/component/storage/proc/orient2hud(mob/user, maxcolumns)
|
||||
var/atom/real_location = real_location()
|
||||
var/adjusted_contents = real_location.contents.len
|
||||
var/list/accessible_contents = accessible_items()
|
||||
var/adjusted_contents = length(accessible_contents)
|
||||
|
||||
//Numbered contents display
|
||||
var/list/datum/numbered_display/numbered_contents
|
||||
@@ -329,8 +346,7 @@
|
||||
if(cy - screen_start_y >= rows)
|
||||
break
|
||||
else
|
||||
var/atom/real_location = real_location()
|
||||
for(var/obj/O in real_location)
|
||||
for(var/obj/O in accessible_items())
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
|
||||
@@ -351,9 +367,8 @@
|
||||
return FALSE
|
||||
var/list/cview = getviewsize(M.client.view)
|
||||
var/maxallowedscreensize = cview[1]-8
|
||||
var/atom/real_location = real_location()
|
||||
if(M.active_storage != src && (M.stat == CONSCIOUS))
|
||||
for(var/obj/item/I in real_location)
|
||||
for(var/obj/item/I in accessible_items())
|
||||
if(I.on_found(M))
|
||||
return FALSE
|
||||
if(M.active_storage)
|
||||
@@ -361,7 +376,7 @@
|
||||
orient2hud(M, (isliving(M) ? maxallowedscreensize : 7))
|
||||
M.client.screen |= boxes
|
||||
M.client.screen |= closer
|
||||
M.client.screen |= real_location.contents
|
||||
M.client.screen |= accessible_items()
|
||||
M.active_storage = src
|
||||
LAZYOR(is_using, M)
|
||||
return TRUE
|
||||
@@ -387,6 +402,11 @@
|
||||
close(M)
|
||||
. = TRUE //returns TRUE if any mobs actually got a close(M) call
|
||||
|
||||
/datum/component/storage/proc/check_views()
|
||||
for(var/mob/M in can_see_contents())
|
||||
if(!isobserver(M) && !M.CanReach(src, view_only = TRUE))
|
||||
close(M)
|
||||
|
||||
/datum/component/storage/proc/emp_act(datum/source, severity)
|
||||
if(emp_shielded)
|
||||
return
|
||||
@@ -588,7 +608,7 @@
|
||||
return FALSE
|
||||
if(isitem(host))
|
||||
var/obj/item/IP = host
|
||||
GET_COMPONENT_FROM(STR_I, /datum/component/storage, I)
|
||||
var/datum/component/storage/STR_I = I.GetComponent(/datum/component/storage)
|
||||
if((I.w_class >= IP.w_class) && STR_I && !allow_big_nesting)
|
||||
if(!stop_messages)
|
||||
to_chat(M, "<span class='warning'>[IP] cannot hold [I] as it's a storage item of the same size!</span>")
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
/datum/component/summoning
|
||||
var/list/mob_types = list()
|
||||
var/spawn_chance // chance for the mob to spawn on hit in percent
|
||||
var/max_mobs
|
||||
var/spawn_delay // delay in spawning between mobs (deciseconds)
|
||||
var/spawn_text
|
||||
var/spawn_sound
|
||||
var/list/faction
|
||||
|
||||
var/last_spawned_time = 0
|
||||
var/list/spawned_mobs = list()
|
||||
|
||||
/datum/component/summoning/Initialize(mob_types, spawn_chance=100, max_mobs=3, spawn_delay=100, spawn_text="appears out of nowhere", spawn_sound='sound/magic/summon_magic.ogg', faction)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.mob_types = mob_types
|
||||
src.spawn_chance = spawn_chance
|
||||
src.max_mobs = max_mobs
|
||||
src.spawn_delay = spawn_delay
|
||||
src.spawn_text = spawn_text
|
||||
src.spawn_sound = spawn_sound
|
||||
src.faction = faction
|
||||
|
||||
/datum/component/summoning/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/summoning/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/summoning/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_spawn_mob(get_turf(target), user)
|
||||
|
||||
/datum/component/summoning/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_spawn_mob(get_turf(target), attacker)
|
||||
|
||||
/datum/component/summoning/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_spawn_mob(get_turf(target), firer)
|
||||
|
||||
/datum/component/summoning/proc/do_spawn_mob(atom/spawn_location, summoner)
|
||||
if(spawned_mobs.len >= max_mobs)
|
||||
return 0
|
||||
if(last_spawned_time > world.time)
|
||||
return 0
|
||||
if(!prob(spawn_chance))
|
||||
return 0
|
||||
last_spawned_time = world.time + spawn_delay
|
||||
var/chosen_mob_type = pick(mob_types)
|
||||
var/mob/living/simple_animal/L = new chosen_mob_type(spawn_location)
|
||||
if(ishostile(L))
|
||||
var/mob/living/simple_animal/hostile/H = L
|
||||
H.friends += summoner // do not attack our summon boy
|
||||
spawned_mobs += L
|
||||
if(faction != null)
|
||||
L.faction = faction
|
||||
RegisterSignal(L, COMSIG_MOB_DEATH, .proc/on_spawned_death) // so we can remove them from the list, etc (for mobs with corpses)
|
||||
playsound(spawn_location,spawn_sound, 50, 1)
|
||||
spawn_location.visible_message("<span class='danger'>[L] [spawn_text].</span>")
|
||||
|
||||
/datum/component/summoning/proc/on_spawned_death(mob/killed, gibbed)
|
||||
spawned_mobs -= killed
|
||||
@@ -12,7 +12,7 @@
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm)
|
||||
|
||||
/datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM)
|
||||
GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM)
|
||||
var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
|
||||
if(!other_swarm)
|
||||
return
|
||||
swarm()
|
||||
@@ -21,7 +21,7 @@
|
||||
other_swarm.swarm_members |= src
|
||||
|
||||
/datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM)
|
||||
GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM)
|
||||
var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
|
||||
if(!other_swarm || !(other_swarm in swarm_members))
|
||||
return
|
||||
swarm_members -= other_swarm
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
/datum/component/tactical
|
||||
var/allowed_slot
|
||||
|
||||
/datum/component/tactical/Initialize(allowed_slot)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.allowed_slot = allowed_slot
|
||||
|
||||
/datum/component/tactical/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/modify)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/unmodify)
|
||||
|
||||
/datum/component/tactical/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
|
||||
unmodify()
|
||||
|
||||
/datum/component/fantasy/Destroy()
|
||||
unmodify()
|
||||
return ..()
|
||||
|
||||
/datum/component/tactical/proc/modify(obj/item/source, mob/user, slot)
|
||||
if(allowed_slot && slot != allowed_slot)
|
||||
unmodify()
|
||||
return
|
||||
|
||||
var/obj/item/master = parent
|
||||
var/image/I = image(icon = master.icon, icon_state = master.icon_state, loc = user)
|
||||
I.copy_overlays(master)
|
||||
I.override = TRUE
|
||||
source.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "sneaking_mission", I)
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
|
||||
/datum/component/tactical/proc/unmodify(obj/item/source, mob/user)
|
||||
var/obj/item/master = source || parent
|
||||
if(!user)
|
||||
if(!ismob(master.loc))
|
||||
return
|
||||
user = master.loc
|
||||
|
||||
user.remove_alt_appearance("sneaking_mission")
|
||||
@@ -15,7 +15,7 @@
|
||||
/turf/closed/indestructible,
|
||||
/turf/open/indestructible)
|
||||
)
|
||||
|
||||
|
||||
var/static/list/resistlist = typecacheof(
|
||||
/turf/closed/wall/r_wall
|
||||
)
|
||||
@@ -77,5 +77,5 @@
|
||||
thermite_melt()
|
||||
|
||||
/datum/component/thermite/proc/attackby_react(datum/source, obj/item/thing, mob/user, params)
|
||||
if(thing.is_hot())
|
||||
if(thing.get_temperature())
|
||||
thermite_melt(user)
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/component/virtual_reality
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED //mindswap memes, shouldn't stack up otherwise.
|
||||
can_transfer = TRUE
|
||||
var/datum/mind/mastermind // where is my mind t. pixies
|
||||
var/datum/mind/current_mind
|
||||
var/obj/machinery/vr_sleeper/vr_sleeper
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/datum/component/waddling
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
|
||||
/datum/component/waddling/Initialize()
|
||||
if(!isliving(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/Waddle)
|
||||
if(!isliving(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/Waddle)
|
||||
|
||||
/datum/component/waddling/proc/Waddle()
|
||||
var/mob/living/L = parent
|
||||
if(L.incapacitated() || L.lying)
|
||||
return
|
||||
animate(L, pixel_z = 4, time = 0)
|
||||
animate(pixel_z = 0, transform = turn(matrix(), pick(-12, 0, 12)), time=2)
|
||||
animate(pixel_z = 0, transform = matrix(), time = 0)
|
||||
var/mob/living/L = parent
|
||||
if(L.incapacitated() || L.lying)
|
||||
return
|
||||
animate(L, pixel_z = 4, time = 0)
|
||||
animate(pixel_z = 0, transform = turn(matrix(), pick(-12, 0, 12)), time=2)
|
||||
animate(pixel_z = 0, transform = matrix(), time = 0)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/datum/component/wearertargeting
|
||||
var/list/valid_slots = list()
|
||||
var/list/signals = list()
|
||||
var/datum/callback/callback = CALLBACK(GLOBAL_PROC, .proc/pass)
|
||||
var/proctype = .proc/pass
|
||||
var/mobtype = /mob/living
|
||||
|
||||
/datum/component/wearertargeting/Initialize()
|
||||
@@ -14,13 +14,9 @@
|
||||
|
||||
/datum/component/wearertargeting/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
if((slot in valid_slots) && istype(equipper, mobtype))
|
||||
RegisterSignal(equipper, signals, callback, TRUE)
|
||||
RegisterSignal(equipper, signals, proctype, TRUE)
|
||||
else
|
||||
UnregisterSignal(equipper, signals)
|
||||
|
||||
/datum/component/wearertargeting/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, signals)
|
||||
|
||||
/datum/component/wearertargeting/Destroy()
|
||||
QDEL_NULL(callback) //is likely to ourselves.
|
||||
return ..()
|
||||
UnregisterSignal(user, signals)
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/component/wet_floor
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
can_transfer = TRUE
|
||||
var/highest_strength = TURF_DRY
|
||||
var/lube_flags = NONE //why do we have this?
|
||||
var/list/time_left_list //In deciseconds.
|
||||
@@ -26,14 +27,19 @@
|
||||
if(!isopenturf(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
add_wet(strength, duration_minimum, duration_add, duration_maximum)
|
||||
RegisterSignal(parent, COMSIG_TURF_IS_WET, .proc/is_wet)
|
||||
RegisterSignal(parent, COMSIG_TURF_MAKE_DRY, .proc/dry)
|
||||
permanent = _permanent
|
||||
if(!permanent)
|
||||
START_PROCESSING(SSwet_floors, src)
|
||||
addtimer(CALLBACK(src, .proc/gc, TRUE), 1) //GC after initialization.
|
||||
last_process = world.time
|
||||
|
||||
/datum/component/wet_floor/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_TURF_IS_WET, .proc/is_wet)
|
||||
RegisterSignal(parent, COMSIG_TURF_MAKE_DRY, .proc/dry)
|
||||
|
||||
/datum/component/wet_floor/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_TURF_IS_WET, COMSIG_TURF_MAKE_DRY))
|
||||
|
||||
/datum/component/wet_floor/Destroy()
|
||||
STOP_PROCESSING(SSwet_floors, src)
|
||||
var/turf/T = parent
|
||||
@@ -82,6 +88,9 @@
|
||||
if(TURF_WET_PERMAFROST)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_SUPERLUBE)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP | SLIP_WHEN_CRAWLING
|
||||
else
|
||||
qdel(parent.GetComponent(/datum/component/slippery))
|
||||
return
|
||||
@@ -138,15 +147,22 @@
|
||||
/datum/component/wet_floor/PreTransfer()
|
||||
var/turf/O = parent
|
||||
O.cut_overlay(current_overlay)
|
||||
//That turf is no longer slippery, we're out of here
|
||||
//Slippery components don't transfer due to callbacks
|
||||
qdel(O.GetComponent(/datum/component/slippery))
|
||||
|
||||
/datum/component/wet_floor/PostTransfer()
|
||||
if(!isopenturf(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
var/turf/T = parent
|
||||
T.add_overlay(current_overlay)
|
||||
//Make sure to add/update any slippery component on the new turf (update_flags calls LoadComponent)
|
||||
update_flags()
|
||||
|
||||
//NB it's possible we get deleted after this, due to inherit
|
||||
|
||||
/datum/component/wet_floor/proc/add_wet(type, duration_minimum = 0, duration_add = 0, duration_maximum = MAXIMUM_WET_TIME, _permanent = FALSE)
|
||||
var/static/list/allowed_types = list(TURF_WET_WATER, TURF_WET_LUBE, TURF_WET_ICE, TURF_WET_PERMAFROST)
|
||||
var/static/list/allowed_types = list(TURF_WET_WATER, TURF_WET_LUBE, TURF_WET_ICE, TURF_WET_PERMAFROST, TURF_WET_SUPERLUBE)
|
||||
if(duration_minimum <= 0 || !type)
|
||||
return FALSE
|
||||
if(type in allowed_types)
|
||||
|
||||
@@ -34,11 +34,10 @@
|
||||
var/turf/T = get_turf(target)
|
||||
if(target in view(user.client.view, user))
|
||||
var/obj/spot1 = new phaseout(get_turf(user), user.dir)
|
||||
user.forceMove(T)
|
||||
playsound(T, dash_sound, 25, 1)
|
||||
var/obj/spot2 = new phasein(get_turf(user), user.dir)
|
||||
spot1.Beam(spot2,beam_effect,time=20)
|
||||
current_charges--
|
||||
if(do_teleport(user, T, null, TRUE, null, null, dash_sound, dash_sound, TRUE, TELEPORT_CHANNEL_FREE, TRUE))
|
||||
var/obj/spot2 = new phasein(get_turf(user), user.dir)
|
||||
spot1.Beam(spot2,beam_effect,time=20)
|
||||
current_charges--
|
||||
holder.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(src, .proc/charge), charge_rate)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/list/datum_components //for /datum/components
|
||||
var/list/status_traits
|
||||
var/list/comp_lookup //it used to be for looking up components which had registered a signal but now anything can register
|
||||
var/list/signal_procs
|
||||
var/list/list/datum/callback/signal_procs
|
||||
var/signal_enabled = FALSE
|
||||
var/datum_flags = NONE
|
||||
var/datum/weakref/weak_reference
|
||||
|
||||
@@ -875,14 +875,14 @@
|
||||
return
|
||||
// text2num conveniently returns a null on invalid values
|
||||
O.armor = O.armor.setRating(melee = text2num(result["values"]["melee"]),\
|
||||
bullet = text2num(result["values"]["bullet"]),\
|
||||
laser = text2num(result["values"]["laser"]),\
|
||||
energy = text2num(result["values"]["energy"]),\
|
||||
bomb = text2num(result["values"]["bomb"]),\
|
||||
bio = text2num(result["values"]["bio"]),\
|
||||
rad = text2num(result["values"]["rad"]),\
|
||||
fire = text2num(result["values"]["fire"]),\
|
||||
acid = text2num(result["values"]["acid"]))
|
||||
bullet = text2num(result["values"]["bullet"]),\
|
||||
laser = text2num(result["values"]["laser"]),\
|
||||
energy = text2num(result["values"]["energy"]),\
|
||||
bomb = text2num(result["values"]["bomb"]),\
|
||||
bio = text2num(result["values"]["bio"]),\
|
||||
rad = text2num(result["values"]["rad"]),\
|
||||
fire = text2num(result["values"]["fire"]),\
|
||||
acid = text2num(result["values"]["acid"]))
|
||||
log_admin("[key_name(usr)] modified the armor on [O] ([O.type]) to melee: [O.armor.melee], bullet: [O.armor.bullet], laser: [O.armor.laser], energy: [O.armor.energy], bomb: [O.armor.bomb], bio: [O.armor.bio], rad: [O.armor.rad], fire: [O.armor.fire], acid: [O.armor.acid]")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] modified the armor on [O] ([O.type]) to melee: [O.armor.melee], bullet: [O.armor.bullet], laser: [O.armor.laser], energy: [O.armor.energy], bomb: [O.armor.bomb], bio: [O.armor.bio], rad: [O.armor.rad], fire: [O.armor.fire], acid: [O.armor.acid]</span>")
|
||||
else
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if(M.getToxLoss() && prob(5))
|
||||
to_chat(M, "<span class='notice'>Your skin tingles as the starlight seems to heal you.</span>")
|
||||
|
||||
M.adjustToxLoss(-(4 * heal_amt)) //most effective on toxins
|
||||
M.adjustToxLoss(-(4 * heal_amt), forced = TRUE) //most effective on toxins
|
||||
|
||||
var/list/parts = M.get_damaged_bodyparts(1,1)
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
level = 8
|
||||
passive_message = "<span class='notice'>You feel an odd attraction to plasma.</span>"
|
||||
var/temp_rate = 1
|
||||
threshold_desc = "<b>Transmission 6:</b> Increases temperature adjustment rate.<br>\
|
||||
threshold_desc = "<b>Transmission 6:</b> Increases temperature adjustment rate and heals toxin lovers.<br>\
|
||||
<b>Stage Speed 7:</b> Increases healing speed."
|
||||
|
||||
/datum/symptom/heal/plasma/Start(datum/disease/advance/A)
|
||||
@@ -410,7 +410,7 @@
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>You feel warmer.</span>")
|
||||
|
||||
M.adjustToxLoss(-heal_amt)
|
||||
M.adjustToxLoss(-heal_amt, forced = (temp_rate == 4))
|
||||
|
||||
var/list/parts = M.get_damaged_bodyparts(1,1)
|
||||
if(!parts.len)
|
||||
@@ -435,7 +435,7 @@
|
||||
symptom_delay_max = 1
|
||||
passive_message = "<span class='notice'>Your skin glows faintly for a moment.</span>"
|
||||
var/cellular_damage = FALSE
|
||||
threshold_desc = "<b>Transmission 6:</b> Additionally heals cellular damage.<br>\
|
||||
threshold_desc = "<b>Transmission 6:</b> Additionally heals cellular damage and toxin lovers.<br>\
|
||||
<b>Resistance 7:</b> Increases healing speed."
|
||||
|
||||
/datum/symptom/heal/radiation/Start(datum/disease/advance/A)
|
||||
@@ -468,7 +468,7 @@
|
||||
if(cellular_damage)
|
||||
M.adjustCloneLoss(-heal_amt * 0.5)
|
||||
|
||||
M.adjustToxLoss(-(2 * heal_amt))
|
||||
M.adjustToxLoss(-(2 * heal_amt), forced = cellular_damage)
|
||||
|
||||
var/list/parts = M.get_damaged_bodyparts(1,1)
|
||||
|
||||
|
||||
+1
-1
@@ -42,8 +42,8 @@
|
||||
destination.dna.unique_enzymes = unique_enzymes
|
||||
destination.dna.uni_identity = uni_identity
|
||||
destination.dna.blood_type = blood_type
|
||||
destination.set_species(species.type, icon_update=0)
|
||||
destination.dna.features = features.Copy()
|
||||
destination.set_species(species.type, icon_update=0)
|
||||
destination.dna.real_name = real_name
|
||||
destination.dna.nameless = nameless
|
||||
destination.dna.custom_species = custom_species
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
#define EMBEDID "embed-[embed_chance]-[embedded_fall_chance]-[embedded_pain_chance]-[embedded_pain_multiplier]-[embedded_fall_pain_multiplier]-[embedded_impact_pain_multiplier]-[embedded_unsafe_removal_pain_multiplier]-[embedded_unsafe_removal_time]"
|
||||
|
||||
/proc/getEmbeddingBehavior(embed_chance = EMBED_CHANCE,
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
. = locate(EMBEDID)
|
||||
if (!.)
|
||||
. = new /datum/embedding_behavior(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
. = locate(EMBEDID)
|
||||
if (!.)
|
||||
. = new /datum/embedding_behavior(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
|
||||
|
||||
/datum/embedding_behavior
|
||||
var/embed_chance
|
||||
var/embedded_fall_chance
|
||||
var/embedded_pain_chance
|
||||
var/embedded_pain_multiplier //The coefficient of multiplication for the damage this item does while embedded (this*w_class)
|
||||
var/embedded_fall_pain_multiplier //The coefficient of multiplication for the damage this item does when falling out of a limb (this*w_class)
|
||||
var/embedded_impact_pain_multiplier //The coefficient of multiplication for the damage this item does when first embedded (this*w_class)
|
||||
var/embedded_unsafe_removal_pain_multiplier //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||
var/embedded_unsafe_removal_time //A time in ticks, multiplied by the w_class.
|
||||
var/embed_chance
|
||||
var/embedded_fall_chance
|
||||
var/embedded_pain_chance
|
||||
var/embedded_pain_multiplier //The coefficient of multiplication for the damage this item does while embedded (this*w_class)
|
||||
var/embedded_fall_pain_multiplier //The coefficient of multiplication for the damage this item does when falling out of a limb (this*w_class)
|
||||
var/embedded_impact_pain_multiplier //The coefficient of multiplication for the damage this item does when first embedded (this*w_class)
|
||||
var/embedded_unsafe_removal_pain_multiplier //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||
var/embedded_unsafe_removal_time //A time in ticks, multiplied by the w_class.
|
||||
|
||||
/datum/embedding_behavior/New(embed_chance = EMBED_CHANCE,
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
src.embed_chance = embed_chance
|
||||
src.embedded_fall_chance = embedded_fall_chance
|
||||
src.embedded_pain_chance = embedded_pain_chance
|
||||
src.embedded_pain_multiplier = embedded_pain_multiplier
|
||||
src.embedded_fall_pain_multiplier = embedded_fall_pain_multiplier
|
||||
src.embedded_impact_pain_multiplier = embedded_impact_pain_multiplier
|
||||
src.embedded_unsafe_removal_pain_multiplier = embedded_unsafe_removal_pain_multiplier
|
||||
src.embedded_unsafe_removal_time = embedded_unsafe_removal_time
|
||||
tag = EMBEDID
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
src.embed_chance = embed_chance
|
||||
src.embedded_fall_chance = embedded_fall_chance
|
||||
src.embedded_pain_chance = embedded_pain_chance
|
||||
src.embedded_pain_multiplier = embedded_pain_multiplier
|
||||
src.embedded_fall_pain_multiplier = embedded_fall_pain_multiplier
|
||||
src.embedded_impact_pain_multiplier = embedded_impact_pain_multiplier
|
||||
src.embedded_unsafe_removal_pain_multiplier = embedded_unsafe_removal_pain_multiplier
|
||||
src.embedded_unsafe_removal_time = embedded_unsafe_removal_time
|
||||
tag = EMBEDID
|
||||
|
||||
/datum/embedding_behavior/proc/setRating(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
|
||||
return getEmbeddingBehavior((isnull(embed_chance) ? src.embed_chance : embed_chance),\
|
||||
(isnull(embedded_fall_chance) ? src.embedded_fall_chance : embedded_fall_chance),\
|
||||
(isnull(embedded_pain_chance) ? src.embedded_pain_chance : embedded_pain_chance),\
|
||||
(isnull(embedded_pain_multiplier) ? src.embedded_pain_multiplier : embedded_pain_multiplier),\
|
||||
(isnull(embedded_fall_pain_multiplier) ? src.embedded_fall_pain_multiplier : embedded_fall_pain_multiplier),\
|
||||
(isnull(embedded_impact_pain_multiplier) ? src.embedded_impact_pain_multiplier : embedded_impact_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_pain_multiplier) ? src.embedded_unsafe_removal_pain_multiplier : embedded_unsafe_removal_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_time) ? src.embedded_unsafe_removal_time : embedded_unsafe_removal_time))
|
||||
return getEmbeddingBehavior((isnull(embed_chance) ? src.embed_chance : embed_chance),\
|
||||
(isnull(embedded_fall_chance) ? src.embedded_fall_chance : embedded_fall_chance),\
|
||||
(isnull(embedded_pain_chance) ? src.embedded_pain_chance : embedded_pain_chance),\
|
||||
(isnull(embedded_pain_multiplier) ? src.embedded_pain_multiplier : embedded_pain_multiplier),\
|
||||
(isnull(embedded_fall_pain_multiplier) ? src.embedded_fall_pain_multiplier : embedded_fall_pain_multiplier),\
|
||||
(isnull(embedded_impact_pain_multiplier) ? src.embedded_impact_pain_multiplier : embedded_impact_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_pain_multiplier) ? src.embedded_unsafe_removal_pain_multiplier : embedded_unsafe_removal_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_time) ? src.embedded_unsafe_removal_time : embedded_unsafe_removal_time))
|
||||
|
||||
#undef EMBEDID
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
tele_play_specials(teleatom, destturf, effectout, asoundout)
|
||||
if(ismegafauna(teleatom))
|
||||
message_admins("[teleatom] [ADMIN_FLW(teleatom)] has teleported from [ADMIN_VERBOSEJMP(curturf)] to [ADMIN_VERBOSEJMP(destturf)].")
|
||||
SEND_SIGNAL(teleatom, COMSIG_MOVABLE_TELEPORTED, channel, curturf, destturf)
|
||||
|
||||
if(ismob(teleatom))
|
||||
var/mob/M = teleatom
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
var/config_max_users = 0
|
||||
var/config_min_users = 0
|
||||
var/voteweight = 1
|
||||
var/max_round_search_span = 0 //If this is nonzero, then if the map has been played more than max_rounds_played within the search span (max determined by define in persistence.dm), this map won't be available.
|
||||
var/max_rounds_played = 0
|
||||
|
||||
// Config actually from the JSON - should default to Box
|
||||
var/map_name = "Box Station"
|
||||
@@ -23,6 +25,10 @@
|
||||
|
||||
var/minetype = "lavaland"
|
||||
|
||||
var/maptype = MAP_TYPE_STATION //This should be used to adjust ingame behavior depending on the specific type of map being played. For instance, if an overmap were added, it'd be appropriate for it to only generate with a MAP_TYPE_SHIP
|
||||
|
||||
var/announcertype = "standard" //Determines the announcer the map uses. standard uses the default announcer, classic, but has a random chance to use other similarly-themed announcers, like medibot
|
||||
|
||||
var/allow_custom_shuttles = TRUE
|
||||
var/shuttles = list(
|
||||
"cargo" = "cargo_box",
|
||||
@@ -30,6 +36,8 @@
|
||||
"whiteship" = "whiteship_box",
|
||||
"emergency" = "emergency_box")
|
||||
|
||||
var/year_offset = 540 //The offset of ingame year from the actual IRL year. You know you want to make a map that takes place in the 90's. Don't lie.
|
||||
|
||||
/proc/load_map_config(filename = "data/next_map.json", default_to_box, delete_after, error_if_missing = TRUE)
|
||||
var/datum/map_config/config = new
|
||||
if (default_to_box)
|
||||
@@ -122,8 +130,21 @@
|
||||
log_world("map_config space_empty_levels is not a number!")
|
||||
return
|
||||
|
||||
temp = json["year_offset"]
|
||||
if (isnum(temp))
|
||||
year_offset = temp
|
||||
else if (!isnull(temp))
|
||||
log_world("map_config year_offset is not a number!")
|
||||
return
|
||||
|
||||
if ("minetype" in json)
|
||||
minetype = json["minetype"]
|
||||
|
||||
if ("maptype" in json)
|
||||
maptype = json["maptype"]
|
||||
|
||||
if ("announcertype" in json)
|
||||
announcertype = json["announcertype"]
|
||||
|
||||
allow_custom_shuttles = json["allow_custom_shuttles"] != FALSE
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
if (T && isturf(T))
|
||||
if (!D.stat)
|
||||
D.emote("scream")
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human/.Knockdown, 20))
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/Knockdown, 20))
|
||||
log_combat(A, D, "has thrown with wrestling")
|
||||
return 0
|
||||
|
||||
|
||||
+93
-158
@@ -41,8 +41,6 @@
|
||||
var/special_role
|
||||
var/list/restricted_roles = list()
|
||||
|
||||
var/list/datum/objective/objectives = list()
|
||||
|
||||
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
|
||||
|
||||
var/linglink
|
||||
@@ -360,13 +358,15 @@
|
||||
output += memory
|
||||
|
||||
|
||||
var/list/all_objectives = list()
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
output += A.antag_memory
|
||||
all_objectives |= A.objectives
|
||||
|
||||
if(objectives.len)
|
||||
if(all_objectives.len)
|
||||
output += "<B>Objectives:</B>"
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in objectives)
|
||||
for(var/datum/objective/objective in all_objectives)
|
||||
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
|
||||
var/list/datum/mind/other_owners = objective.get_owners() - src
|
||||
if(other_owners.len)
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
if(window)
|
||||
recipient << browse(output,"window=memory")
|
||||
else if(objectives.len || memory)
|
||||
else if(all_objectives.len || memory)
|
||||
to_chat(recipient, "<i>[output]</i>")
|
||||
|
||||
/datum/mind/Topic(href, href_list)
|
||||
@@ -408,34 +408,24 @@
|
||||
memory = new_memo
|
||||
|
||||
else if (href_list["obj_edit"] || href_list["obj_add"])
|
||||
var/datum/objective/objective
|
||||
var/objective_pos
|
||||
var/objective_pos //Edited objectives need to keep same order in antag objective list
|
||||
var/def_value
|
||||
|
||||
var/datum/antagonist/target_antag
|
||||
var/datum/objective/old_objective //The old objective we're replacing/editing
|
||||
var/datum/objective/new_objective //New objective we're be adding
|
||||
|
||||
if (href_list["obj_edit"])
|
||||
objective = locate(href_list["obj_edit"])
|
||||
if (!objective)
|
||||
if(href_list["obj_edit"])
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
old_objective = locate(href_list["obj_edit"]) in A.objectives
|
||||
if(old_objective)
|
||||
target_antag = A
|
||||
objective_pos = A.objectives.Find(old_objective)
|
||||
break
|
||||
if(!old_objective)
|
||||
to_chat(usr,"Invalid objective.")
|
||||
return
|
||||
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
if(objective in A.objectives)
|
||||
target_antag = A
|
||||
objective_pos = A.objectives.Find(objective)
|
||||
break
|
||||
|
||||
if(!target_antag) //Shouldn't happen anymore
|
||||
stack_trace("objective without antagonist found")
|
||||
objective_pos = objectives.Find(objective)
|
||||
|
||||
//Text strings are easy to manipulate. Revised for simplicity.
|
||||
var/temp_obj_type = "[objective.type]"//Convert path into a text string.
|
||||
def_value = copytext(temp_obj_type, 19)//Convert last part of path into an objective keyword.
|
||||
if(!def_value)//If it's a custom objective, it will be an empty string.
|
||||
def_value = "custom"
|
||||
else
|
||||
//We're adding this objective
|
||||
if(href_list["target_antag"])
|
||||
var/datum/antagonist/X = locate(href_list["target_antag"]) in antag_datums
|
||||
if(X)
|
||||
@@ -447,7 +437,7 @@
|
||||
if(1)
|
||||
target_antag = antag_datums[1]
|
||||
else
|
||||
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", def_value) as null|anything in antag_datums + "(new custom antag)"
|
||||
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
|
||||
if (QDELETED(target))
|
||||
return
|
||||
else if(target == "(new custom antag)")
|
||||
@@ -455,149 +445,88 @@
|
||||
else
|
||||
target_antag = target
|
||||
|
||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "maroon", "debrain", "protect", "destroy", "prevent", "hijack", "escape", "survive", "martyr", "steal", "download", "nuclear", "capture", "absorb", "custom")
|
||||
if (!new_obj_type)
|
||||
var/static/list/choices
|
||||
if(!choices)
|
||||
choices = list()
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/datum/objective/assassinate,
|
||||
/datum/objective/maroon,
|
||||
/datum/objective/debrain,
|
||||
/datum/objective/protect,
|
||||
/datum/objective/destroy,
|
||||
/datum/objective/hijack,
|
||||
/datum/objective/escape,
|
||||
/datum/objective/survive,
|
||||
/datum/objective/martyr,
|
||||
/datum/objective/steal,
|
||||
/datum/objective/download,
|
||||
/datum/objective/nuclear,
|
||||
/datum/objective/capture,
|
||||
/datum/objective/absorb,
|
||||
/datum/objective/custom
|
||||
)
|
||||
|
||||
for(var/T in allowed_types)
|
||||
var/datum/objective/X = T
|
||||
choices[initial(X.name)] = T
|
||||
|
||||
if(old_objective)
|
||||
if(old_objective.name in choices)
|
||||
def_value = old_objective.name
|
||||
|
||||
var/selected_type = input("Select objective type:", "Objective type", def_value) as null|anything in choices
|
||||
selected_type = choices[selected_type]
|
||||
if (!selected_type)
|
||||
return
|
||||
|
||||
var/datum/objective/new_objective = null
|
||||
if(!old_objective)
|
||||
//Add new one
|
||||
new_objective = new selected_type
|
||||
new_objective.owner = src
|
||||
new_objective.admin_edit(usr)
|
||||
target_antag.objectives += new_objective
|
||||
|
||||
switch (new_obj_type)
|
||||
if ("assassinate","protect","debrain","maroon")
|
||||
var/list/possible_targets = list("Free objective")
|
||||
for(var/datum/mind/possible_target in SSticker.minds)
|
||||
if ((possible_target != src) && ishuman(possible_target.current))
|
||||
possible_targets += possible_target.current
|
||||
|
||||
var/mob/def_target = null
|
||||
var/list/objective_list = typecacheof(list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon))
|
||||
if (is_type_in_typecache(objective, objective_list) && objective.target)
|
||||
def_target = objective.target.current
|
||||
|
||||
var/mob/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
|
||||
if (!new_target)
|
||||
return
|
||||
|
||||
var/objective_path = text2path("/datum/objective/[new_obj_type]")
|
||||
if (new_target == "Free objective")
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective.target = null
|
||||
new_objective.explanation_text = "Free objective"
|
||||
else
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective.target = new_target.mind
|
||||
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
|
||||
new_objective.update_explanation_text()
|
||||
|
||||
if ("destroy")
|
||||
var/list/possible_targets = active_ais(1)
|
||||
if(possible_targets.len)
|
||||
var/mob/new_target = input("Select target:", "Objective target") as null|anything in possible_targets
|
||||
new_objective = new /datum/objective/destroy
|
||||
new_objective.target = new_target.mind
|
||||
new_objective.owner = src
|
||||
new_objective.update_explanation_text()
|
||||
else
|
||||
to_chat(usr, "No active AIs with minds")
|
||||
|
||||
if ("prevent")
|
||||
new_objective = new /datum/objective/block
|
||||
new_objective.owner = src
|
||||
|
||||
if ("hijack")
|
||||
new_objective = new /datum/objective/hijack
|
||||
new_objective.owner = src
|
||||
|
||||
if ("escape")
|
||||
new_objective = new /datum/objective/escape
|
||||
new_objective.owner = src
|
||||
|
||||
if ("survive")
|
||||
new_objective = new /datum/objective/survive
|
||||
new_objective.owner = src
|
||||
|
||||
if("martyr")
|
||||
new_objective = new /datum/objective/martyr
|
||||
new_objective.owner = src
|
||||
|
||||
if ("nuclear")
|
||||
new_objective = new /datum/objective/nuclear
|
||||
new_objective.owner = src
|
||||
|
||||
if ("steal")
|
||||
if (!istype(objective, /datum/objective/steal))
|
||||
new_objective = new /datum/objective/steal
|
||||
new_objective.owner = src
|
||||
else
|
||||
new_objective = objective
|
||||
var/datum/objective/steal/steal = new_objective
|
||||
if (!steal.select_target())
|
||||
return
|
||||
|
||||
if("download","capture","absorb")
|
||||
var/def_num
|
||||
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
|
||||
def_num = objective.target_amount
|
||||
|
||||
var/target_number = input("Input target number:", "Objective", def_num) as num | null
|
||||
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
|
||||
return
|
||||
|
||||
switch(new_obj_type)
|
||||
if("download")
|
||||
new_objective = new /datum/objective/download
|
||||
new_objective.explanation_text = "Download [target_number] research node\s."
|
||||
if("capture")
|
||||
new_objective = new /datum/objective/capture
|
||||
new_objective.explanation_text = "Capture [target_number] lifeforms with an energy net. Live, rare specimens are worth more."
|
||||
if("absorb")
|
||||
new_objective = new /datum/objective/absorb
|
||||
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
|
||||
new_objective.owner = src
|
||||
new_objective.target_amount = target_number
|
||||
|
||||
if ("custom")
|
||||
var/expl = stripped_input(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : "")
|
||||
if (!expl)
|
||||
return
|
||||
new_objective = new /datum/objective
|
||||
new_objective.owner = src
|
||||
new_objective.explanation_text = expl
|
||||
|
||||
if (!new_objective)
|
||||
return
|
||||
|
||||
if (objective)
|
||||
if(target_antag)
|
||||
target_antag.objectives -= objective
|
||||
objectives -= objective
|
||||
target_antag.objectives.Insert(objective_pos, new_objective)
|
||||
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
else
|
||||
if(target_antag)
|
||||
target_antag.objectives += new_objective
|
||||
objectives += new_objective
|
||||
message_admins("[key_name_admin(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
||||
else
|
||||
if(old_objective.type == selected_type)
|
||||
//Edit the old
|
||||
old_objective.admin_edit(usr)
|
||||
new_objective = old_objective
|
||||
else
|
||||
//Replace the old
|
||||
new_objective = new selected_type
|
||||
new_objective.owner = src
|
||||
new_objective.admin_edit(usr)
|
||||
target_antag.objectives -= old_objective
|
||||
target_antag.objectives.Insert(objective_pos, new_objective)
|
||||
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
|
||||
else if (href_list["obj_delete"])
|
||||
var/datum/objective/objective = locate(href_list["obj_delete"])
|
||||
if(!istype(objective))
|
||||
return
|
||||
var/datum/objective/objective
|
||||
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
if(objective in A.objectives)
|
||||
A.objectives -= objective
|
||||
objective = locate(href_list["obj_delete"]) in A.objectives
|
||||
if(istype(objective))
|
||||
break
|
||||
objectives -= objective
|
||||
if(!objective)
|
||||
to_chat(usr,"Invalid objective.")
|
||||
return
|
||||
//qdel(objective) Needs cleaning objective destroys
|
||||
message_admins("[key_name_admin(usr)] removed an objective for [current]: [objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] removed an objective for [current]: [objective.explanation_text]")
|
||||
|
||||
else if(href_list["obj_completed"])
|
||||
var/datum/objective/objective = locate(href_list["obj_completed"])
|
||||
if(!istype(objective))
|
||||
var/datum/objective/objective
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
objective = locate(href_list["obj_completed"]) in A.objectives
|
||||
if(istype(objective))
|
||||
objective = objective
|
||||
break
|
||||
if(!objective)
|
||||
to_chat(usr,"Invalid objective.")
|
||||
return
|
||||
objective.completed = !objective.completed
|
||||
log_admin("[key_name(usr)] toggled the win state for [current]'s objective: [objective.explanation_text]")
|
||||
@@ -652,10 +581,16 @@
|
||||
usr = current
|
||||
traitor_panel()
|
||||
|
||||
/datum/mind/proc/get_all_objectives()
|
||||
var/list/all_objectives = list()
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
all_objectives |= A.objectives
|
||||
return all_objectives
|
||||
|
||||
/datum/mind/proc/announce_objectives()
|
||||
var/obj_count = 1
|
||||
to_chat(current, "<span class='notice'>Your current objectives:</span>")
|
||||
for(var/objective in objectives)
|
||||
for(var/objective in get_all_objectives())
|
||||
var/datum/objective/O = objective
|
||||
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
|
||||
obj_count++
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
mood_change = -1
|
||||
|
||||
/datum/mood_event/broken_vow //Used for when mimes break their vow of silence
|
||||
description = "<span class='boldwarning'>I have brought shame upon my name, and betrayed my fellow mimes by breaking our sacred vow...</span>\n"
|
||||
mood_change = -8
|
||||
description = "<span class='boldwarning'>I have brought shame upon my name, and betrayed my fellow mimes by breaking our sacred vow...</span>\n"
|
||||
mood_change = -8
|
||||
|
||||
/datum/mood_event/on_fire
|
||||
description = "<span class='boldwarning'>I'M ON FIRE!!!</span>\n"
|
||||
@@ -55,14 +55,14 @@
|
||||
timeout = 2 MINUTES
|
||||
|
||||
/datum/mood_event/shameful_suicide //suicide_acts that return SHAME, like sord
|
||||
description = "<span class='boldwarning'>I can't even end it all!</span>\n"
|
||||
mood_change = -10
|
||||
timeout = 1 MINUTES
|
||||
description = "<span class='boldwarning'>I can't even end it all!</span>\n"
|
||||
mood_change = -10
|
||||
timeout = 1 MINUTES
|
||||
|
||||
/datum/mood_event/dismembered
|
||||
description = "<span class='boldwarning'>AHH! I WAS USING THAT LIMB!</span>\n"
|
||||
mood_change = -8
|
||||
timeout = 2400
|
||||
description = "<span class='boldwarning'>AHH! I WAS USING THAT LIMB!</span>\n"
|
||||
mood_change = -8
|
||||
timeout = 2400
|
||||
|
||||
/datum/mood_event/noshoes
|
||||
description = "<span class='warning'>I am a disgrace to comedy everywhere!</span>\n"
|
||||
@@ -92,20 +92,20 @@
|
||||
mood_change = 2
|
||||
|
||||
/datum/mood_event/brain_damage
|
||||
mood_change = -3
|
||||
mood_change = -3
|
||||
|
||||
/datum/mood_event/brain_damage/add_effects()
|
||||
var/damage_message = pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage")
|
||||
description = "<span class='warning'>Hurr durr... [damage_message]</span>\n"
|
||||
var/damage_message = pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage")
|
||||
description = "<span class='warning'>Hurr durr... [damage_message]</span>\n"
|
||||
|
||||
/datum/mood_event/hulk //Entire duration of having the hulk mutation
|
||||
description = "<span class='warning'>HULK SMASH!</span>\n"
|
||||
mood_change = -4
|
||||
description = "<span class='warning'>HULK SMASH!</span>\n"
|
||||
mood_change = -4
|
||||
|
||||
/datum/mood_event/epilepsy //Only when the mutation causes a seizure
|
||||
description = "<span class='warning'>I should have paid attention to the epilepsy warning.</span>\n"
|
||||
mood_change = -3
|
||||
timeout = 3000
|
||||
description = "<span class='warning'>I should have paid attention to the epilepsy warning.</span>\n"
|
||||
mood_change = -3
|
||||
timeout = 3000
|
||||
|
||||
/datum/mood_event/nyctophobia
|
||||
description = "<span class='warning'>It sure is dark around here...</span>\n"
|
||||
|
||||
@@ -80,12 +80,12 @@
|
||||
description = "<span class='nicegreen'>Heh...hehehe...hehe...</span>\n"
|
||||
mood_change = 4
|
||||
|
||||
/datum/mood_event/chemical_laughter
|
||||
/datum/mood_event/chemical_laughter
|
||||
description = "<span class='nicegreen'>Laughter really is the best medicine! Or is it?</span>\n"
|
||||
mood_change = 4
|
||||
timeout = 3 MINUTES
|
||||
|
||||
/datum/mood_event/chemical_superlaughter
|
||||
/datum/mood_event/chemical_superlaughter
|
||||
description = "<span class='nicegreen'>*WHEEZE*</span>\n"
|
||||
mood_change = 12
|
||||
timeout = 3 MINUTES
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
// And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var
|
||||
|
||||
// Helper similar to image()
|
||||
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE)
|
||||
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, color = "#FFFFFF")
|
||||
var/mutable_appearance/MA = new()
|
||||
MA.icon = icon
|
||||
MA.icon_state = icon_state
|
||||
MA.layer = layer
|
||||
MA.plane = plane
|
||||
MA.color = color
|
||||
return MA
|
||||
|
||||
@@ -30,7 +30,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
|
||||
. = on_losing(owner)
|
||||
|
||||
/datum/mutation/human/proc/set_se(se_string, on = 1)
|
||||
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
return
|
||||
var/before = copytext(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1)
|
||||
var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE)
|
||||
@@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
|
||||
owner.dna.struc_enzymes = set_se(owner.dna.struc_enzymes, on)
|
||||
|
||||
/datum/mutation/human/proc/check_block_string(se_string)
|
||||
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
return 0
|
||||
if(hex2num(getblock(se_string, dna_block)) >= lowest_value)
|
||||
return 1
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
place = cmaster_turf
|
||||
for(var/i in 1 to distance)
|
||||
place = get_step(place, dir)
|
||||
if(!place)
|
||||
break
|
||||
atoms += get_rad_contents(place)
|
||||
|
||||
return atoms
|
||||
@@ -108,7 +110,7 @@
|
||||
if(!can_contaminate || blacklisted[thing.type])
|
||||
continue
|
||||
if(prob(contamination_chance)) // Only stronk rads get to have little baby rads
|
||||
if(SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
|
||||
if(CHECK_BITFIELD(thing.rad_flags, RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
|
||||
continue
|
||||
var/rad_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT
|
||||
thing.AddComponent(/datum/component/radioactive, rad_strength, source)
|
||||
|
||||
@@ -163,6 +163,13 @@
|
||||
suffix = "lavaland_surface_xeno_nest.dmm"
|
||||
cost = 20 */
|
||||
|
||||
/datum/map_template/ruin/lavaland/alien_nest
|
||||
name = "Alien Nest"
|
||||
id = "alien-nest"
|
||||
description = "Not even Necropolis is safe from alien infestation. The competition for hosts has locked the legion and aliens in an endless conflict that can only be resolved by a PKA."
|
||||
suffix = "lavaland_surface_alien_nest.dmm"
|
||||
cost = 20
|
||||
|
||||
/datum/map_template/ruin/lavaland/fountain
|
||||
name = "Fountain Hall"
|
||||
id = "fountain"
|
||||
|
||||
@@ -282,6 +282,11 @@
|
||||
name = "Ancient Cloning Lab"
|
||||
description = "An experimental cloning lab snapped off from an ancient ship. The cloner model inside lacks many modern functionalities and security measures."
|
||||
|
||||
/datum/map_template/ruin/space/hilbertresearchfacility
|
||||
id = "hilbert_facility"
|
||||
suffix = "hilbertshoteltestingsite.dmm"
|
||||
name = "Hilbert Research Facility"
|
||||
description = "A research facility of great bluespace discoveries. Long since abandoned, willingly or not..."
|
||||
/datum/map_template/ruin/space/augmentation
|
||||
id = "augmentationfacility"
|
||||
suffix = "augmentationfacility.dmm"
|
||||
|
||||
+19
-8
@@ -177,8 +177,8 @@
|
||||
/datum/map_template/shuttle/emergency/airless
|
||||
suffix = "airless"
|
||||
name = "Build your own shuttle kit"
|
||||
description = "Save money by building your own shuttle! The chassis will dock upon purchase, but launch will have to be authorized as usual via shuttle call. Interior and atmosphere not included."
|
||||
admin_notes = "No brig, no medical facilities, no air."
|
||||
description = "Save money by building your own shuttle! The chassis will dock upon purchase, but launch will have to be authorized as usual via shuttle call. Interior and lighting not included."
|
||||
admin_notes = "No brig, no medical facilities, just an empty box."
|
||||
credit_cost = -7500
|
||||
|
||||
/datum/map_template/shuttle/emergency/airless/prerequisites_met()
|
||||
@@ -222,9 +222,9 @@
|
||||
/datum/map_template/shuttle/emergency/luxury
|
||||
suffix = "luxury"
|
||||
name = "Luxury Shuttle"
|
||||
description = "A luxurious golden shuttle complete with an indoor swimming pool. Each crewmember wishing to board must bring 500 credits, payable in cash and mineral coin."
|
||||
admin_notes = "Due to the limited space for non paying crew, this shuttle may cause a riot."
|
||||
credit_cost = 10000
|
||||
description = "A luxurious golden shuttle complete with an indoor swimming pool. Entry is free, so long as you can afford the initial cost."
|
||||
admin_notes = "Fancy, and very roomy!"
|
||||
credit_cost = 17500
|
||||
|
||||
/datum/map_template/shuttle/emergency/discoinferno
|
||||
suffix = "discoinferno"
|
||||
@@ -300,7 +300,7 @@
|
||||
suffix = "syndicate"
|
||||
name = "Syndicate GM Battlecruiser"
|
||||
credit_cost = 20000
|
||||
description = "Manufactured by the Gorlex Marauders, this cruiser has been specially designed with high occupancy in mind, while remaining robust in combat situations. Features a fully stocked EVA storage, armory, medbay, and bar!"
|
||||
description = "(Emag only) Manufactured by the Gorlex Marauders, this cruiser has been specially designed with high occupancy in mind, while remaining robust in combat situations. Features a fully stocked EVA storage, armory, medbay, and bar!"
|
||||
admin_notes = "An emag exclusive, stocked with syndicate equipment and turrets that will target any simplemob."
|
||||
|
||||
/datum/map_template/shuttle/emergency/syndicate/prerequisites_met()
|
||||
@@ -333,7 +333,7 @@
|
||||
/datum/map_template/shuttle/emergency/supermatter
|
||||
suffix = "supermatter"
|
||||
name = "Hyperfractal Gigashuttle"
|
||||
description = "\"I dunno, this seems kinda needlessly complicated.\"\n\
|
||||
description = "(Emag only) \"I dunno, this seems kinda needlessly complicated.\"\n\
|
||||
\"This shuttle has very a very high safety record, according to CentCom Officer Cadet Yins.\"\n\
|
||||
\"Are you sure?\"\n\
|
||||
\"Yes, it has a safety record of N-A-N, which is apparently larger than 100%.\""
|
||||
@@ -341,7 +341,12 @@
|
||||
Outside of admin intervention, it cannot explode. \
|
||||
It does, however, still dust anything on contact, emits high levels of radiation, and induce hallucinations in anyone looking at it without protective goggles. \
|
||||
Emitters spawn powered on, expect admin notices, they are harmless."
|
||||
credit_cost = 100000
|
||||
credit_cost = 15000
|
||||
|
||||
/datum/map_template/shuttle/emergency/supermatter/prerequisites_met()
|
||||
if("emagged" in SSshuttle.shuttle_purchase_requirements_met)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/map_template/shuttle/emergency/imfedupwiththisworld
|
||||
suffix = "imfedupwiththisworld"
|
||||
@@ -372,6 +377,12 @@
|
||||
description = "On the smaller size with a modern design, this shuttle is for the crew who like the cosier things, while still being able to stretch their legs."
|
||||
credit_cost = 1000
|
||||
|
||||
/datum/map_template/shuttle/emergency/gorilla
|
||||
suffix = "gorilla"
|
||||
name = "Gorilla Cargo Freighter"
|
||||
description = "A rustic, barely excuseable shuttle transporting important cargo. Not for crew who are about to go ape."
|
||||
credit_cost = 2000
|
||||
|
||||
/datum/map_template/shuttle/ferry/base
|
||||
suffix = "base"
|
||||
name = "transport ferry"
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
tick_interval = 4
|
||||
alert_type = /obj/screen/alert/status_effect/his_grace
|
||||
var/bloodlust = 0
|
||||
|
||||
|
||||
/obj/screen/alert/status_effect/his_grace
|
||||
name = "His Grace"
|
||||
desc = "His Grace hungers, and you must feed Him."
|
||||
@@ -356,7 +356,7 @@
|
||||
var/new_staminaloss = owner.getStaminaLoss()
|
||||
if(new_staminaloss < last_staminaloss)
|
||||
var/heal_amount = -5 // CIT CHANGE - makes blood drunk status effect not exhaust you
|
||||
owner.adjustStaminaLoss(heal_amount, updating_health = FALSE)
|
||||
owner.adjustStaminaLoss(heal_amount, FALSE)
|
||||
new_staminaloss = owner.getStaminaLoss()
|
||||
needs_health_update = TRUE
|
||||
last_staminaloss = new_staminaloss
|
||||
|
||||
@@ -80,6 +80,36 @@
|
||||
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
|
||||
icon_state = "asleep"
|
||||
|
||||
//TASER
|
||||
/datum/status_effect/electrode
|
||||
id = "tased"
|
||||
blocks_combatmode = TRUE
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/electrode/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
. = ..()
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
if(C.combatmode)
|
||||
C.toggle_combat_mode(TRUE)
|
||||
C.add_movespeed_modifier(MOVESPEED_ID_TASED_STATUS, TRUE, override = TRUE, multiplicative_slowdown = 8)
|
||||
|
||||
/datum/status_effect/electrode/on_remove()
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
C.remove_movespeed_modifier(MOVESPEED_ID_TASED_STATUS)
|
||||
. = ..()
|
||||
|
||||
/datum/status_effect/electrode/tick()
|
||||
if(owner)
|
||||
owner.adjustStaminaLoss(5) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing.
|
||||
|
||||
/datum/status_effect/electrode/nextmove_modifier() //why is this a proc. its no big deal since this doesnt get called often at all but literally w h y
|
||||
return 2
|
||||
|
||||
//OTHER DEBUFFS
|
||||
/datum/status_effect/his_wrath //does minor damage over time unless holding His Grace
|
||||
id = "his_wrath"
|
||||
@@ -125,7 +155,7 @@
|
||||
|
||||
/datum/status_effect/belligerent/proc/do_movement_toggle(force_damage)
|
||||
var/number_legs = owner.get_num_legs(FALSE)
|
||||
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check() && number_legs)
|
||||
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check(chargecost = 0) && number_legs)
|
||||
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
|
||||
if(GLOB.ratvar_awakens)
|
||||
owner.Knockdown(20)
|
||||
@@ -218,7 +248,7 @@
|
||||
if(owner.confused)
|
||||
owner.confused = 0
|
||||
severity = 0
|
||||
else if(!owner.anti_magic_check() && owner.stat != DEAD && severity)
|
||||
else if(!owner.anti_magic_check(chargecost = 0) && owner.stat != DEAD && severity)
|
||||
var/static/hum = get_sfx('sound/effects/screech.ogg') //same sound for every proc call
|
||||
if(owner.getToxLoss() > MANIA_DAMAGE_TO_CONVERT)
|
||||
if(is_eligible_servant(owner))
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
alert_type = /obj/screen/alert/status_effect/freon
|
||||
var/icon/cube
|
||||
var/can_melt = TRUE
|
||||
var/datum/weakref/redirect_component
|
||||
|
||||
/obj/screen/alert/status_effect/freon
|
||||
name = "Frozen Solid"
|
||||
@@ -13,7 +12,7 @@
|
||||
icon_state = "frozen"
|
||||
|
||||
/datum/status_effect/freon/on_apply()
|
||||
redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/owner_resist))))
|
||||
RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist)
|
||||
if(!owner.stat)
|
||||
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
|
||||
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
||||
@@ -40,8 +39,7 @@
|
||||
owner.cut_overlay(cube)
|
||||
owner.adjust_bodytemperature(100)
|
||||
owner.update_canmove()
|
||||
qdel(redirect_component.resolve())
|
||||
redirect_component = null
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
|
||||
/datum/status_effect/freon/watcher
|
||||
duration = 8
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
|
||||
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
|
||||
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
|
||||
var/blocks_combatmode //Does this status effect prevent the user from toggling combat mode?
|
||||
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
|
||||
|
||||
/datum/status_effect/New(list/arguments)
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
mood_quirk = TRUE
|
||||
|
||||
/datum/quirk/apathetic/add()
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
|
||||
var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood)
|
||||
if(mood)
|
||||
mood.mood_modifier = 0.8
|
||||
|
||||
/datum/quirk/apathetic/remove()
|
||||
if(quirk_holder)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
|
||||
var/datum/component/mood/mood = quirk_holder.GetComponent(/datum/component/mood)
|
||||
if(mood)
|
||||
mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers.
|
||||
|
||||
|
||||
@@ -94,6 +94,50 @@
|
||||
lose_text = "<span class='notice'>You don't feel as prudish as before.</span>"
|
||||
medical_record_text = "Patient exhibits a special gene that makes them immune to Crocin and Hexacrocin."
|
||||
|
||||
/datum/quirk/libido
|
||||
name = "Nymphomania"
|
||||
desc = "You're always feeling a bit in heat. Also, you get aroused faster than usual."
|
||||
value = 0
|
||||
mob_trait = TRAIT_NYMPHO
|
||||
gain_text = "<span class='notice'>You are feeling extra wild.</span>"
|
||||
lose_text = "<span class='notice'>You don't feel that burning sensation anymore.</span>"
|
||||
|
||||
/datum/quirk/libido/add()
|
||||
quirk_holder.min_arousal = 16
|
||||
quirk_holder.arousal_rate = 3
|
||||
|
||||
/datum/quirk/libido/remove()
|
||||
if(quirk_holder)
|
||||
quirk_holder.min_arousal = initial(quirk_holder.min_arousal)
|
||||
quirk_holder.arousal_rate = initial(quirk_holder.arousal_rate)
|
||||
|
||||
/datum/quirk/maso
|
||||
name = "Masochism"
|
||||
desc = "You are aroused by pain."
|
||||
value = 0
|
||||
mob_trait = TRAIT_MASO
|
||||
gain_text = "<span class='notice'>You desire to be hurt.</span>"
|
||||
lose_text = "<span class='notice'>Pain has become less exciting for you.</span>"
|
||||
|
||||
/datum/quirk/exhibitionism
|
||||
name = "Exhibitionism"
|
||||
desc = "You don't mind showing off your bare body to strangers, in fact you find it quite satistying."
|
||||
value = 0
|
||||
medical_record_text = "Patient has been diagnosed with exhibitionistic disorder."
|
||||
mob_trait = TRAIT_EXHIBITIONIST
|
||||
gain_text = "<span class='notice'>You feel like exposing yourself to the world.</span>"
|
||||
lose_text = "<span class='notice'>Indecent exposure doesn't sound as charming to you anymore.</span>"
|
||||
|
||||
/datum/quirk/pharmacokinesis //Prevents unwanted organ additions.
|
||||
name = "Acute hepatic pharmacokinesis"
|
||||
desc = "You've a rare genetic disorder that causes Incubus draft and Sucubus milk to be absorbed by your liver instead."
|
||||
value = 0
|
||||
mob_trait = TRAIT_PHARMA
|
||||
lose_text = "<span class='notice'>Your liver feels different.</span>"
|
||||
var/active = FALSE
|
||||
var/power = 0
|
||||
var/cachedmoveCalc = 1
|
||||
|
||||
/datum/quirk/assblastusa
|
||||
name = "Buns of Steel"
|
||||
desc = "You've never skipped ass day. With this trait, you are completely immune to all forms of ass slapping and anyone who tries to slap your rock hard ass usually gets a broken hand."
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
//do things for each entry in Generate_list
|
||||
//return value sets Generate_list[verbpath]
|
||||
/datum/verbs/proc/HandleVerb(list/entry, atom/verb/verbpath, ...)
|
||||
/datum/verbs/proc/HandleVerb(list/entry, procpath/verbpath, ...)
|
||||
return entry
|
||||
|
||||
/datum/verbs/New()
|
||||
@@ -82,7 +82,7 @@
|
||||
. += childlist
|
||||
|
||||
for (var/thing in verblist)
|
||||
var/atom/verb/verbpath = thing
|
||||
var/procpath/verbpath = thing
|
||||
if (!verbpath)
|
||||
stack_trace("Bad VERB in [type] verblist: [english_list(verblist)]")
|
||||
var/list/entry = list()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
return TRUE
|
||||
if(ishuman(L)) //Are you immune?
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/thermal_protection = H.get_thermal_protection()
|
||||
var/thermal_protection = H.easy_thermal_protection()
|
||||
if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT)
|
||||
return TRUE
|
||||
if(isliving(L))// if we're a non immune mob inside an immune mob we have to reconsider if that mob is immune to protect ourselves
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
area_type = /area
|
||||
protected_areas = list(/area/maintenance, /area/ai_monitored/turret_protected/ai_upload, /area/ai_monitored/turret_protected/ai_upload_foyer,
|
||||
/area/ai_monitored/turret_protected/ai, /area/storage/emergency/starboard, /area/storage/emergency/port, /area/shuttle)
|
||||
/area/ai_monitored/turret_protected/ai, /area/storage/emergency/starboard, /area/storage/emergency/port, /area/shuttle, /area/security/prison)
|
||||
target_trait = ZTRAIT_STATION
|
||||
|
||||
immunity_type = "rad"
|
||||
|
||||
@@ -1,10 +1,35 @@
|
||||
/datum/wires/airlock
|
||||
holder_type = /obj/machinery/door/airlock
|
||||
proper_name = "Airlock"
|
||||
proper_name = "Generic Airlock"
|
||||
var/wiretype
|
||||
|
||||
/datum/wires/airlock/secure
|
||||
randomize = TRUE
|
||||
|
||||
/datum/wires/airlock/command
|
||||
proper_name = "Command Airlock"
|
||||
wiretype = "commandairlock"
|
||||
|
||||
/datum/wires/airlock/security
|
||||
proper_name = "Security Airlock"
|
||||
wiretype = "securityairlock"
|
||||
|
||||
/datum/wires/airlock/engineering
|
||||
proper_name = "Engineering Airlock"
|
||||
wiretype = "engineeringairlock"
|
||||
|
||||
/datum/wires/airlock/science
|
||||
proper_name = "Science Airlock"
|
||||
wiretype = "scienceairlock"
|
||||
|
||||
/datum/wires/airlock/medical
|
||||
proper_name = "Medical Airlock"
|
||||
wiretype = "medicalairlock"
|
||||
|
||||
/datum/wires/airlock/cargo
|
||||
proper_name = "Cargo Airlock"
|
||||
wiretype = "cargoairlock"
|
||||
|
||||
/datum/wires/airlock/New(atom/holder)
|
||||
wires = list(
|
||||
WIRE_POWER1, WIRE_POWER2,
|
||||
@@ -14,7 +39,16 @@
|
||||
WIRE_ZAP1, WIRE_ZAP2
|
||||
)
|
||||
add_duds(2)
|
||||
..()
|
||||
. = ..()
|
||||
if(randomize || !wiretype)
|
||||
return
|
||||
if(!GLOB.wire_color_directory[wiretype])
|
||||
colors = list()
|
||||
randomize()
|
||||
GLOB.wire_color_directory[wiretype] = colors
|
||||
GLOB.wire_name_directory[wiretype] = proper_name
|
||||
else
|
||||
colors = GLOB.wire_color_directory[wiretype]
|
||||
|
||||
/datum/wires/airlock/interactable(mob/user)
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
|
||||
Reference in New Issue
Block a user