Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into tggenetics
This commit is contained in:
@@ -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)
|
||||
..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,29 @@ 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()
|
||||
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 +470,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 +758,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 +860,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 +1224,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."
|
||||
@@ -283,3 +289,29 @@
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
|
||||
/obj/item/choice_beacon/music
|
||||
name = "instrument delivery beacon"
|
||||
desc = "Summon your tool of art."
|
||||
icon_state = "gangtool-red"
|
||||
|
||||
/obj/item/choice_beacon/music/generate_display_names()
|
||||
var/static/list/instruments
|
||||
if(!instruments)
|
||||
instruments = list()
|
||||
var/list/templist = list(/obj/item/instrument/violin,
|
||||
/obj/item/instrument/piano_synth,
|
||||
/obj/item/instrument/guitar,
|
||||
/obj/item/instrument/eguitar,
|
||||
/obj/item/instrument/glockenspiel,
|
||||
/obj/item/instrument/accordion,
|
||||
/obj/item/instrument/trumpet,
|
||||
/obj/item/instrument/saxophone,
|
||||
/obj/item/instrument/trombone,
|
||||
/obj/item/instrument/recorder,
|
||||
/obj/item/instrument/harmonica
|
||||
)
|
||||
for(var/V in templist)
|
||||
var/atom/A = V
|
||||
instruments[initial(A.name)] = A
|
||||
return instruments
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -487,7 +487,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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -286,6 +283,7 @@
|
||||
if(!C.legcuffed && C.get_num_legs(FALSE) >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
|
||||
C.legcuffed = src
|
||||
forceMove(C)
|
||||
C.update_equipment_speed_mods()
|
||||
C.update_inv_legcuffed()
|
||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||
else if(isanimal(L))
|
||||
@@ -352,7 +350,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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -51,43 +51,37 @@
|
||||
item_state = "knight_hospitaller"
|
||||
// CITADEL CHANGES ENDS HERE
|
||||
|
||||
/obj/item/holybeacon
|
||||
/obj/item/choice_beacon/holy
|
||||
name = "armaments beacon"
|
||||
desc = "Contains a set of armaments for the chaplain."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-red"
|
||||
item_state = "radio"
|
||||
|
||||
/obj/item/holybeacon/attack_self(mob/user)
|
||||
if(user.mind && (user.mind.isholy) && !GLOB.holy_armor_type)
|
||||
beacon_armor(user)
|
||||
/obj/item/choice_beacon/holy/canUseBeacon(mob/living/user)
|
||||
if(user.mind && user.mind.isholy)
|
||||
return ..()
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
||||
return FALSE
|
||||
|
||||
/obj/item/holybeacon/proc/beacon_armor(mob/M)
|
||||
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)
|
||||
/obj/item/choice_beacon/holy/generate_display_names()
|
||||
var/static/list/holy_item_list
|
||||
if(!holy_item_list)
|
||||
holy_item_list = list()
|
||||
var/list/templist = typesof(/obj/item/storage/box/holy)
|
||||
for(var/V in templist)
|
||||
var/atom/A = V
|
||||
holy_item_list[initial(A.name)] = A
|
||||
return holy_item_list
|
||||
|
||||
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)
|
||||
/obj/item/choice_beacon/holy/spawn_option(obj/choice,mob/living/M)
|
||||
if(!GLOB.holy_armor_type)
|
||||
..()
|
||||
playsound(src, 'sound/effects/pray_chaplain.ogg', 40, 1)
|
||||
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
|
||||
GLOB.holy_armor_type = choice
|
||||
else
|
||||
to_chat(M, "<span class='warning'>A selection has already been made. Self-Destructing...</span>")
|
||||
return
|
||||
|
||||
var/index = display_names.Find(choice)
|
||||
var/A = holy_armor_list[index]
|
||||
|
||||
GLOB.holy_armor_type = A
|
||||
var/holy_armor_box = new A(T)
|
||||
|
||||
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
|
||||
|
||||
if(holy_armor_box)
|
||||
qdel(src)
|
||||
M.put_in_hands(holy_armor_box)
|
||||
|
||||
/obj/item/storage/box/holy
|
||||
name = "Templar Kit"
|
||||
|
||||
@@ -244,7 +238,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 +249,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 +263,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 +668,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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -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)
|
||||
@@ -180,13 +181,60 @@
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 12 //9 hit crit
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/cooldown = 13
|
||||
var/on = TRUE
|
||||
var/last_hit = 0
|
||||
var/stun_stam_cost_coeff = 1.25
|
||||
var/hardstun_ds = 1
|
||||
var/hardstun_ds = TRUE
|
||||
var/softstun_ds = 0
|
||||
var/stam_dmg = 30
|
||||
var/cooldown_check = 0 // Used internally, you don't want to modify
|
||||
var/cooldown = 13 // Default wait time until can stun again.
|
||||
var/stun_time_silicon = 60 // How long it stuns silicons for - 6 seconds.
|
||||
var/affect_silicon = FALSE // Does it stun silicons.
|
||||
var/on_sound // "On" sound, played when switching between able to stun or not.
|
||||
var/on_stun_sound = "sound/effects/woodhit.ogg" // Default path to sound for when we stun.
|
||||
var/stun_animation = TRUE // Do we animate the "hit" when stunning.
|
||||
var/on = TRUE // Are we on or off
|
||||
var/on_icon_state // What is our sprite when turned on
|
||||
var/off_icon_state // What is our sprite when turned off
|
||||
var/on_item_state // What is our in-hand sprite when turned on
|
||||
var/force_on // Damage when on - not stunning
|
||||
var/force_off // Damage when off - not stunning
|
||||
var/weight_class_on // What is the new size class when turned on
|
||||
|
||||
/obj/item/melee/classic_baton/Initialize()
|
||||
. = ..()
|
||||
|
||||
// Description for trying to stun when still on cooldown.
|
||||
/obj/item/melee/classic_baton/proc/get_wait_description()
|
||||
return
|
||||
|
||||
// Description for when turning their baton "on"
|
||||
/obj/item/melee/classic_baton/proc/get_on_description()
|
||||
. = list()
|
||||
.["local_on"] = "<span class ='warning'>You extend the baton.</span>"
|
||||
.["local_off"] = "<span class ='notice'>You collapse the baton.</span>"
|
||||
return .
|
||||
|
||||
// Default message for stunning mob.
|
||||
/obj/item/melee/classic_baton/proc/get_stun_description(mob/living/target, mob/living/user)
|
||||
. = list()
|
||||
.["visible"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
|
||||
.["local"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
|
||||
return .
|
||||
|
||||
// Default message for stunning a silicon.
|
||||
/obj/item/melee/classic_baton/proc/get_silicon_stun_description(mob/living/target, mob/living/user)
|
||||
. = list()
|
||||
.["visible"] = "<span class='danger'>[user] pulses [target]'s sensors with the baton!</span>"
|
||||
.["local"] = "<span class='danger'>You pulse [target]'s sensors with the baton!</span>"
|
||||
return .
|
||||
|
||||
// Are we applying any special effects when we stun to carbon
|
||||
/obj/item/melee/classic_baton/proc/additional_effects_carbon(mob/living/target, mob/living/user)
|
||||
return
|
||||
|
||||
// Are we applying any special effects when we stun to silicon
|
||||
/obj/item/melee/classic_baton/proc/additional_effects_silicon(mob/living/target, mob/living/user)
|
||||
return
|
||||
|
||||
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
|
||||
if(!on)
|
||||
@@ -199,7 +247,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)
|
||||
@@ -207,15 +255,28 @@
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
if(iscyborg(target))
|
||||
..()
|
||||
if(user.a_intent != INTENT_HARM) // We don't stun if we're on harm.
|
||||
if(affect_silicon)
|
||||
var/list/desc = get_silicon_stun_description(target, user)
|
||||
target.flash_act(affect_silicon = TRUE)
|
||||
target.Stun(stun_time_silicon)
|
||||
additional_effects_silicon(target, user)
|
||||
user.visible_message(desc["visible"], desc["local"])
|
||||
playsound(get_turf(src), on_stun_sound, 100, TRUE, -1)
|
||||
if(stun_animation)
|
||||
user.do_attack_animation(target)
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
return
|
||||
if(!isliving(target))
|
||||
return
|
||||
if (user.a_intent == INTENT_HARM)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(!..() || !iscyborg(target))
|
||||
return
|
||||
else
|
||||
if(last_hit < world.time)
|
||||
if(cooldown_check < world.time)
|
||||
if(target.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
|
||||
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return
|
||||
@@ -223,18 +284,25 @@
|
||||
var/mob/living/carbon/human/H = target
|
||||
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)
|
||||
var/list/desc = get_stun_description(target, user)
|
||||
if(stun_animation)
|
||||
user.do_attack_animation(target)
|
||||
playsound(get_turf(src), on_stun_sound, 75, 1, -1)
|
||||
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
||||
additional_effects_carbon(target, user)
|
||||
log_combat(user, target, "stunned", src)
|
||||
src.add_fingerprint(user)
|
||||
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
||||
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
|
||||
add_fingerprint(user)
|
||||
target.visible_message(desc["visible"], desc["local"])
|
||||
if(!iscarbon(user))
|
||||
target.LAssailant = null
|
||||
else
|
||||
target.LAssailant = user
|
||||
last_hit = world.time + cooldown
|
||||
target.LAssailant = WEAKREF(user)
|
||||
cooldown_check = world.time + cooldown
|
||||
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
|
||||
else
|
||||
var/wait_desc = get_wait_description()
|
||||
if(wait_desc)
|
||||
to_chat(user, wait_desc)
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic
|
||||
name = "telescopic baton"
|
||||
@@ -249,6 +317,13 @@
|
||||
item_flags = NONE
|
||||
force = 0
|
||||
on = FALSE
|
||||
on_sound = 'sound/weapons/batonextend.ogg'
|
||||
on_icon_state = "telebaton_1"
|
||||
off_icon_state = "telebaton_0"
|
||||
on_item_state = "nullrod"
|
||||
force_on = 10
|
||||
force_off = 0
|
||||
weight_class_on = WEIGHT_CLASS_BULKY
|
||||
total_mass = TOTAL_MASS_NORMAL_ITEM
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
|
||||
@@ -259,7 +334,7 @@
|
||||
if(!on)
|
||||
src.attack_self(user)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
playsound(loc, on_sound, 50, 1)
|
||||
add_fingerprint(user)
|
||||
sleep(3)
|
||||
if (H && !QDELETED(H))
|
||||
@@ -271,25 +346,57 @@
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/attack_self(mob/user)
|
||||
on = !on
|
||||
var/list/desc = get_on_description()
|
||||
if(on)
|
||||
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
|
||||
icon_state = "telebaton_1"
|
||||
item_state = "nullrod"
|
||||
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
|
||||
force = 10 //stunbaton damage
|
||||
to_chat(user, desc["local_on"])
|
||||
icon_state = on_icon_state
|
||||
item_state = on_item_state
|
||||
w_class = weight_class_on
|
||||
force = force_on
|
||||
attack_verb = list("smacked", "struck", "cracked", "beaten")
|
||||
else
|
||||
to_chat(user, "<span class ='notice'>You collapse the baton.</span>")
|
||||
icon_state = "telebaton_0"
|
||||
to_chat(user, desc["local_off"])
|
||||
icon_state = off_icon_state
|
||||
item_state = null //no sprite for concealment even when in hand
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 0 //not so robust now
|
||||
force = force_off
|
||||
attack_verb = list("hit", "poked")
|
||||
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
playsound(src.loc, on_sound, 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/contractor_baton
|
||||
name = "contractor baton"
|
||||
desc = "A compact, specialised baton assigned to Syndicate contractors. Applies light electrical shocks to targets."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "contractor_baton_0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
item_state = null
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_flags = NONE
|
||||
force = 5
|
||||
cooldown = 20
|
||||
stam_dmg = 45 //4 hit stamcrit
|
||||
affect_silicon = TRUE
|
||||
on_sound = 'sound/weapons/contractorbatonextend.ogg'
|
||||
on_stun_sound = 'sound/effects/contractorbatonhit.ogg'
|
||||
on_icon_state = "contractor_baton_1"
|
||||
off_icon_state = "contractor_baton_0"
|
||||
on_item_state = "contractor_baton"
|
||||
force_on = 16
|
||||
force_off = 5
|
||||
weight_class_on = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/contractor_baton/get_wait_description()
|
||||
return "<span class='danger'>The baton is still charging!</span>"
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/contractor_baton/additional_effects_carbon(mob/living/target, mob/living/user)
|
||||
target.Jitter(20)
|
||||
target.apply_effect(EFFECT_STUTTER, 20)
|
||||
target.apply_status_effect(/datum/status_effect/electrostaff, 30) //knockdown, disarm, and slowdown, the unholy triumvirate of stam combat
|
||||
|
||||
/obj/item/melee/supermatter_sword
|
||||
name = "supermatter sword"
|
||||
desc = "In a station full of bad ideas, this might just be the worst."
|
||||
@@ -453,12 +560,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 +621,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
|
||||
|
||||
@@ -12,6 +12,95 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
attack_verb = list("warned", "cautioned", "smashed")
|
||||
|
||||
/obj/item/choice_beacon
|
||||
name = "choice beacon"
|
||||
desc = "Hey, why are you viewing this?!! Please let Centcom know about this odd occurance."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-blue"
|
||||
item_state = "radio"
|
||||
|
||||
/obj/item/choice_beacon/attack_self(mob/user)
|
||||
if(canUseBeacon(user))
|
||||
generate_options(user)
|
||||
|
||||
/obj/item/choice_beacon/proc/generate_display_names() // return the list that will be used in the choice selection. entries should be in (type.name = type) fashion. see choice_beacon/hero for how this is done.
|
||||
return list()
|
||||
|
||||
/obj/item/choice_beacon/proc/canUseBeacon(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return TRUE
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
||||
return FALSE
|
||||
|
||||
/obj/item/choice_beacon/proc/generate_options(mob/living/M)
|
||||
var/list/display_names = generate_display_names()
|
||||
if(!display_names.len)
|
||||
return
|
||||
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in display_names
|
||||
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
|
||||
spawn_option(display_names[choice],M)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/proc/spawn_option(obj/choice,mob/living/M)
|
||||
var/obj/new_item = new choice()
|
||||
var/obj/structure/closet/supplypod/bluespacepod/pod = new()
|
||||
pod.explosionSize = list(0,0,0,0)
|
||||
new_item.forceMove(pod)
|
||||
var/msg = "<span class='danger'>After making your selection, you notice a strange target on the ground. It might be best to step back!</span>"
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/radio/headset))
|
||||
msg = "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows: <span class='bold'>Item request received. Your package is inbound, please stand back from the landing site.</span> Message ends.\""
|
||||
to_chat(M, msg)
|
||||
|
||||
new /obj/effect/abstract/DPtarget(get_turf(src), pod)
|
||||
|
||||
/obj/item/choice_beacon/hero
|
||||
name = "heroic beacon"
|
||||
desc = "To summon heroes from the past to protect the future."
|
||||
|
||||
/obj/item/choice_beacon/hero/generate_display_names()
|
||||
var/static/list/hero_item_list
|
||||
if(!hero_item_list)
|
||||
hero_item_list = list()
|
||||
var/list/templist = typesof(/obj/item/storage/box/hero) //we have to convert type = name to name = type, how lovely!
|
||||
for(var/V in templist)
|
||||
var/atom/A = V
|
||||
hero_item_list[initial(A.name)] = A
|
||||
return hero_item_list
|
||||
|
||||
|
||||
/obj/item/storage/box/hero
|
||||
name = "Courageous Tomb Raider - 1940's."
|
||||
|
||||
/obj/item/storage/box/hero/PopulateContents()
|
||||
new /obj/item/clothing/head/fedora/curator(src)
|
||||
new /obj/item/clothing/suit/curator(src)
|
||||
new /obj/item/clothing/under/rank/curator/treasure_hunter(src)
|
||||
new /obj/item/clothing/shoes/workboots/mining(src)
|
||||
new /obj/item/melee/curator_whip(src)
|
||||
|
||||
/obj/item/storage/box/hero/astronaut
|
||||
name = "First Man on the Moon - 1960's."
|
||||
|
||||
/obj/item/storage/box/hero/astronaut/PopulateContents()
|
||||
new /obj/item/clothing/suit/space/nasavoid(src)
|
||||
new /obj/item/clothing/head/helmet/space/nasavoid(src)
|
||||
new /obj/item/tank/internals/emergency_oxygen/double(src)
|
||||
new /obj/item/gps(src)
|
||||
|
||||
/obj/item/storage/box/hero/scottish
|
||||
name = "Braveheart, the Scottish rebel - 1300's."
|
||||
|
||||
/obj/item/storage/box/hero/scottish/PopulateContents()
|
||||
new /obj/item/clothing/under/kilt(src)
|
||||
new /obj/item/claymore/weak/ceremonial(src)
|
||||
new /obj/item/toy/crayon/spraycan(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
|
||||
/obj/item/skub
|
||||
desc = "It's skub."
|
||||
name = "skub"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/active = FALSE
|
||||
var/atom/movable/target //The thing we're searching for
|
||||
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
|
||||
var/ignore_suit_sensor_level = FALSE // Do we find people even if their suit sensors are turned off
|
||||
var/alert = FALSE // TRUE to display things more seriously
|
||||
|
||||
/obj/item/pinpointer/Initialize()
|
||||
@@ -49,34 +50,36 @@
|
||||
/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"
|
||||
desc = "A handheld tracking device that points to crew suit sensors."
|
||||
icon_state = "pinpointer_crew"
|
||||
var/has_owner = FALSE
|
||||
var/pinpointer_owner = null
|
||||
|
||||
/obj/item/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
|
||||
var/turf/here = get_turf(src)
|
||||
@@ -84,7 +87,7 @@
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
|
||||
// Suit sensors must be on maximum.
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS && !ignore_suit_sensor_level)
|
||||
return FALSE
|
||||
|
||||
var/turf/there = get_turf(H)
|
||||
@@ -101,7 +104,11 @@
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (has_owner && !pinpointer_owner)
|
||||
pinpointer_owner = user
|
||||
if (pinpointer_owner && pinpointer_owner != user)
|
||||
to_chat(user, "<span class='notice'>The pinpointer doesn't respond. It seems to only recognise its owner.</span>")
|
||||
return
|
||||
var/list/name_counts = list()
|
||||
var/list/names = list()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -315,3 +314,9 @@
|
||||
desc = "This one is rusted."
|
||||
force = 30
|
||||
armour_penetration = 15
|
||||
|
||||
/obj/item/claymore/weak/ceremonial
|
||||
desc = "A rusted claymore, once at the heart of a powerful scottish clan struck down and oppressed by tyrants, it has been passed down the ages as a symbol of defiance."
|
||||
force = 15
|
||||
block_chance = 30
|
||||
armour_penetration = 5
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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), \
|
||||
))
|
||||
@@ -206,6 +229,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
null, \
|
||||
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
|
||||
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \
|
||||
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\
|
||||
null, \
|
||||
@@ -347,6 +371,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
|
||||
@@ -381,12 +406,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"
|
||||
@@ -738,6 +763,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
|
||||
@@ -790,6 +816,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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
. = ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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))
|
||||
@@ -1333,7 +1333,7 @@
|
||||
/obj/item/storage/box/beakers/bluespace=1,\
|
||||
/obj/item/storage/box/beakers/variety=1,\
|
||||
/obj/item/storage/box/material=1,\
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv=1
|
||||
)
|
||||
generate_items_inside(items_inside, src)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -397,3 +397,96 @@
|
||||
/obj/item/storage/box/syndie_kit/revolver/PopulateContents()
|
||||
new /obj/item/gun/ballistic/revolver(src)
|
||||
new /obj/item/ammo_box/a357(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/contract_kit
|
||||
name = "contractor kit"
|
||||
desc = "Supplied to Syndicate contractors in active mission areas."
|
||||
|
||||
/obj/item/storage/box/syndicate/contractor_loadout
|
||||
name = "standard loadout"
|
||||
desc = "Supplied to Syndicate contractors, providing their specialised space suit and chameleon uniform."
|
||||
icon_state = "syndiebox"
|
||||
illustration = "writing_syndie"
|
||||
|
||||
/obj/item/paper/contractor_guide
|
||||
name = "Contractor Guide"
|
||||
|
||||
/obj/item/paper/contractor_guide/Initialize()
|
||||
info = {"<p>Welcome agent, congratulations on your new position as contractor. On top of your already assigned objectives,
|
||||
this kit will provide you contracts to take on for TC payments.</p>
|
||||
<p>Provided within, we give your specialist contractor space suit. It's even more compact, being able to fit into a pocket, and faster than the
|
||||
Syndicate space suit available to you on the uplink. We also provide your chameleon jumpsuit and mask, both of which can be changed
|
||||
to any form you need for the moment. The cigarettes are a special blend - it'll heal your injuries slowly overtime.</p>
|
||||
<p>The three additional items, apart from the tablet and loadout box, have been randomly selected from what we had available. We hope
|
||||
they're useful to you for you mission.</p>
|
||||
<p>The contractor hub, available at the top right of the uplink, will provide you unique items and abilities. These are bought using Contractor Rep,
|
||||
with two Rep being provided each time you complete a contract.</p>
|
||||
<h3>Using the tablet</h3>
|
||||
<ol>
|
||||
<li>Open the Syndicate Contract Uplink program.</li>
|
||||
<li>Assign yourself.</li>
|
||||
<li>Here, you can accept a contract, and redeem your TC payments from completed contracts.</li>
|
||||
<li>The payment number shown in brackets is the bonus you'll recieve when bringing your target <b>alive</b>. You recieve the
|
||||
other number regardless of if they were alive or dead.</li>
|
||||
<li>Contracts are completed by bringing the target to designated dropoff, calling for extraction, and putting them
|
||||
inside the pod.</li>
|
||||
</ol>
|
||||
<p>Be careful when accepting a contract. While you'll be able to see the location of the dropoff point, cancelling will make it
|
||||
unavailable to take on again.</p>
|
||||
<p>The tablet can also be recharged at any cell charger.</p>
|
||||
<h3>Extracting</h3>
|
||||
<ol>
|
||||
<li>Make sure both yourself and your target are at the dropoff.</li>
|
||||
<li>Call the extraction, and stand back from the drop point</li>
|
||||
<li>If it fails, make sure your target is inside, and there's a free space for the pod to land.</li>
|
||||
<li>Grab your target, and drag them into the pod.</li>
|
||||
</ol>
|
||||
<h3>Ransoms</h3>
|
||||
<p>We need your target for our own reasons, but we ransom them back to your mission area once their use is served. They will return back
|
||||
from where you sent them off from in several minutes time. You will be paid in TC for your services.</p>
|
||||
|
||||
<p>Good luck agent. You can burn this document with the supplied lighter.</p>"}
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/box/syndicate/contractor_loadout/PopulateContents()
|
||||
new /obj/item/clothing/head/helmet/space/syndicate/contract(src)
|
||||
new /obj/item/clothing/suit/space/syndicate/contract(src)
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/clothing/mask/chameleon(src)
|
||||
new /obj/item/card/id/syndicate(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src)
|
||||
new /obj/item/lighter(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/contract_kit/PopulateContents()
|
||||
new /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink(src)
|
||||
new /obj/item/storage/box/syndicate/contractor_loadout(src)
|
||||
new /obj/item/melee/classic_baton/telescopic/contractor_baton(src)
|
||||
var/list/item_list = list( // All 4 TC or less - some nukeops only items, but fit nicely to the theme.
|
||||
/obj/item/storage/backpack/duffelbag/syndie/x4,
|
||||
/obj/item/storage/box/syndie_kit/throwing_weapons,
|
||||
/obj/item/gun/syringe/syndicate,
|
||||
/obj/item/pen/edagger,
|
||||
/obj/item/pen/sleepy,
|
||||
/obj/item/flashlight/emp,
|
||||
/obj/item/reagent_containers/syringe/mulligan,
|
||||
/obj/item/clothing/shoes/chameleon/noslip,
|
||||
/obj/item/storage/firstaid/tactical,
|
||||
/obj/item/storage/backpack/duffelbag/syndie/surgery,
|
||||
/obj/item/encryptionkey/syndicate,
|
||||
/obj/item/clothing/glasses/thermal/syndi,
|
||||
/obj/item/slimepotion/slime/sentience/nuclear,
|
||||
/obj/item/storage/box/syndie_kit/imp_radio,
|
||||
/obj/item/storage/box/syndie_kit/imp_uplink,
|
||||
/obj/item/clothing/gloves/krav_maga/combatglovesplus,
|
||||
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot,
|
||||
/obj/item/reagent_containers/syringe/stimulants,
|
||||
/obj/item/storage/box/syndie_kit/imp_freedom
|
||||
)
|
||||
var/obj/item1 = pick_n_take(item_list)
|
||||
var/obj/item2 = pick_n_take(item_list)
|
||||
var/obj/item3 = pick_n_take(item_list)
|
||||
new item1(src) // Create three, non repeat items from the list.
|
||||
new item2(src)
|
||||
new item3(src)
|
||||
new /obj/item/paper/contractor_guide(src) //Paper guide
|
||||
@@ -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"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/item/melee/baton/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Right click attack while in combat mode to disarm instead of stun.</span>"
|
||||
. += "<span class='notice'>Right click attack while in combat mode or attack while in disarm intent to disarm instead of stun.</span>"
|
||||
|
||||
/obj/item/melee/baton/get_cell()
|
||||
. = cell
|
||||
@@ -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)
|
||||
@@ -149,6 +149,8 @@
|
||||
|
||||
//return TRUE to interrupt attack chain.
|
||||
/obj/item/melee/baton/proc/common_baton_melee(mob/M, mob/living/user, disarming = FALSE)
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
disarming = TRUE //override if they're in disarm intent.
|
||||
if(iscyborg(M) || !isliving(M)) //can't baton cyborgs
|
||||
return FALSE
|
||||
if(status && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
@@ -191,11 +193,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 +220,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)
|
||||
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user