Merge remote-tracking branch 'citadel/master' into auxtools-atmos
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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!"
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -721,24 +721,24 @@
|
||||
|
||||
/obj/item/disk/medical/defib_heal
|
||||
name = "Defibrillator Healing Disk"
|
||||
desc = "An upgrade which increases the healing power of the defibrillator"
|
||||
desc = "An upgrade which increases the healing power of the defibrillator."
|
||||
icon_state = "heal_disk"
|
||||
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
|
||||
|
||||
/obj/item/disk/medical/defib_shock
|
||||
name = "Defibrillator Anti-Shock Disk"
|
||||
desc = "A safety upgrade that guarantees only the patient will get shocked"
|
||||
desc = "A safety upgrade that guarantees only the patient will get shocked."
|
||||
icon_state = "zap_disk"
|
||||
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
|
||||
|
||||
/obj/item/disk/medical/defib_decay
|
||||
name = "Defibrillator Body-Decay Extender Disk"
|
||||
desc = "An upgrade allowing the defibrillator to work on more decayed bodies"
|
||||
desc = "An upgrade allowing the defibrillator to work on bodies that have decayed further."
|
||||
icon_state = "body_disk"
|
||||
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 16000, /datum/material/silver = 6000, /datum/material/titanium = 2000)
|
||||
|
||||
/obj/item/disk/medical/defib_speed
|
||||
name = "Defibrillator Fast Charge Disk"
|
||||
desc = "An upgrade to the defibrillator capacitors, which let it charge faster"
|
||||
desc = "An upgrade to the defibrillator capacitors, which lets it charge faster."
|
||||
icon_state = "fast_disk"
|
||||
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 8000, /datum/material/gold = 26000, /datum/material/silver = 26000)
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
@@ -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
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
|
||||
/obj/item/melee/proc/check_martial_counter(mob/living/carbon/human/target, mob/living/carbon/human/user)
|
||||
if(target.check_martial_melee_block())
|
||||
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
|
||||
target.visible_message("<span class='danger'>[target.name] blocks your attack!</span>",
|
||||
"<span class='userdanger'>You block the attack!</span>")
|
||||
user.Stun(40)
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/chainofcommand
|
||||
@@ -272,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()
|
||||
@@ -403,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
|
||||
@@ -432,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
|
||||
@@ -440,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)
|
||||
|
||||
@@ -466,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>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -16,17 +16,21 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
attack_speed = CLICK_CD_MELEE
|
||||
|
||||
var/stamforce = 35
|
||||
var/stamina_loss_amount = 35
|
||||
var/turned_on = FALSE
|
||||
var/knockdown = TRUE
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/hitcost = 750
|
||||
var/throw_hit_chance = 35
|
||||
var/preload_cell_type //if not empty the baton starts with this type of cell
|
||||
var/cooldown_duration = 5 SECONDS //How long our baton rightclick goes on cooldown for after applying a knockdown
|
||||
var/status_duration = 5 SECONDS //how long our status effects last for otherwise
|
||||
COOLDOWN_DECLARE(shove_cooldown)
|
||||
|
||||
/obj/item/melee/baton/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Right click attack while in combat mode to disarm instead of stun.</span>"
|
||||
. += "<span class='notice'>Right click attack while in combat mode to knockdown, but only once per [cooldown_duration / 10] seconds.</span>"
|
||||
. += "<span class='notice'>This knockdown will also put them off balance for [status_duration / 20] seconds, allowing you to shove a weapon out of their hand with a right click in Disarm intent.</span>"
|
||||
|
||||
/obj/item/melee/baton/get_cell()
|
||||
. = cell
|
||||
@@ -53,8 +57,8 @@
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
//Only mob/living types have stun handling
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom))
|
||||
baton_stun(hit_atom)
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrownby)
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
|
||||
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
|
||||
preload_cell_type = /obj/item/stock_parts/cell/high/plus
|
||||
@@ -74,6 +78,16 @@
|
||||
//we're below minimum, turn off
|
||||
switch_status(FALSE)
|
||||
|
||||
///Check for our cell to determine how much penetration our weapon does.
|
||||
/obj/item/melee/baton/proc/get_cell_zap_pen()
|
||||
var/obj/item/stock_parts/cell/copper_top = get_cell()
|
||||
if(copper_top)
|
||||
var/chargepower = copper_top.maxcharge
|
||||
var/zap_penetration = (chargepower/1000) //This is our effective penetration. Every 1000 max charge, we get 1 pen power. A high capacity cell is equal to 10 armor pen, as an example.
|
||||
return zap_penetration
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/melee/baton/proc/switch_status(new_status = FALSE, silent = FALSE)
|
||||
if(turned_on != new_status)
|
||||
turned_on = new_status
|
||||
@@ -101,6 +115,7 @@
|
||||
var/obj/item/stock_parts/cell/copper_top = get_cell()
|
||||
if(copper_top)
|
||||
. += "<span class='notice'>\The [src] is [round(copper_top.percent())]% charged.</span>"
|
||||
. += "<span class='notice'>\The [src] currently can penetrate [round(copper_top.maxcharge/1000)]% of enemy armor thanks to it's loaded cell.</span>"
|
||||
else
|
||||
. += "<span class='warning'>\The [src] does not have a power source installed.</span>"
|
||||
|
||||
@@ -150,10 +165,10 @@
|
||||
/obj/item/melee/baton/alt_pre_attack(atom/A, mob/living/user, params)
|
||||
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
|
||||
return
|
||||
. = common_baton_melee(A, user, TRUE) //return true (attackchain interrupt) if this also returns true. no harm-disarming.
|
||||
. = common_baton_melee(A, user, TRUE) //return true (attackchain interrupt) if this also returns true. no harm-shoving.
|
||||
|
||||
//return TRUE to interrupt attack chain.
|
||||
/obj/item/melee/baton/proc/common_baton_melee(mob/M, mob/living/user, disarming = FALSE)
|
||||
/obj/item/melee/baton/proc/common_baton_melee(mob/M, mob/living/user, shoving = FALSE)
|
||||
if(iscyborg(M) || !isliving(M)) //can't baton cyborgs
|
||||
return FALSE
|
||||
if(turned_on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
@@ -167,21 +182,26 @@
|
||||
if(check_martial_counter(L, user))
|
||||
return TRUE
|
||||
if(turned_on)
|
||||
if(baton_stun(M, user, disarming))
|
||||
if(baton_stun(M, user, shoving))
|
||||
user.do_attack_animation(M)
|
||||
else if(user.a_intent != INTENT_HARM) //they'll try to bash in the last proc.
|
||||
M.visible_message("<span class='warning'>[user] has prodded [M] with [src]. Luckily it was off.</span>", \
|
||||
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
|
||||
return disarming || (user.a_intent != INTENT_HARM)
|
||||
return shoving || (user.a_intent != INTENT_HARM)
|
||||
|
||||
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/living/user, disarming = FALSE)
|
||||
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/living/user, shoving = FALSE)
|
||||
var/list/return_list = list()
|
||||
if(L.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, return_list) & BLOCK_SUCCESS) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return FALSE
|
||||
var/stunpwr = stamforce
|
||||
stunpwr = block_calculate_resultant_damage(stunpwr, return_list)
|
||||
var/final_stamina_loss_amount = stamina_loss_amount //Our stunning power for the baton
|
||||
var/shoved = FALSE //Did we succeed on knocking our target over?
|
||||
var/zap_penetration = get_cell_zap_pen() //Find out what kind of cell we have, and calculating the resultant armor pen we get from it
|
||||
var/zap_block = L.run_armor_check(BODY_ZONE_CHEST, "melee", null, null, zap_penetration) //armor check, including calculation for armor penetration, for our attack
|
||||
final_stamina_loss_amount = block_calculate_resultant_damage(final_stamina_loss_amount, return_list)
|
||||
|
||||
var/obj/item/stock_parts/cell/our_cell = get_cell()
|
||||
|
||||
if(!our_cell)
|
||||
switch_status(FALSE)
|
||||
return FALSE
|
||||
@@ -194,26 +214,31 @@
|
||||
L.visible_message("<span class='warning'>[user] has prodded [L] with [src]. Luckily it was out of charge.</span>", \
|
||||
"<span class='warning'>[user] has prodded you with [src]. Luckily it was out of charge.</span>")
|
||||
return FALSE
|
||||
stunpwr *= round(stuncharge/hitcost, 0.1)
|
||||
final_stamina_loss_amount *= round(stuncharge/hitcost, 0.1)
|
||||
|
||||
if(user && !user.UseStaminaBuffer(getweight(user, STAM_COST_BATON_MOB_MULT), warn = TRUE))
|
||||
return FALSE
|
||||
|
||||
if(!disarming)
|
||||
if(knockdown)
|
||||
L.DefaultCombatKnockdown(50, override_stamdmg = 0) //knockdown
|
||||
L.adjustStaminaLoss(stunpwr)
|
||||
else
|
||||
L.drop_all_held_items() //no knockdown/stamina damage, instead disarm.
|
||||
if(shoving && COOLDOWN_FINISHED(src, shove_cooldown) && !HAS_TRAIT(L, TRAIT_IWASBATONED)) //Rightclicking applies a knockdown, but only once every couple of seconds, based on the cooldown_duration var. If they were recently knocked down, they can't be knocked down again by a baton.
|
||||
L.DefaultCombatKnockdown(50, override_stamdmg = 0)
|
||||
L.apply_status_effect(STATUS_EFFECT_TASED_WEAK, status_duration) //Even if they shove themselves up, they're still slowed.
|
||||
L.apply_status_effect(STATUS_EFFECT_OFF_BALANCE, status_duration) //They're very likely to drop items if shoved briefly after a knockdown.
|
||||
shoved = TRUE
|
||||
COOLDOWN_START(src, shove_cooldown, cooldown_duration)
|
||||
ADD_TRAIT(L, TRAIT_IWASBATONED, STATUS_EFFECT_TRAIT) //Prevents swapping to a new baton to avoid the cooldown by just acquiring more batons
|
||||
addtimer(TRAIT_CALLBACK_REMOVE(L, TRAIT_IWASBATONED, STATUS_EFFECT_TRAIT), cooldown_duration)
|
||||
playsound(loc, 'sound/weapons/zapbang.ogg', 50, 1, -1)
|
||||
else //If we cannot/don't knock down the target, we apply a stagger, which keeps them from just running off
|
||||
L.apply_status_effect(STATUS_EFFECT_STAGGERED, status_duration)
|
||||
|
||||
L.apply_effect(EFFECT_STUTTER, stamforce)
|
||||
L.apply_damage (final_stamina_loss_amount, STAMINA, BODY_ZONE_CHEST, zap_block)
|
||||
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 [disarming? "disarmed" : "stunned"] [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has [disarming? "disarmed" : "stunned"] you with [src]!</span>")
|
||||
log_combat(user, L, disarming? "disarmed" : "stunned")
|
||||
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)
|
||||
|
||||
@@ -228,7 +253,7 @@
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.DefaultCombatKnockdown(stamforce*6)
|
||||
user.DefaultCombatKnockdown(stamina_loss_amount*6)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
deductcharge(hitcost)
|
||||
|
||||
@@ -306,18 +331,20 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 3
|
||||
throwforce = 5
|
||||
stamforce = 25
|
||||
stamina_loss_amount = 25
|
||||
hitcost = 1000
|
||||
throw_hit_chance = 10
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
cooldown_duration = 7 SECONDS //It's a little on the weak side
|
||||
status_duration = 3 //Slows someone for a tiny bit
|
||||
var/obj/item/assembly/igniter/sparkler
|
||||
|
||||
/obj/item/melee/baton/cattleprod/Initialize()
|
||||
. = ..()
|
||||
sparkler = new (src)
|
||||
sparkler.activate_cooldown = 5
|
||||
sparkler.activate_cooldown = 7 //Helps visualize the knockdown
|
||||
|
||||
/obj/item/melee/baton/cattleprod/baton_stun()
|
||||
/obj/item/melee/baton/cattleprod/baton_stun(mob/living/L, mob/living/carbon/user, shoving = FALSE)
|
||||
sparkler?.activate()
|
||||
. = ..()
|
||||
|
||||
@@ -344,8 +371,8 @@
|
||||
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(turned_on)
|
||||
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance))//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom)
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
if(thrownby && !caught)
|
||||
sleep(1)
|
||||
if(!QDELETED(src))
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
/obj/item/tank/internals/air
|
||||
name = "air tank"
|
||||
desc = "Mixed anyone?"
|
||||
icon_state = "air"
|
||||
item_state = "air"
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = "teleprod"
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/baton_stun(mob/living/L, mob/living/carbon/user)//handles making things teleport when hit
|
||||
/obj/item/melee/baton/cattleprod/teleprod/baton_stun(mob/living/L, mob/living/carbon/user, shoving = FALSE)//handles making things teleport when hit
|
||||
. = ..()
|
||||
if(!. || L.anchored)
|
||||
return
|
||||
@@ -16,7 +16,7 @@
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.DefaultCombatKnockdown(stamforce * 6)
|
||||
user.DefaultCombatKnockdown(stamina_loss_amount * 6)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
if(do_teleport(user, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE))
|
||||
deductcharge(hitcost)
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -80,9 +80,9 @@
|
||||
SStgui.close_uis(src)
|
||||
. = ..()
|
||||
|
||||
/// @depricated DO NOT USE
|
||||
/obj/proc/setAnchored(anchorvalue)
|
||||
SEND_SIGNAL(src, COMSIG_OBJ_SETANCHORED, anchorvalue)
|
||||
anchored = anchorvalue
|
||||
set_anchored(anchorvalue)
|
||||
|
||||
/obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
//Adding canvases
|
||||
/obj/structure/easel/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/canvas))
|
||||
var/obj/item/canvas/C = I
|
||||
user.dropItemToGround(C)
|
||||
painting = C
|
||||
C.forceMove(get_turf(src))
|
||||
C.layer = layer+0.1
|
||||
user.visible_message("<span class='notice'>[user] puts \the [C] on \the [src].</span>","<span class='notice'>You place \the [C] on \the [src].</span>")
|
||||
var/obj/item/canvas/canvas = I
|
||||
user.dropItemToGround(canvas)
|
||||
painting = canvas
|
||||
canvas.forceMove(get_turf(src))
|
||||
canvas.layer = layer+0.1
|
||||
user.visible_message("<span class='notice'>[user] puts \the [canvas] on \the [src].</span>","<span class='notice'>You place \the [canvas] on \the [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -40,13 +40,14 @@
|
||||
desc = "Draw out your soul on this canvas!"
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "11x11"
|
||||
// flags_1 = UNPAINTABLE_1
|
||||
resistance_flags = FLAMMABLE
|
||||
var/width = 11
|
||||
var/height = 11
|
||||
var/list/grid
|
||||
var/canvas_color = "#ffffff" //empty canvas color
|
||||
var/used = FALSE
|
||||
var/painting_name //Painting name, this is set after framing.
|
||||
var/painting_name = "Untitled Artwork" //Painting name, this is set after framing.
|
||||
var/finalized = FALSE //Blocks edits
|
||||
var/author_ckey
|
||||
var/icon_generated = FALSE
|
||||
@@ -132,17 +133,19 @@
|
||||
|
||||
/obj/item/canvas/update_overlays()
|
||||
. = ..()
|
||||
if(!icon_generated)
|
||||
if(used)
|
||||
var/mutable_appearance/detail = mutable_appearance(icon,"[icon_state]wip")
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
else
|
||||
if(icon_generated)
|
||||
var/mutable_appearance/detail = mutable_appearance(generated_icon)
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
return
|
||||
if(!used)
|
||||
return
|
||||
|
||||
var/mutable_appearance/detail = mutable_appearance(icon, "[icon_state]wip")
|
||||
detail.pixel_x = 1
|
||||
detail.pixel_y = 1
|
||||
. += detail
|
||||
|
||||
/obj/item/canvas/proc/generate_proper_overlay()
|
||||
if(icon_generated)
|
||||
@@ -167,8 +170,8 @@
|
||||
if(!I)
|
||||
return
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = I
|
||||
return C.paint_color
|
||||
var/obj/item/toy/crayon/crayon = I
|
||||
return crayon.paint_color
|
||||
else if(istype(I, /obj/item/pen))
|
||||
var/obj/item/pen/P = I
|
||||
switch(P.colour)
|
||||
@@ -184,7 +187,7 @@
|
||||
|
||||
/obj/item/canvas/proc/try_rename(mob/user)
|
||||
var/new_name = stripped_input(user,"What do you want to name the painting?")
|
||||
if(!painting_name && new_name && user.canUseTopic(src,BE_CLOSE))
|
||||
if(new_name != painting_name && new_name && user.canUseTopic(src,BE_CLOSE))
|
||||
painting_name = new_name
|
||||
SStgui.update_uis(src)
|
||||
|
||||
@@ -215,12 +218,23 @@
|
||||
framed_offset_x = 5
|
||||
framed_offset_y = 6
|
||||
|
||||
/obj/item/canvas/twentyfour_twentyfour
|
||||
name = "ai universal standard canvas"
|
||||
desc = "Besides being very large, the AI can accept these as a display from their internal database after you've hung it up."
|
||||
icon_state = "24x24"
|
||||
width = 24
|
||||
height = 24
|
||||
pixel_x = 2
|
||||
pixel_y = 1
|
||||
framed_offset_x = 4
|
||||
framed_offset_y = 5
|
||||
|
||||
/obj/item/wallframe/painting
|
||||
name = "painting frame"
|
||||
desc = "The perfect showcase for your favorite deathtrap memories."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
custom_materials = null
|
||||
flags_1 = 0
|
||||
custom_materials = list(/datum/material/wood = 2000)
|
||||
flags_1 = NONE
|
||||
icon_state = "frame-empty"
|
||||
result_path = /obj/structure/sign/painting
|
||||
|
||||
@@ -229,8 +243,13 @@
|
||||
desc = "Art or \"Art\"? You decide."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "frame-empty"
|
||||
// base_icon_state = "frame"
|
||||
custom_materials = list(/datum/material/wood = 2000)
|
||||
buildable_sign = FALSE
|
||||
var/obj/item/canvas/C
|
||||
///Canvas we're currently displaying.
|
||||
var/obj/item/canvas/current_canvas
|
||||
///Description set when canvas is added.
|
||||
var/desc_with_canvas
|
||||
var/persistence_id
|
||||
|
||||
/obj/structure/sign/painting/Initialize(mapload, dir, building)
|
||||
@@ -242,64 +261,78 @@
|
||||
if(building)
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0
|
||||
desc = current_canvas ? desc_with_canvas : initial(desc)
|
||||
|
||||
/obj/structure/sign/painting/Destroy()
|
||||
. = ..()
|
||||
SSpersistence.painting_frames -= src
|
||||
|
||||
/obj/structure/sign/painting/attackby(obj/item/I, mob/user, params)
|
||||
if(!C && istype(I, /obj/item/canvas))
|
||||
if(!current_canvas && istype(I, /obj/item/canvas))
|
||||
frame_canvas(user,I)
|
||||
else if(C && !C.painting_name && istype(I,/obj/item/pen))
|
||||
else if(current_canvas && current_canvas.painting_name == initial(current_canvas.painting_name) && istype(I,/obj/item/pen))
|
||||
try_rename(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/painting/examine(mob/user)
|
||||
. = ..()
|
||||
if(C)
|
||||
C.ui_interact(user)
|
||||
if(persistence_id)
|
||||
. += "<span class='notice'>Any painting placed here will be archived at the end of the shift.</span>"
|
||||
if(current_canvas)
|
||||
current_canvas.ui_interact(user)
|
||||
. += "<span class='notice'>Use wirecutters to remove the painting.</span>"
|
||||
|
||||
/obj/structure/sign/painting/wirecutter_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(C)
|
||||
C.forceMove(drop_location())
|
||||
C = null
|
||||
if(current_canvas)
|
||||
current_canvas.forceMove(drop_location())
|
||||
current_canvas = null
|
||||
to_chat(user, "<span class='notice'>You remove the painting from the frame.</span>")
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas)
|
||||
if(user.transferItemToLoc(new_canvas,src))
|
||||
C = new_canvas
|
||||
if(!C.finalized)
|
||||
C.finalize(user)
|
||||
to_chat(user,"<span class='notice'>You frame [C].</span>")
|
||||
current_canvas = new_canvas
|
||||
if(!current_canvas.finalized)
|
||||
current_canvas.finalize(user)
|
||||
to_chat(user,"<span class='notice'>You frame [current_canvas].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/painting/proc/try_rename(mob/user)
|
||||
if(!C.painting_name)
|
||||
C.try_rename(user)
|
||||
if(current_canvas.painting_name == initial(current_canvas.painting_name))
|
||||
current_canvas.try_rename(user)
|
||||
|
||||
// /obj/structure/sign/painting/update_name(updates)
|
||||
// name = current_canvas ? "painting - [current_canvas.painting_name]" : initial(name)
|
||||
// return ..()
|
||||
|
||||
// /obj/structure/sign/painting/update_desc(updates)
|
||||
// desc = current_canvas ? desc_with_canvas : initial(desc)
|
||||
// return ..()
|
||||
|
||||
/obj/structure/sign/painting/update_icon_state()
|
||||
. = ..()
|
||||
if(C && C.generated_icon)
|
||||
icon_state = null
|
||||
else
|
||||
// icon_state = "[base_icon_state]-[current_canvas?.generated_icon ? "overlay" : "empty"]"
|
||||
if(current_canvas?.generated_icon)
|
||||
icon_state = "frame-empty"
|
||||
|
||||
else
|
||||
icon_state = null // or "frame-empty"
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/painting/update_overlays()
|
||||
. = ..()
|
||||
if(C && C.generated_icon)
|
||||
var/mutable_appearance/MA = mutable_appearance(C.generated_icon)
|
||||
MA.pixel_x = C.framed_offset_x
|
||||
MA.pixel_y = C.framed_offset_y
|
||||
. += MA
|
||||
var/mutable_appearance/frame = mutable_appearance(C.icon,"[C.icon_state]frame")
|
||||
frame.pixel_x = C.framed_offset_x - 1
|
||||
frame.pixel_y = C.framed_offset_y - 1
|
||||
. += frame
|
||||
if(!current_canvas?.generated_icon)
|
||||
return
|
||||
|
||||
var/mutable_appearance/MA = mutable_appearance(current_canvas.generated_icon)
|
||||
MA.pixel_x = current_canvas.framed_offset_x
|
||||
MA.pixel_y = current_canvas.framed_offset_y
|
||||
. += MA
|
||||
var/mutable_appearance/frame = mutable_appearance(current_canvas.icon,"[current_canvas.icon_state]frame")
|
||||
frame.pixel_x = current_canvas.framed_offset_x - 1
|
||||
frame.pixel_y = current_canvas.framed_offset_y - 1
|
||||
. += frame
|
||||
|
||||
/obj/structure/sign/painting/proc/load_persistent()
|
||||
if(!persistence_id)
|
||||
@@ -310,6 +343,10 @@
|
||||
var/title = chosen["title"]
|
||||
var/author = chosen["ckey"]
|
||||
var/png = "data/paintings/[persistence_id]/[chosen["md5"]].png"
|
||||
if(!title)
|
||||
title = "Untitled Artwork" //Should prevent NULL named art from loading as NULL, if you're still getting the admin log chances are persistence is broken
|
||||
if(!title)
|
||||
message_admins("<span class='notice'>Painting with NO TITLE loaded on a [persistence_id] frame in [get_area(src)]. Please delete it, it is saved in the database with no name and will create bad assets.</span>")
|
||||
if(!fexists(png))
|
||||
stack_trace("Persistent painting [chosen["md5"]].png was not found in [persistence_id] directory.")
|
||||
return
|
||||
@@ -328,17 +365,20 @@
|
||||
new_canvas.finalized = TRUE
|
||||
new_canvas.painting_name = title
|
||||
new_canvas.author_ckey = author
|
||||
C = new_canvas
|
||||
new_canvas.name = "painting - [title]"
|
||||
current_canvas = new_canvas
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/painting/proc/save_persistent()
|
||||
if(!persistence_id || !C)
|
||||
if(!persistence_id || !current_canvas)
|
||||
return
|
||||
if(sanitize_filename(persistence_id) != persistence_id)
|
||||
stack_trace("Invalid persistence_id - [persistence_id]")
|
||||
return
|
||||
var/data = C.get_data_string()
|
||||
var/md5 = md5(data)
|
||||
if(!current_canvas.painting_name)
|
||||
current_canvas.painting_name = "Untitled Artwork"
|
||||
var/data = current_canvas.get_data_string()
|
||||
var/md5 = md5(lowertext(data))
|
||||
var/list/current = SSpersistence.paintings[persistence_id]
|
||||
if(!current)
|
||||
current = list()
|
||||
@@ -347,10 +387,10 @@
|
||||
return
|
||||
var/png_directory = "data/paintings/[persistence_id]/"
|
||||
var/png_path = png_directory + "[md5].png"
|
||||
var/result = rustg_dmi_create_png(png_path,"[C.width]","[C.height]",data)
|
||||
var/result = rustg_dmi_create_png(png_path,"[current_canvas.width]","[current_canvas.height]",data)
|
||||
if(result)
|
||||
CRASH("Error saving persistent painting: [result]")
|
||||
current += list(list("title" = C.painting_name , "md5" = md5, "ckey" = C.author_ckey))
|
||||
current += list(list("title" = current_canvas.painting_name , "md5" = md5, "ckey" = current_canvas.author_ckey))
|
||||
SSpersistence.paintings[persistence_id] = current
|
||||
|
||||
/obj/item/canvas/proc/fill_grid_from_icon(icon/I)
|
||||
@@ -361,12 +401,21 @@
|
||||
|
||||
//Presets for art gallery mapping, for paintings to be shared across stations
|
||||
/obj/structure/sign/painting/library
|
||||
name = "\improper Public Painting Exhibit mounting"
|
||||
desc = "For art pieces hung by the public."
|
||||
desc_with_canvas = "A piece of art (or \"art\"). Anyone could've hung it."
|
||||
persistence_id = "library"
|
||||
|
||||
/obj/structure/sign/painting/library_secure
|
||||
name = "\improper Curated Painting Exhibit mounting"
|
||||
desc = "For masterpieces hand-picked by the curator."
|
||||
desc_with_canvas = "A masterpiece hand-picked by the curator, supposedly."
|
||||
persistence_id = "library_secure"
|
||||
|
||||
/obj/structure/sign/painting/library_private // keep your smut away from prying eyes, or non-librarians at least
|
||||
name = "\improper Private Painting Exhibit mounting"
|
||||
desc = "For art pieces deemed too subversive or too illegal to be shared outside of curators."
|
||||
desc_with_canvas = "A painting hung away from lesser minds."
|
||||
persistence_id = "library_private"
|
||||
|
||||
/obj/structure/sign/painting/vv_get_dropdown()
|
||||
@@ -379,11 +428,11 @@
|
||||
if(!check_rights(NONE))
|
||||
return
|
||||
var/mob/user = usr
|
||||
if(!persistence_id || !C)
|
||||
if(!persistence_id || !current_canvas)
|
||||
to_chat(user,"<span class='warning'>This is not a persistent painting.</span>")
|
||||
return
|
||||
var/md5 = md5(C.get_data_string())
|
||||
var/author = C.author_ckey
|
||||
var/md5 = md5(lowertext(current_canvas.get_data_string()))
|
||||
var/author = current_canvas.author_ckey
|
||||
var/list/current = SSpersistence.paintings[persistence_id]
|
||||
if(current)
|
||||
for(var/list/entry in current)
|
||||
@@ -392,7 +441,8 @@
|
||||
var/png = "data/paintings/[persistence_id]/[md5].png"
|
||||
fdel(png)
|
||||
for(var/obj/structure/sign/painting/P in SSpersistence.painting_frames)
|
||||
if(P.C && md5(P.C.get_data_string()) == md5)
|
||||
QDEL_NULL(P.C)
|
||||
if(P.current_canvas && md5(P.current_canvas.get_data_string()) == md5)
|
||||
QDEL_NULL(P.current_canvas)
|
||||
P.update_icon()
|
||||
log_admin("[key_name(user)] has deleted a persistent painting made by [author].")
|
||||
message_admins("<span class='notice'>[key_name_admin(user)] has deleted persistent painting made by [author].</span>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -73,9 +73,14 @@
|
||||
icon_state = "breaker_drop"
|
||||
|
||||
/obj/structure/femur_breaker/proc/damage_leg(mob/living/carbon/human/H)
|
||||
H.emote("scream")
|
||||
H.apply_damage(150, BRUTE, pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
H.adjustBruteLoss(rand(5,20) + (max(0, H.health))) //Make absolutely sure they end up in crit, so that they can succumb if they wish.
|
||||
var/where_we_snappin_boys = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
H.emote("scream")
|
||||
H.apply_damage(150, BRUTE, where_we_snappin_boys)
|
||||
var/obj/item/bodypart/cracka = H.get_bodypart(where_we_snappin_boys)
|
||||
if(cracka)
|
||||
var/datum/wound/blunt/critical/cracka_lackin = new
|
||||
cracka_lackin.apply_wound(cracka)
|
||||
H.adjustBruteLoss(rand(5,20) + (max(0, H.health))) //Make absolutely sure they end up in crit, so that they can succumb if they wish.
|
||||
|
||||
/obj/structure/femur_breaker/proc/raise_slat()
|
||||
slat_status = BREAKER_SLAT_RAISED
|
||||
|
||||
@@ -590,7 +590,7 @@
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate
|
||||
name = "space pirate sleeper"
|
||||
desc = "A cryo sleeper smelling faintly of rum."
|
||||
desc = "A cryo sleeper smelling faintly of rum. The sleeper looks unstable. <i>Perhaps the pirate within can be killed with the right tools...</i>"
|
||||
job_description = "Space Pirate"
|
||||
random = TRUE
|
||||
icon = 'icons/obj/machines/sleeper.dmi'
|
||||
@@ -608,6 +608,54 @@
|
||||
assignedrole = "Space Pirate"
|
||||
var/rank = "Mate"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.mind.has_antag_datum(/datum/antagonist/pirate))
|
||||
to_chat(user, "<span class='notice'>Your shipmate sails within their dreams for now. Perhaps they may wake up eventually.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>If you want to kill the pirate off, something to pry open the sleeper might be the best way to do it.</span>")
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/attackby(obj/item/W, mob/user, params)
|
||||
if(W.tool_behaviour == TOOL_CROWBAR && user.a_intent != INTENT_HARM)
|
||||
if(user.mind.has_antag_datum(/datum/antagonist/pirate))
|
||||
to_chat(user,"<span class='warning'>Why would you want to do that to your shipmate? That'd kill them.</span>")
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] start to pry open [src]...</span>",
|
||||
"<span class='notice'>You start to pry open [src]...</span>",
|
||||
"<span class='italics'>You hear prying...</span>")
|
||||
W.play_tool_sound(src)
|
||||
if(do_after(user, 100*W.toolspeed, target = src))
|
||||
user.visible_message("<span class='warning'>[user] pries open [src], disrupting the sleep of the pirate within and killing them.</span>",
|
||||
"<span class='notice'>You pry open [src], disrupting the sleep of the pirate within and killing them.</span>",
|
||||
"<span class='italics'>You hear prying, followed by the death rattling of bones.</span>")
|
||||
log_game("[key_name(user)] has successfully pried open [src] and disabled a space pirate spawner.")
|
||||
W.play_tool_sound(src)
|
||||
playsound(src.loc, 'modular_citadel/sound/voice/scream_skeleton.ogg', 50, 1, 4, 1.2)
|
||||
if(rank == "Captain")
|
||||
new /obj/effect/mob_spawn/human/pirate/corpse/captain(get_turf(src))
|
||||
else
|
||||
new /obj/effect/mob_spawn/human/pirate/corpse(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/corpse //occurs when someone pries a pirate out of their sleeper.
|
||||
mob_name = "Dead Space Pirate"
|
||||
death = TRUE
|
||||
instant = TRUE
|
||||
random = FALSE
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/corpse/Destroy()
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/corpse/captain
|
||||
rank = "Captain"
|
||||
mob_name = "Dead Space Pirate Captain"
|
||||
outfit = /datum/outfit/pirate/space/captain
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/special(mob/living/new_spawn)
|
||||
new_spawn.fully_replace_character_name(new_spawn.real_name,generate_pirate_name())
|
||||
new_spawn.mind.add_antag_datum(/datum/antagonist/pirate)
|
||||
@@ -662,6 +710,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 +790,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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -554,7 +554,7 @@
|
||||
if(B.cell)
|
||||
if(B.cell.charge > 0 && B.turned_on)
|
||||
flick("baton_active", src)
|
||||
var/stunforce = B.stamforce
|
||||
var/stunforce = B.stamina_loss_amount
|
||||
user.DefaultCombatKnockdown(stunforce * 2)
|
||||
user.stuttering = stunforce/20
|
||||
B.deductcharge(B.hitcost)
|
||||
|
||||
Reference in New Issue
Block a user