Merge branch 'master' into baton_change_pr

This commit is contained in:
necromanceranne
2021-04-19 10:55:33 +10:00
committed by GitHub
585 changed files with 314429 additions and 310193 deletions
@@ -243,6 +243,17 @@
icon_state = "shieldsparkles"
duration = 5
/obj/effect/temp_visual/voidpush
name = "eldritch energy"
icon_state = "emark4"
duration = 5
/obj/effect/temp_visual/voidswap
name = "altered space"
icon = 'icons/mob/mob.dmi'
icon_state = "voidalter"
duration = 5
/obj/effect/temp_visual/telekinesis
name = "telekinetic force"
icon_state = "empdisable"
+8 -6
View File
@@ -375,12 +375,14 @@ GLOBAL_LIST_INIT(fluid_duct_recipes, list(
. = TRUE
if((mode & DESTROY_MODE) && istype(A, /obj/item/pipe) || istype(A, /obj/structure/disposalconstruct) || istype(A, /obj/structure/c_transit_tube) || istype(A, /obj/structure/c_transit_tube_pod) || istype(A, /obj/item/pipe_meter))
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, destroy_speed, target = A))
activate()
qdel(A)
return
var/obj/item/pipe/P = A
if(!istype(P) || P.disposable)
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, destroy_speed, target = A))
activate()
qdel(A)
return
if((mode & PAINT_MODE))
if(istype(A, /obj/machinery/atmospherics/pipe) && !istype(A, /obj/machinery/atmospherics/pipe/layer_manifold))
-92
View File
@@ -1,92 +0,0 @@
/* BALLS - GLORIOUS BALLS
//
// Includes:-
// 1) Tennis balls, lines 10 - 92
//
//
//
*/
/obj/item/toy/tennis
name = "tennis ball"
desc = "A classical tennis ball. It appears to have faint bite marks scattered all over its surface."
icon = 'modular_citadel/icons/obj/balls.dmi'
icon_state = "tennis_classic"
lefthand_file = 'modular_citadel/icons/mob/inhands/balls_left.dmi'
righthand_file = 'modular_citadel/icons/mob/inhands/balls_right.dmi'
item_state = "tennis_classic"
mob_overlay_icon = 'modular_citadel/icons/mob/mouthball.dmi'
slot_flags = ITEM_SLOT_HEAD | ITEM_SLOT_NECK | ITEM_SLOT_EARS //Fluff item, put it wherever you want!
throw_range = 14
w_class = WEIGHT_CLASS_SMALL
/obj/item/toy/tennis/alt_pre_attack(atom/A, mob/living/user, params) //checks if it can do right click memes
altafterattack(A, user, TRUE, params)
return TRUE
/obj/item/toy/tennis/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes
if(istype(user))
user.visible_message("<span class='notice'>[user] waggles [src] at [target].</span>", "<span class='notice'>You waggle [src] at [target].</span>")
return TRUE
/obj/item/toy/tennis/rainbow
name = "pseudo-euclidean interdimensional tennis sphere"
desc = "A tennis ball from another plane of existance. Really groovy."
icon_state = "tennis_rainbow"
item_state = "tennis_rainbow"
actions_types = list(/datum/action/item_action/squeeze) //Giving the masses easy access to unilimted honks would be annoying
/obj/item/toy/tennis/rainbow/Initialize()
. = ..()
AddComponent(/datum/component/squeak)
/obj/item/toy/tennis/rainbow/izzy //izzyinbox's donator item
name = "Katlin's Ball"
desc = "A tennis ball that's seen a good bit of love, being covered in a few black and white hairs and slobber."
icon_state = "tennis_izzy"
item_state = "tennis_izzy"
/obj/item/toy/tennis/red //da red wuns go fasta
name = "red tennis ball"
desc = "A red tennis ball. It goes three times faster!"
icon_state = "tennis_red"
item_state = "tennis_red"
throw_speed = 9
/obj/item/toy/tennis/yellow //because yellow is hot I guess
name = "yellow tennis ball"
desc = "A yellow tennis ball. It seems to have a flame-retardant coating."
icon_state = "tennis_yellow"
item_state = "tennis_yellow"
resistance_flags = FIRE_PROOF
/obj/item/toy/tennis/green //pestilence
name = "green tennis ball"
desc = "A green tennis ball. It seems to have an impermeable coating."
icon_state = "tennis_green"
item_state = "tennis_green"
permeability_coefficient = 0.9
/obj/item/toy/tennis/cyan //electric
name = "cyan tennis ball"
desc = "A cyan tennis ball. It seems to have odd electrical properties."
icon_state = "tennis_cyan"
item_state = "tennis_cyan"
siemens_coefficient = 0.9
/obj/item/toy/tennis/blue //reliability
name = "blue tennis ball"
desc = "A blue tennis ball. It seems ever so slightly more robust than normal."
icon_state = "tennis_blue"
item_state = "tennis_blue"
max_integrity = 300
/obj/item/toy/tennis/purple //because purple dyes have high pH and would neutralize acids I guess
name = "purple tennis ball"
desc = "A purple tennis ball. It seems to have an acid-resistant coating."
icon_state = "tennis_purple"
item_state = "tennis_purple"
resistance_flags = ACID_PROOF
/datum/action/item_action/squeeze
name = "Squeak!"
+3
View File
@@ -16,6 +16,9 @@
if(isopenturf(target))
deploy_bodybag(user, target)
/obj/item/bodybag/canReachInto(atom/user, atom/target, list/next, view_only, obj/item/tool)
return (user in src)
/obj/item/bodybag/proc/deploy_bodybag(mob/user, atom/location)
var/obj/structure/closet/body_bag/R = new unfoldedbag_path(location)
R.open(user)
@@ -549,6 +549,7 @@
contraband = TRUE
obj_flags |= EMAGGED
to_chat(user, "<span class='notice'>You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.</span>")
return TRUE
/obj/item/circuitboard/computer/cargo/configure_machine(obj/machinery/computer/cargo/machine)
if(!istype(machine))
@@ -565,10 +566,12 @@
build_path = /obj/machinery/computer/cargo/express
/obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user)
. = ..()
if(!(obj_flags & EMAGGED))
contraband = TRUE
obj_flags |= EMAGGED
to_chat(user, "<span class='notice'>You change the routing protocols, allowing the Drop Pod to land anywhere on the station.</span>")
return TRUE
/obj/item/circuitboard/computer/cargo/express/multitool_act(mob/living/user)
if (!(obj_flags & EMAGGED))
@@ -472,7 +472,7 @@
build_path = /obj/machinery/holopad
secure = FALSE
else
build_path = /obj/machinery/holopad //secure
build_path = /obj/machinery/holopad/secure //secure
secure = TRUE
to_chat(user, "<span class='notice'>You [secure? "en" : "dis"]able the security on the [src]</span>")
. = ..()
@@ -609,6 +609,7 @@
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
/obj/machinery/vending/games = "\improper Good Clean Fun",
/obj/machinery/vending/kink = "KinkMate",
/obj/machinery/vending/barkbox = "Bark Box",
/obj/machinery/vending/autodrobe = "AutoDrobe",
/obj/machinery/vending/wardrobe/sec_wardrobe = "SecDrobe",
/obj/machinery/vending/wardrobe/det_wardrobe = "DetDrobe",
+1 -1
View File
@@ -443,7 +443,7 @@
// Check area validity.
// Reject space, player-created areas, and non-station z-levels.
var/area/A = get_base_area(target)
if(!A || (!is_station_level(A.z)) || !A.valid_territory)
if(!A || (!is_station_level(A.z)) || !(A.area_flags & VALID_TERRITORY))
to_chat(user, "<span class='warning'>[A] is unsuitable for tagging.</span>")
return FALSE
@@ -69,8 +69,7 @@ effective or pretty fucking useless.
*/
/obj/item/healthanalyzer/rad_laser
custom_materials = list(/datum/material/iron=400)
var/irradiate = 1
var/irradiate = TRUE
var/intensity = 10 // how much damage the radiation does
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
var/used = 0 // is it cooling down?
@@ -92,16 +91,16 @@ effective or pretty fucking useless.
addtimer(VARSET_CALLBACK(src, used, FALSE), cooldown)
addtimer(VARSET_CALLBACK(src, icon_state, "health"), cooldown)
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
addtimer(CALLBACK(src, .proc/radiation_aftereffect, M), (wavelength+(intensity*4))*5)
addtimer(CALLBACK(src, .proc/radiation_aftereffect, M, intensity), (wavelength+(intensity*4))*5)
else
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
/obj/item/healthanalyzer/rad_laser/proc/radiation_aftereffect(mob/living/M)
if(QDELETED(M))
/obj/item/healthanalyzer/rad_laser/proc/radiation_aftereffect(mob/living/M, passed_intensity)
if(QDELETED(M) || !ishuman(M) || HAS_TRAIT(M, TRAIT_RADIMMUNE))
return
if(intensity >= 5)
M.apply_effect(round(intensity/0.075), EFFECT_UNCONSCIOUS)
M.rad_act(intensity*10)
if(passed_intensity >= 5)
M.apply_effect(round(passed_intensity/0.075), EFFECT_UNCONSCIOUS) //to save you some math, this is a round(intensity * (4/3)) second long knockout
M.rad_act(passed_intensity*10)
/obj/item/healthanalyzer/rad_laser/proc/get_cooldown()
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
+2 -4
View File
@@ -210,8 +210,7 @@
target.apply_effect(EFFECT_STUTTER, stunforce)
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
if(user)
target.lastattacker = user.real_name
target.lastattackerckey = user.ckey
target.set_last_attacker(user)
target.visible_message("<span class='danger'>[user] has shocked [target] with [src]!</span>", \
"<span class='userdanger'>[user] has shocked you with [src]!</span>")
log_combat(user, target, "stunned with an electrostaff")
@@ -237,8 +236,7 @@
target.adjustFireLoss(lethal_force) //good against ointment spam
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
if(user)
target.lastattacker = user.real_name
target.lastattackerckey = user.ckey
target.set_last_attacker(user)
target.visible_message("<span class='danger'>[user] has seared [target] with [src]!</span>", \
"<span class='userdanger'>[user] has seared you with [src]!</span>")
log_combat(user, target, "burned with an electrostaff")
+160
View File
@@ -0,0 +1,160 @@
/* Balls, Bones, and Bountiful Fun
//
// Includes:-
// 1) Fluff Content, lines 12 - 131
//
// 1) Tennis balls, lines 39 - 99
// 2) Chew bones, lines 101 - 138
// 3) Frisbee, lines 140 - 166
*/
/obj/item/toy/fluff
name = "Fluff Item"
desc = "You shouldn't be seeing this."
icon = 'icons/obj/barkbox_fluff.dmi'
icon_state = "poly_tennis"
item_state = "poly_tennis"
lefthand_file = 'icons/mob/inhands/fluff_lefthand.dmi'
righthand_file = 'icons/mob/inhands/fluff_righthand.dmi'
mob_overlay_icon = 'icons/mob/mouthfluff.dmi'
slot_flags = ITEM_SLOT_HEAD | ITEM_SLOT_NECK | ITEM_SLOT_EARS
var/poly_states = 0
var/poly_colors = list()
/obj/item/toy/fluff/alt_pre_attack(atom/A, mob/living/user, params) //checks if it can do right click memes
altafterattack(A, user, TRUE, params)
return TRUE
/obj/item/toy/fluff/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes
if(istype(user))
user.visible_message("<span class='notice'>[user] waggles [src] at [target].</span>", "<span class='notice'>You waggle [src] at [target].</span>")
return TRUE
/obj/item/toy/fluff/ComponentInitialize()
. = ..()
if(!poly_states)
return
AddElement(/datum/element/polychromic, poly_colors, poly_states, _flags = POLYCHROMIC_ACTION)
/obj/item/toy/fluff/tennis_poly
name = "polychromic tennis ball"
desc = "A polychromic tennis ball. There's a half torn tag read: WARNIN-, surely it means nothing. Right?"
throw_range = 14
w_class = WEIGHT_CLASS_SMALL
poly_states = 2
poly_colors = list("#CCFF00", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/red
poly_colors = list("#FF4C00", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/yellow
poly_colors = list("#FFCC00", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/green
poly_colors = list("#99FF00", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/cyan
poly_colors = list("#00FFB2", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/blue
poly_colors = list("#007FFF", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/purple
poly_colors = list("#CC00FF", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/tri
name = "tricolor-polychromic tennis ball"
desc = "A tricolor-polychromic tennis ball. Triple the shocking!"
icon_state = "tripoly_tennis"
item_state = "tripoly_tennis"
poly_states = 3
poly_colors = list("#FFFFFF", "#FFFFFF", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/tri/squeak
name = "tricolor-polychromic tennis sphere"
desc = "A tricolor-polychromic tennis ball. This one seems to emit a squeak when squeezed."
actions_types = list(/datum/action/item_action/squeeze)
/obj/item/toy/fluff/tennis_poly/tri/squeak/izzy //izzyinbox's donator item
name = "Katlin's Ball"
desc = "A tennis ball that's seen a good bit of love, being covered in a few black and white hairs and slobber."
poly_colors = list("#8FED56", "#51cfde", "#FFFFFF")
/obj/item/toy/fluff/tennis_poly/tri/squeak/rainbow
name = "pseudo-euclidean interdimensional tennis sphere"
desc = "A tennis ball from another plane of existance. Really groovy."
icon_state = "tennis_rainbow"
item_state = "tennis_rainbow"
poly_states = 0
actions_types = list(/datum/action/item_action/squeeze)
/obj/item/toy/fluff/tennis_poly/tri/squeak/Initialize()
. = ..()
AddComponent(/datum/component/squeak)
/obj/item/toy/fluff/bone_poly
name = "polychromic bone"
desc = "A polychromic chew bone. Nothing like a good bone to chew on."
icon_state = "poly_bone"
item_state = "poly_bone"
throw_range = 7
w_class = WEIGHT_CLASS_SMALL
poly_states = 1
poly_colors = list("#FFFFFF")
/obj/item/toy/fluff/bone_poly/red
poly_colors = list("#FF4C00")
/obj/item/toy/fluff/bone_poly/yellow
poly_colors = list("#FFCC00")
/obj/item/toy/fluff/bone_poly/green
poly_colors = list("#99FF00")
/obj/item/toy/fluff/bone_poly/cyan
poly_colors = list("#00FFB2")
/obj/item/toy/fluff/bone_poly/blue
poly_colors = list("#007FFF")
/obj/item/toy/fluff/bone_poly/purple
poly_colors = list("#CC00FF")
/obj/item/toy/fluff/bone_poly/squeak
name = "polychromic bone"
desc = "A polychromic chew bone. Makes a small squeak when squeezed."
/obj/item/toy/fluff/bone_poly/squeak/Initialize()
. = ..()
AddComponent(/datum/component/squeak)
/datum/action/item_action/squeeze
name = "Squeak!"
/obj/item/toy/fluff/frisbee_poly
name = "polychromic frisbee"
desc = "A polychromic frisbee. Warning: May induce shock."
icon_state = "poly_frisbee"
item_state = "poly_frisbee"
throw_range = 14
w_class = WEIGHT_CLASS_NORMAL
poly_states = 2
poly_colors = list("#CCFF00", "#FFFFFF")
/obj/item/toy/fluff/frisbee_poly/red
poly_colors = list("#FF4C00", "#FFFFFF")
/obj/item/toy/fluff/frisbee_poly/yellow
poly_colors = list("#FFCC00", "#FFFFFF")
/obj/item/toy/fluff/frisbee_poly/green
poly_colors = list("#99FF00", "#FFFFFF")
/obj/item/toy/fluff/frisbee_poly/cyan
poly_colors = list("#00FFB2", "#FFFFFF")
/obj/item/toy/fluff/frisbee_poly/blue
poly_colors = list("#007FFF", "#FFFFFF")
/obj/item/toy/fluff/frisbee_poly/purple
poly_colors = list("#CC00FF", "#FFFFFF")
+1 -1
View File
@@ -312,7 +312,7 @@
trap_damage = 0
item_flags = DROPDEL
flags_1 = NONE
breakouttime = 50
breakouttime = 25
/obj/item/restraints/legcuffs/beartrap/energy/New()
..()
@@ -0,0 +1,74 @@
/datum/deathrattle_group
var/name
var/list/datum/weakref/implant_refs = list()
/datum/deathrattle_group/New()
// Give the group a unique name for debugging, and possible future
// use for making custom linked groups.
name = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
/datum/deathrattle_group/proc/rattle(obj/item/implant/deathrattle/origin, mob/living/owner)
var/name = owner.mind ? owner.mind.name : owner.real_name
var/area = get_area_name(get_turf(owner))
for(var/r in implant_refs)
var/datum/weakref/R = r
var/obj/item/implant/deathrattle/implant = R.resolve()
if(!implant || implant == origin)
continue
// Not all the implants may be actually implanted in people.
if(!implant.imp_in)
continue
// Deliberately the same message framing as nanite message + ghost deathrattle
var/mob/living/recipient = implant.imp_in
to_chat(recipient, "<i>You hear a strange, robotic voice in your head...</i> \"<span class='robot'><b>[name]</b> has died at <b>[area]</b>.</span>\"")
SEND_SOUND(recipient, pick(
'sound/items/knell1.ogg',
'sound/items/knell2.ogg',
'sound/items/knell3.ogg',
'sound/items/knell4.ogg',
))
/datum/deathrattle_group/proc/register(obj/item/implant/deathrattle/implant)
implant.group = src
implant_refs += WEAKREF(implant)
/obj/item/implant/deathrattle
name = "deathrattle implant"
desc = "Hope no one else dies, prepare for when they do."
activated = FALSE
var/datum/deathrattle_group/group = null
/obj/item/implant/deathrattle/Destroy()
group = null
return ..()
/obj/item/implant/deathrattle/can_be_implanted_in(mob/living/target)
// Can be implanted in anything that's a mob. Syndicate cyborgs, talking fish, humans...
return TRUE
/obj/item/implant/deathrattle/proc/on_predeath(datum/source, gibbed)
SIGNAL_HANDLER
if(group)
group.rattle(origin = src, owner = source)
/obj/item/implant/deathrattle/implant(mob/living/target, mob/user, silent = FALSE, force = FALSE)
. = ..()
if(.)
RegisterSignal(target, COMSIG_LIVING_PREDEATH, .proc/on_predeath)
if(!group)
to_chat(target, "<i>You hear a strange, robotic voice in your head...</i> \"<span class='robot'>Warning: No other linked implants detected.</span>\"")
/obj/item/implantcase/deathrattle
name = "implant case - 'Deathrattle'"
desc = "A glass case containing a deathrattle implant."
imp_type = /obj/item/implant/deathrattle
@@ -139,14 +139,25 @@
name = "health implant"
activated = 0
var/healthstring = ""
var/list/raw_data = list()
/obj/item/implant/health/proc/sensehealth()
/obj/item/implant/health/proc/sensehealth(get_list = FALSE)
if (!imp_in)
return "ERROR"
else
if(isliving(imp_in))
var/mob/living/L = imp_in
healthstring = "<small>Oxygen Deprivation Damage => [round(L.getOxyLoss())]<br />Fire Damage => [round(L.getFireLoss())]<br />Toxin Damage => [round(L.getToxLoss())]<br />Brute Force Damage => [round(L.getBruteLoss())]</small>"
if (!healthstring)
raw_data = list() //Reset list
raw_data["oxy"] = list("[round(L.getOxyLoss())]") //Suffocation
raw_data["burn"] = list("[round(L.getFireLoss())]") //Burn
raw_data["tox"] = list("[round(L.getToxLoss())]") //Tox
raw_data["brute"] = list("[round(L.getBruteLoss())]") //Brute
if(!healthstring) //I have no idea who made it go this order but okay.
healthstring = "ERROR"
return healthstring
if(!length(raw_data))
raw_data = list("ERROR")
if(!get_list)
return healthstring
else
return raw_data
+12
View File
@@ -271,11 +271,14 @@
var/force_on // Damage when on - not stunning
var/force_off // Damage when off - not stunning
var/weight_class_on // What is the new size class when turned on
var/sword_point = TRUE
wound_bonus = 15
/obj/item/melee/classic_baton/Initialize()
. = ..()
if(sword_point)
AddElement(/datum/element/sword_point)
// Description for trying to stun when still on cooldown.
/obj/item/melee/classic_baton/proc/get_wait_description()
@@ -402,6 +405,8 @@
weight_class_on = WEIGHT_CLASS_BULKY
total_mass = TOTAL_MASS_NORMAL_ITEM
bare_wound_bonus = 5
sword_point = FALSE
var/silent = FALSE
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
var/mob/living/carbon/human/H = user
@@ -431,6 +436,9 @@
w_class = weight_class_on
force = force_on
attack_verb = list("smacked", "struck", "cracked", "beaten")
AddElement(/datum/element/sword_point)
if(!silent)
user?.visible_message("<span class='warning'>[user] extends [src] with a flick of their wrist!</span>")
else
to_chat(user, desc["local_off"])
icon_state = off_icon_state
@@ -439,6 +447,9 @@
w_class = WEIGHT_CLASS_SMALL
force = force_off
attack_verb = list("hit", "poked")
RemoveElement(/datum/element/sword_point)
if(!silent)
user?.visible_message("<span class='warning'>[user] collapses [src] back down!</span>")
playsound(src.loc, on_sound, 50, 1)
add_fingerprint(user)
@@ -465,6 +476,7 @@
force_on = 16
force_off = 5
weight_class_on = WEIGHT_CLASS_NORMAL
silent = TRUE
/obj/item/melee/classic_baton/telescopic/contractor_baton/get_wait_description()
return "<span class='danger'>The baton is still charging!</span>"
+11
View File
@@ -332,6 +332,7 @@
to_chat(occupant, "You pop out of the [src], slightly dazed!")
occupant.Stun(5 SECONDS)
/obj/item/pet_carrier/bluespace/return_air()
if(!occupant_gas_supply)
occupant_gas_supply = new
@@ -353,4 +354,14 @@
if(..())
name = "[initial(name)] ([target])"
/obj/item/pet_carrier/bluespace/single_use
desc = "A jar, that seems to be bigger on the inside, somehow allowing lifeforms to fit through its narrow entrance. This one looks exceptionally fragile."
/obj/item/pet_carrier/bluespace/single_use/remove_occupant(mob/living/occupant)
. = ..()
if(!QDELETED(src))
playsound(src, "shatter", 70, 1)
qdel(src)
#undef pet_carrier_full
+138 -22
View File
@@ -174,6 +174,10 @@
var/atom/movable/AM = object
if(CHECK_BITFIELD(shield_flags, SHIELD_TRANSPARENT) && (AM.pass_flags & PASSGLASS))
return BLOCK_NONE
if(CHECK_BITFIELD(shield_flags, SHIELD_NO_RANGED) && (attack_type & ATTACK_TYPE_PROJECTILE))
return BLOCK_NONE
if(CHECK_BITFIELD(shield_flags, SHIELD_NO_MELEE) && (attack_type & ATTACK_TYPE_MELEE))
return BLOCK_NONE
if(attack_type & ATTACK_TYPE_THROWN)
final_block_chance += 30
if(attack_type & ATTACK_TYPE_TACKLE)
@@ -238,30 +242,75 @@
new /obj/item/shard((get_turf(src)))
/obj/item/shield/riot/on_shield_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
var/final_damage = damage
if(attack_type & ATTACK_TYPE_MELEE)
var/obj/hittingthing = object
if(hittingthing.damtype == BURN)
if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == BRUTE)
if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(hittingthing.damtype == STAMINA || hittingthing.damtype == TOX || hittingthing.damtype == CLONE || hittingthing.damtype == BRAIN || hittingthing.damtype == OXY)
final_damage = 0
if(attack_type & ATTACK_TYPE_PROJECTILE)
var/obj/item/projectile/shootingthing = object
if(is_energy_reflectable_projectile(shootingthing))
if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_ENERGY_STRONG))
final_damage *= 0.5
if(!is_energy_reflectable_projectile(object))
if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_WEAK))
final_damage *= 2
else if(CHECK_BITFIELD(shield_flags, SHIELD_KINETIC_STRONG))
final_damage *= 0.5
if(shootingthing.damage_type == STAMINA)
if(CHECK_BITFIELD(shield_flags, SHIELD_DISABLER_DISRUPTED))
final_damage *= 3 //disablers melt these kinds of shields. Really meant more for holoshields.
else
final_damage = 0
if(shootingthing.damage_type == TOX || shootingthing.damage_type == CLONE || shootingthing.damage_type == BRAIN || shootingthing.damage_type == OXY)
final_damage = 0
if(can_shatter && (obj_integrity <= damage))
var/turf/T = get_turf(owner)
T.visible_message("<span class='warning'>[attack_text] destroys [src]!</span>")
shatter(owner)
qdel(src)
return FALSE
take_damage(damage)
take_damage(final_damage)
return ..()
/obj/item/shield/riot/laser_proof
name = "laser resistant shield"
desc = "A far more frail shield made of dark glass meant to block lasers but suffers from being being weak to ballistic projectiles."
/obj/item/shield/riot/energy_proof
name = "energy resistant shield"
desc = "An ablative shield designed to absorb and disperse energy attacks. This comes at significant cost to its ability to withstand ballistics and kinetics, breaking apart easily."
armor = list("melee" = 30, "bullet" = -10, "laser" = 80, "energy" = 80, "bomb" = -40, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50)
icon_state = "riot_laser"
item_state = "riot_laser"
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
shield_flags = SHIELD_FLAGS_DEFAULT
shield_flags = SHIELD_FLAGS_DEFAULT | SHIELD_ENERGY_STRONG | SHIELD_KINETIC_WEAK
max_integrity = 300
/obj/item/shield/riot/bullet_proof
name = "bullet resistant shield"
desc = "A far more frail shield made of resistant plastics and kevlar meant to block ballistics."
/obj/item/shield/riot/kinetic_proof
name = "kinetic resistant shield"
desc = "A polymer and ceramic shield designed to absorb ballistic projectiles and kinetic force. It doesn't do very well into energy attacks, especially from weapons that inflict burns."
armor = list("melee" = 30, "bullet" = 80, "laser" = 0, "energy" = 0, "bomb" = -40, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50)
icon_state = "riot_bullet"
item_state = "riot_bullet"
shield_flags = SHIELD_FLAGS_DEFAULT | SHIELD_KINETIC_STRONG | SHIELD_ENERGY_WEAK
max_integrity = 300
/obj/item/shield/riot/roman
@@ -277,8 +326,8 @@
/obj/item/shield/riot/roman/fake
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>. It appears to be a bit flimsy."
block_chance = 0
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
shield_flags = SHIELD_ENERGY_WEAK | SHIELD_KINETIC_WEAK | SHIELD_NO_RANGED
max_integrity = 40
/obj/item/shield/riot/roman/shatter(mob/living/carbon/human/owner)
@@ -295,14 +344,80 @@
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 10)
resistance_flags = FLAMMABLE
repair_material = /obj/item/stack/sheet/mineral/wood
block_chance = 30
shield_flags = SHIELD_FLAGS_DEFAULT
shield_flags = SHIELD_FLAGS_DEFAULT | SHIELD_ENERGY_WEAK
max_integrity = 150
/obj/item/shield/riot/buckler/shatter(mob/living/carbon/human/owner)
playsound(owner, 'sound/effects/bang.ogg', 50)
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
/obj/item/shield/riot/flash
name = "strobe shield"
desc = "A shield with a built in, high intensity light capable of blinding and disorienting suspects. Takes regular handheld flashes as bulbs."
icon_state = "flashshield"
item_state = "flashshield"
var/obj/item/assembly/flash/handheld/embedded_flash
/obj/item/shield/riot/flash/Initialize()
. = ..()
embedded_flash = new(src)
/obj/item/shield/riot/flash/ComponentInitialize()
. = .. ()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/shield/riot/flash/attack(mob/living/M, mob/user)
. = embedded_flash.attack(M, user)
update_icon()
/obj/item/shield/riot/flash/attack_self(mob/living/carbon/user)
. = embedded_flash.attack_self(user)
update_icon()
/obj/item/shield/riot/flash/on_shield_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
. = ..()
if (. && !embedded_flash.crit_fail)
embedded_flash.activate()
update_icon()
/obj/item/shield/riot/flash/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/assembly/flash/handheld))
var/obj/item/assembly/flash/handheld/flash = W
if(flash.crit_fail)
to_chat(user, "<span class='warning'>No sense replacing it with a broken bulb!</span>")
return
else
to_chat(user, "<span class='notice'>You begin to replace the bulb...</span>")
if(do_after(user, 20, target = user))
if(flash.crit_fail || !flash || QDELETED(flash))
return
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
qdel(embedded_flash)
embedded_flash = flash
flash.forceMove(src)
update_icon()
return
..()
/obj/item/shield/riot/flash/emp_act(severity)
. = ..()
embedded_flash.emp_act(severity)
update_icon()
/obj/item/shield/riot/flash/update_icon_state()
if(!embedded_flash || embedded_flash.crit_fail)
icon_state = "riot"
item_state = "riot"
else
icon_state = "flashshield"
item_state = "flashshield"
/obj/item/shield/riot/flash/examine(mob/user)
. = ..()
if (embedded_flash?.crit_fail)
. += "<span class='info'>The mounted bulb has burnt out. You can try replacing it with a new one.</span>"
/obj/item/shield/riot/tele
name = "telescopic shield"
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
@@ -348,7 +463,7 @@
/obj/item/shield/makeshift
name = "metal shield"
desc = "A large shield made of wired and welded sheets of metal. The handle is made of cloth and leather making it unwieldy."
desc = "A large shield made of wired and welded sheets of metal. The handle is made of cloth and leather, making it unwieldy."
armor = list("melee" = 25, "bullet" = 25, "laser" = 5, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 80)
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
@@ -362,33 +477,34 @@
/obj/item/shield/riot/tower
name = "tower shield"
desc = "A massive shield that can block a lot of attacks, can take a lot of abuse before braking."
desc = "An immense tower shield. Designed to ensure maximum protection to the user, at the expense of mobility."
armor = list("melee" = 95, "bullet" = 95, "laser" = 75, "energy" = 60, "bomb" = 90, "bio" = 90, "rad" = 0, "fire" = 90, "acid" = 10) //Armor for the item, dosnt transfer to user
item_state = "metal"
icon_state = "metal"
force = 16
slowdown = 2
throwforce = 15 //Massive pice of metal
throwforce = 15 //Massive piece of metal
max_integrity = 600
w_class = WEIGHT_CLASS_HUGE
item_flags = SLOWS_WHILE_IN_HAND
item_flags = SLOWS_WHILE_IN_HAND | ITEM_CAN_BLOCK
shield_flags = SHIELD_FLAGS_DEFAULT
/obj/item/shield/riot/tower/swat
name = "swat shield"
desc = "A massive, heavy shield that can block a lot of attacks, can take a lot of abuse before breaking."
max_integrity = 250
/obj/item/shield/riot/implant
name = "telescoping shield implant"
desc = "A compact, arm-mounted telescopic shield. While nigh-indestructible when powered by a host user, it will eventually overload from damage. Recharges while inside its implant."
item_state = "metal"
icon_state = "metal"
name = "hardlight shield implant"
desc = "A hardlight plane of force projected from the implant. While it is capable of withstanding immense amounts of abuse, it will eventually overload from sustained impacts, especially against energy attacks. Recharges while retracted."
item_state = "holoshield"
icon_state = "holoshield"
slowdown = 1
shield_flags = SHIELD_FLAGS_DEFAULT
max_integrity = 100
obj_integrity = 100
can_shatter = FALSE
item_flags = SLOWS_WHILE_IN_HAND | ITEM_CAN_BLOCK
item_flags = ITEM_CAN_BLOCK
shield_flags = SHIELD_FLAGS_DEFAULT | SHIELD_KINETIC_STRONG | SHIELD_DISABLER_DISRUPTED
var/recharge_timerid
var/recharge_delay = 15 SECONDS
@@ -400,7 +516,7 @@
if(obj_integrity == 0)
if(ismob(loc))
var/mob/living/L = loc
playsound(src, 'sound/effects/glassbr3.ogg', 100)
playsound(src, "sparks", 100, TRUE)
L.visible_message("<span class='boldwarning'>[src] overloads from the damage sustained!</span>")
L.dropItemToGround(src) //implant component catch hook will grab it.
@@ -272,7 +272,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
. = ..()
. += GLOB.plastitaniumglass_recipes
/obj/item/stack/sheet/titaniumglass/on_solar_construction(obj/machinery/power/solar/S)
/obj/item/stack/sheet/plastitaniumglass/on_solar_construction(obj/machinery/power/solar/S)
S.max_integrity *= 2
S.efficiency *= 2
@@ -117,8 +117,8 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
new/datum/stack_recipe("Captain Statue", /obj/structure/statue/diamond/captain, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("AI Hologram Statue", /obj/structure/statue/diamond/ai1, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("AI Core Statue", /obj/structure/statue/diamond/ai2, 5, one_per_turf = 1, on_floor = 1), \
// new/datum/stack_recipe("diamond brick", /obj/item/ingot/diamond, 6, time = 100), \ not yet
))
new/datum/stack_recipe("diamond ingot", /obj/item/ingot/diamond, 6, time = 100), \
))
/obj/item/stack/sheet/mineral/diamond/get_main_recipes()
. = ..()
@@ -592,7 +592,7 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
return
var/turf/T = get_turf(user) //we may have moved. adjust as needed...
var/area/A = get_area(user)
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !A.blob_allowed))
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.flags_1 & CULT_PERMITTED_1)))
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
return FALSE
return ..()
+2 -2
View File
@@ -459,8 +459,8 @@
/obj/item/stack/AltClick(mob/living/user)
. = ..()
if(isturf(loc)) // to prevent people that are alt clicking a tile to see its content from getting undesidered pop ups
return
// if(isturf(loc)) // to prevent people that are alt clicking a tile to see its content from getting undesidered pop ups
// return
if(is_cyborg || !user.canUseTopic(src, BE_CLOSE, TRUE, FALSE) || zero_amount()) //, !iscyborg(user)
return
//get amount from user
+83
View File
@@ -351,6 +351,75 @@
if(!contents.len)
. += "[icon_state]_empty"
//Derringer "Cigarettes"//
/obj/item/storage/fancy/cigarettes/derringer
name = "\improper Robust packet"
desc = "Smoked by the robust."
icon_state = "robust"
spawn_type = /obj/item/gun/ballistic/derringer/traitor
/obj/item/storage/fancy/cigarettes/derringer/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 6
STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette, /obj/item/lighter, /obj/item/gun/ballistic/derringer, /obj/item/ammo_casing/c38, /obj/item/ammo_casing/a357, /obj/item/ammo_casing/g4570))
/obj/item/storage/fancy/cigarettes/derringer/AltClick(mob/living/carbon/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
var/obj/item/W = (locate(/obj/item/ammo_casing/a357) in contents) || (locate(/obj/item/clothing/mask/cigarette) in contents) || locate(/obj/item/ammo_casing/g4570) //Easy access smokes and bullets
if(W && contents.len > 0)
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, user)
user.put_in_hands(W)
contents -= W
to_chat(user, "<span class='notice'>You take \a [W] out of the pack.</span>")
else
to_chat(user, "<span class='notice'>There are no items left in the pack.</span>")
/obj/item/storage/fancy/cigarettes/derringer/PopulateContents()
new spawn_type(src)
new /obj/item/ammo_casing/a357(src)
new /obj/item/ammo_casing/a357(src)
new /obj/item/ammo_casing/a357(src)
new /obj/item/ammo_casing/a357(src)
new /obj/item/clothing/mask/cigarette/syndicate(src)
//For traitors with luck/class
/obj/item/storage/fancy/cigarettes/derringer/gold
name = "\improper Robust Gold packet"
desc = "Smoked by the truly robust."
icon_state = "robustg"
spawn_type = /obj/item/gun/ballistic/derringer/gold
//For operatives, bound in a ka-tet.
/obj/item/storage/fancy/cigarettes/derringer/midworld
name = "\improper Midworld's Lime Bend"
desc = "The wheel of Ka turns, Gunslinger."
icon_state = "slime"
spawn_type = /obj/item/gun/ballistic/derringer/nukeop
/obj/item/storage/fancy/cigarettes/derringer/midworld/PopulateContents()
new spawn_type(src)
new /obj/item/ammo_casing/g4570(src)
new /obj/item/ammo_casing/g4570(src)
new /obj/item/ammo_casing/g4570(src)
new /obj/item/ammo_casing/g4570(src)
new /obj/item/clothing/mask/cigarette/xeno(src)
//For Cargomen, looking for a good deal on arms, with no quarrels as to where they're from.
/obj/item/storage/fancy/cigarettes/derringer/smuggled
name = "\improper Shady Jim's Super Slims packet"
desc = "If you get caught with this, we don't know you, capiche?"
icon_state = "shadyjim"
spawn_type = /obj/item/gun/ballistic/derringer
/obj/item/storage/fancy/cigarettes/derringer/smuggled/PopulateContents()
new spawn_type(src)
new /obj/item/ammo_casing/c38/lethal(src)
new /obj/item/ammo_casing/c38/lethal(src)
new /obj/item/ammo_casing/c38/lethal(src)
new /obj/item/ammo_casing/c38/lethal(src)
new /obj/item/clothing/mask/cigarette/shadyjims (src)
/////////////
//CIGAR BOX//
/////////////
@@ -435,6 +504,20 @@
STR.max_items = 6
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/nugget))
/obj/item/storage/fancy/treat_box
name = "treat box"
desc = "A cardboard box used for holding dog treats."
icon = 'icons/obj/food/containers.dmi'
icon_state = "treatbox"
icon_type = "treat"
spawn_type = /obj/item/reagent_containers/food/snacks/dogtreat
/obj/item/storage/fancy/treat_box/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 6
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/dogtreat))
/obj/item/storage/fancy/cracker_pack
name = "cracker pack"
desc = "A pack of delicious crackers. Keep away from parrots!"
+4 -4
View File
@@ -394,15 +394,15 @@
desc = "You want penis enlargement pills?"
/obj/item/storage/pill_bottle/penis_enlargement/PopulateContents()
for(var/i in 1 to 7)
for(var/i in 1 to 10)
new /obj/item/reagent_containers/pill/penis_enlargement(src)
/obj/item/storage/pill_bottle/breast_enlargement
name = "breast enlargement pills"
desc = "Made by Fermichem - They have a woman with breasts larger than she is on them. The warming states not to take more than 10u at a time."
desc = "Made by Fermichem - The bottle shows a woman with breasts larger than she is on them. The warning states to not take more than 10 units at a time."
/obj/item/storage/pill_bottle/breast_enlargement/PopulateContents()
for(var/i in 1 to 7)
for(var/i in 1 to 10)
new /obj/item/reagent_containers/pill/breast_enlargement(src)
/obj/item/storage/pill_bottle/neurine
@@ -469,7 +469,7 @@
//hijacking the minature first aids for hypospray boxes. <3
/obj/item/storage/hypospraykit
name = "hypospray kit"
desc = "It's a kit containing a hypospray and specific treatment chemical-filled vials."
desc = "It's a kit designed for containing a hypospray and specific treatment chemical-filled vials."
icon_state = "firstaid-mini"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
+35 -2
View File
@@ -1,7 +1,7 @@
/obj/item/storage/box/syndicate
/obj/item/storage/box/syndicate/PopulateContents()
switch (pickweight(list("bloodyspai" = 3, "stealth" = 2, "bond" = 2, "screwed" = 2, "sabotage" = 3, "guns" = 2, "murder" = 2, "baseball" = 1, "implant" = 1, "hacker" = 3, "darklord" = 1, "sniper" = 1, "metaops" = 1, "ninja" = 1)))
switch (pickweight(list("bloodyspai" = 3, "stealth" = 2, "bond" = 2, "screwed" = 2, "sabotage" = 3, "guns" = 2, "murder" = 2, "baseball" = 1, "implant" = 1, "hacker" = 3, "darklord" = 1, "sniper" = 1, "metaops" = 1, "ninja" = 1, "ancient" = 1)))
if("bloodyspai") // 30 tc now this is more right
new /obj/item/clothing/under/chameleon(src) // 2 tc since it's not the full set
new /obj/item/clothing/mask/chameleon(src) // Goes with above
@@ -62,7 +62,7 @@
new /obj/item/clothing/glasses/phantomthief/syndicate(src)
new /obj/item/reagent_containers/syringe/stimulants(src)
if("baseball") // 42~ tc
if("baseball") // 44~ tc
new /obj/item/melee/baseball_bat/ablative/syndi(src) //Lets say 12 tc, lesser sleeping carp
new /obj/item/clothing/glasses/sunglasses/garb(src) //Lets say 2 tc
new /obj/item/card/emag(src) //6 tc
@@ -72,6 +72,7 @@
new /obj/item/clothing/under/syndicate/baseball(src) //3tc
new /obj/item/clothing/head/soft/baseball(src) //Lets say 4 tc
new /obj/item/reagent_containers/hypospray/medipen/stimulants/baseball(src) //lets say 5tc
new /obj/item/melee/baseball_bat/telescopic(src) // 2 tc
if("implant") // 67+ tc holy shit what the fuck this is a lottery disguised as fun boxes isn't it?
new /obj/item/implanter/freedom(src)
@@ -155,6 +156,20 @@
new /obj/item/card/id/syndicate(src) // 2 tc
new /obj/item/chameleon(src) // 7 tc
if("ancient") //A kit so old, it's probably older than you. //This bundle is filled with the entire unlink contents traitors had access to in 2006, from OpenSS13. Notably the esword was not a choice but existed in code.
new /obj/item/storage/toolbox/emergency/old/ancientbundle(src) //Items fit neatly into a classic toolbox just to remind you what the theme is.
/obj/item/storage/toolbox/emergency/old/ancientbundle //So the subtype works
/obj/item/storage/toolbox/emergency/old/ancientbundle/PopulateContents()
new /obj/item/card/emag(src)
new /obj/item/pen/sleepy(src)
new /obj/item/reagent_containers/pill/cyanide(src)
new /obj/item/chameleon(src) //its not the original cloaking device, but it will do.
new /obj/item/gun/ballistic/revolver(src)
new /obj/item/implanter/freedom(src)
new /obj/item/stack/telecrystal(src) //The failsafe/self destruct isn't an item we can physically include in the kit, but 1 TC is technically enough to buy the equivalent.
/obj/item/storage/box/syndie_kit
name = "box"
desc = "A sleek, sturdy box."
@@ -531,3 +546,21 @@
. = ..()
new /obj/item/cardpack/syndicate(src)
new /obj/item/cardpack/syndicate(src)
/obj/item/storage/box/syndie_kit/imp_deathrattle
name = "deathrattle implant box"
desc = "Contains eight linked deathrattle implants."
/obj/item/storage/box/syndie_kit/imp_deathrattle/PopulateContents()
new /obj/item/implanter(src)
var/datum/deathrattle_group/group = new
var/implants = list()
for(var/j in 1 to 8)
var/obj/item/implantcase/deathrattle/case = new (src)
implants += case.imp
for(var/i in implants)
group.register(i)
desc += " The implants are registered to the \"[group.name]\" group."
+2 -1
View File
@@ -46,7 +46,8 @@
/obj/item/instrument/harmonica,
/obj/item/mining_voucher,
/obj/item/suit_voucher,
/obj/item/reagent_containers/pill))
/obj/item/reagent_containers/pill,
/obj/item/gun/ballistic/derringer))
/obj/item/storage/wallet/Exited(atom/movable/AM)
. = ..()
+3 -4
View File
@@ -235,10 +235,9 @@
L.apply_effect(EFFECT_STUTTER, stamina_loss_amount)
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
if(user)
L.lastattacker = user.real_name
L.lastattackerckey = user.ckey
L.visible_message("<span class='danger'>[user] has [shoved ? "knocked to the floor" : "stunned"] [L] with [src]!</span>", \
"<span class='userdanger'>[user] has [shoved ? "knocked you to the floor" : "stunned you"] with [src]!</span>")
L.set_last_attacker(user)
L.visible_message("<span class='danger'>[user] has [shoved ? "brutally stunned" : "stunned"] [L] with [src]!</span>", \
"<span class='userdanger'>[user] has [shoved ? "brutally stunnned" : "stunned"] you with [src]!</span>")
log_combat(user, L, shoved ? "stunned and attempted knockdown" : "stunned")
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
+2 -2
View File
@@ -15,7 +15,7 @@
var/datum/effect_system/trail_follow/ion/ion_trail
/obj/item/tank/jetpack/Initialize()
..()
. = ..()
ion_trail = new
ion_trail.set_up(src)
@@ -88,7 +88,7 @@
return TRUE
/obj/item/tank/jetpack/suicide_act(mob/user)
if (istype(user, /mob/living/carbon/human/))
if (ishuman(user))
var/mob/living/carbon/human/H = user
H.forcesay("WHAT THE FUCK IS CARBON DIOXIDE?")
H.visible_message("<span class='suicide'>[user] is suffocating [user.p_them()]self with [src]! It looks like [user.p_they()] didn't read what that jetpack says!</span>")
+6 -6
View File
@@ -139,14 +139,14 @@
/obj/item/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
var/area/current_area = current_location.loc
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
if(!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
var/area/A = get_area(com.target)
if(!A || A.noteleport)
if(!A || (A.area_flags & NOTELEPORT))
continue
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[get_area(com.target)] (Active)"] = com.target
@@ -159,7 +159,7 @@
if(T.y>world.maxy-8 || T.y<8)
continue
var/area/A = T.loc
if(A.noteleport)
if(A.area_flags & NOTELEPORT)
continue
turfs += T
if(turfs.len)
@@ -172,12 +172,12 @@
return
var/atom/T = L[t1]
var/area/A = get_area(T)
if(A.noteleport)
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
if (A.area_flags & NOTELEPORT)
to_chat(user, "<span class='notice'>[src] is malfunctioning.</span>")
return
current_location = get_turf(user) //Recheck.
current_area = current_location.loc
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
if (!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
user.show_message("<span class='notice'>Locked In.</span>", MSG_AUDIBLE)
+62
View File
@@ -911,6 +911,16 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
var/homerun_ready = 0
var/homerun_able = 0
total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google
var/on_sound
var/on = TRUE // Are we on or off
var/on_icon_state // What is our sprite when turned on
var/off_icon_state // What is our sprite when turned off
var/on_item_state // What is our in-hand sprite when turned on
var/force_on // Damage when on
var/force_off // Damage when off
var/throwforce_on // Damage when on
var/throwforce_off // Damage when off
var/weight_class_on // What is the new size class when turned on
/obj/item/melee/baseball_bat/Initialize()
. = ..()
@@ -992,6 +1002,58 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 18 //Spear damage...
throwforce = 30
/obj/item/melee/baseball_bat/proc/get_on_description()
. = list()
.["local_on"] = "<span class ='warning'>You extend the bat.</span>"
.["local_off"] = "<span class ='notice'>You collapse the bat.</span>"
return .
/obj/item/melee/baseball_bat/telescopic
name = "telescopic baseball bat"
desc = "A stealthy telescopic bat that can fit in a pocket when collapsed."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "baseball_bat_telescopic_0"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
item_state = null
w_class = WEIGHT_CLASS_SMALL
item_flags = NONE
force = 5
throwforce = 10
on = FALSE
on_sound = 'sound/weapons/batonextend.ogg'
on_icon_state = "baseball_bat_telescopic_1"
off_icon_state = "baseball_bat_telescopic_0"
on_item_state = "baseball_bat_telescopic"
force_on = 15
force_off = 5
throwforce_on = 20
throwforce_off = 10
weight_class_on = WEIGHT_CLASS_HUGE
total_mass = TOTAL_MASS_NORMAL_ITEM
/obj/item/melee/baseball_bat/telescopic/attack_self(mob/user)
on = !on
var/list/desc = get_on_description()
if(on)
to_chat(user, desc["local_on"])
icon_state = on_icon_state
item_state = on_item_state
w_class = weight_class_on
force = force_on
throwforce = throwforce_on
attack_verb = list("beat", "smacked")
else
to_chat(user, desc["local_off"])
icon_state = off_icon_state
item_state = null //no sprite for concealment even when in hand
w_class = WEIGHT_CLASS_SMALL
force = force_off
throwforce = throwforce_off
attack_verb = list("drubbed", "beaned")
playsound(src.loc, on_sound, 50, 1)
add_fingerprint(user)
/obj/item/melee/flyswatter
name = "flyswatter"
desc = "Useful for killing pests of all sizes."
+1 -1
View File
@@ -50,7 +50,7 @@
return FALSE
var/turf/T = get_turf(src)
var/area/A = get_area(src)
if(!A.blob_allowed)
if(!(A.area_flags & BLOBS_ALLOWED))
return FALSE
if(!A.powered(EQUIP))
return FALSE
@@ -4,6 +4,10 @@
icon = 'icons/obj/closet.dmi'
icon_state = "generic"
density = TRUE
max_integrity = 200
integrity_failure = 0.25
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
var/icon_door = null
var/icon_door_override = FALSE //override to have open overlay use icon different to its base's
var/secure = FALSE //secure locker or not, also used if overriding a non-secure locker with a secure door overlay to add fancy lights
@@ -12,9 +16,6 @@
var/locked = FALSE
var/large = TRUE
var/wall_mounted = 0 //never solid (You can always pass over it)
max_integrity = 200
integrity_failure = 0.25
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
var/breakout_time = 1200
var/message_cooldown
var/can_weld_shut = TRUE
@@ -40,12 +41,12 @@
var/should_populate_contents = TRUE
/obj/structure/closet/Initialize(mapload)
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
addtimer(CALLBACK(src, .proc/take_contents), 0)
. = ..()
update_icon()
if(should_populate_contents)
PopulateContents()
if(mapload && !opened) // if closed, any item at the crate's loc is put in the contents
addtimer(CALLBACK(src, .proc/take_contents), 0)
if(secure)
lockerelectronics = new(src)
lockerelectronics.accesses = req_access
@@ -60,10 +61,10 @@
/obj/structure/closet/update_icon()
. = ..()
if(!opened)
layer = OBJ_LAYER
else
layer = BELOW_OBJ_LAYER
if(istype(src, /obj/structure/closet/supplypod))
return
layer = opened ? BELOW_OBJ_LAYER : OBJ_LAYER
/obj/structure/closet/update_overlays()
. = ..()
@@ -71,61 +72,57 @@
/obj/structure/closet/proc/closet_update_overlays(list/new_overlays)
. = new_overlays
if(!opened)
if(icon_door)
. += "[icon_door]_door"
else
. += "[icon_state]_door"
if(welded)
. += "welded"
if(!secure)
return
if(broken)
. += "off"
. += "sparking"
else if(locked)
. += "locked"
else
. += "unlocked"
else
if(icon_door_override)
. += "[icon_door]_open"
else
. += "[icon_state]_open"
if(opened)
. += "[icon_door_override ? icon_door : icon_state]_open"
return
. += "[icon_door || icon_state]_door"
if(welded)
. += icon_welded
if(!secure)
return
if(broken)
. += "off"
. += "sparking"
//Overlay is similar enough for both that we can use the same mask for both
SSvis_overlays.add_vis_overlay(src, icon, "locked", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
. += locked ? "locked" : "unlocked"
/obj/structure/closet/examine(mob/user)
. = ..()
if(welded)
. += "<span class='notice'>It's <b>welded</b> shut.</span>"
. += "<span class='notice'>It's welded shut.</span>"
if(anchored)
. += "<span class='notice'>It is <b>bolted</b> to the ground.</span>"
if(opened)
. += "<span class='notice'>The parts are <b>welded</b> together.</span>"
else if(secure && !opened)
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>"
else if(broken)
. += "<span class='notice'>The lock is <b>screwed</b> in.</span>"
else if(secure)
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>"
if(isliving(user))
var/mob/living/L = user
if(HAS_TRAIT(L, TRAIT_SKITTISH))
. += "<span class='notice'>Ctrl-Shift-click [src] to jump inside.</span>"
if(isobserver(user))
. += "<span class='info'>It contains: [english_list(contents)].</span>"
investigate_log("had its contents examined by [user] as a ghost.", INVESTIGATE_GHOST)
if(HAS_TRAIT(user, TRAIT_SKITTISH))
. += "<span class='notice'>If you bump into [p_them()] while running, you will jump inside.</span>"
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
return TRUE
return !density
/obj/structure/closet/proc/can_open(mob/living/user)
/obj/structure/closet/proc/can_open(mob/living/user, force = FALSE)
if(force)
return TRUE
if(welded || locked)
return FALSE
var/turf/T = get_turf(src)
for(var/mob/living/L in T)
if(L.move_resist >= MOVE_FORCE_VERY_STRONG || (horizontal && L.mob_size > MOB_SIZE_TINY && L.density))
if(L.anchored || L.move_resist >= MOVE_FORCE_VERY_STRONG || (horizontal && L.mob_size > MOB_SIZE_TINY && L.density))
if(user)
to_chat(user, "<span class='danger'>There's something large on top of [src], preventing it from opening.</span>" )
return FALSE
@@ -137,44 +134,16 @@
if(closet != src && !closet.wall_mounted)
return FALSE
for(var/mob/living/L in T)
if(L.move_resist >= MOVE_FORCE_VERY_STRONG || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
if(L.anchored || L.move_resist >= MOVE_FORCE_VERY_STRONG || (horizontal && L.mob_size > MOB_SIZE_TINY && L.density))
if(user)
to_chat(user, "<span class='danger'>There's something too large in [src], preventing it from closing.</span>")
return FALSE
return TRUE
/obj/structure/closet/proc/can_lock(mob/living/user, var/check_access = TRUE) //set check_access to FALSE if you only need to check if a locker has a functional lock rather than access
if(!secure)
return FALSE
if(broken)
to_chat(user, "<span class='notice'>[src] is broken!</span>")
return FALSE
if(QDELETED(lockerelectronics) && !locked) //We want to be able to unlock it regardless of electronics, but only lockable with electronics
to_chat(user, "<span class='notice'>[src] is missing locker electronics!</span>")
return FALSE
if(!check_access)
return TRUE
if(allowed(user))
return TRUE
to_chat(user, "<span class='notice'>Access denied.</span>")
/obj/structure/closet/proc/togglelock(mob/living/user)
add_fingerprint(user)
if(eigen_target)
return
if(opened)
return
if(!can_lock(user))
return
locked = !locked
user.visible_message("<span class='notice'>[user] [locked ? null : "un"]locks [src].</span>",
"<span class='notice'>You [locked ? null : "un"]lock [src].</span>")
update_icon()
/obj/structure/closet/proc/dump_contents(var/override = TRUE) //Override is for not revealing the locker electronics when you open the locker, for example
/obj/structure/closet/proc/dump_contents(override = TRUE) //Override is for not revealing the locker electronics when you open the locker, for example
var/atom/L = drop_location()
for(var/atom/movable/AM in src)
if(AM == lockerelectronics && override)
if(AM == lockerelectronics && override) // this stops the electronics from being dumped out? huh
continue
AM.forceMove(L)
if(throwing) // you keep some momentum when getting out of a thrown closet
@@ -187,18 +156,30 @@
for(var/atom/movable/AM in L)
if(AM != src && insert(AM) == -1) // limit reached
break
// for(var/i in reverseRange(L.GetAllContents()))
// var/atom/movable/thing = i
// SEND_SIGNAL(thing, COMSIG_TRY_STORAGE_HIDE_ALL)
/obj/structure/closet/proc/open(mob/living/user)
if(opened || !can_open(user))
/obj/structure/closet/proc/open(mob/living/user, force = FALSE)
if(!can_open(user, force))
return
playsound(loc, open_sound, 15, 1, -3)
if(opened)
return
welded = FALSE
locked = FALSE // if you manage to open it, then its not welded/locked, hello?!
playsound(loc, open_sound, 15, TRUE, -3)
opened = TRUE
if(!dense_when_open)
density = FALSE
climb_time *= 0.5 //it's faster to climb onto an open thing
dump_contents()
update_icon()
return 1
after_open(user, force)
return TRUE
///Proc to override for effects after opening a door
/obj/structure/closet/proc/after_open(mob/living/user, force = FALSE)
return
/obj/structure/closet/proc/insert(atom/movable/AM)
if(contents.len >= storage_capacity)
@@ -208,19 +189,19 @@
do_teleport(AM, get_turf(eigen_target), 0)
if(eigen_target.opened == FALSE)
eigen_target.bust_open()
else
AM.forceMove(src)
return TRUE
AM.forceMove(src)
return TRUE
else
return FALSE
/obj/structure/closet/proc/insertion_allowed(atom/movable/AM)
if(ismob(AM))
if(!isliving(AM)) //let's not put ghosts or camera mobs inside closets...
return FALSE
var/mob/living/L = AM
if(L.move_resist >= MOVE_FORCE_VERY_STRONG || L.buckled || L.incorporeal_move || L.has_buckled_mobs())
if(L.anchored || L.move_resist >= MOVE_FORCE_VERY_STRONG || L.buckled || L.incorporeal_move || L.has_buckled_mobs())
return FALSE
if(L.mob_size > MOB_SIZE_TINY) // Tiny mobs are treated as items.
if(horizontal && L.density)
@@ -236,13 +217,13 @@
else if(istype(AM, /obj/structure/closet))
return FALSE
else if(istype(AM, /obj/effect))
else if(iseffect(AM)) // todo: move to atom/movable
return FALSE
else if(isobj(AM))
if((!allow_dense && AM.density) || AM.anchored || AM.has_buckled_mobs())
return FALSE
if(isitem(AM) && !HAS_TRAIT(AM, TRAIT_NODROP))
else if(isitem(AM) && !HAS_TRAIT(AM, TRAIT_NODROP))
return TRUE
else if(!allow_objects && !istype(AM, /obj/effect/dummy/chameleon))
return FALSE
@@ -255,25 +236,365 @@
if(!opened || !can_close(user))
return FALSE
take_contents()
playsound(loc, close_sound, 15, 1, -3)
climb_time = initial(climb_time)
playsound(loc, close_sound, 15, TRUE, -3)
opened = FALSE
density = TRUE
update_icon()
after_close(user)
return TRUE
///Proc to override for effects after closing a door
/obj/structure/closet/proc/after_close(mob/living/user)
return
/obj/structure/closet/proc/toggle(mob/living/user)
if(opened)
return close(user)
else
return open(user)
/obj/structure/closet/deconstruct(disassembled = TRUE)
if(ispath(material_drop) && material_drop_amount && !(flags_1 & NODECONSTRUCT_1))
new material_drop(loc, material_drop_amount)
qdel(src)
/obj/structure/closet/obj_break(damage_flag)
if(!broken && !(flags_1 & NODECONSTRUCT_1))
bust_open()
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
if(user in src)
return
if(src.tool_interact(W,user))
return 1 // No afterattack
else
return ..()
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/living/user)//returns TRUE if attackBy call shouldn't be continued (because tool was used/closet was of wrong type), FALSE if otherwise
. = TRUE
if(opened)
if(W.tool_behaviour == cutting_tool)
// eigen check
if(eigen_teleport)
to_chat(user, "<span class='notice'>The unstable nature of \the [src] makes it impossible to deconstruct!</span>")
return
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
if(W.use_tool(src, user, 40, volume=50))
if(!opened)
return
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [W].</span>",
"<span class='hear'>You hear welding.</span>")
deconstruct(TRUE)
return
else if(W.tool_behaviour == TOOL_WIRECUTTER)
W.use_tool(src, user, 40, volume=50)
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
deconstruct(TRUE)
return
W.use_tool(src, user, 40, volume=50)
user.visible_message("<span class='notice'>[user] deconstructed \the [src].</span>", \
"<span class='notice'>You deconstructed \the [src] with \the [W].</span>")
deconstruct(TRUE) //Honestly by this point, if all checks were right and this is the cutting tool, just cut it
return
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
return
else if(!opened && user.a_intent == INTENT_HELP)
var/item_is_id = W.GetID()
if(!item_is_id)
if(!open(user))
togglelock(user)
return
return
if(item_is_id || !toggle(user))
togglelock(user)
return
else if(W.tool_behaviour == TOOL_WELDER && can_weld_shut)
// eigen check
if(eigen_teleport)
to_chat(user, "<span class='notice'>The unstable nature of \the [src] makes it impossible to deconstruct!</span>")
return
if(!W.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>")
if(W.use_tool(src, user, 40, volume=50))
if(opened)
return
welded = !welded
after_weld(welded)
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unwelded"] \the [src].</span>",
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
"<span class='hear'>You hear welding.</span>")
log_game("[key_name(user)] [welded ? "welded":"unwelded"] closet [src] with [W] at [AREACOORD(src)]")
update_icon()
else if(W.tool_behaviour == TOOL_WRENCH && anchorable)
if(isinspace() && !anchored)
return
set_anchored(!anchored)
W.play_tool_sound(src, 75)
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='hear'>You hear a ratchet.</span>")
// cit addons
else if(istype(W, /obj/item/electronics/airlock))
handle_lock_addition(user, W)
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
handle_lock_removal(user, W)
else
return FALSE
/obj/structure/closet/proc/after_weld(weld_state)
return
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
if(!istype(O) || O.anchored || istype(O, /obj/screen))
return
if(!istype(user) || user.incapacitated() || user.lying)
return
if(!Adjacent(user) || !user.Adjacent(O))
return
if(user == O) //try to climb onto it
return ..()
if(!opened)
return
if(!isturf(O.loc))
return
var/actuallyismob = 0
if(isliving(O))
actuallyismob = 1
else if(!isitem(O))
return
var/turf/T = get_turf(src)
var/list/targets = list(O, src)
add_fingerprint(user)
user.visible_message("<span class='warning'>[user] [actuallyismob ? "tries to ":""]stuff [O] into [src].</span>", \
"<span class='warning'>You [actuallyismob ? "try to ":""]stuff [O] into [src].</span>", \
"<span class='hear'>You hear clanging.</span>")
if(actuallyismob)
if(do_after_mob(user, targets, 40))
user.visible_message("<span class='notice'>[user] stuffs [O] into [src].</span>", \
"<span class='notice'>You stuff [O] into [src].</span>", \
"<span class='hear'>You hear a loud metal bang.</span>")
var/mob/living/L = O
if(!issilicon(L))
L.DefaultCombatKnockdown(40)
if(istype(src, /obj/structure/closet/supplypod/extractionpod))
O.forceMove(src)
else
O.forceMove(T)
close()
else
O.forceMove(T)
return 1
/obj/structure/closet/relaymove(mob/living/user, direction)
if(user.stat || !isturf(loc))
return
if(locked)
if(message_cooldown <= world.time)
message_cooldown = world.time + 50
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
return
container_resist(user)
/obj/structure/closet/on_attack_hand(mob/user)
if(user.lying && get_dist(src, user) > 0)
return
if(!toggle(user))
togglelock(user)
/obj/structure/closet/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/closet/attack_robot(mob/user)
if(user.Adjacent(src))
return attack_hand(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user)
return attack_hand(user)
/obj/structure/closet/verb/verb_toggleopen()
set src in view(1)
set category = "Object"
set name = "Toggle Open"
if(!usr.canUseTopic(src, BE_CLOSE) || !isturf(loc))
return
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
return toggle(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
// Objects that try to exit a locker by stepping were doing so successfully,
// and due to an oversight in turf/Enter() were going through walls. That
// should be independently resolved, but this is also an interesting twist.
/obj/structure/closet/Exit(atom/movable/AM)
open()
if(AM.loc == src)
return FALSE
return TRUE
/obj/structure/closet/container_resist(mob/living/user)
if(opened)
return
if(ismovable(loc))
// user.changeNext_move(CLICK_CD_BREAKOUT)
// user.last_special = world.time + CLICK_CD_BREAKOUT
var/atom/movable/AM = loc
AM.relay_container_resist(user, src)
return
if(!welded && !locked)
open()
return
//okay, so the closet is either welded or locked... resist!!!
// user.changeNext_move(CLICK_CD_BREAKOUT)
// user.last_special = world.time + CLICK_CD_BREAKOUT
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='hear'>You hear banging from [src].</span>")
if(do_after(user,(breakout_time), target = src, required_mobility_flags = MOBILITY_RESIST))
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
return
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>",
"<span class='notice'>You successfully break out of [src]!</span>")
bust_open()
else
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
to_chat(user, "<span class='warning'>You fail to break out of [src]!</span>")
/obj/structure/closet/proc/bust_open()
welded = FALSE //applies to all lockers
locked = FALSE //applies to critter crates and secure lockers only
broken = TRUE //applies to secure lockers only
open()
/obj/structure/closet/AltClick(mob/user)
..()
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(loc))
return
if(opened || !secure)
return
else
togglelock(user)
/obj/structure/closet/proc/togglelock(mob/living/user, silent)
if(secure && !broken)
if(allowed(user))
if(iscarbon(user))
add_fingerprint(user)
locked = !locked
user.visible_message("<span class='notice'>[user] [locked ? null : "un"]locks [src].</span>",
"<span class='notice'>You [locked ? null : "un"]lock [src].</span>")
update_icon()
else if(!silent)
to_chat(user, "<span class='alert'>Access Denied.</span>")
else if(secure && broken)
to_chat(user, "<span class='warning'>\The [src] is broken!</span>")
/obj/structure/closet/CtrlShiftClick(mob/living/user)
if(!HAS_TRAIT(user, TRAIT_SKITTISH))
return ..()
if(!user.canUseTopic(src) || !isturf(user.loc) || !user.Adjacent(src) || !user.CanReach(src))
return
dive_into(user)
/obj/structure/closet/emag_act(mob/user)
. = ..()
if(!secure || broken)
return
if(user)
user.visible_message("<span class='warning'>Sparks fly from [src]!</span>",
"<span class='warning'>You scramble [src]'s lock, breaking it open!</span>",
"<span class='hear'>You hear a faint electrical spark.</span>")
playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
broken = TRUE
locked = FALSE
if(!QDELETED(lockerelectronics))
QDEL_NULL(lockerelectronics)
update_icon()
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
/obj/structure/closet/emp_act(severity)
. = ..()
if(. & EMP_PROTECT_SELF)
return
if (!(. & EMP_PROTECT_CONTENTS))
for(var/obj/O in src)
O.emp_act(severity)
if(secure && !broken && !(. & EMP_PROTECT_SELF))
if(prob(50 / severity))
locked = !locked
update_icon()
if(prob(20 / severity) && !opened)
if(!locked)
open()
else
req_access = list()
req_access += pick(get_all_accesses())
if(!QDELETED(lockerelectronics))
lockerelectronics.accesses = req_access
/obj/structure/closet/contents_explosion(severity, target)
for(var/atom/A in contents)
A.ex_act(severity, target)
CHECK_TICK
/obj/structure/closet/singularity_act()
dump_contents()
..()
/obj/structure/closet/AllowDrop()
return TRUE
/obj/structure/closet/return_temperature()
return
/obj/structure/closet/proc/dive_into(mob/living/user)
var/turf/T1 = get_turf(user)
var/turf/T2 = get_turf(src)
if(!opened)
if(locked)
togglelock(user, TRUE)
if(!open(user))
to_chat(user, "<span class='warning'>It won't budge!</span>")
return
step_towards(user, T2)
T1 = get_turf(user)
if(T1 == T2)
user.set_resting(TRUE, TRUE)
if(!close(user))
to_chat(user, "<span class='warning'>You can't get [src] to close!</span>")
user.set_resting(FALSE, TRUE)
return
user.set_resting(FALSE, TRUE)
togglelock(user)
T1.visible_message("<span class='warning'>[user] dives into [src]!</span>")
/obj/structure/closet/canReachInto(atom/user, atom/target, list/next, view_only, obj/item/tool)
return (user in src)
/// cit specific ///
/obj/structure/closet/proc/handle_lock_addition(mob/user, obj/item/electronics/airlock/E)
add_fingerprint(user)
if(lock_in_use)
@@ -336,294 +657,17 @@
update_icon()
return TRUE
/obj/structure/closet/deconstruct(disassembled = TRUE)
if(ispath(material_drop) && material_drop_amount && !(flags_1 & NODECONSTRUCT_1))
new material_drop(loc, material_drop_amount)
qdel(src)
/obj/structure/closet/obj_break(damage_flag)
if(!broken && !(flags_1 & NODECONSTRUCT_1))
bust_open()
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
if(user in src)
return
if(src.tool_interact(W,user))
return 1 // No afterattack
else
return ..()
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/user)//returns TRUE if attackBy call shouldnt be continued (because tool was used/closet was of wrong type), FALSE if otherwise
. = TRUE
if(opened)
if(istype(W, cutting_tool))
var/welder = FALSE
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You begin [welder ? "slicing" : "deconstructing"] \the [src] apart...</span>")
welder = TRUE
if(W.use_tool(src, user, 40, volume=50))
if(eigen_teleport)
to_chat(user, "<span class='notice'>The unstable nature of \the [src] makes it impossible to [welder ? "slice" : "deconstruct"]!</span>")
return
if(!opened)
return
user.visible_message("<span class='notice'>[user] [welder ? "slice" : "deconstruct"]s apart \the [src].</span>",
"<span class='notice'>You [welder ? "slice" : "deconstruct"] \the [src] apart with \the [W].</span>",
"<span class='italics'>You hear [welder ? "welding" : "rustling of screws and metal"].</span>")
deconstruct(TRUE)
return
if(user.a_intent != INTENT_HARM && user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
return TRUE
else if(istype(W, /obj/item/electronics/airlock))
handle_lock_addition(user, W)
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
handle_lock_removal(user, W)
else if(W.tool_behaviour == TOOL_WELDER && can_weld_shut)
if(!W.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>")
if(W.use_tool(src, user, 40, volume=50))
if(eigen_teleport)
to_chat(user, "<span class='notice'>The unstable nature of \the [src] makes it impossible to weld!</span>")
return
if(opened)
return
welded = !welded
after_weld(welded)
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unwelds"] \the [src].</span>",
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
"<span class='italics'>You hear welding.</span>")
update_icon()
else if(W.tool_behaviour == TOOL_WRENCH && anchorable)
if(isinspace() && !anchored)
return
setAnchored(!anchored)
W.play_tool_sound(src, 75)
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
else if(user.a_intent != INTENT_HARM && !(W.item_flags & NOBLUDGEON))
if(W.GetID() || !toggle(user))
togglelock(user)
else
/obj/structure/closet/proc/can_lock(mob/living/user, var/check_access = TRUE) //set check_access to FALSE if you only need to check if a locker has a functional lock rather than access
if(!secure)
return FALSE
/obj/structure/closet/proc/after_weld(weld_state)
return
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
if(!istype(O) || O.anchored || istype(O, /obj/screen))
return
if(!istype(user) || user.incapacitated() || user.lying)
return
if(!Adjacent(user) || !user.Adjacent(O))
return
if(user == O) //try to climb onto it
return ..()
if(!opened)
return
if(!isturf(O.loc))
return
var/actuallyismob = 0
if(isliving(O))
actuallyismob = 1
else if(!isitem(O))
return
var/turf/T = get_turf(src)
var/list/targets = list(O, src)
add_fingerprint(user)
user.visible_message("<span class='warning'>[user] [actuallyismob ? "tries to ":""]stuff [O] into [src].</span>", \
"<span class='warning'>You [actuallyismob ? "try to ":""]stuff [O] into [src].</span>", \
"<span class='italics'>You hear clanging.</span>")
if(actuallyismob)
if(do_after_mob(user, targets, 40))
user.visible_message("<span class='notice'>[user] stuffs [O] into [src].</span>", \
"<span class='notice'>You stuff [O] into [src].</span>", \
"<span class='italics'>You hear a loud metal bang.</span>")
var/mob/living/L = O
if(!issilicon(L))
L.DefaultCombatKnockdown(40)
if(istype(src, /obj/structure/closet/supplypod/extractionpod))
O.forceMove(src)
else
O.forceMove(T)
close()
else
O.forceMove(T)
return 1
/obj/structure/closet/relaymove(mob/user)
if(user.stat || !isturf(loc) || !isliving(user))
return
if(locked || welded)
if(message_cooldown <= world.time)
message_cooldown = world.time + 50
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
return
container_resist(user)
/obj/structure/closet/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(user.lying && get_dist(src, user) > 0)
return
if(!toggle(user))
togglelock(user)
/obj/structure/closet/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/closet/attack_robot(mob/user)
if(user.Adjacent(src))
return attack_hand(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user)
return attack_hand(user)
/obj/structure/closet/verb/verb_toggleopen()
set src in oview(1)
set category = "Object"
set name = "Toggle Open"
var/mob/living/L = usr
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
if(broken)
to_chat(user, "<span class='notice'>[src] is broken!</span>")
return FALSE
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
return attack_hand(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
// Objects that try to exit a locker by stepping were doing so successfully,
// and due to an oversight in turf/Enter() were going through walls. That
// should be independently resolved, but this is also an interesting twist.
/obj/structure/closet/Exit(atom/movable/AM)
open()
if(AM.loc == src)
return 0
return 1
/obj/structure/closet/container_resist(mob/living/user)
if(opened)
return
if(ismovable(loc))
var/atom/movable/AM = loc
AM.relay_container_resist(user, src)
return
if(!welded && !locked)
open()
return
//okay, so the closet is either welded or locked... resist!!!
user.visible_message("<span class='warning'>[src] begins to shake violently!</span>", \
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
"<span class='italics'>You hear banging from [src].</span>")
if(do_after(user,(breakout_time), target = src, required_mobility_flags = MOBILITY_RESIST))
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
return
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>",
"<span class='notice'>You successfully break out of [src]!</span>")
bust_open()
else
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
to_chat(user, "<span class='warning'>You fail to break out of [src]!</span>")
/obj/structure/closet/AltClick(mob/user)
. = ..()
if(!user.canUseTopic(src, be_close=TRUE) || !isturf(loc))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
if(QDELETED(lockerelectronics) && !locked) //We want to be able to unlock it regardless of electronics, but only lockable with electronics
to_chat(user, "<span class='notice'>[src] is missing locker electronics!</span>")
return FALSE
if(!check_access)
return TRUE
togglelock(user)
return TRUE
/obj/structure/closet/CtrlShiftClick(mob/living/user)
if(!HAS_TRAIT(user, TRAIT_SKITTISH))
return ..()
if(!user.canUseTopic(src) || !isturf(user.loc) || !user.Adjacent(src) || !user.CanReach(src))
return
dive_into(user)
/obj/structure/closet/emag_act(mob/user)
. = ..()
if(!secure || broken)
return
user.visible_message("<span class='warning'>Sparks fly from [src]!</span>",
"<span class='warning'>You scramble [src]'s lock, breaking it open!</span>",
"<span class='italics'>You hear a faint electrical spark.</span>")
playsound(src, "sparks", 50, 1)
broken = TRUE
locked = FALSE
if(!QDELETED(lockerelectronics))
QDEL_NULL(lockerelectronics)
update_icon()
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
/obj/structure/closet/emp_act(severity)
. = ..()
if(. & EMP_PROTECT_SELF)
return
if (!(. & EMP_PROTECT_CONTENTS))
for(var/obj/O in src)
O.emp_act(severity)
if(!secure || broken)
return ..()
if(prob(severity/2))
locked = !locked
update_icon()
if(prob(severity/5) && !opened)
if(!locked)
open()
else
req_access = list()
req_access += pick(get_all_accesses())
if(!QDELETED(lockerelectronics))
lockerelectronics.accesses = req_access
/obj/structure/closet/contents_explosion(severity, target)
for(var/atom/A in contents)
A.ex_act(severity, target)
CHECK_TICK
/obj/structure/closet/singularity_act()
dump_contents()
..()
/obj/structure/closet/AllowDrop()
return TRUE
/obj/structure/closet/return_temperature()
return
/obj/structure/closet/proc/dive_into(mob/living/user)
var/turf/T1 = get_turf(user)
var/turf/T2 = get_turf(src)
if(!opened)
if(locked)
togglelock(user, TRUE)
if(!open(user))
to_chat(user, "<span class='warning'>It won't budge!</span>")
return
step_towards(user, T2)
T1 = get_turf(user)
if(T1 == T2)
user.set_resting(TRUE, TRUE)
if(!close(user))
to_chat(user, "<span class='warning'>You can't get [src] to close!</span>")
user.set_resting(FALSE, TRUE)
return
user.set_resting(FALSE, TRUE)
togglelock(user)
T1.visible_message("<span class='warning'>[user] dives into [src]!</span>")
/obj/structure/closet/canReachInto(atom/user, atom/target, list/next, view_only, obj/item/tool)
return ..() && opened
if(allowed(user))
return TRUE
to_chat(user, "<span class='notice'>Access denied.</span>")
@@ -19,3 +19,50 @@
desc = "A sturdier card-locked storage unit used for bulky shipments."
max_integrity = 500 // Same as crates.
melee_min_damage = 25 // Idem.
/obj/structure/closet/secure_closet/goodies/owned
name = "private locker"
desc = "A locker designed to only open for who purchased its contents."
///Account of the person buying the crate if private purchasing.
var/datum/bank_account/buyer_account
///Department of the person buying the crate if buying via the NIRN app.
var/datum/bank_account/department/department_account
///Is the secure crate opened or closed?
var/privacy_lock = TRUE
///Is the crate being bought by a person, or a budget card?
var/department_purchase = FALSE
/obj/structure/closet/secure_closet/goodies/owned/examine(mob/user)
. = ..()
. += "<span class='notice'>It's locked with a privacy lock, and can only be unlocked by the buyer's ID.</span>"
/obj/structure/closet/secure_closet/goodies/owned/Initialize(mapload, datum/bank_account/_buyer_account)
. = ..()
buyer_account = _buyer_account
if(istype(buyer_account, /datum/bank_account/department))
department_purchase = TRUE
department_account = buyer_account
/obj/structure/closet/secure_closet/goodies/owned/togglelock(mob/living/user, silent)
if(privacy_lock)
if(!broken)
var/obj/item/card/id/id_card = user.get_idcard(TRUE)
if(id_card)
if(id_card.registered_account)
if(id_card.registered_account == buyer_account || (department_purchase && (id_card.registered_account?.account_job?.paycheck_department) == (department_account.department_id)))
if(iscarbon(user))
add_fingerprint(user)
locked = !locked
user.visible_message("<span class='notice'>[user] unlocks [src]'s privacy lock.</span>",
"<span class='notice'>You unlock [src]'s privacy lock.</span>")
privacy_lock = FALSE
update_icon()
else if(!silent)
to_chat(user, "<span class='notice'>Bank account does not match with buyer!</span>")
else if(!silent)
to_chat(user, "<span class='notice'>No linked bank account detected!</span>")
else if(!silent)
to_chat(user, "<span class='notice'>No ID detected!</span>")
else if(!silent)
to_chat(user, "<span class='warning'>[src] is broken!</span>")
else ..()
@@ -17,10 +17,13 @@
material_drop_amount = 5
var/obj/item/paper/fluff/jobs/cargo/manifest/manifest
/obj/structure/closet/crate/New()
..()
/obj/structure/closet/crate/Initialize()
. = ..()
if(icon_state == "[initial(icon_state)]open")
opened = TRUE
// AddElement(/datum/element/climbable, climb_time = crate_climb_time * 0.5, climb_stun = 0)
// else
// AddElement(/datum/element/climbable, climb_time = crate_climb_time, climb_stun = 0)
update_icon()
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target)
@@ -46,21 +49,16 @@
if(manifest)
tear_manifest(user)
/obj/structure/closet/crate/tool_interact(obj/item/W, mob/user)
if(W.tool_behaviour == TOOL_WIRECUTTER && manifest)
tear_manifest(user)
return TRUE
return ..()
/obj/structure/closet/crate/open(mob/living/user)
/obj/structure/closet/crate/open(mob/living/user, force = FALSE)
. = ..()
if(. && manifest)
to_chat(user, "<span class='notice'>The manifest is torn off [src].</span>")
playsound(src, 'sound/items/poster_ripped.ogg', 75, 1)
playsound(src, 'sound/items/poster_ripped.ogg', 75, TRUE)
manifest.forceMove(get_turf(src))
manifest = null
update_icon()
// cit specific
/obj/structure/closet/crate/handle_lock_addition()
return
@@ -69,7 +67,7 @@
/obj/structure/closet/crate/proc/tear_manifest(mob/user)
to_chat(user, "<span class='notice'>You tear the manifest off of [src].</span>")
playsound(src, 'sound/items/poster_ripped.ogg', 75, 1)
playsound(src, 'sound/items/poster_ripped.ogg', 75, TRUE)
manifest.forceMove(loc)
if(ishuman(user))
@@ -80,16 +80,25 @@
name = "private crate"
desc = "A crate cover designed to only open for who purchased its contents."
icon_state = "privatecrate"
///Account of the person buying the crate if private purchasing.
var/datum/bank_account/buyer_account
///Department of the person buying the crate if buying via the NIRN app.
var/datum/bank_account/department/department_account
///Is the secure crate opened or closed?
var/privacy_lock = TRUE
///Is the crate being bought by a person, or a budget card?
var/department_purchase = FALSE
/obj/structure/closet/crate/secure/owned/examine(mob/user)
. = ..()
to_chat(user, "<span class='notice'>It's locked with a privacy lock, and can only be unlocked by the buyer's ID.</span>")
. += "<span class='notice'>It's locked with a privacy lock, and can only be unlocked by the buyer's ID.</span>"
/obj/structure/closet/crate/secure/owned/Initialize(mapload, datum/bank_account/_buyer_account)
. = ..()
buyer_account = _buyer_account
if(istype(buyer_account, /datum/bank_account/department))
department_purchase = TRUE
department_account = buyer_account
/obj/structure/closet/crate/secure/owned/togglelock(mob/living/user, silent)
if(privacy_lock)
@@ -97,7 +106,7 @@
var/obj/item/card/id/id_card = user.get_idcard(TRUE)
if(id_card)
if(id_card.registered_account)
if(id_card.registered_account == buyer_account)
if(id_card.registered_account == buyer_account || (department_purchase && (id_card.registered_account?.account_job?.paycheck_department) == (department_account.department_id)))
if(iscarbon(user))
add_fingerprint(user)
locked = !locked
@@ -662,6 +662,72 @@
to_chat(M,"<span class='notice'>You're once again longer hearing deadchat.</span>")
/datum/action/disguise
name = "Disguise"
button_icon_state = "ling_transform"
icon_icon = 'icons/mob/actions/actions_changeling.dmi'
background_icon_state = "bg_mime"
var/currently_disguised = FALSE
var/static/list/mob_blacklist = typecacheof(list(
/mob/living/simple_animal/pet,
/mob/living/simple_animal/hostile/retaliate/goose,
/mob/living/simple_animal/hostile/poison,
/mob/living/simple_animal/hostile/retaliate/goat,
/mob/living/simple_animal/cow,
/mob/living/simple_animal/chick,
/mob/living/simple_animal/chicken,
/mob/living/simple_animal/kiwi,
/mob/living/simple_animal/babyKiwi,
/mob/living/simple_animal/deer,
/mob/living/simple_animal/parrot,
/mob/living/simple_animal/hostile/lizard,
/mob/living/simple_animal/crab,
/mob/living/simple_animal/cockroach,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/mouse,
/mob/living/simple_animal/sloth,
/mob/living/simple_animal/opossum,
/mob/living/simple_animal/hostile/bear,
/mob/living/simple_animal/hostile/asteroid/polarbear,
/mob/living/simple_animal/hostile/asteroid/wolf,
/mob/living/carbon/monkey,
/mob/living/simple_animal/hostile/gorilla,
/mob/living/carbon/alien/larva,
/mob/living/simple_animal/hostile/retaliate/frog
))
/datum/action/disguise/Trigger()
var/mob/living/carbon/human/H = owner
if(!currently_disguised)
var/user_object_type = input(H, "Disguising as OBJECT or MOB?") as null|anything in list("OBJECT", "MOB")
if(user_object_type)
var/search_term = stripped_input(H, "Enter the search term")
if(search_term)
var/list_to_search
if(user_object_type == "MOB")
list_to_search = subtypesof(/mob) - mob_blacklist
else
list_to_search = subtypesof(/obj)
var/list/filtered_results = list()
for(var/some_search_item in list_to_search)
if(findtext("[some_search_item]", search_term))
filtered_results += some_search_item
if(!length(filtered_results))
to_chat(H, "Nothing matched your search query!")
else
var/disguise_selection = input("Select item to disguise as") as null|anything in filtered_results
if(disguise_selection)
var/atom/disguise_item = disguise_selection
var/image/I = image(icon = initial(disguise_item.icon), icon_state = initial(disguise_item.icon_state), loc = H)
I.override = TRUE
I.layer = ABOVE_MOB_LAYER
H.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "ghost_cafe_disguise", I)
currently_disguised = TRUE
else
H.remove_alt_appearance("ghost_cafe_disguise")
currently_disguised = FALSE
/obj/effect/mob_spawn/human/ghostcafe/special(mob/living/carbon/human/new_spawn)
if(new_spawn.client)
new_spawn.client.prefs.copy_to(new_spawn)
@@ -676,10 +742,11 @@
ADD_TRAIT(new_spawn, TRAIT_SIXTHSENSE, GHOSTROLE_TRAIT)
ADD_TRAIT(new_spawn, TRAIT_EXEMPT_HEALTH_EVENTS, GHOSTROLE_TRAIT)
ADD_TRAIT(new_spawn, TRAIT_NO_MIDROUND_ANTAG, GHOSTROLE_TRAIT) //The mob can't be made into a random antag, they are still eligible for ghost roles popups.
ADD_TRAIT(new_spawn, TRAIT_PACIFISM, GHOSTROLE_TRAIT)
to_chat(new_spawn,"<span class='boldwarning'>Ghosting is free!</span>")
var/datum/action/toggle_dead_chat_mob/D = new(new_spawn)
D.Grant(new_spawn)
var/datum/action/disguise/disguise_action = new(new_spawn)
disguise_action.Grant(new_spawn)
/datum/outfit/ghostcafe
name = "ID, jumpsuit and shoes"
@@ -199,8 +199,7 @@
return TRUE
/obj/item/gun_control/attack(mob/living/M, mob/living/user)
M.lastattacker = user.real_name
M.lastattackerckey = user.ckey
M.set_last_attacker(user)
M.attacked_by(src, user)
add_fingerprint(user)
+7 -7
View File
@@ -3,7 +3,7 @@
#define STAIR_TERMINATOR_YES 2
// dir determines the direction of travel to go upwards (due to lack of sprites, currently only 1 and 2 make sense)
// stairs require /turf/open/transparent/openspace as the tile above them to work
// stairs require /turf/open/openspace as the tile above them to work
// multiple stair objects can be chained together; the Z level transition will happen on the final stair object in the chain
/obj/structure/stairs
@@ -12,7 +12,7 @@
icon_state = "stairs"
anchored = TRUE
var/force_open_above = FALSE // replaces the turf above this stair obj with /turf/open/transparent/openspace
var/force_open_above = FALSE // replaces the turf above this stair obj with /turf/open/openspace
var/terminator_mode = STAIR_TERMINATOR_AUTOMATIC
var/turf/listeningTo
@@ -107,23 +107,23 @@
/obj/structure/stairs/proc/build_signal_listener()
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_TURF_MULTIZ_NEW)
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
RegisterSignal(T, COMSIG_TURF_MULTIZ_NEW, .proc/on_multiz_new)
listeningTo = T
/obj/structure/stairs/proc/force_open_above()
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
if(T && !istype(T))
T.ChangeTurf(/turf/open/transparent/openspace, flags = CHANGETURF_INHERIT_AIR)
T.ChangeTurf(/turf/open/openspace, flags = CHANGETURF_INHERIT_AIR)
/obj/structure/stairs/proc/on_multiz_new(turf/source, dir)
//SIGNAL_HANDLER
SHOULD_NOT_SLEEP(TRUE) //the same thing.
if(dir == UP)
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
if(T && !istype(T))
T.ChangeTurf(/turf/open/transparent/openspace, flags = CHANGETURF_INHERIT_AIR)
T.ChangeTurf(/turf/open/openspace, flags = CHANGETURF_INHERIT_AIR)
/obj/structure/stairs/intercept_zImpact(atom/movable/AM, levels = 1)
. = ..()
@@ -93,6 +93,9 @@
user.stop_pulling()
return ..()
/obj/structure/table/attack_robot(mob/user)
on_attack_hand(user)
/obj/structure/table/attack_tk()
return FALSE
@@ -67,6 +67,9 @@
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
update_icon()
/obj/structure/tank_dispenser/attack_robot(mob/user)
return _try_interact(user)
/obj/structure/tank_dispenser/ui_state(mob/user)
return GLOB.physical_state