Merge branch 'master' into more_crates+bags

This commit is contained in:
Trilbyspaceclone
2020-03-06 06:31:54 -05:00
committed by GitHub
986 changed files with 384470 additions and 224048 deletions
+3 -4
View File
@@ -36,8 +36,7 @@
//procs that handle the actual buckling and unbuckling
/atom/movable/proc/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!buckled_mobs)
buckled_mobs = list()
LAZYINITLIST(buckled_mobs)
if(!istype(M))
return FALSE
@@ -66,7 +65,7 @@
M.buckled = src
M.setDir(dir)
buckled_mobs |= M
M.update_canmove()
M.update_mobility()
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
post_buckle_mob(M)
@@ -85,7 +84,7 @@
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob.update_mobility()
buckled_mob.clear_alert("buckled")
buckled_mobs -= buckled_mob
SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
+1 -1
View File
@@ -113,7 +113,7 @@
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
if(boing && isliving(A) && !A.stat)
A.Knockdown(40)
A.DefaultCombatKnockdown(40)
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
A.throw_at(target, 5, 1)
boing = 0
+60
View File
@@ -409,6 +409,21 @@
desc = "A poster advertising a movie about some masked men."
icon_state = "poster44"
/obj/structure/sign/poster/contraband/buzzfuzz
name = "Buzz Fuzz"
desc = "A poster advertising the newest drink \"Buzz Fuzz\" with its iconic slogan of ~A Hive of Flavour~."
icon_state = "poster45"
/obj/structure/sign/poster/contraband/scum
name = "Security are Scum"
desc = "Anti-security propaganda. Features a human NanoTrasen security officer being shot in the head, with the words 'Scum' and a short inciteful manifesto. Used to anger security."
icon_state = "poster46"
/obj/structure/sign/poster/contraband/syndicate_logo
name = "Syndicate"
desc = "A poster decipting a snake shaped into an ominous 'S'!"
icon_state = "poster47"
/obj/structure/sign/poster/official
poster_item_name = "motivational poster"
poster_item_desc = "An official Nanotrasen-issued poster to foster a compliant and obedient workforce. It comes with state-of-the-art adhesive backing, for easy pinning to any vertical surface."
@@ -595,4 +610,49 @@
desc = "This informational poster teaches the viewer what carbon dioxide is."
icon_state = "poster35_legit"
/obj/structure/sign/poster/official/spiderlings
name = "Spiderlings"
desc = "This poster informs the crew of the dangers of spiderlings."
icon_state = "poster36_legit"
/obj/structure/sign/poster/official/duelshotgun
name = "Cycler Shotgun Ad"
desc = "A poster advertising an advanced dual magazine tubes shotgun, boasting about how easy it is to swap between the two tubes."
icon_state = "poster37_legit"
/obj/structure/sign/poster/official/fashion
name = "Fashion!"
desc = "An advertisement for 'Fashion!', a popular fashion magazine, depicting a woman with a black dress with a golden trim, she also has a red poppy in her hair."
icon_state = "poster38_legit"
/obj/structure/sign/poster/official/pda_ad600
name = "NT PDA600 Ad"
desc = "A poster advertising an old discounted Nanotrasen PDA. This is the old 600 model, it has a small screen and suffered from security and networking issues."
icon_state = "poster39_legit"
/obj/structure/sign/poster/official/pda_ad800
name = "NT PDA800 Ad"
desc = "An advertisement on an old Nanotrasen PDA model. The 800 fixed a lot of security flaws that the 600 had; it also had large touchscreen and hot-swappable cartridges."
icon_state = "poster40_legit"
/obj/structure/sign/poster/official/hydro_ad
name = "Hydroponics Tray"
desc = "An advertisement for hydroponics trays. Space Station 13's botanical department uses a slightly newer model, but the principles are the same. From left to right: Green means the plant is done, red means the plant is unhealthy, flashing red means pests or weeds, yellow means the plant needs nutriment and blue means the plant needs water."
icon_state = "poster41_legit"
/obj/structure/sign/poster/official/medical_green_cross
name = "Medical"
desc = "A green cross, one of the interplanetary symbol of health and aid. It has a bunch of common languages at the top with translations." // Didn't the American Heart Foundation trademark red crosses? I'm playing it safe with green, not that they'll notice spacegame13 poster.
icon_state = "poster42_legit"
/obj/structure/sign/poster/official/nt_storm_officer
name = "NT Storm Ad"
desc = "An advertisement for NanoTrasen Storm. A premium infantry helmet, This is the officer variant. I comes with a better radio, better HUD software and better targeting sensors."
icon_state = "poster43_legit"
/obj/structure/sign/poster/official/nt_storm
name = "NT Storm Ad"
desc = "An advertisement for NanoTrasen Storm. A premium infantry helmet, It contains a rebreather and full head coverage for use on harsh environments where the air isn't always safe to breathe."
icon_state = "poster44_legit"
#undef PLACE_SPEED
@@ -17,7 +17,7 @@
if(gibs_reagent_id)
reagents.add_reagent(gibs_reagent_id, 5)
if(gibs_bloodtype)
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype, diseases))
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype), diseases)
update_icon()
/obj/effect/decal/cleanable/blood/gibs/update_icon()
@@ -104,4 +104,5 @@
if(explosion_message)
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
"<span class='italics'>You hear an explosion!</span>")
dyn_explosion(location, amount, flashing_factor)
dyn_explosion(location, amount, flashing_factor)
+4 -5
View File
@@ -151,6 +151,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
name = "Medical Doctor"
icon_state = "Medical Doctor"
/obj/effect/landmark/start/paramedic
name = "Paramedic"
icon_state = "Paramedic"
/obj/effect/landmark/start/scientist
name = "Scientist"
icon_state = "Scientist"
@@ -502,8 +506,3 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
/obj/effect/landmark/stationroom/box/engine/New()
. = ..()
templates = CONFIG_GET(keyed_list/box_random_engine)
// Landmark for the mining station
/obj/effect/landmark/stationroom/lavaland/station
templates = list("Public Mining Base" = 3)
icon = 'icons/rooms/Lavaland/Mining.dmi'
+1 -1
View File
@@ -48,7 +48,7 @@
/obj/effect/mine/stun/mineEffect(mob/living/victim)
if(isliving(victim))
victim.Knockdown(stun_time)
victim.DefaultCombatKnockdown(stun_time)
/obj/effect/mine/kickmine
name = "kick mine"
+8 -6
View File
@@ -61,10 +61,11 @@
if(AM in T.affecting)
return
if(ismob(AM))
var/mob/M = AM
if(isliving(AM))
var/mob/living/M = AM
if(immobilize)
M.canmove = 0
ADD_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
M.update_mobility()
affecting.Add(AM)
while(AM && !stopthrow)
@@ -98,10 +99,11 @@
affecting.Remove(AM)
if(ismob(AM))
var/mob/M = AM
if(isliving(AM))
var/mob/living/M = AM
if(immobilize)
M.canmove = 1
REMOVE_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
M.update_mobility()
/* Stops things thrown by a thrower, doesn't do anything */
@@ -139,13 +139,6 @@
/obj/effect/temp_visual/dir_setting/curse/hand
icon_state = "cursehand"
/obj/effect/temp_visual/dir_setting/curse/hand/Initialize(mapload, set_dir, handedness)
. = ..()
update_icon()
/obj/item/projectile/curse_hand/update_icon()
icon_state = "[icon_state][handedness]"
/obj/effect/temp_visual/wizard
name = "water"
icon = 'icons/mob/mob.dmi'
@@ -474,7 +467,7 @@
else
update_icon()
/obj/effect/constructing_effect/update_icon()
/obj/effect/constructing_effect/update_icon_state()
icon_state = "rcd"
if (delay < 10)
icon_state += "_shortest"
+6 -7
View File
@@ -175,14 +175,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
set category = "Object"
set src in oview(1)
if(!isturf(loc) || usr.stat || usr.restrained() || !usr.canmove)
var/mob/living/L = usr
if(!istype(L) || !isturf(loc) || !CHECK_MOBILITY(L, MOBILITY_USE))
return
var/turf/T = src.loc
src.loc = null
src.loc = T
var/turf/T = loc
loc = null
loc = T
/obj/item/examine(mob/user) //This might be spammy. Remove?
. = ..()
@@ -544,7 +543,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
to_chat(M, "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>")
M.adjust_blurriness(10)
M.Unconscious(20)
M.Knockdown(40)
M.DefaultCombatKnockdown(40)
if (prob(eyes.damage - 10 + 1))
M.become_blind(EYE_DAMAGE)
to_chat(M, "<span class='danger'>You go blind!</span>")
+5 -6
View File
@@ -552,8 +552,8 @@ RLD
explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src)
/obj/item/construction/rcd/update_icon()
..()
/obj/item/construction/rcd/update_overlays()
. = ..()
if(has_ammobar)
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
cut_overlays() //To prevent infinite stacking of overlays
@@ -707,11 +707,10 @@ RLD
else
..()
/obj/item/construction/rld/update_icon()
..()
/obj/item/construction/rld/update_overlays()
. = ..()
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
cut_overlays() //To prevent infinite stacking of overlays
add_overlay("rld_light[ratio]")
. += "rld_light[ratio]"
/obj/item/construction/rld/attack_self(mob/user)
..()
+36 -68
View File
@@ -2,8 +2,8 @@
name = "rapid cable layer"
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables. Do not use without insulation!"
icon = 'icons/obj/tools.dmi'
icon_state = "rcl-empty"
item_state = "rcl-0"
icon_state = "rcl"
item_state = "rcl"
var/obj/structure/cable/last
var/obj/item/stack/cable_coil/loaded
opacity = FALSE
@@ -23,6 +23,14 @@
var/datum/radial_menu/persistent/wiring_gui_menu
var/mob/listeningTo
/obj/item/twohanded/rcl/Initialize()
. = ..()
update_icon()
/obj/item/twohanded/rcl/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
@@ -90,34 +98,28 @@
QDEL_NULL(wiring_gui_menu)
return ..()
/obj/item/twohanded/rcl/update_icon()
if(!loaded)
icon_state = "rcl-empty"
item_state = "rcl-empty"
/obj/item/twohanded/rcl/update_icon_state()
icon_state = initial(icon_state)
item_state = initial(item_state)
if(!loaded || !loaded.amount)
icon_state += "-empty"
item_state += "-0"
/obj/item/twohanded/rcl/update_overlays()
. = ..()
if(!loaded || !loaded.amount)
return
cut_overlays()
var/cable_amount = 0
switch(loaded.amount)
if(61 to INFINITY)
cable_amount = 3
if(31 to 60)
cable_amount = 2
if(1 to 30)
cable_amount = 1
else
cable_amount = 0
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "[initial(icon_state)]-[CEILING(loaded.amount/(max_amount/3), 1)]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
if(cable_amount >= 1)
icon_state = "rcl"
item_state = "rcl"
add_overlay(cable_overlay)
else
icon_state = "rcl-empty"
item_state = "rcl-0"
add_overlay(cable_overlay)
. += cable_overlay
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, style_flags = NONE)
. = ..()
if(!isinhands || !(loaded?.amount))
return
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[CEILING(loaded.amount/(max_amount/3), 1)]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
. += cable_overlay
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
update_icon()
@@ -289,18 +291,6 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
wiringGuiUpdate(user)
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
. = ..()
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
update_icon()
/obj/item/twohanded/rcl/Initialize()
. = ..()
update_icon()
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/rcl_col))
current_color_index++;
@@ -319,37 +309,15 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
else //open the menu
showWiringGui(user)
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
return ..()
/obj/item/twohanded/rcl/ghetto
actions_types = list()
max_amount = 30
name = "makeshift rapid cable layer"
icon_state = "rclg"
ghetto = TRUE
/obj/item/twohanded/rcl/ghetto/update_icon()
if(!loaded)
icon_state = "rclg-empty"
item_state = "rclg-0"
return
cut_overlays()
var/cable_amount = 0
switch(loaded.amount)
if(20 to INFINITY)
cable_amount = 3
if(10 to 19)
cable_amount = 2
if(1 to 9)
cable_amount = 1
else
cable_amount = 0
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
if(cable_amount >= 1)
icon_state = "rclg"
item_state = "rclg"
add_overlay(cable_overlay)
else
icon_state = "rclg-empty"
item_state = "rclg-0"
add_overlay(cable_overlay)
+2 -2
View File
@@ -66,8 +66,8 @@
if(iswallturf(T))
T.attackby(src, user, params)
var/metal_amt = round(custom_materials[getmaterialref(/datum/material/iron)]/MINERAL_MATERIAL_AMOUNT)
var/glass_amt = round(custom_materials[getmaterialref(/datum/material/glass)]/MINERAL_MATERIAL_AMOUNT)
var/metal_amt = round(custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)]/MINERAL_MATERIAL_AMOUNT)
var/glass_amt = round(custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)]/MINERAL_MATERIAL_AMOUNT)
if(istype(W, /obj/item/wrench) && (metal_amt || glass_amt))
to_chat(user, "<span class='notice'>You dismantle [src].</span>")
+5 -3
View File
@@ -37,7 +37,7 @@
SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src))
. = ..()
/obj/item/boombox/update_icon()
/obj/item/boombox/update_icon_state()
icon_state = "[baseiconstate]_[boomingandboxing ? "on" : "off"]"
return
@@ -48,8 +48,11 @@
baseiconstate = "raiqbawks"
availabletrackids = list("hotline.ogg","chiptune.ogg","genesis.ogg")
/obj/item/boombox/raiq/update_icon()
/obj/item/boombox/raiq/Initialize()
. = ..()
RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, .proc/start_party)
/obj/item/boombox/raiq/proc/start_party()
if(boomingandboxing)
START_PROCESSING(SSobj, src)
else
@@ -58,4 +61,3 @@
/obj/item/boombox/raiq/process()
set_light(5,0.95,pick("#d87aff","#7a7aff","#89ecff","#b88eff","#ff59ad"))
return
+1 -1
View File
@@ -19,7 +19,7 @@
if(start_lit)
light()
/obj/item/candle/update_icon()
/obj/item/candle/update_icon_state()
icon_state = "candle[(wax > 400) ? ((wax > 750) ? 1 : 2) : 3][lit ? "_lit" : ""]"
/obj/item/candle/attackby(obj/item/W, mob/user, params)
+14 -16
View File
@@ -40,13 +40,13 @@
.=..()
update_icon()
/obj/item/card/data/update_icon()
cut_overlays()
/obj/item/card/data/update_overlays()
. = ..()
if(detail_color == COLOR_FLOORTILE_GRAY)
return
var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/card.dmi', "[icon_state]-color")
detail_overlay.color = detail_color
add_overlay(detail_overlay)
. += detail_overlay
/obj/item/card/data/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/integrated_electronics/detailer))
@@ -517,10 +517,16 @@ update_label("John Doe", "Clowny")
//Polychromatic Knight Badge
/obj/item/card/id/knight
var/id_color = "#00FF00" //defaults to green
name = "knight badge"
icon_state = "knight"
desc = "A badge denoting the owner as a knight! It has a strip for swiping like an ID"
var/id_color = "#00FF00" //defaults to green
var/mutable_appearance/id_overlay
/obj/item/card/id/knight/Initialize()
. = ..()
id_overlay = mutable_appearance(icon, "knight_overlay")
update_icon()
/obj/item/card/id/knight/update_label(newname, newjob)
if(newname || newjob)
@@ -529,14 +535,10 @@ update_label("John Doe", "Clowny")
name = "[(!registered_name) ? "knight badge" : "[registered_name]'s Knight Badge"][(!assignment) ? "" : " ([assignment])"]"
/obj/item/card/id/knight/update_icon()
var/mutable_appearance/id_overlay = mutable_appearance(icon, "knight_overlay")
if(id_color)
id_overlay.color = id_color
cut_overlays()
add_overlay(id_overlay)
/obj/item/card/id/knight/update_overlays()
. = ..()
id_overlay.color = id_color
. += id_overlay
/obj/item/card/id/knight/AltClick(mob/living/user)
. = ..()
@@ -556,10 +558,6 @@ update_label("John Doe", "Clowny")
update_icon()
return TRUE
/obj/item/card/id/knight/Initialize()
. = ..()
update_icon()
/obj/item/card/id/knight/examine(mob/user)
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
+3 -2
View File
@@ -65,8 +65,9 @@
TED = new(src.loc)
return INITIALIZE_HINT_QDEL
/obj/item/gun/energy/chrono_gun/update_icon()
return
/obj/item/gun/energy/chrono_gun/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/energy/chrono_gun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(field)
+13 -9
View File
@@ -522,11 +522,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("<span class='suicide'>[user] begins whacking [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/lighter/update_icon()
cut_overlays()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
/obj/item/lighter/update_icon_state()
icon_state = "[initial(icon_state)][lit ? "-on" : ""]"
add_overlay(lighter_overlay)
/obj/item/lighter/update_overlays()
. = ..()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
. += lighter_overlay
/obj/item/lighter/ignition_effect(atom/A, mob/user)
if(get_temperature())
@@ -645,12 +647,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
lighter_color = pick(color_list)
update_icon()
/obj/item/lighter/greyscale/update_icon()
cut_overlays()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
/obj/item/lighter/greyscale/update_icon_state()
icon_state = "[initial(icon_state)][lit ? "-on" : ""]"
/obj/item/lighter/greyscale/update_overlays()
. = ..()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
lighter_overlay.color = lighter_color
add_overlay(lighter_overlay)
. += lighter_overlay
/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user)
if(get_temperature())
@@ -852,7 +856,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
M.Knockdown(300, 1, 0)
M.DefaultCombatKnockdown(300, 1, 0)
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
sp.set_up(5, 1, src)
sp.start()
+8 -6
View File
@@ -577,8 +577,8 @@
new /obj/item/toy/crayon/black(src)
update_icon()
/obj/item/storage/crayons/update_icon()
cut_overlays()
/obj/item/storage/crayons/update_overlays()
. = ..()
for(var/obj/item/toy/crayon/crayon in contents)
add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.item_color))
@@ -694,7 +694,7 @@
C.blind_eyes(1)
if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS.
C.confused = max(C.confused, 3)
C.Knockdown(60)
C.DefaultCombatKnockdown(60)
if(ishuman(C) && actually_paints)
var/mob/living/carbon/human/H = C
H.lip_style = "spray_face"
@@ -735,13 +735,15 @@
. = ..()
/obj/item/toy/crayon/spraycan/update_icon()
/obj/item/toy/crayon/spraycan/update_icon_state()
icon_state = is_capped ? icon_capped : icon_uncapped
/obj/item/toy/crayon/spraycan/update_overlays()
. = ..()
if(use_overlays)
cut_overlays()
var/mutable_appearance/spray_overlay = mutable_appearance('icons/obj/crayons.dmi', "[is_capped ? "spraycan_cap_colors" : "spraycan_colors"]")
spray_overlay.color = paint_color
add_overlay(spray_overlay)
. += spray_overlay
/obj/item/toy/crayon/spraycan/borg
name = "cyborg spraycan"
+30 -40
View File
@@ -20,7 +20,7 @@
var/safety = TRUE //if you can zap people with the defibs on harm mode
var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/twohanded/shockpaddles/paddles
var/obj/item/stock_parts/cell/high/cell
var/obj/item/stock_parts/cell/cell
var/combat = FALSE //can we revive through space suits?
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
var/healdisk = FALSE // Will we shock people dragging the body?
@@ -35,19 +35,14 @@
/obj/item/defibrillator/Initialize() //starts without a cell for rnd
. = ..()
if(cell)
cell = new cell(src)
paddles = make_paddles()
update_icon()
return
/obj/item/defibrillator/loaded/Initialize() //starts with hicap
. = ..()
cell = new(src)
update_icon()
return
/obj/item/defibrillator/update_icon()
update_power()
return ..()
return
/obj/item/defibrillator/loaded
cell = /obj/item/stock_parts/cell/high
/obj/item/defibrillator/proc/update_power()
if(!QDELETED(cell))
@@ -57,6 +52,7 @@
powered = TRUE
else
powered = FALSE
update_icon()
/obj/item/defibrillator/update_overlays()
. = ..()
@@ -76,7 +72,7 @@
/obj/item/defibrillator/CheckParts(list/parts_list)
..()
cell = locate(/obj/item/stock_parts/cell) in contents
update_icon()
update_power()
/obj/item/defibrillator/ui_action_click()
toggle_paddles()
@@ -124,7 +120,7 @@
return
cell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon()
update_power()
else if(istype(W, /obj/item/screwdriver))
if(cell)
@@ -132,7 +128,7 @@
cell.forceMove(get_turf(src))
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
update_icon()
update_power()
else
return ..()
@@ -157,7 +153,7 @@
safety = TRUE
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
update_icon()
update_power()
/obj/item/defibrillator/proc/toggle_paddles()
set name = "Toggle Paddles"
@@ -170,14 +166,14 @@
if(!usr.put_in_hands(paddles))
on = FALSE
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
update_icon()
update_power()
return
else
//Remove from their hands and back onto the defib unit
paddles.unwield()
remove_paddles(user)
update_icon()
update_power()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
@@ -189,7 +185,7 @@
..()
if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT))
remove_paddles(user)
update_icon()
update_power()
/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == user.getBackSlot())
@@ -213,12 +209,12 @@
if(cell)
if(cell.charge < (paddles.revivecost+chrgdeductamt))
powered = FALSE
update_icon()
update_power()
if(cell.use(chrgdeductamt))
update_icon()
update_power()
return TRUE
else
update_icon()
update_power()
return FALSE
/obj/item/defibrillator/proc/cooldowncheck(mob/user)
@@ -232,7 +228,7 @@
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = FALSE
paddles.update_icon()
update_icon()
update_power()
/obj/item/defibrillator/compact
name = "compact defibrillator"
@@ -246,10 +242,8 @@
if(slot == user.getBeltSlot())
return TRUE
/obj/item/defibrillator/compact/loaded/Initialize()
. = ..()
cell = new(src)
update_icon()
/obj/item/defibrillator/compact/loaded
cell = /obj/item/stock_parts/cell/high
/obj/item/defibrillator/compact/combat
name = "combat defibrillator"
@@ -258,17 +252,12 @@
safety = FALSE
always_emagged = TRUE
disarm_shock_time = 0
/obj/item/defibrillator/compact/combat/loaded/Initialize()
. = ..()
cell = new /obj/item/stock_parts/cell/infinite(src)
update_icon()
cell = /obj/item/stock_parts/cell/infinite
/obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
update_icon()
return
//paddles
@@ -298,6 +287,10 @@
var/mob/listeningTo
/obj/item/twohanded/shockpaddles/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
. = ..()
if(!req_defib)
@@ -339,14 +332,11 @@
busy = FALSE
update_icon()
/obj/item/twohanded/shockpaddles/update_icon()
/obj/item/twohanded/shockpaddles/update_icon_state()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
if(iscarbon(loc))
var/mob/living/carbon/C = loc
C.update_inv_hands()
/obj/item/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -373,7 +363,7 @@
return
defib.on = FALSE
forceMove(defib)
defib.update_icon()
defib.update_power()
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O)
if(!req_defib)
@@ -459,7 +449,7 @@
M.visible_message("<span class='danger'>[user] zaps [M] with [src]!</span>", \
"<span class='userdanger'>[user] zaps [M] with [src]!</span>")
M.adjustStaminaLoss(50)
M.Knockdown(100)
M.DefaultCombatKnockdown(100)
M.updatehealth() //forces health update before next life tick
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
M.emote("gasp")
@@ -516,7 +506,7 @@
H.set_heartattack(TRUE)
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
log_combat(user, H, "overloaded the heart of", defib)
H.Knockdown(100)
H.DefaultCombatKnockdown(100)
H.Jitter(100)
if(req_defib)
defib.deductcharge(revivecost)
+30 -18
View File
@@ -9,7 +9,6 @@ GLOBAL_LIST_EMPTY(PDAs)
#define PDA_SCANNER_HALOGEN 4
#define PDA_SCANNER_GAS 5
#define PDA_SPAM_DELAY 2 MINUTES
#define PDA_STANDARD_OVERLAYS list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")
//pda icon overlays list defines
#define PDA_OVERLAY_ALERT 1
@@ -33,14 +32,19 @@ GLOBAL_LIST_EMPTY(PDAs)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
//Main variables
var/owner = null // String name of owner
var/default_cartridge = 0 // Access level defined by cartridge
var/obj/item/cartridge/cartridge = null //current cartridge
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
var/current_overlays = PDA_STANDARD_OVERLAYS
var/static/list/standard_overlays_icons = list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")
var/list/current_overlays //set on Initialize.
//variables exclusively used on 'update_overlays' (which should never be called directly, and 'update_icon' doesn't use args anyway)
var/new_overlays = FALSE
var/new_alert = FALSE
var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again.
var/font_mode = "font-family:monospace;" //The currently selected font.
var/background_color = "#808000" //The currently selected background color.
@@ -123,7 +127,8 @@ GLOBAL_LIST_EMPTY(PDAs)
inserted_item = new inserted_item(src)
else
inserted_item = new /obj/item/pen(src)
update_icon(FALSE, TRUE)
new_overlays = TRUE
update_icon()
/obj/item/pda/CtrlShiftClick(mob/living/user)
. = ..()
@@ -144,7 +149,8 @@ GLOBAL_LIST_EMPTY(PDAs)
if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
icon = new_icon
update_icon(FALSE, TRUE)
new_overlays = TRUE
update_icon()
to_chat(M, "[src] is now skinned as '[choice]'.")
/obj/item/pda/proc/set_new_overlays()
@@ -157,7 +163,7 @@ GLOBAL_LIST_EMPTY(PDAs)
overlays_x_offset = new_offsets[1]
overlays_y_offset = new_offsets[2]
if(!(icon in overlays_icons))
current_overlays = PDA_STANDARD_OVERLAYS
current_overlays = standard_overlays_icons
return
current_overlays = overlays_icons[icon]
@@ -188,7 +194,8 @@ GLOBAL_LIST_EMPTY(PDAs)
var/pref_skin = GLOB.pda_reskins[C.prefs.pda_skin]
if(icon != pref_skin)
icon = pref_skin
update_icon(FALSE, TRUE)
new_overlays = TRUE
update_icon()
equipped = TRUE
/obj/item/pda/proc/update_label()
@@ -215,25 +222,30 @@ GLOBAL_LIST_EMPTY(PDAs)
return TRUE
return FALSE
/obj/item/pda/update_icon(alert = FALSE, new_overlays = FALSE)
/obj/item/pda/update_overlays()
. = ..()
if(new_overlays)
set_new_overlays()
cut_overlays()
add_overlay(alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN])
var/mutable_appearance/overlay = new()
. += new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
var/screen_state = new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
var/mutable_appearance/overlay = mutable_appearance(icon, screen_state)
overlay.pixel_x = overlays_x_offset
overlay.pixel_y = overlays_y_offset
. += overlay
if(id)
overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
if(inserted_item)
overlay.icon_state = current_overlays[PDA_OVERLAY_ITEM]
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
if(fon)
overlay.icon_state = current_overlays[PDA_OVERLAY_LIGHT]
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
if(pai)
overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]"
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
new_overlays = FALSE
new_alert = FALSE
/obj/item/pda/MouseDrop(mob/over, src_location, over_location)
var/mob/M = usr
@@ -459,7 +471,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/mob/living/U = usr
//Looking for master was kind of pointless since PDAs don't appear to have one.
if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) && !href_list["close"])
if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK, FALSE) && !href_list["close"])
add_fingerprint(U)
U.set_machine(src)
@@ -747,7 +759,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/t = stripped_input(U, "Please enter message", name)
if (!t || toff)
return
if(!U.canUseTopic(src, BE_CLOSE))
if(!U.canUseTopic(src, BE_CLOSE, FALSE, NO_TK, FALSE))
return
if(emped)
t = Gibberish(t, 100)
@@ -849,6 +861,7 @@ GLOBAL_LIST_EMPTY(PDAs)
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[inbound_message] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>) (<a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>BLOCK/UNBLOCK</a>)")
new_alert = TRUE
update_icon(TRUE)
/obj/item/pda/proc/send_to_all(mob/living/U)
@@ -1212,7 +1225,6 @@ GLOBAL_LIST_EMPTY(PDAs)
#undef PDA_SCANNER_HALOGEN
#undef PDA_SCANNER_GAS
#undef PDA_SPAM_DELAY
#undef PDA_STANDARD_OVERLAYS
#undef PDA_OVERLAY_ALERT
#undef PDA_OVERLAY_SCREEN
@@ -193,8 +193,6 @@
/obj/item/pda/curator
name = "curator PDA"
icon_state = "pda-library"
overlays_icons = list('icons/obj/pda.dmi' = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay"),
'icons/obj/pda_alt.dmi' = list("pda-r","screen_default","id_overlay","insert_overlay", "light_overlay", "pai_overlay"))
current_overlays = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay")
default_cartridge = /obj/item/cartridge/curator
inserted_item = /obj/item/pen/fountain
@@ -454,7 +454,7 @@
on = FALSE
update_icon()
/obj/item/flashlight/glowstick/update_icon()
/obj/item/flashlight/glowstick/update_icon_state()
item_state = "glowstick"
cut_overlays()
if(!fuel)
@@ -87,27 +87,25 @@
. += "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>"
/obj/item/geiger_counter/update_icon()
/obj/item/geiger_counter/update_icon_state()
if(!scanning)
icon_state = "geiger_off"
return 1
if(obj_flags & EMAGGED)
else if(obj_flags & EMAGGED)
icon_state = "geiger_on_emag"
return 1
switch(radiation_count)
if(-INFINITY to RAD_LEVEL_NORMAL)
icon_state = "geiger_on_1"
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
icon_state = "geiger_on_2"
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
icon_state = "geiger_on_3"
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
icon_state = "geiger_on_4"
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
icon_state = "geiger_on_4"
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
icon_state = "geiger_on_5"
..()
else
switch(radiation_count)
if(-INFINITY to RAD_LEVEL_NORMAL)
icon_state = "geiger_on_1"
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
icon_state = "geiger_on_2"
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
icon_state = "geiger_on_3"
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
icon_state = "geiger_on_4"
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
icon_state = "geiger_on_4"
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
icon_state = "geiger_on_5"
/obj/item/geiger_counter/proc/update_sound()
var/datum/looping_sound/geiger/loop = soundloop
@@ -108,6 +108,12 @@
song.instrumentDir = name
song.instrumentExt = insTypes[name]
/obj/item/instrument/piano_synth/proc/selectInstrument() // Moved here so it can be used by the action and PAI software panel without copypasta
var/chosen = input("Choose the type of instrument you want to use", "Instrument Selection", song.instrumentDir) as null|anything in insTypes
if(!insTypes[chosen])
return
return changeInstrument(chosen)
/obj/item/instrument/banjo
name = "banjo"
desc = "A 'Mura' brand banjo. It's pretty much just a drum with a neck and strings."
@@ -116,7 +116,7 @@
//chance to actually hit the eyes depends on internal component
if(prob(effectchance * diode.rating))
S.flash_act(affect_silicon = 1)
S.Knockdown(rand(100,200))
S.DefaultCombatKnockdown(rand(100,200))
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"
else
@@ -152,8 +152,7 @@
if(prob(50))
C.visible_message("<span class='notice'>[C] pounces on the light!</span>","<span class='warning'>LIGHT!</span>")
C.Move(targloc)
C.resting = TRUE
C.update_canmove()
C.set_resting(TRUE)
else
C.visible_message("<span class='notice'>[C] looks uninterested in your games.</span>","<span class='warning'>You spot [user] shining [src] at you. How insulting!</span>")
@@ -158,7 +158,7 @@
/obj/item/lightreplacer/attack_self(mob/user)
to_chat(user, status_string())
/obj/item/lightreplacer/update_icon()
/obj/item/lightreplacer/update_icon_state()
icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]"
/obj/item/lightreplacer/proc/status_string()
+2 -2
View File
@@ -67,7 +67,7 @@
to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>")
update_icon()
/obj/item/multitool/update_icon()
/obj/item/multitool/update_icon_state()
if(selected_io)
icon_state = "multitool_red"
else
@@ -149,7 +149,7 @@
/obj/item/multitool/ai_detect/ui_action_click()
return
/obj/item/multitool/ai_detect/update_icon()
/obj/item/multitool/ai_detect/update_icon_state()
if(selected_io)
icon_state = "multitool_red"
else
+2 -4
View File
@@ -94,10 +94,8 @@
to_chat(pai, "<span class='userdanger'>Your mental faculties leave you.</span>")
to_chat(pai, "<span class='rose'>oblivion... </span>")
qdel(pai)
if(href_list["wires"])
var/wire = text2num(href_list["wires"])
if(pai.radio)
pai.radio.wires.cut(wire)
if(href_list["wires"] && pai.radio)
pai.radio.wires.cut(href_list["wires"])
if(href_list["reset_radio_short"])
pai.unshort_radio()
if(href_list["setlaws"])
+1 -1
View File
@@ -26,7 +26,7 @@
var/obj/structure/cable/attached // the attached cable
/obj/item/powersink/update_icon()
/obj/item/powersink/update_icon_state()
icon_state = "powersink[mode == OPERATING]"
/obj/item/powersink/proc/set_mode(value)
@@ -27,7 +27,7 @@
qpad = null
return TRUE
/obj/item/quantum_keycard/update_icon()
/obj/item/quantum_keycard/update_icon_state()
if(qpad)
icon_state = "quantum_keycard_on"
else
@@ -118,7 +118,7 @@
s.set_up(3, 1, L)
s.start()
L.Knockdown(100)
L.DefaultCombatKnockdown(100)
if(master)
master.receive_signal()
@@ -192,7 +192,7 @@ Code:
s.set_up(3, 1, L)
s.start()
L.Knockdown(100)
L.DefaultCombatKnockdown(100)
if(master)
master.receive_signal()
@@ -254,12 +254,17 @@ GLOBAL_LIST_INIT(channel_tokens, list(
keyslot = null
bowman = TRUE
/obj/item/radio/headset/ai
/obj/item/radio/headset/silicon/pai
name = "\proper mini Integrated Subspace Transceiver "
subspace_transmission = FALSE
/obj/item/radio/headset/silicon/ai
name = "\proper Integrated Subspace Transceiver "
keyslot2 = new /obj/item/encryptionkey/ai
command = TRUE
/obj/item/radio/headset/ai/can_receive(freq, level)
/obj/item/radio/headset/silicon/can_receive(freq, level)
return ..(freq, level, TRUE)
/obj/item/radio/headset/attackby(obj/item/W, mob/user, params)
+2 -1
View File
@@ -484,7 +484,8 @@ SLIME SCANNER
set name = "Switch Verbosity"
set category = "Object"
if(usr.stat || !usr.canmove || usr.restrained())
var/mob/living/L = usr
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
return
mode = !mode
@@ -83,7 +83,7 @@
eject(usr)
/obj/item/taperecorder/update_icon()
/obj/item/taperecorder/update_icon_state()
if(!mytape)
icon_state = "taperecorder_empty"
else if(recording)
@@ -44,7 +44,7 @@ effective or pretty fucking useless.
for(var/mob/living/carbon/human/M in urange(10, user, 1))
if(prob(50))
M.Knockdown(rand(200,400))
M.DefaultCombatKnockdown(rand(200,400))
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
else
+12 -9
View File
@@ -134,8 +134,9 @@
w_class = WEIGHT_CLASS_SMALL
sides = 100
/obj/item/dice/d100/update_icon()
return
/obj/item/dice/d100/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/dice/eightbd20
name = "strange d20"
@@ -144,8 +145,9 @@
sides = 20
special_faces = list("It is certain","It is decidedly so","Without a doubt","Yes, definitely","You may rely on it","As I see it, yes","Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now","Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no","My sources say no","Outlook not so good","Very doubtful")
/obj/item/dice/eightbd20/update_icon()
return
/obj/item/dice/eightbd20/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/dice/fourdd6
name = "4d d6"
@@ -154,8 +156,9 @@
sides = 48
special_faces = list("Cube-Side: 1-1","Cube-Side: 1-2","Cube-Side: 1-3","Cube-Side: 1-4","Cube-Side: 1-5","Cube-Side: 1-6","Cube-Side: 2-1","Cube-Side: 2-2","Cube-Side: 2-3","Cube-Side: 2-4","Cube-Side: 2-5","Cube-Side: 2-6","Cube-Side: 3-1","Cube-Side: 3-2","Cube-Side: 3-3","Cube-Side: 3-4","Cube-Side: 3-5","Cube-Side: 3-6","Cube-Side: 4-1","Cube-Side: 4-2","Cube-Side: 4-3","Cube-Side: 4-4","Cube-Side: 4-5","Cube-Side: 4-6","Cube-Side: 5-1","Cube-Side: 5-2","Cube-Side: 5-3","Cube-Side: 5-4","Cube-Side: 5-5","Cube-Side: 5-6","Cube-Side: 6-1","Cube-Side: 6-2","Cube-Side: 6-3","Cube-Side: 6-4","Cube-Side: 6-5","Cube-Side: 6-6","Cube-Side: 7-1","Cube-Side: 7-2","Cube-Side: 7-3","Cube-Side: 7-4","Cube-Side: 7-5","Cube-Side: 7-6","Cube-Side: 8-1","Cube-Side: 8-2","Cube-Side: 8-3","Cube-Side: 8-4","Cube-Side: 8-5","Cube-Side: 8-6")
/obj/item/dice/fourdd6/update_icon()
return
/obj/item/dice/fourdd6/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/dice/attack_self(mob/user)
diceroll(user)
@@ -187,9 +190,9 @@
else if(!src.throwing) //Dice was thrown and is coming to rest
visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
/obj/item/dice/update_icon()
cut_overlays()
add_overlay("[src.icon_state]-[src.result]")
/obj/item/dice/update_overlays()
. = ..()
. += "[icon_state]-[result]"
/obj/item/dice/microwave_act(obj/machinery/microwave/M)
if(can_be_rigged)
+11 -12
View File
@@ -27,6 +27,10 @@
var/igniter_type = /obj/item/assembly/igniter
trigger_guard = TRIGGER_GUARD_NORMAL
/obj/item/flamethrower/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/flamethrower/Destroy()
if(weldtool)
qdel(weldtool)
@@ -48,22 +52,17 @@
if(isturf(location)) //start a fire if possible
igniter.flamethrower_process(location)
/obj/item/flamethrower/update_icon_state()
item_state = "flamethrower_[lit]"
/obj/item/flamethrower/update_icon()
cut_overlays()
/obj/item/flamethrower/update_overlays()
. = ..()
if(igniter)
add_overlay("+igniter[status]")
. += "+igniter[status]"
if(ptank)
add_overlay("+ptank")
. += "+ptank"
if(lit)
add_overlay("+lit")
item_state = "flamethrower_1"
else
item_state = "flamethrower_0"
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
return
. += "+lit"
/obj/item/flamethrower/afterattack(atom/target, mob/user, flag)
. = ..()
+4 -4
View File
@@ -294,7 +294,7 @@
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
..()
to_chat(user,"<span class='warning'>You're knocked down!</span>")
user.Knockdown(40)
user.DefaultCombatKnockdown(40)
/obj/item/book/granter/spell/barnyard
spell = /obj/effect/proc_holder/spell/targeted/barnyardcurse
@@ -491,12 +491,12 @@
remarks = list("Looks like these would sell much better in a plasma fire...", "Using glass bowls rather then cones?", "Mixing soda and ice-cream?", "Tall glasses with of liquids and solids...", "Just add a bit of icecream and cherry on top?")
/obj/item/book/granter/crafting_recipe/bone_bow //Bow crafting for non-ashwalkers
name = "Sandstone manual on bows"
desc = "A standstone slab with everything you need to know for making bows and arrows just like an ashwalker would."
name = "bowyery sandstone slab" // this is an actual word
desc = "A sandstone slab with inscriptions describing the Ash Walkers of Lavaland's bowyery."
crafting_recipe_types = list(/datum/crafting_recipe/bone_arrow, /datum/crafting_recipe/bone_bow, /datum/crafting_recipe/ashen_arrow, /datum/crafting_recipe/quiver, /datum/crafting_recipe/bow_tablet)
icon_state = "stone_tablet"
oneuse = FALSE
remarks = list("Sticking burning arrows into the sand makes them stronger?", "Breaking the bone apart to get shards, not sharpening the bone.", "Sinew is just like rope?")
remarks = list("Sticking burning arrows into the sand makes them stronger...", "Breaking the bone apart to get shards, not sharpening the bone...", "Sinew is just like rope...")
/obj/item/book/granter/crafting_recipe/under_the_oven //Illegal cook book
name = "Under The Oven"
@@ -31,7 +31,7 @@
M.show_message("<span class='warning'>BANG</span>", MSG_AUDIBLE)
var/distance = get_dist(get_turf(M), source)
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
M.Knockdown(200)
M.DefaultCombatKnockdown(200)
M.soundbang_act(1, 200, 10, 15)
else
M.soundbang_act(1, max(200/max(1,distance), 60), rand(0, 5))
@@ -41,4 +41,4 @@
return
var/distance = get_dist(get_turf(M), source)
if(M.flash_act(affect_silicon = 1))
M.Knockdown(max(200/max(1,distance), 60))
M.DefaultCombatKnockdown(max(200/max(1,distance), 60))
+1 -1
View File
@@ -158,7 +158,7 @@
user.gib(1, 1)
qdel(src)
/obj/item/grenade/plastic/update_icon()
/obj/item/grenade/plastic/update_icon_state()
if(nadeassembly)
icon_state = "[item_state]1"
else
+1 -4
View File
@@ -128,9 +128,6 @@
item_color = param_color || item_color || pick(cable_colors)
if(cable_colors[item_color])
item_color = cable_colors[item_color]
update_icon()
/obj/item/restraints/handcuffs/cable/update_icon()
color = null
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
@@ -352,7 +349,7 @@
C.update_inv_legcuffed()
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
C.Knockdown(knockdown)
C.DefaultCombatKnockdown(knockdown)
/obj/item/restraints/legcuffs/bola/tactical//traitor variant
name = "reinforced bola"
+1 -1
View File
@@ -92,7 +92,7 @@
master.emote("scream")
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
master.Knockdown(60)
master.DefaultCombatKnockdown(60)
master.adjustBruteLoss(master.maxHealth)
playsound(master, 'sound/effects/splat.ogg', 100, 0)
else
+10 -10
View File
@@ -64,16 +64,16 @@
else
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
/obj/item/holybeacon/proc/beacon_armor(mob/M)
/obj/item/holybeacon/proc/beacon_armor(mob/living/L)
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
var/list/display_names = list()
for(var/V in holy_armor_list)
var/atom/A = V
display_names += list(initial(A.name) = A)
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
var/turf/T = get_turf(M)
if(!T || QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || GLOB.holy_armor_type)
var/choice = input(L,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
var/turf/T = get_turf(src)
if(!T || QDELETED(src) || !choice || !CHECK_MOBILITY(L, MOBILITY_USE) || !in_range(L, src) || GLOB.holy_armor_type)
return
var/index = display_names.Find(choice)
@@ -86,7 +86,7 @@
if(holy_armor_box)
qdel(src)
M.put_in_hands(holy_armor_box)
L.put_in_hands(holy_armor_box)
/obj/item/storage/box/holy
name = "Templar Kit"
@@ -244,7 +244,7 @@
if(user.mind && (user.mind.isholy) && !reskinned)
reskin_holy_weapon(user)
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/L)
if(GLOB.holy_weapon_type)
return
var/obj/item/holy_weapon
@@ -255,8 +255,8 @@
if (initial(rodtype.chaplain_spawnable))
display_names[initial(rodtype.name)] = rodtype
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
var/choice = input(L, "What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(QDELETED(src) || !choice || !in_range(L, src) || !CHECK_MOBILITY(L, MOBILITY_USE) || reskinned)
return
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
@@ -269,7 +269,7 @@
if(holy_weapon)
holy_weapon.reskinned = TRUE
qdel(src)
M.put_in_active_hand(holy_weapon)
L.put_in_active_hand(holy_weapon)
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
@@ -674,7 +674,7 @@
add_fingerprint(user)
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
user.Knockdown(60)
user.DefaultCombatKnockdown(60)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
+2 -3
View File
@@ -71,8 +71,7 @@
if(stimulant)
if(isliving(loc))
var/mob/living/L = loc
L.SetStun(0)
L.SetKnockdown(0)
L.SetAllImmobility(0)
L.SetSleeping(0)
L.SetUnconscious(0)
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
@@ -154,7 +153,7 @@
colorize(null)
active = FALSE
/obj/item/hot_potato/update_icon()
/obj/item/hot_potato/update_icon_state()
icon_state = active? icon_on : icon_off
/obj/item/hot_potato/syndicate
@@ -78,7 +78,7 @@
return
if(message && imp_in.stat == CONSCIOUS)
imp_in.visible_message("<span class='warning'>[imp_in] doubles over in pain!</span>")
imp_in.Knockdown(140)
imp_in.DefaultCombatKnockdown(140)
/obj/item/implant/explosive/proc/boom_goes_the_weasel()
explosion(get_turf(imp_in ? imp_in : src), heavy, medium, weak, weak, flame_range = weak)
@@ -10,18 +10,14 @@
throw_range = 5
w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/glass=500)
var/obj/item/implant/imp = null
var/obj/item/implant/imp
var/imp_type
/obj/item/implantcase/update_icon()
/obj/item/implantcase/update_icon_state()
if(imp)
icon_state = "implantcase-[imp.item_color]"
reagents = imp.reagents
else
icon_state = "implantcase-0"
reagents = null
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
@@ -46,6 +42,7 @@
imp = I.imp
I.imp = null
update_icon()
reagents = imp.reagents
I.update_icon()
else
if(imp)
@@ -54,6 +51,7 @@
imp.forceMove(I)
I.imp = imp
imp = null
reagents = null
update_icon()
I.update_icon()
@@ -96,16 +96,17 @@
visible_message("<span class='warning'>[M] has been implanted by [src].</span>")
return TRUE
/obj/machinery/implantchair/update_icon()
/obj/machinery/implantchair/update_icon_state()
icon_state = initial(icon_state)
if(state_open)
icon_state += "_open"
if(occupant)
icon_state += "_occupied"
/obj/machinery/implantchair/update_overlays()
. = ..()
if(ready)
add_overlay("ready")
else
cut_overlays()
. += "ready"
/obj/machinery/implantchair/proc/replenish()
if(ready_implants < max_implants)
@@ -14,13 +14,12 @@
var/imp_type = null
/obj/item/implanter/update_icon()
/obj/item/implanter/update_icon_state()
if(imp)
icon_state = "implanter1"
else
icon_state = "implanter0"
/obj/item/implanter/attack(mob/living/M, mob/user)
if(!istype(M))
return
@@ -18,7 +18,7 @@
if(case)
. += "<span class='notice'>Alt-click [src] to remove the inserted implant case.</span>"
/obj/item/implantpad/update_icon()
/obj/item/implantpad/update_icon_state()
icon_state = "implantpad-[case ? TRUE : FALSE]"
/obj/item/implantpad/AltClick(mob/user)
+8 -7
View File
@@ -163,13 +163,14 @@
if(opened)
. += "<span class='notice'>Its battery compartment is open.</span>"
/obj/item/inducer/update_icon()
cut_overlays()
if(opened)
if(!cell)
add_overlay("inducer-nobat")
else
add_overlay("inducer-bat")
/obj/item/inducer/update_overlays()
. = ..()
if(!opened)
return
if(!cell)
. += "inducer-nobat"
else
. += "inducer-bat"
/obj/item/inducer/sci
icon_state = "inducer-sci"
+6
View File
@@ -138,6 +138,12 @@
throwforce = 15
custom_materials = null
/obj/item/kitchen/knife/combat/bone/plastic
name = "plastic knife"
desc = "A plastic knife. Rather harmless to anything."
force = 1
bayonet = FALSE
/obj/item/kitchen/knife/combat/cyborg
name = "cyborg knife"
icon = 'icons/obj/items_cyborg.dmi'
+14 -16
View File
@@ -7,7 +7,6 @@
var/brightness_on = 3
total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces.
/obj/item/melee/transforming/energy/Initialize()
. = ..()
total_mass_on = (total_mass_on ? total_mass_on : (w_class_on * 0.75))
@@ -107,8 +106,12 @@
/obj/item/melee/transforming/energy/sword/transform_weapon(mob/living/user, supress_message_text)
. = ..()
if(. && active && item_color)
icon_state = "sword[item_color]"
if(active)
if(. && item_color)
icon_state = "sword[item_color]"
AddElement(/datum/element/sword_point)
else
RemoveElement(/datum/element/sword_point)
/obj/item/melee/transforming/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(active)
@@ -259,15 +262,14 @@
light_color = "#37FFF7"
actions_types = list()
/obj/item/melee/transforming/energy/sword/cx/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/melee/transforming/energy/sword/cx/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/melee/transforming/energy/sword/cx/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] points the tip of [src] at [target].</span>", "<span class='notice'>You point the tip of [src] at [target].</span>")
return TRUE
/obj/item/melee/transforming/energy/sword/cx/transform_weapon(mob/living/user, supress_message_text)
active = !active //I'd use a ..() here but it'd inherit from the regular esword's proc instead, so SPAGHETTI CODE
if(active) //also I'd need to rip out the iconstate changing bits
@@ -301,7 +303,8 @@
if(!supress_message_text)
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
/obj/item/melee/transforming/energy/sword/cx/update_icon()
/obj/item/melee/transforming/energy/sword/cx/update_overlays()
. = ..()
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade")
var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem")
@@ -309,15 +312,10 @@
blade_overlay.color = light_color
gem_overlay.color = light_color
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
add_overlay(gem_overlay)
. += gem_overlay
if(active)
add_overlay(blade_overlay)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
. += blade_overlay
/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user)
. = ..()
+6 -7
View File
@@ -73,6 +73,7 @@
/obj/item/melee/sabre/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 30, 95, 5) //fast and effective, but as a sword, it might damage the results.
AddElement(/datum/element/sword_point)
/obj/item/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
@@ -199,7 +200,7 @@
add_fingerprint(user)
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
user.Knockdown(60 * force)
user.DefaultCombatKnockdown(60 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
@@ -224,7 +225,7 @@
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
log_combat(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
@@ -453,12 +454,10 @@
held_sausage = null
update_icon()
/obj/item/melee/roastingstick/update_icon()
/obj/item/melee/roastingstick/update_overlays()
. = ..()
cut_overlays()
if (held_sausage)
var/mutable_appearance/sausage = mutable_appearance(icon, "roastingstick_sausage")
add_overlay(sausage)
. += mutable_appearance(icon, "roastingstick_sausage")
/obj/item/melee/roastingstick/proc/extend(user)
to_chat(user, "<span class ='warning'>You extend [src].</span>")
@@ -516,7 +515,7 @@
item_state = "mace_greyscale"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR //Material type changes the prefix as well as the color.
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Material type changes the prefix as well as the color.
custom_materials = list(/datum/material/iron = 12000) //Defaults to an Iron Mace.
slot_flags = ITEM_SLOT_BELT
force = 14
+6 -4
View File
@@ -143,14 +143,16 @@
update_icon()
remove_occupant(user)
/obj/item/pet_carrier/update_icon()
cut_overlay("unlocked")
cut_overlay("locked")
/obj/item/pet_carrier/update_icon_state()
if(open)
icon_state = initial(icon_state)
else
icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]"
add_overlay("[locked ? "" : "un"]locked")
/obj/item/pet_carrier/update_overlays()
. = ..()
if(!open)
. += "[locked ? "" : "un"]locked"
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
+8 -8
View File
@@ -49,29 +49,29 @@
/obj/item/pinpointer/proc/scan_for_target()
return
/obj/item/pinpointer/update_icon()
cut_overlays()
/obj/item/pinpointer/update_overlays()
. = ..()
if(!active)
return
if(!target)
add_overlay("pinon[alert ? "alert" : ""]null")
. += "pinon[alert ? "alert" : ""]null"
return
var/turf/here = get_turf(src)
var/turf/there = get_turf(target)
if(!here || !there || here.z != there.z)
add_overlay("pinon[alert ? "alert" : ""]null")
. += "pinon[alert ? "alert" : ""]null"
return
if(get_dist_euclidian(here,there) <= minimum_range)
add_overlay("pinon[alert ? "alert" : ""]direct")
. += "pinon[alert ? "alert" : ""]direct"
else
setDir(get_dir(here, there))
switch(get_dist(here, there))
if(1 to 8)
add_overlay("pinon[alert ? "alert" : "close"]")
. += "pinon[alert ? "alert" : "close"]"
if(9 to 16)
add_overlay("pinon[alert ? "alert" : "medium"]")
. += "pinon[alert ? "alert" : "medium"]"
if(16 to INFINITY)
add_overlay("pinon[alert ? "alert" : "far"]")
. += "pinon[alert ? "alert" : "far"]"
/obj/item/pinpointer/crew // A replacement for the old crew monitoring consoles
name = "crew pinpointer"
+3 -1
View File
@@ -37,7 +37,9 @@
/obj/item/toy/plush/random_snowflake/Initialize(mapload, set_snowflake_id)
. = ..()
var/list/configlist = CONFIG_GET(keyed_list/snowflake_plushies)
var/id = pick(configlist)
var/id = safepick(configlist)
if(!id)
return
set_snowflake_from_config(id)
/obj/item/toy/plush/Initialize(mapload, set_snowflake_id)
+4 -4
View File
@@ -168,7 +168,7 @@
if(pressureSetting >= 3 && iscarbon(user))
var/mob/living/carbon/C = user
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
C.Knockdown(60)
C.DefaultCombatKnockdown(60)
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
if(fire_mode == PCANNON_FIREALL)
@@ -241,11 +241,11 @@
tank = thetank
update_icon()
/obj/item/pneumatic_cannon/update_icon()
cut_overlays()
/obj/item/pneumatic_cannon/update_overlays()
. = ..()
if(!tank)
return
add_overlay(tank.icon_state)
. += tank.icon_state
/obj/item/pneumatic_cannon/proc/fill_with_type(type, amount)
if(!ispath(type, /obj) && !ispath(type, /mob))
+1 -2
View File
@@ -64,8 +64,7 @@
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
H.adjustBruteLoss(-15)
H.adjustFireLoss(-15)
H.AdjustStun(-40)
H.AdjustKnockdown(-40)
H.AdjustAllImmobility(-40)
H.AdjustUnconscious(-40)
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
+7 -14
View File
@@ -20,7 +20,7 @@
return
user.do_attack_animation(M)
M.Knockdown(100)
M.DefaultCombatKnockdown(100)
M.apply_effect(EFFECT_STUTTER, 5)
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
@@ -81,8 +81,7 @@
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
if(M.resting && !M.recoveringstam)
M.resting = FALSE
M.update_canmove()
M.set_resting(FALSE, TRUE)
else
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
"<span class='notice'>You pet [M]!</span>")
@@ -100,9 +99,8 @@
else
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
if(M.resting && !M.recoveringstam)
M.resting = FALSE
M.update_canmove()
if(!CHECK_MOBILITY(M, MOBILITY_STAND) && !M.recoveringstam)
M.set_resting(FALSE, TRUE)
else
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
"<span class='warning'>You bop [M] on the head!</span>")
@@ -114,7 +112,6 @@
M.electrocute_act(5, "[user]", safety = 1)
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
"<span class='danger'>You electrocute [M] with your touch!</span>")
M.update_canmove()
else
if(!iscyborg(M))
M.adjustFireLoss(10)
@@ -154,11 +151,7 @@
var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port))
var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy))
/obj/item/borg/charger/Initialize()
. = ..()
/obj/item/borg/charger/update_icon()
..()
/obj/item/borg/charger/update_icon_state()
icon_state = "charger_[mode]"
/obj/item/borg/charger/attack_self(mob/user)
@@ -330,7 +323,7 @@
C.stuttering += 10
C.Jitter(10)
if(2)
C.Knockdown(40)
C.DefaultCombatKnockdown(40)
C.confused += 10
C.stuttering += 15
C.Jitter(25)
@@ -596,7 +589,7 @@
update_icon()
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] [src].</span>")
/obj/item/borg/projectile_dampen/update_icon()
/obj/item/borg/projectile_dampen/update_icon_state()
icon_state = "[initial(icon_state)][active]"
/obj/item/borg/projectile_dampen/proc/activate_field()
+10 -12
View File
@@ -39,20 +39,20 @@
chest.cell = new /obj/item/stock_parts/cell/high/plus(chest)
..()
/obj/item/robot_suit/update_icon()
cut_overlays()
/obj/item/robot_suit/update_overlays()
. = ..()
if(l_arm)
add_overlay("[l_arm.icon_state]+o")
. += "[l_arm.icon_state]+o"
if(r_arm)
add_overlay("[r_arm.icon_state]+o")
. += "[r_arm.icon_state]+o"
if(chest)
add_overlay("[chest.icon_state]+o")
. += "[chest.icon_state]+o"
if(l_leg)
add_overlay("[l_leg.icon_state]+o")
. += "[l_leg.icon_state]+o"
if(r_leg)
add_overlay("[r_leg.icon_state]+o")
. += "[r_leg.icon_state]+o"
if(head)
add_overlay("[head.icon_state]+o")
. += "[head.icon_state]+o"
/obj/item/robot_suit/proc/check_completion()
if(src.l_arm && src.r_arm)
@@ -317,8 +317,7 @@
O.robot_suit = src
if(!locomotion)
O.lockcharge = 1
O.update_canmove()
O.SetLockdown(TRUE)
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
else
@@ -356,8 +355,7 @@
forceMove(O)
O.robot_suit = src
if(!locomotion)
O.lockcharge = TRUE
O.update_canmove()
O.SetLockdown(TRUE)
else if(istype(W, /obj/item/pen))
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
@@ -364,12 +364,9 @@
to_chat(toggle_action.owner, "<span class='notice'>You activate the self-repair module.</span>")
activate_sr()
/obj/item/borg/upgrade/selfrepair/update_icon()
/obj/item/borg/upgrade/selfrepair/update_icon_state()
if(toggle_action)
icon_state = "selfrepair_[on ? "on" : "off"]"
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
else
icon_state = "cyborg_upgrade5"
@@ -580,7 +577,7 @@
return FALSE
R.notransform = TRUE
var/prev_lockcharge = R.lockcharge
var/prev_locked_down = R.locked_down
R.SetLockdown(1)
R.anchored = TRUE
var/datum/effect_system/smoke_spread/smoke = new
@@ -590,7 +587,7 @@
for(var/i in 1 to 4)
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
sleep(12)
if(!prev_lockcharge)
if(!prev_locked_down)
R.SetLockdown(0)
R.anchored = FALSE
R.notransform = FALSE
+16
View File
@@ -237,3 +237,19 @@
w_class = WEIGHT_CLASS_HUGE
item_flags = SLOWS_WHILE_IN_HAND
transparent = FALSE
/obj/item/shield/riot/implant
name = "riot tower shield"
desc = "A massive shield that can block a lot of attacks and can take a lot of abuse before breaking." //It cant break unless it is removed from the implant
item_state = "metal"
icon_state = "metal"
icon = 'icons/obj/items_and_weapons.dmi'
block_chance = 30 //May be big but hard to move around to block.
slowdown = 1
transparent = FALSE
item_flags = SLOWS_WHILE_IN_HAND
/obj/item/shield/riot/implant/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 60 //Massive shield
return ..()
+2 -2
View File
@@ -31,7 +31,7 @@
charged++
return
/obj/item/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
/obj/item/twohanded/singularityhammer/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"
return
@@ -110,6 +110,6 @@
if(isliving(hit_atom))
shock(hit_atom)
/obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
/obj/item/twohanded/mjollnir/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"
return
+5 -4
View File
@@ -35,9 +35,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
. = ..()
. += GLOB.rod_recipes
/obj/item/stack/rods/update_icon()
/obj/item/stack/rods/update_icon_state()
var/amount = get_amount()
if((amount <= 5) && (amount > 0))
if(amount <= 5)
icon_state = "rods-[amount]"
else
icon_state = "rods"
@@ -77,8 +77,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
is_cyborg = 1
cost = 250
/obj/item/stack/rods/cyborg/update_icon()
return
/obj/item/stack/rods/cyborg/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/stack/rods/ten
amount = 10
@@ -33,6 +33,12 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
)), \
//END OF CIT CHANGES
new/datum/stack_recipe_list("fancy sofas", list( \
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa/corp, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/corp/left, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/corp/right, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corp/corner, one_per_turf = TRUE, on_floor = TRUE), \
)), \
null, \
new/datum/stack_recipe_list("office chairs", list( \
new/datum/stack_recipe("dark office chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
@@ -42,8 +48,10 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
new/datum/stack_recipe("beige comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("black comfy chair", /obj/structure/chair/comfy/black, 2, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/chair/comfy/brown, 2, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("green comfy chair", /obj/structure/chair/comfy/green, 2, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/chair/comfy/lime, 2, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/chair/comfy/teal, 2, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("purple comfy chair", /obj/structure/chair/comfy/purple, 2, one_per_turf = TRUE, on_floor = TRUE), \
)), \
null, \
new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \
@@ -96,6 +104,21 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
new/datum/stack_recipe("extinguisher cabinet frame", /obj/item/wallframe/extinguisher_cabinet, 2), \
new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \
null, \
new /datum/stack_recipe_list("chess pieces", list( \
new /datum/stack_recipe("White Pawn", /obj/structure/chess/whitepawn, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("White Rook", /obj/structure/chess/whiterook, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("White Knight", /obj/structure/chess/whiteknight, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("White Bishop", /obj/structure/chess/whitebishop, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("White Queen", /obj/structure/chess/whitequeen, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("White King", /obj/structure/chess/whiteking, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("Black Pawn", /obj/structure/chess/blackpawn, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("Black Rook", /obj/structure/chess/blackrook, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("Black Knight", /obj/structure/chess/blackknight, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("Black Bishop", /obj/structure/chess/blackbishop, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("Black Queen", /obj/structure/chess/blackqueen, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("Black King", /obj/structure/chess/blackking, 2, time = 10, one_per_turf = 1, on_floor = 1), \
)), \
null, \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, one_per_turf = TRUE, on_floor = TRUE), \
))
@@ -360,6 +383,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
new/datum/stack_recipe("black gloves", /obj/item/clothing/gloves/color/black, 3), \
null, \
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 2), \
null, \
))
/obj/item/stack/sheet/cloth
@@ -394,12 +418,12 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
new/datum/stack_recipe("white jumpsuit", /obj/item/clothing/under/color/white, 4, time = 40), \
new/datum/stack_recipe("white gloves", /obj/item/clothing/gloves/color/white, 2, time = 40), \
null, \
new/datum/stack_recipe("silk string", /obj/item/weaponcrafting/silkstring, 2, time = 40), \
new/datum/stack_recipe("silk string", /obj/item/weaponcrafting/silkstring, 1, time = 40), \
))
/obj/item/stack/sheet/silk
name = "silk"
desc = "A long soft material. This one is just made out of cotton rather then any spiders or wyrms"
desc = "A long, soft material. Made out of refined cotton, instead of relying on the habits of spiders or silkworms."
singular_name = "silk sheet"
icon_state = "sheet-silk"
item_state = "sheet-cloth"
@@ -751,6 +775,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
new /datum/stack_recipe("opaque plastic flaps", /obj/structure/plasticflaps/opaque, 5, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/empty), \
new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/large/empty,3), \
new /datum/stack_recipe("shower curtain", /obj/structure/curtain, 10, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("wet floor sign", /obj/item/caution, 2)))
/obj/item/stack/sheet/plastic
@@ -803,6 +828,7 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
/obj/item/stack/sheet/cotton
name = "raw cotton bundle"
desc = "A bundle of raw cotton ready to be spun on the loom."
max_amount = 80
singular_name = "raw cotton ball"
icon_state = "sheet-cotton"
is_fabric = TRUE
+6 -7
View File
@@ -48,7 +48,7 @@
merge_type = type
if(custom_materials && custom_materials.len)
for(var/i in custom_materials)
custom_materials[getmaterialref(i)] = mats_per_stack * amount
custom_materials[SSmaterials.GetMaterialRef(i)] = mats_per_stack * amount
. = ..()
if(merge)
for(var/obj/item/stack/S in loc)
@@ -57,7 +57,7 @@
var/list/temp_recipes = get_main_recipes()
recipes = temp_recipes.Copy()
if(material_type)
var/datum/material/M = getmaterialref(material_type) //First/main material
var/datum/material/M = SSmaterials.GetMaterialRef(material_type) //First/main material
for(var/i in M.categories)
switch(i)
if(MAT_CATEGORY_RIGID)
@@ -77,16 +77,15 @@
else
w_class = full_w_class
/obj/item/stack/update_icon()
/obj/item/stack/update_icon_state()
if(novariants)
return ..()
return
if(amount <= (max_amount * (1/3)))
icon_state = initial(icon_state)
else if (amount <= (max_amount * (2/3)))
icon_state = "[initial(icon_state)]_2"
else
icon_state = "[initial(icon_state)]_3"
..()
/obj/item/stack/Destroy()
@@ -226,7 +225,7 @@
if(R.applies_mats && custom_materials && custom_materials.len)
var/list/used_materials = list()
for(var/i in custom_materials)
used_materials[getmaterialref(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
used_materials[SSmaterials.GetMaterialRef(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
O.set_custom_materials(used_materials)
//START: oh fuck i'm so sorry
@@ -348,7 +347,7 @@
src.amount += amount
if(custom_materials && custom_materials.len)
for(var/i in custom_materials)
custom_materials[getmaterialref(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
custom_materials[SSmaterials.GetMaterialRef(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
set_custom_materials() //Refresh
update_icon()
update_weight()
+21 -13
View File
@@ -57,14 +57,16 @@
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
return (TOXLOSS)
/obj/item/storage/bag/trash/update_icon()
if(contents.len == 0)
icon_state = "[initial(icon_state)]"
else if(contents.len < 12)
icon_state = "[initial(icon_state)]1"
else if(contents.len < 21)
icon_state = "[initial(icon_state)]2"
else icon_state = "[initial(icon_state)]3"
/obj/item/storage/bag/trash/update_icon_state()
switch(contents.len)
if(0)
icon_state = "[initial(icon_state)]"
if(0 to 11)
icon_state = "[initial(icon_state)]1"
if(11 to 20)
icon_state = "[initial(icon_state)]2"
else
icon_state = "[initial(icon_state)]3"
/obj/item/storage/bag/trash/cyborg
insertable = FALSE
@@ -244,7 +246,8 @@
set name = "Activate Seed Extraction"
set category = "Object"
set desc = "Activate to convert your plants into plantable seeds."
if(usr.stat || !usr.canmove || usr.restrained())
var/mob/living/L = usr
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE))
return
for(var/obj/item/O in contents)
seedify(O, 1)
@@ -327,6 +330,8 @@
/obj/item/storage/bag/tray/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food, /obj/item/reagent_containers/glass, /datum/reagent/consumable, /obj/item/kitchen/knife, /obj/item/kitchen/rollingpin, /obj/item/kitchen/fork, /obj/item/storage/box)) //Should cover: Bottles, Beakers, Bowls, Booze, Glasses, Food, Kitchen Tools, and ingredient boxes.
STR.insert_preposition = "on"
/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
@@ -349,13 +354,16 @@
if(ishuman(M) || ismonkey(M))
if(prob(10))
M.Knockdown(40)
M.DefaultCombatKnockdown(40)
update_icon()
/obj/item/storage/bag/tray/update_icon()
cut_overlays()
/obj/item/storage/bag/tray/update_overlays()
. = ..()
for(var/obj/item/I in contents)
add_overlay(new /mutable_appearance(I))
var/mutable_appearance/I_copy = new(I)
I_copy.plane = FLOAT_PLANE
I_copy.layer = FLOAT_LAYER
. += I_copy
/obj/item/storage/bag/tray/Entered()
. = ..()
+11 -14
View File
@@ -10,23 +10,21 @@
attack_verb = list("whipped", "lashed", "disciplined")
max_integrity = 300
var/content_overlays = FALSE //If this is true, the belt will gain overlays based on what it's holding
var/worn_overlays = FALSE //worn counterpart of the above.
var/onmob_overlays = FALSE //worn counterpart of the above.
/obj/item/storage/belt/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins belting [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/storage/belt/update_icon()
cut_overlays()
/obj/item/storage/belt/update_overlays()
. = ..()
if(content_overlays)
for(var/obj/item/I in contents)
var/mutable_appearance/M = I.get_belt_overlay()
add_overlay(M)
..()
. += I.get_belt_overlay()
/obj/item/storage/belt/worn_overlays(isinhands, icon_file, style_flags = NONE)
. = ..()
if(!isinhands && worn_overlays)
if(!isinhands && onmob_overlays)
for(var/obj/item/I in contents)
. += I.get_worn_belt_overlay(icon_file)
@@ -34,6 +32,11 @@
. = ..()
update_icon()
/obj/item/storage/belt/ComponentInitialize()
. = ..()
if(onmob_overlays)
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/storage/belt/utility
name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
desc = "Holds tools."
@@ -769,7 +772,7 @@
item_state = "sheath"
w_class = WEIGHT_CLASS_BULKY
content_overlays = TRUE
worn_overlays = TRUE
onmob_overlays = TRUE
var/list/fitting_swords = list(/obj/item/melee/sabre, /obj/item/melee/baton/stunsword)
var/starting_sword = /obj/item/melee/sabre
@@ -787,12 +790,6 @@
if(length(contents))
. += "<span class='notice'>Alt-click it to quickly draw the blade.</span>"
/obj/item/storage/belt/sabre/update_icon()
. = ..()
if(isliving(loc))
var/mob/living/L = loc
L.regenerate_icons()
/obj/item/storage/belt/sabre/PopulateContents()
new starting_sword(src)
+5 -5
View File
@@ -50,11 +50,10 @@
user.visible_message("<span class='suicide'>[user] beating [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/storage/box/update_icon()
/obj/item/storage/box/update_overlays()
. = ..()
if(illustration)
cut_overlays()
add_overlay(illustration)
. += illustration
/obj/item/storage/box/attack_self(mob/user)
..()
@@ -866,10 +865,11 @@
foldable = null
var/design = NODESIGN
/obj/item/storage/box/papersack/update_icon()
/obj/item/storage/box/papersack/update_icon_state()
if(contents.len == 0)
icon_state = "[item_state]"
else icon_state = "[item_state]_closed"
else
icon_state = "[item_state]_closed"
/obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
+40 -37
View File
@@ -30,7 +30,7 @@
for(var/i = 1 to STR.max_items)
new spawn_type(src)
/obj/item/storage/fancy/update_icon()
/obj/item/storage/fancy/update_icon_state()
if(fancy_open)
icon_state = "[icon_type]box[contents.len]"
else
@@ -160,30 +160,31 @@
to_chat(user, "<span class='notice'>There are no [icon_type]s left in the pack.</span>")
return TRUE
/obj/item/storage/fancy/cigarettes/update_icon()
if(fancy_open || !contents.len)
cut_overlays()
if(!contents.len)
icon_state = "[initial(icon_state)]_empty"
/obj/item/storage/fancy/cigarettes/update_icon_state()
if(!contents.len)
icon_state = "[initial(icon_state)]_empty"
else if(fancy_open)
icon_state = initial(icon_state)
/obj/item/storage/fancy/cigarettes/update_overlays()
. = ..()
if(!fancy_open || !contents.len)
return
. += "[icon_state]_open"
var/cig_position = 1
for(var/C in contents)
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
if(istype(C, /obj/item/lighter/greyscale))
inserted_overlay.icon_state = "lighter_in"
else if(istype(C, /obj/item/lighter))
inserted_overlay.icon_state = "zippo_in"
else
icon_state = initial(icon_state)
add_overlay("[icon_state]_open")
var/cig_position = 1
for(var/C in contents)
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
inserted_overlay.icon_state = "cigarette"
if(istype(C, /obj/item/lighter/greyscale))
inserted_overlay.icon_state = "lighter_in"
else if(istype(C, /obj/item/lighter))
inserted_overlay.icon_state = "zippo_in"
else
inserted_overlay.icon_state = "cigarette"
inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]"
add_overlay(inserted_overlay)
cig_position++
else
cut_overlays()
inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]"
. += inserted_overlay
cig_position++
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!ismob(M))
@@ -282,10 +283,10 @@
STR.max_items = 10
STR.can_hold = typecacheof(list(/obj/item/rollingpaper))
/obj/item/storage/fancy/rollingpapers/update_icon()
cut_overlays()
/obj/item/storage/fancy/rollingpapers/update_overlays()
. = ..()
if(!contents.len)
add_overlay("[icon_state]_empty")
. += "[icon_state]_empty"
/////////////
//CIGAR BOX//
@@ -306,21 +307,23 @@
STR.max_items = 5
STR.can_hold = typecacheof(list(/obj/item/clothing/mask/cigarette/cigar))
/obj/item/storage/fancy/cigarettes/cigars/update_icon()
cut_overlays()
/obj/item/storage/fancy/cigarettes/cigars/update_icon_state()
if(fancy_open)
icon_state = "[initial(icon_state)]_open"
var/cigar_position = 0 //to keep track of the pixel_x offset of each new overlay.
for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents)
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]")
cigar_overlay.pixel_x = 3 * cigar_position
add_overlay(cigar_overlay)
cigar_position++
else
icon_state = "[initial(icon_state)]"
/obj/item/storage/fancy/cigarettes/cigars/update_overlays()
. = ..()
if(!fancy_open)
return
var/cigar_position = 0 //to keep track of the pixel_x offset of each new overlay.
for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents)
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]")
cigar_overlay.pixel_x = 3 * cigar_position
. += cigar_overlay
cigar_position++
/obj/item/storage/fancy/cigarettes/cigars/cohiba
name = "\improper Cohiba Robusto cigar case"
desc = "A case of imported Cohiba cigars, renowned for their strong flavor."
@@ -382,4 +385,4 @@
icon_state = "silver ringbox"
icon_type = "silver ring"
spawn_type = /obj/item/clothing/gloves/ring/silver
+19 -14
View File
@@ -132,29 +132,34 @@
for(var/i in 1 to 3)
new /obj/item/clothing/accessory/medal/conduct(src)
/obj/item/storage/lockbox/medal/update_icon()
cut_overlays()
/obj/item/storage/lockbox/medal/update_icon_state()
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
if(locked)
icon_state = "medalbox+l"
open = FALSE
else
icon_state = "medalbox"
if(open)
icon_state += "open"
if(broken)
icon_state += "+b"
if(contents && open)
for (var/i in 1 to contents.len)
var/obj/item/clothing/accessory/medal/M = contents[i]
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
if(i > 1 && i <= 5)
medalicon.pixel_x += ((i-1)*3)
else if(i > 5)
medalicon.pixel_y -= 7
medalicon.pixel_x -= 2
medalicon.pixel_x += ((i-6)*3)
add_overlay(medalicon)
/obj/item/storage/lockbox/medal/update_overlays()
. = ..()
if(!contents || !open)
return
var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)
if(locked)
return
for (var/i in 1 to contents.len)
var/obj/item/clothing/accessory/medal/M = contents[i]
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
if(i > 1 && i <= 5)
medalicon.pixel_x += ((i-1)*3)
else if(i > 5)
medalicon.pixel_y -= 7
medalicon.pixel_x -= 2
medalicon.pixel_x += ((i-6)*3)
. += medalicon
/obj/item/storage/lockbox/medal/sec
name = "security medal box"
+3 -6
View File
@@ -33,14 +33,11 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
. = ..()
update_icon()
/obj/item/storage/toolbox/update_icon()
..()
cut_overlays()
if(length(blood_DNA))
add_blood_overlay()
/obj/item/storage/toolbox/update_overlays()
. = ..()
if(has_latches)
var/icon/I = icon('icons/obj/storage.dmi', latches)
add_overlay(I)
. += I
/obj/item/storage/toolbox/suicide_act(mob/user)
+1 -1
View File
@@ -66,7 +66,7 @@
. = ..()
refreshID()
/obj/item/storage/wallet/update_icon()
/obj/item/storage/wallet/update_icon_state()
var/new_state = "wallet"
if(front_id)
new_state = "wallet_id"
+4 -4
View File
@@ -84,7 +84,7 @@
/obj/item/melee/baton/process()
deductcharge(round(hitcost * STUNBATON_DEPLETION_RATE), FALSE, FALSE)
/obj/item/melee/baton/update_icon()
/obj/item/melee/baton/update_icon_state()
if(status)
icon_state = "[initial(name)]_active"
else if(!cell)
@@ -191,11 +191,11 @@
if(!disarming)
if(knockdown)
L.Knockdown(50, override_stamdmg = 0) //knockdown
L.DefaultCombatKnockdown(50, override_stamdmg = 0) //knockdown
L.adjustStaminaLoss(stunpwr)
else
L.drop_all_held_items() //no knockdown/stamina damage, instead disarm.
L.apply_effect(EFFECT_STUTTER, stamforce)
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
if(user)
@@ -218,7 +218,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.Knockdown(stamforce*6)
user.DefaultCombatKnockdown(stamforce*6)
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
deductcharge(hitcost)
+1 -1
View File
@@ -142,7 +142,7 @@
return ..()
/obj/item/hand_tele/proc/try_dispel_portal(atom/target, mob/user, delay = 30)
var/datum/beam/B = user.Beam(target)
var/datum/beam/B = user.Beam(target, icon_state = "rped_upgrade", maxdistance = 50)
if(is_parent_of_portal(target) && (!delay || do_after(user, delay, target = target)))
qdel(target)
to_chat(user, "<span class='notice'>You dispel [target] with \the [src]!</span>")
+1 -1
View File
@@ -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.Knockdown(stamforce * 6)
user.DefaultCombatKnockdown(stamforce * 6)
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
if(do_teleport(user, get_turf(user), 50, channel = TELEPORT_CHANNEL_BLUESPACE))
deductcharge(hitcost)
+1 -1
View File
@@ -246,7 +246,7 @@
QDEL_NULL(sliver)
return ..()
/obj/item/hemostat/supermatter/update_icon()
/obj/item/hemostat/supermatter/update_icon_state()
if(sliver)
icon_state = "supermatter_tongs_loaded"
else
+3 -3
View File
@@ -45,13 +45,13 @@
if(prob(75))
pixel_y = rand(0, 16)
/obj/item/screwdriver/update_icon()
/obj/item/screwdriver/update_overlays()
. = ..()
if(!random_color) //icon override
return
cut_overlays()
var/mutable_appearance/base_overlay = mutable_appearance(icon, "screwdriver_screwybits")
base_overlay.appearance_flags = RESET_COLOR
add_overlay(base_overlay)
. += base_overlay
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = list()
+9 -14
View File
@@ -40,24 +40,24 @@
reagents.add_reagent(/datum/reagent/fuel, max_fuel)
update_icon()
/obj/item/weldingtool/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/weldingtool/proc/update_torch()
/obj/item/weldingtool/update_icon_state()
if(welding)
add_overlay("[initial(icon_state)]-on")
item_state = "[initial(item_state)]1"
else
item_state = "[initial(item_state)]"
/obj/item/weldingtool/update_icon()
cut_overlays()
/obj/item/weldingtool/update_overlays()
. = ..()
if(change_icons)
var/ratio = get_fuel() / max_fuel
ratio = CEILING(ratio*4, 1) * 25
add_overlay("[initial(icon_state)][ratio]")
update_torch()
return
. += "[initial(icon_state)][ratio]"
if(welding)
. += "[initial(icon_state)]-on"
/obj/item/weldingtool/process()
switch(welding)
@@ -177,11 +177,6 @@
if(get_fuel() <= 0 && welding)
switched_on(user)
update_icon()
//mob icon update
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands(0)
return 0
return 1
+3 -3
View File
@@ -40,13 +40,13 @@
add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY)
update_icon()
/obj/item/wirecutters/update_icon()
/obj/item/wirecutters/update_overlays()
. = ..()
if(!random_color) //icon override
return
cut_overlays()
var/mutable_appearance/base_overlay = mutable_appearance(icon, "cutters_cutty_thingy")
base_overlay.appearance_flags = RESET_COLOR
add_overlay(base_overlay)
. += base_overlay
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
+64 -59
View File
@@ -44,9 +44,13 @@
item_state = "balloon-empty"
/obj/item/toy/balloon/New()
/obj/item/toy/balloon/Initialize()
. = ..()
create_reagents(10)
..()
/obj/item/toy/balloon/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/toy/balloon/attack(mob/living/carbon/human/M, mob/user)
return
@@ -102,7 +106,7 @@
icon_state = "burst"
qdel(src)
/obj/item/toy/balloon/update_icon()
/obj/item/toy/balloon/update_icon_state()
if(src.reagents.total_volume >= 1)
icon_state = "waterballoon"
item_state = "balloon"
@@ -200,8 +204,8 @@
custom_materials = list(/datum/material/iron=10, /datum/material/glass=10)
var/amount_left = 7
/obj/item/toy/ammo/gun/update_icon()
src.icon_state = text("357OLD-[]", src.amount_left)
/obj/item/toy/ammo/gun/update_icon_state()
icon_state = "357OLD-[amount_left]"
/obj/item/toy/ammo/gun/examine(mob/user)
. = ..()
@@ -224,26 +228,39 @@
var/hacked = FALSE
total_mass = 0.4
var/total_mass_on = TOTAL_MASS_TOY_SWORD
var/activation_sound = 'sound/weapons/saberon.ogg'
var/deactivation_sound = 'sound/weapons/saberoff.ogg'
var/activation_message = "You extend the plastic blade with a quick flick of your wrist."
var/deactivation_message = "You push the plastic blade back down into the handle."
var/transform_volume = 20
/obj/item/toy/sword/attack_self(mob/user)
active = !( active )
active = !active
if (active)
to_chat(user, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
playsound(user, 'sound/weapons/saberon.ogg', 20, 1)
to_chat(user, "<span class='notice'>[activation_message]</span>")
playsound(user, activation_sound, transform_volume, 1)
w_class = WEIGHT_CLASS_BULKY
AddElement(/datum/element/sword_point)
else
to_chat(user, "<span class='notice'>[deactivation_message]</span>")
playsound(user, deactivation_sound, transform_volume, 1)
w_class = WEIGHT_CLASS_SMALL
RemoveElement(/datum/element/sword_point)
update_icon()
add_fingerprint(user)
/obj/item/toy/sword/update_icon_state()
if(active)
if(hacked)
icon_state = "swordrainbow"
item_state = "swordrainbow"
else
icon_state = "swordblue"
item_state = "swordblue"
w_class = WEIGHT_CLASS_BULKY
else
to_chat(user, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
playsound(user, 'sound/weapons/saberoff.ogg', 20, 1)
icon_state = "sword0"
item_state = "sword0"
w_class = WEIGHT_CLASS_SMALL
add_fingerprint(user)
// Copied from /obj/item/melee/transforming/energy/sword/attackby
/obj/item/toy/sword/attackby(obj/item/W, mob/living/user, params)
@@ -266,7 +283,7 @@
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")
if(active)
icon_state = "swordrainbow"
update_icon()
user.update_inv_hands()
else
to_chat(user, "<span class='warning'>It's already fabulous!</span>")
@@ -286,40 +303,27 @@
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("poked", "jabbed", "hit")
light_color = "#37FFF7"
activation_sound = 'sound/weapons/nebon.ogg'
deactivation_sound = 'sound/weapons/neboff.ogg'
transform_volume = 50
activation_message = "You activate the holographic blade with a press of a button."
deactivation_message = "You deactivate the holographic blade with a press of a button."
var/light_brightness = 3
actions_types = list()
/obj/item/toy/sword/cx/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/sword/cx/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] points the tip of [src] at [target].</span>", "<span class='notice'>You point the tip of [src] at [target].</span>")
return TRUE
/obj/item/toy/sword/cx/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/toy/sword/cx/attack_self(mob/user)
active = !( active )
. = ..()
set_light(active ? light_brightness : 0)
if (active)
to_chat(user, "<span class='notice'>You activate the holographic blade with a press of a button.</span>")
playsound(user, 'sound/weapons/nebon.ogg', 50, 1)
w_class = WEIGHT_CLASS_BULKY
attack_verb = list("slashed", "stabbed", "ravaged")
set_light(light_brightness)
update_icon()
/obj/item/toy/sword/cx/update_icon_state()
return
else
to_chat(user, "<span class='notice'>You deactivate the holographic blade with a press of a button.</span>")
playsound(user, 'sound/weapons/neboff.ogg', 50, 1)
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("poked", "jabbed", "hit")
set_light(0)
update_icon()
add_fingerprint(user)
/obj/item/toy/sword/cx/update_icon()
/obj/item/toy/sword/cx/update_overlays()
. = ..()
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade")
var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem")
@@ -327,15 +331,10 @@
blade_overlay.color = light_color
gem_overlay.color = light_color
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
add_overlay(gem_overlay)
. += gem_overlay
if(active)
add_overlay(blade_overlay)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
. += blade_overlay
/obj/item/toy/sword/cx/AltClick(mob/living/user)
. = ..()
@@ -843,15 +842,16 @@
user.visible_message("[user] draws a card from the deck.", "<span class='notice'>You draw a card from the deck.</span>")
update_icon()
/obj/item/toy/cards/deck/update_icon()
if(cards.len > 26)
icon_state = "deck_[deckstyle]_full"
else if(cards.len > 10)
icon_state = "deck_[deckstyle]_half"
else if(cards.len > 0)
icon_state = "deck_[deckstyle]_low"
else if(cards.len == 0)
icon_state = "deck_[deckstyle]_empty"
/obj/item/toy/cards/deck/update_icon_state()
switch(cards.len)
if(27 to INFINITY)
icon_state = "deck_[deckstyle]_full"
if(11 to 27)
icon_state = "deck_[deckstyle]_half"
if(1 to 11)
icon_state = "deck_[deckstyle]_low"
else
icon_state = "deck_[deckstyle]_empty"
/obj/item/toy/cards/deck/attack_self(mob/user)
if(cooldown < world.time - 50)
@@ -1078,8 +1078,13 @@
else
return ..()
/obj/item/toy/cards/singlecard/attack_self(mob/user)
if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
/obj/item/toy/cards/singlecard/attack_self(mob/living/user)
. = ..()
if(.)
return
if(!ishuman(user))
return
if(!CHECK_MOBILITY(user, MOBILITY_USE))
return
Flip()
+303 -55
View File
@@ -24,7 +24,7 @@
* Twohanded
*/
/obj/item/twohanded
var/wielded = 0
var/wielded = FALSE
var/force_unwielded // default to null, the number force will be set to on unwield()
var/force_wielded // same as above but for wield()
var/wieldsound = null
@@ -97,9 +97,6 @@
return
unwield(user)
/obj/item/twohanded/update_icon()
return
/obj/item/twohanded/attack_self(mob/user)
. = ..()
if(wielded) //Trying to unwield it
@@ -241,7 +238,7 @@
. = ..()
AddComponent(/datum/component/butchering, 100, 80, 0 , hitsound) //axes are not known for being precision butchering tools
/obj/item/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
/obj/item/twohanded/fireaxe/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "fireaxe[wielded]"
return
@@ -342,7 +339,7 @@
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/twohanded/dualsaber/update_icon()
/obj/item/twohanded/dualsaber/update_icon_state()
if(wielded)
icon_state = "dualsaber[item_color][wielded]"
else
@@ -399,6 +396,7 @@
hitsound = 'sound/weapons/blade1.ogg'
START_PROCESSING(SSobj, src)
set_light(brightness_on)
AddElement(/datum/element/sword_point)
/obj/item/twohanded/dualsaber/unwield() //Specific unwield () to switch hitsounds.
sharpness = initial(sharpness)
@@ -408,6 +406,7 @@
hitsound = "swing_hit"
STOP_PROCESSING(SSobj, src)
set_light(0)
RemoveElement(/datum/element/sword_point)
/obj/item/twohanded/dualsaber/process()
if(wielded)
@@ -492,34 +491,15 @@
spinnable = FALSE
total_mass_on = 4
/obj/item/twohanded/dualsaber/hypereutactic/chaplain
name = "\improper divine lightblade"
desc = "A giant blade of bright and holy light, said to cut down the wicked with ease."
force = 5
force_unwielded = 5
force_wielded = 20
block_chance = 50
armour_penetration = 0
var/chaplain_spawnable = TRUE
obj_flags = UNIQUE_RENAME
/obj/item/twohanded/dualsaber/hypereutactic/chaplain/Initialize()
/obj/item/twohanded/dualsaber/hypereutactic/ComponentInitialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/dualsaber/hypereutactic/chaplain/IsReflect()
return FALSE
/obj/item/twohanded/dualsaber/hypereutactic/update_icon_state()
return
/obj/item/twohanded/dualsaber/hypereutactic/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/twohanded/dualsaber/hypereutactic/altafterattack(atom/target, mob/living/user, proximity_flag, click_parameters) //does right click memes
if(istype(user))
user.visible_message("<span class='notice'>[user] points the tip of [src] at [target].</span>", "<span class='notice'>You point the tip of [src] at [target].</span>")
return TRUE
/obj/item/twohanded/dualsaber/hypereutactic/update_icon()
/obj/item/twohanded/dualsaber/hypereutactic/update_overlays()
. = ..()
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "hypereutactic_blade")
var/mutable_appearance/gem_overlay = mutable_appearance(icon, "hypereutactic_gem")
@@ -527,15 +507,10 @@
blade_overlay.color = light_color
gem_overlay.color = light_color
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
add_overlay(gem_overlay)
. += gem_overlay
if(wielded)
add_overlay(blade_overlay)
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
. += blade_overlay
clean_blood()
@@ -576,6 +551,24 @@
update_icon()
update_light()
/obj/item/twohanded/dualsaber/hypereutactic/chaplain
name = "divine lightblade"
desc = "A giant blade of bright and holy light, said to cut down the wicked with ease."
force = 5
force_unwielded = 5
force_wielded = 20
block_chance = 50
armour_penetration = 0
var/chaplain_spawnable = TRUE
obj_flags = UNIQUE_RENAME
/obj/item/twohanded/dualsaber/hypereutactic/chaplain/ComponentInitialize()
. = ..()
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
/obj/item/twohanded/dualsaber/hypereutactic/chaplain/IsReflect()
return FALSE
//spears
/obj/item/twohanded/spear
icon_state = "spearglass0"
@@ -605,6 +598,8 @@
/obj/item/twohanded/spear/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 100, 70) //decent in a pinch, but pretty bad.
AddComponent(/datum/component/jousting)
AddElement(/datum/element/sword_point)
/obj/item/twohanded/spear/attack_self(mob/user)
if(explosive)
@@ -630,16 +625,12 @@
return BRUTELOSS
return BRUTELOSS
/obj/item/twohanded/spear/Initialize()
. = ..()
AddComponent(/datum/component/jousting)
/obj/item/twohanded/spear/examine(mob/user)
. = ..()
if(explosive)
. += "<span class='notice'>Use in your hands to activate the attached explosive.</span><br><span class='notice'>Alt-click to set your war cry.</span><br><span class='notice'>Right-click in combat mode to wield</span>"
/obj/item/twohanded/spear/update_icon()
/obj/item/twohanded/spear/update_icon_state()
if(explosive)
icon_state = "spearbomb[wielded]"
else
@@ -717,9 +708,10 @@
tool_behaviour = TOOL_SAW
toolspeed = 0.5
/obj/item/twohanded/required/chainsaw/Initialize()
/obj/item/twohanded/required/chainsaw/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 30, 100, 0, 'sound/weapons/chainsawhit.ogg', TRUE)
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/required/chainsaw/suicide_act(mob/living/carbon/user)
if(on)
@@ -738,7 +730,7 @@
to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]")
force = on ? force_on : initial(force)
throwforce = on ? force_on : force
icon_state = "chainsaw_[on ? "on" : "off"]"
update_icon()
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = on
@@ -747,11 +739,8 @@
else
hitsound = "swing_hit"
if(src == user.get_active_held_item()) //update inhands
user.update_inv_hands()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/twohanded/required/chainsaw/update_icon_state()
icon_state = "chainsaw_[on ? "on" : "off"]"
/obj/item/twohanded/required/chainsaw/get_dismemberment_chance()
if(wielded)
@@ -820,6 +809,9 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
/obj/item/twohanded/pitchfork/Initialize(mapload)
AddElement(/datum/element/sword_point)
/obj/item/twohanded/pitchfork/demonic
name = "demonic pitchfork"
desc = "A red pitchfork, it looks like the work of the devil."
@@ -844,7 +836,7 @@
force_unwielded = 100
force_wielded = 500000 // Kills you DEAD.
/obj/item/twohanded/pitchfork/update_icon()
/obj/item/twohanded/pitchfork/update_icon_state()
icon_state = "pitchfork[wielded]"
/obj/item/twohanded/pitchfork/suicide_act(mob/user)
@@ -903,6 +895,7 @@
/obj/item/twohanded/vibro_weapon/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 20, 105)
AddElement(/datum/element/sword_point)
/obj/item/twohanded/vibro_weapon/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(wielded)
@@ -918,7 +911,7 @@
return 1
return 0
/obj/item/twohanded/vibro_weapon/update_icon()
/obj/item/twohanded/vibro_weapon/update_icon_state()
icon_state = "hfrequency[wielded]"
/*
@@ -930,7 +923,7 @@
desc = "A large, vicious axe crafted out of several sharpened bone plates and crudely tied together. Made of monsters, by killing monsters, for killing monsters."
force_wielded = 23
/obj/item/twohanded/fireaxe/boneaxe/update_icon()
/obj/item/twohanded/fireaxe/boneaxe/update_icon_state()
icon_state = "bone_axe[wielded]"
/*
@@ -956,7 +949,7 @@
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
sharpness = IS_SHARP
/obj/item/twohanded/bonespear/update_icon()
/obj/item/twohanded/bonespear/update_icon_state()
icon_state = "bone_spear[wielded]"
/obj/item/twohanded/binoculars
@@ -1017,6 +1010,259 @@
user.client.pixel_x = 0
user.client.pixel_y = 0
/obj/item/twohanded/electrostaff
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "electrostaff_3"
item_state = "electrostaff"
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
name = "riot suppression electrostaff"
desc = "A large quarterstaff, with massive silver electrodes mounted at the end."
w_class = WEIGHT_CLASS_HUGE
slot_flags = ITEM_SLOT_BACK | ITEM_SLOT_OCLOTHING
force_unwielded = 5
force_wielded = 10
throwforce = 15 //if you are a madman and finish someone off with this, power to you.
throw_speed = 1
item_flags = NO_MAT_REDEMPTION | SLOWS_WHILE_IN_HAND
block_chance = 30
attack_verb = list("struck", "beaten", "thwacked", "pulped")
total_mass = 5 //yeah this is a heavy thing, beating people with it while it's off is not going to do you any favors. (to curb stun-kill rampaging without it being on)
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high
var/on = FALSE
var/can_block_projectiles = FALSE //can't block guns
var/lethal_cost = 400 //10000/400*20 = 500. decent enough?
var/lethal_damage = 20
var/lethal_stam_cost = 4
var/stun_cost = 333 //10000/333*25 = 750. stunbatons are at time of writing 10000/1000*49 = 490.
var/stun_status_effect = STATUS_EFFECT_ELECTROSTAFF //a small slowdown effect
var/stun_stamdmg = 40
var/stun_status_duration = 25
var/stun_stam_cost = 3.5
/obj/item/twohanded/electrostaff/Initialize(mapload)
. = ..()
if(ispath(cell))
cell = new cell
/obj/item/twohanded/electrostaff/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/twohanded/electrostaff/get_cell()
. = cell
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
. = R.get_cell()
/obj/item/twohanded/electrostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(!on)
return FALSE
if((attack_type == PROJECTILE_ATTACK) && !can_block_projectiles)
return FALSE
return ..()
/obj/item/twohanded/electrostaff/proc/min_hitcost()
return min(stun_cost, lethal_cost)
/obj/item/twohanded/electrostaff/proc/turn_on(mob/user, silent = FALSE)
if(on)
return
if(!cell)
if(user)
to_chat(user, "<span class='warning'>[src] has no cell.</span>")
return
if(cell.charge < min_hitcost())
if(user)
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
return
on = TRUE
START_PROCESSING(SSobj, src)
if(user)
to_chat(user, "<span class='warning'>You turn [src] on.</span>")
update_icon()
if(!silent)
playsound(src, "sparks", 75, 1, -1)
/obj/item/twohanded/electrostaff/proc/turn_off(mob/user, silent = FALSE)
if(!on)
return
if(user)
to_chat(user, "<span class='warning'>You turn [src] off.</span>")
on = FALSE
STOP_PROCESSING(SSobj, src)
update_icon()
if(!silent)
playsound(src, "sparks", 75, 1, -1)
/obj/item/twohanded/electrostaff/proc/toggle(mob/user, silent = FALSE)
if(on)
turn_off(user, silent)
else
turn_on(user, silent)
/obj/item/twohanded/electrostaff/wield(mob/user)
. = ..()
if(wielded)
turn_on(user)
add_fingerprint(user)
/obj/item/twohanded/electrostaff/unwield(mob/user)
. = ..()
if(!wielded)
turn_off(user)
add_fingerprint(user)
/obj/item/twohanded/electrostaff/update_icon_state()
. = ..()
if(!wielded)
icon_state = "electrostaff_3"
item_state = "electrostaff"
else
icon_state = item_state = (on? "electrostaff_1" : "electrostaff_3")
set_light(7, on? 1 : 0, LIGHT_COLOR_CYAN)
/obj/item/twohanded/electrostaff/examine(mob/living/user)
. = ..()
if(cell)
. += "<span class='notice'>The cell charge is [round(cell.percent())]%.</span>"
else
. += "<span class='warning'>There is no cell installed!</span>"
/obj/item/twohanded/electrostaff/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/C = W
if(cell)
to_chat(user, "<span class='warning'>[src] already has a cell!</span>")
else
if(C.maxcharge < min_hit_cost())
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
return
if(!user.transferItemToLoc(W, src))
return
cell = C
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
turn_off(user, TRUE)
else
return ..()
/obj/item/twohanded/electrostaff/process()
deductcharge(50) //Wasteful!
/obj/item/twohanded/electrostaff/proc/min_hit_cost()
return min(lethal_cost, stun_cost)
/obj/item/twohanded/electrostaff/proc/deductcharge(amount)
var/obj/item/stock_parts/cell/C = get_cell()
if(!C)
turn_off()
return FALSE
C.use(min(amount, C.charge))
if(QDELETED(src))
return FALSE
if(C.charge < min_hit_cost())
turn_off()
/obj/item/twohanded/electrostaff/attack(mob/living/target, mob/living/user)
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes it impossible to baton in stamina softcrit
to_chat(user, "<span class='danger'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
return //CIT CHANGE - ditto
if(on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
clowning_around(user) //ouch!
return
if(iscyborg(target))
..()
return
if(target.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
return FALSE
if(user.a_intent != INTENT_HARM)
if(stun_act(target, user))
user.do_attack_animation(target)
user.adjustStaminaLossBuffered(stun_stam_cost)
return
else if(!harm_act(target, user))
return ..() //if you can't fry them just beat them with it
else //we did harm act them
user.do_attack_animation(target)
user.adjustStaminaLossBuffered(lethal_stam_cost)
/obj/item/twohanded/electrostaff/proc/stun_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE)
var/stunforce = stun_stamdmg
if(!no_charge_and_force)
if(!on)
target.visible_message("<span class='warning'>[user] has bapped [target] with [src]. Luckily it was off.</span>", \
"<span class='warning'>[user] has bapped you with [src]. Luckily it was off</span>")
turn_off() //if it wasn't already off
return FALSE
var/obj/item/stock_parts/cell/C = get_cell()
var/chargeleft = C.charge
deductcharge(stun_cost)
if(QDELETED(src) || QDELETED(C)) //boom
return FALSE
if(chargeleft < stun_cost)
stunforce *= round(chargeleft/stun_cost, 0.1)
target.adjustStaminaLoss(stunforce)
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.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, user, "stunned with an electrostaff")
playsound(src, 'sound/weapons/staff.ogg', 50, 1, -1)
target.apply_status_effect(stun_status_effect, stun_status_duration)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.forcesay(GLOB.hit_appends)
return TRUE
/obj/item/twohanded/electrostaff/proc/harm_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE)
var/lethal_force = lethal_damage
if(!no_charge_and_force)
if(!on)
return FALSE //standard item attack
var/obj/item/stock_parts/cell/C = get_cell()
var/chargeleft = C.charge
deductcharge(lethal_cost)
if(QDELETED(src) || QDELETED(C)) //boom
return FALSE
if(chargeleft < stun_cost)
lethal_force *= round(chargeleft/lethal_cost, 0.1)
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.visible_message("<span class='danger'>[user] has seared [user] with [src]!</span>", \
"<span class='userdanger'>[user] has seared you with [src]!</span>")
log_combat(user, user, "burned with an electrostaff")
playsound(src, 'sound/weapons/sear.ogg', 50, 1, -1)
return TRUE
/obj/item/twohanded/electrostaff/proc/clowning_around(mob/living/user)
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)
harm_act(user, user, TRUE)
stun_act(user, user, TRUE)
deductcharge(lethal_cost)
/obj/item/twohanded/electrostaff/emp_act(severity)
. = ..()
if (!(. & EMP_PROTECT_SELF))
turn_off()
if(!iscyborg(loc))
deductcharge(1000 / severity, TRUE, FALSE)
/obj/item/twohanded/broom
name = "broom"
desc = "This is my BROOMSTICK! It can be used manually or braced with two hands to sweep items as you move. It has a telescopic handle for compact storage." //LIES
@@ -1061,6 +1307,8 @@
target = A
else
target = A.loc
if(!isturf(target)) //read: Mob inventories.
return
else
target = user.loc
if (locate(/obj/structure/table) in target.contents)
@@ -1078,4 +1326,4 @@
/obj/item/twohanded/broom/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) //bless you whoever fixes this copypasta
J.put_in_cart(src, user)
J.mybroom=src
J.update_icon()
J.update_icon()
+1 -19
View File
@@ -74,6 +74,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 40, 105)
AddElement(/datum/element/sword_point)
/obj/item/claymore/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is falling on [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -346,25 +347,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
user.visible_message("<span class='suicide'>[user] is slitting [user.p_their()] own throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/switchblade/crafted
icon_state = "switchblade_ms"
desc = "A concealable spring-loaded knife."
force = 2
throwforce = 3
extended_force = 15
extended_throwforce = 18
extended_icon_state = "switchblade_ext_ms"
retracted_icon_state = "switchblade_ms"
/obj/item/switchblade/crafted/attackby(obj/item/I, mob/user, params)
. = ..()
if(istype(I, /obj/item/stack/sheet/mineral/silver))
icon_state = extended ? "switchblade_ext_msf" : "switchblade_msf"
extended_icon_state = "switchblade_ext_msf"
retracted_icon_state = "switchblade_msf"
icon_state = "switchblade_msf"
to_chat(user, "<span class='notice'>You use part of the silver to improve your Switchblade. Stylish!</span>")
/obj/item/phone
name = "red phone"
desc = "Should anything ever go wrong..."
+3 -2
View File
@@ -33,7 +33,7 @@
if(structureclimber && structureclimber != user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
structureclimber.Knockdown(40)
structureclimber.DefaultCombatKnockdown(40)
structureclimber.visible_message("<span class='warning'>[structureclimber] has been knocked off [src].", "You're knocked off [src]!", "You see [structureclimber] get knocked off [src].</span>")
/obj/structure/ui_act(action, params)
@@ -45,7 +45,8 @@
if(!climbable)
return
if(user == O && iscarbon(O))
if(user.canmove)
var/mob/living/L = O
if(CHECK_MOBILITY(L, MOBILITY_MOVE))
climb_structure(user)
return
if(!istype(O, /obj/item) || user.get_active_held_item() != O)
+5 -7
View File
@@ -308,28 +308,26 @@
icon = "Meow Mix"
desc = "No, we don't serve catnip, officer!"
/datum/barsign/the_hive
name = "The Hive"
icon = "thehive"
desc = "Comb in for some sweet drinks! Not known for serving any sappy drink."
/datum/barsign/hiddensigns
hidden = TRUE
//Hidden signs list below this point
/datum/barsign/hiddensigns/empbarsign
name = "Haywire Barsign"
icon = "empbarsign"
desc = "Something has gone very wrong."
/datum/barsign/hiddensigns/syndibarsign
name = "Syndi Cat Takeover"
icon = "syndibarsign"
desc = "Syndicate or die."
/datum/barsign/hiddensigns/signoff
name = "Bar Sign"
icon = "empty"
@@ -110,7 +110,7 @@
user.visible_message("<span class='notice'>[user] pulls [src] out from under [poordude].</span>", "<span class='notice'>You pull [src] out from under [poordude].</span>")
var/C = new item_chair(loc)
user.put_in_hands(C)
poordude.Knockdown(20)//rip in peace
poordude.DefaultCombatKnockdown(20)//rip in peace
user.adjustStaminaLoss(5)
unbuckle_all_mobs(TRUE)
qdel(src)
@@ -153,7 +153,7 @@
///Material chair
/obj/structure/chair/greyscale
icon_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
item_chair = /obj/item/chair/greyscale
buildstacktype = null //Custom mats handle this
@@ -226,9 +226,15 @@
/obj/structure/chair/comfy/black
color = rgb(167,164,153)
/obj/structure/chair/comfy/green
color = rgb(81,173,106)
/obj/structure/chair/comfy/lime
color = rgb(255,251,0)
/obj/structure/chair/comfy/purple
color = rgb(255,50,230)
/obj/structure/chair/comfy/plywood
name = "plywood chair"
desc = "A relaxing plywood chair."
@@ -371,13 +377,13 @@
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.health < C.maxHealth*0.5)
C.Knockdown(20)
C.DefaultCombatKnockdown(20)
smash(user)
/obj/item/chair/greyscale
icon_state = "chair_greyscale_toppled"
item_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
origin_type = /obj/structure/chair/greyscale
/obj/item/chair/stool
@@ -407,7 +413,7 @@
buildstackamount = 1
/obj/structure/chair/stool/bar/alien
name = "bronze bar stool"
name = "alien bar stool"
desc = "A hard bar stool made of advanced alien alloy."
icon_state = "baralien"
icon = 'icons/obj/abductor.dmi'
@@ -576,40 +582,3 @@
. = ..()
if(has_gravity())
playsound(src, 'sound/machines/clockcult/integration_cog_install.ogg', 50, TRUE)
/obj/structure/chair/sofa
name = "old ratty sofa"
icon_state = "sofamiddle"
icon = 'icons/obj/sofa.dmi'
buildstackamount = 1
var/mutable_appearance/armrest
/obj/structure/chair/sofa/Initialize()
armrest = mutable_appearance(icon, "[icon_state]_armrest", ABOVE_MOB_LAYER)
return ..()
/obj/structure/chair/sofa/post_buckle_mob(mob/living/M)
. = ..()
update_armrest()
/obj/structure/chair/sofa/proc/update_armrest()
if(has_buckled_mobs())
add_overlay(armrest)
else
cut_overlay(armrest)
/obj/structure/chair/sofa/post_unbuckle_mob()
. = ..()
update_armrest()
/obj/structure/chair/sofa/left
icon_state = "sofaend_left"
/obj/structure/chair/sofa/right
icon_state = "sofaend_right"
/obj/structure/chair/sofa/corner
icon_state = "sofacorner"
/obj/structure/chair/sofa/corner/handle_layer() //only the armrest/back of this chair should cover the mob.
return
@@ -10,7 +10,7 @@
item_chair = null
/obj/structure/chair/pew/left
name = "left wooden pew end"
name = "wooden pew end"
icon_state = "pewend_left"
var/mutable_appearance/leftpewarmrest
@@ -41,7 +41,7 @@
update_leftpewarmrest()
/obj/structure/chair/pew/right
name = "left wooden pew end"
name = "wooden pew end"
icon_state = "pewend_right"
var/mutable_appearance/rightpewarmrest
@@ -0,0 +1,52 @@
/obj/structure/chair/sofa
name = "old ratty sofa"
icon_state = "sofamiddle"
icon = 'icons/obj/sofa.dmi'
buildstackamount = 1
var/mutable_appearance/armrest
/obj/structure/chair/sofa/Initialize()
armrest = mutable_appearance(icon, "[icon_state]_armrest", ABOVE_MOB_LAYER)
return ..()
/obj/structure/chair/sofa/post_buckle_mob(mob/living/M)
. = ..()
update_armrest()
/obj/structure/chair/sofa/proc/update_armrest()
if(has_buckled_mobs())
add_overlay(armrest)
else
cut_overlay(armrest)
/obj/structure/chair/sofa/post_unbuckle_mob()
. = ..()
update_armrest()
/obj/structure/chair/sofa/left
icon_state = "sofaend_left"
/obj/structure/chair/sofa/right
icon_state = "sofaend_right"
/obj/structure/chair/sofa/corner
icon_state = "sofacorner"
/obj/structure/chair/sofa/corner/handle_layer() //only the armrest/back of this chair should cover the mob.
return
// Credit for the sprites goes to CEV Eris. The sprites were taken from Hyper Station and modified to fit with armrests which were also added.
/obj/structure/chair/sofa/corp
name = "sofa"
desc = "Soft, cushy and cozy. These sofas reek of bland faceless corporatism, but they aren't old and ratty at least."
icon_state = "corp_sofamiddle"
/obj/structure/chair/sofa/corp/left
icon_state = "corp_sofaend_left"
/obj/structure/chair/sofa/corp/right
icon_state = "corp_sofaend_right"
/obj/structure/chair/sofa/corp/corner
icon_state = "corp_sofacorner"
+76
View File
@@ -0,0 +1,76 @@
/obj/structure/chess
anchored = FALSE
density = FALSE
icon = 'icons/obj/chess.dmi'
icon_state = "singularity_s1"
name = "Singularity"
desc = "You've just been pranked by the Syndicate Chess Grandmaster! Report this to CentCom."
max_integrity = 100
/obj/structure/chess/wrench_act(mob/user, obj/item/tool)
to_chat(user, "<span class='notice'>You take apart the chess piece.</span>")
var/obj/item/stack/sheet/metal/M = new (drop_location(), 2)
M.add_fingerprint(user)
tool.play_tool_sound(src)
qdel(src)
return TRUE
/obj/structure/chess/whitepawn
name = "\improper White Pawn"
desc = "A white pawn chess piece. Get accused of cheating when executing a sick En Passant."
icon_state = "white_pawn"
/obj/structure/chess/whiterook
name = "\improper White Rook"
desc = "A white rook chess piece. Also known as a castle. Can move any number of tiles in a straight line. It has a special move called castling."
icon_state = "white_rook"
/obj/structure/chess/whiteknight
name = "\improper White Knight"
desc = "A white knight chess piece. Hah. It can hop over other pieces, moving in L shapes."
icon_state = "white_knight"
/obj/structure/chess/whitebishop
name = "\improper White Bishop"
desc = "A white bishop chess piece. It can move any number of tiles in a diagonal line."
icon_state = "white_bishop"
/obj/structure/chess/whitequeen
name = "\improper White Queen"
desc = "A white queen chess piece. It can move any number of tiles in diagonal and straight lines."
icon_state = "white_queen"
/obj/structure/chess/whiteking
name = "\improper White King"
desc = "A white king chess piece. It can move any tile in one direction."
icon_state = "white_king"
/obj/structure/chess/blackpawn
name = "\improper Black Pawn"
desc = "A black pawn chess piece. Get accused of cheating when executing a sick En Passant."
icon_state = "black_pawn"
/obj/structure/chess/blackrook
name = "\improper Black Rook"
desc = "A black rook chess piece. Also known as a castle. Can move any number of tiles in a straight line. It has a special move called castling."
icon_state = "black_rook"
/obj/structure/chess/blackknight
name = "\improper Black Knight"
desc = "A black knight chess piece. It can hop over other pieces, moving in L shapes."
icon_state = "black_knight"
/obj/structure/chess/blackbishop
name = "\improper Black Bishop"
desc = "A black bishop chess piece. It can move any number of tiles in a diagonal line."
icon_state = "black_bishop"
/obj/structure/chess/blackqueen
name = "\improper Black Queen"
desc = "A black queen chess piece. It can move any number of tiles in diagonal and straight lines."
icon_state = "black_queen"
/obj/structure/chess/blackking
name = "\improper Black King"
desc = "A black king chess piece. It can move one tile in any direction."
icon_state = "black_king"
@@ -359,7 +359,7 @@
"<span class='italics'>You hear [welder ? "welding" : "rustling of screws and metal"].</span>")
deconstruct(TRUE)
return
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
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)
@@ -431,7 +431,7 @@
"<span class='italics'>You hear a loud metal bang.</span>")
var/mob/living/L = O
if(!issilicon(L))
L.Knockdown(40)
L.DefaultCombatKnockdown(40)
O.forceMove(T)
close()
else
@@ -474,8 +474,9 @@
set category = "Object"
set name = "Toggle Open"
if(!usr.canmove || usr.stat || usr.restrained())
return
var/mob/living/L = usr
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
return FALSE
if(iscarbon(usr) || issilicon(usr) || isdrone(usr))
return attack_hand(usr)
@@ -510,7 +511,7 @@
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))
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
@@ -603,12 +604,12 @@
step_towards(user, T2)
T1 = get_turf(user)
if(T1 == T2)
user.resting = TRUE //so people can jump into crates without slamming the lid on their head
user.set_resting(TRUE, TRUE)
if(!close(user))
to_chat(user, "<span class='warning'>You can't get [src] to close!</span>")
user.resting = FALSE
user.set_resting(FALSE, TRUE)
return
user.resting = FALSE
user.set_resting(FALSE, TRUE)
togglelock(user)
T1.visible_message("<span class='warning'>[user] dives into [src]!</span>")
@@ -18,8 +18,8 @@
var/egged = 0
var/use_mob_movespeed = FALSE //Citadel adds snowflake box handling
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc))
/obj/structure/closet/cardboard/relaymove(mob/living/user, direction)
if(opened || move_delay || !CHECK_MOBILITY(user, MOBILITY_MOVE) || !isturf(loc) || !has_gravity(loc))
return
move_delay = TRUE
var/oldloc = loc
@@ -216,7 +216,7 @@
for(var/i in 1 to 3)
new /obj/item/clothing/suit/toggle/labcoat(src)
for(var/i in 1 to 3)
new /obj/item/clothing/suit/toggle/labcoat/emt(src)
new /obj/item/clothing/suit/toggle/labcoat/paramedic(src)
for(var/i in 1 to 3)
new /obj/item/clothing/shoes/sneakers/white(src)
for(var/i in 1 to 3)
@@ -4,10 +4,10 @@
/obj/structure/closet/secure_closet/freezer/Destroy()
recursive_organ_check(src)
..()
return ..()
/obj/structure/closet/secure_closet/freezer/Initialize()
..()
. = ..()
recursive_organ_check(src)
/obj/structure/closet/secure_closet/freezer/open(mob/living/user)
@@ -17,14 +17,15 @@
return ..()
/obj/structure/closet/secure_closet/freezer/close(mob/living/user)
if(..()) //if we actually closed the locker
. = ..()
if(.) //if we actually closed the locker
recursive_organ_check(src)
/obj/structure/closet/secure_closet/freezer/ex_act()
if(!jones)
jones = TRUE
else
..()
return ..()
/obj/structure/closet/secure_closet/freezer/kitchen
name = "kitchen Cabinet"
@@ -265,12 +265,15 @@
new /obj/item/clothing/head/helmet/alt(src)
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/clothing/suit/armor/bulletproof(src)
/obj/structure/closet/secure_closet/lethalshots
name = "shotgun lethal rounds"
name = "lethal ammunition and riot staves"
req_access = list(ACCESS_ARMORY)
icon_state = "tac"
/obj/structure/closet/secure_closet/lethalshots/PopulateContents()
..()
new /obj/item/twohanded/electrostaff(src)
new /obj/item/twohanded/electrostaff(src)
for(var/i in 1 to 3)
new /obj/item/storage/box/lethalshot(src)
@@ -83,9 +83,12 @@
desc = "It's a burial receptacle for the dearly departed."
icon_state = "coffin"
resistance_flags = FLAMMABLE
can_weld_shut = FALSE
breakout_time = 200
max_integrity = 70
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 5
var/pryLidTimer = 250
/obj/structure/closet/crate/coffin/examine(mob/user)
. = ..()
+2 -2
View File
@@ -110,10 +110,10 @@
CanAtmosPass = ATMOS_PASS_NO
resistance_flags = FIRE_PROOF
/obj/structure/holosign/barrier/combolock/blocksTemperature()
/obj/structure/holosign/barrier/combifan/blocksTemperature()
return TRUE
/obj/structure/holosign/barrier/combolock/Initialize()
/obj/structure/holosign/barrier/combifan/Initialize()
. = ..()
air_update_turf(TRUE)
@@ -64,6 +64,9 @@
/obj/structure/kitchenspike/attack_hand(mob/user)
if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
var/mob/living/L = user.pulling
if(HAS_TRAIT(user, TRAIT_PACIFISM) && L.stat != DEAD)
to_chat(user, "<span class='warning'>You don't want to hurt a living creature!</span>")
return
if(do_mob(user, src, 120))
if(has_buckled_mobs()) //to prevent spam/queing up attacks
return
@@ -136,7 +139,7 @@
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
unbuckle_mob(M,force=1)
M.emote("scream")
M.AdjustKnockdown(20)
M.DefaultCombatKnockdown(20)
/obj/structure/kitchenspike/Destroy()
if(has_buckled_mobs())
+3 -3
View File
@@ -1,7 +1,7 @@
#define MUSICIAN_HEARCHECK_MINDELAY 4
#define MUSIC_MAXLINES 600
#define MUSIC_MAXLINECHARS 50
#define MUSIC_MAXLINECHARS 150
/datum/song
var/name = "Untitled"
@@ -82,7 +82,7 @@
/datum/song/proc/shouldStopPlaying(mob/user)
if(instrumentObj)
if(!user.canUseTopic(instrumentObj))
if(!user.canUseTopic(instrumentObj, TRUE, FALSE, FALSE, FALSE))
return TRUE
return !instrumentObj.anchored // add special cases to stop in subclasses
else
@@ -220,7 +220,7 @@
updateDialog(usr) // make sure updates when complete
/datum/song/Topic(href, href_list)
if(!usr.canUseTopic(instrumentObj))
if(!usr.canUseTopic(instrumentObj, TRUE, FALSE, FALSE, FALSE))
usr << browse(null, "window=instrument")
usr.unset_machine()
return
@@ -49,7 +49,7 @@
if(S.mind)
if(petrified_mob)
S.mind.transfer_to(petrified_mob)
petrified_mob.Knockdown(100)
petrified_mob.DefaultCombatKnockdown(100)
to_chat(petrified_mob, "<span class='notice'>You slowly come back to your senses. You are in control of yourself again!</span>")
qdel(S)

Some files were not shown because too many files have changed in this diff Show More