Merge remote-tracking branch 'origin/master' into hardsync-1.5

This commit is contained in:
Letter N
2021-02-23 11:01:42 +08:00
223 changed files with 1145 additions and 605 deletions

View File

@@ -14,7 +14,7 @@
"ai" = (
/obj/effect/turf_decal/sand/plating,
/obj/structure/closet/crate/secure/loot,
/obj/item/clothing/head/collectable/paper,
/obj/item/clothing/head/sombrero/shamebrero,
/turf/open/floor/plating,
/area/awaymission/jungleresort)
"ak" = (
@@ -51,6 +51,10 @@
/obj/machinery/jukebox,
/turf/open/floor/wood,
/area/awaymission/jungleresort)
"az" = (
/obj/structure/stone_tile/center,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"aA" = (
/obj/machinery/light,
/obj/structure/chair/wood{
@@ -199,7 +203,7 @@
/area/awaymission/jungleresort)
"cK" = (
/obj/structure/closet/crate,
/obj/item/clothing/head/collectable/tophat,
/obj/item/clothing/head/collectable/petehat/gang,
/turf/open/floor/plating/rust,
/area/awaymission/jungleresort)
"cT" = (
@@ -217,6 +221,11 @@
/obj/structure/flora/rock,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"cY" = (
/obj/structure/flora/grass/jungle/b,
/mob/living/simple_animal/hostile/gorilla/jungle,
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"dm" = (
/obj/structure/table/wood,
/obj/item/reagent_containers/food/drinks/beer,
@@ -274,7 +283,6 @@
dir = 9
},
/obj/structure/stone_tile/center/cracked,
/obj/item/ammo_casing/shotgun/buckshot,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"eB" = (
@@ -405,10 +413,14 @@
/obj/item/toy/figure/chef,
/turf/open/floor/wood,
/area/awaymission/jungleresort)
"gC" = (
/obj/item/clothing/head/rice_hat/cursed,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"gK" = (
/obj/structure/table/wood,
/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot,
/obj/item/ammo_box/magazine/toy/m762/riot,
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted,
/obj/item/ammo_box/magazine/toy/smgm45,
/turf/open/floor/wood,
/area/awaymission/jungleresort)
"gL" = (
@@ -580,6 +592,9 @@
dir = 1
},
/obj/structure/stone_tile/center/burnt,
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 6
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"iE" = (
@@ -660,6 +675,11 @@
},
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"jw" = (
/obj/structure/stone_tile/surrounding/cracked,
/obj/structure/stone_tile/center/burnt,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"jy" = (
/obj/structure/flora/grass/jungle/b,
/obj/effect/turf_decal/weather/dirt{
@@ -674,6 +694,16 @@
},
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"jD" = (
/obj/structure/stone_tile/surrounding_tile/cracked,
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 9
},
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 6
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"jF" = (
/obj/structure/flora/tree/jungle,
/obj/machinery/light,
@@ -798,6 +828,11 @@
},
/turf/open/floor/wood,
/area/awaymission/jungleresort)
"lF" = (
/obj/structure/flora/junglebush,
/mob/living/simple_animal/hostile/gorilla/jungle,
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"lJ" = (
/obj/structure/flora/junglebush/c,
/obj/machinery/light{
@@ -869,6 +904,8 @@
/obj/structure/cable{
icon_state = "2-4"
},
/obj/item/clothing/glasses/meson/engine,
/obj/item/storage/belt/utility,
/turf/open/floor/plating,
/area/awaymission/jungleresort)
"mE" = (
@@ -986,6 +1023,10 @@
/obj/item/toy/crayon/spraycan,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"ou" = (
/obj/item/clothing/glasses/meson,
/turf/open/floor/plating/asteroid,
/area/awaymission/jungleresort)
"ow" = (
/obj/structure/flora/tree/jungle,
/obj/effect/turf_decal/weather/dirt,
@@ -993,7 +1034,7 @@
/area/awaymission/jungleresort)
"oW" = (
/obj/effect/decal/remains/human,
/obj/item/clothing/head/collectable/petehat/gang,
/obj/item/clothing/head/collectable/tophat,
/turf/open/floor/plating,
/area/awaymission/jungleresort)
"oX" = (
@@ -1075,7 +1116,7 @@
"qi" = (
/obj/effect/turf_decal/sand/plating,
/obj/structure/closet/crate/secure/loot,
/obj/item/clothing/head/collectable/beret,
/obj/item/clothing/head/rice_hat/cursed,
/turf/open/floor/plating,
/area/awaymission/jungleresort)
"qr" = (
@@ -1255,6 +1296,15 @@
/obj/effect/turf_decal/sand/plating,
/turf/open/floor/plating,
/area/awaymission/jungleresort)
"tm" = (
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 9
},
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 1
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"tn" = (
/obj/structure/flora/rock/pile,
/obj/machinery/light{
@@ -1478,6 +1528,15 @@
/obj/effect/turf_decal/weather/dirt,
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"vz" = (
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 6
},
/obj/structure/stone_tile/surrounding/cracked{
dir = 1
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"vK" = (
/obj/structure/flora/ausbushes/stalkybush,
/turf/open/floor/grass,
@@ -1497,6 +1556,10 @@
},
/turf/open/floor/wood,
/area/awaymission/jungleresort)
"wd" = (
/obj/item/storage/bag/ore,
/turf/open/floor/plating/asteroid,
/area/awaymission/jungleresort)
"wj" = (
/obj/machinery/light{
dir = 1
@@ -1535,7 +1598,7 @@
/area/awaymission/jungleresort)
"ww" = (
/obj/structure/closet/secure_closet/personal/cabinet,
/obj/item/clothing/suit/hooded/wintercoat/captain,
/obj/item/clothing/suit/hooded/wintercoat/captain/jungle,
/turf/open/floor/carpet/blue,
/area/awaymission/jungleresort)
"wF" = (
@@ -1655,6 +1718,10 @@
},
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"yw" = (
/obj/item/pickaxe/mini,
/turf/open/floor/plating/asteroid,
/area/awaymission/jungleresort)
"yx" = (
/obj/structure/flora/ausbushes/fullgrass,
/obj/effect/turf_decal/weather/dirt{
@@ -1814,6 +1881,13 @@
/obj/structure/flora/ausbushes/sparsegrass,
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"Ad" = (
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 1
},
/obj/structure/stone_tile/surrounding_tile/cracked,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"Ag" = (
/obj/machinery/door/airlock/wood{
name = "Resort Office"
@@ -2016,6 +2090,7 @@
/obj/structure/window/reinforced{
dir = 4
},
/obj/structure/window/reinforced,
/turf/open/floor/carpet,
/area/awaymission/jungleresort)
"CV" = (
@@ -2329,6 +2404,9 @@
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 9
},
/obj/structure/stone_tile/surrounding/cracked{
dir = 1
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"GN" = (
@@ -2368,6 +2446,10 @@
},
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"Hr" = (
/obj/structure/stone_tile/surrounding/cracked,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"Hs" = (
/obj/structure/flora/ausbushes/stalkybush,
/obj/machinery/light,
@@ -2410,6 +2492,10 @@
},
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"HT" = (
/mob/living/simple_animal/hostile/gorilla/jungle,
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"Ih" = (
/turf/open/floor/plating,
/area/awaymission/jungleresort)
@@ -2897,6 +2983,15 @@
/obj/item/storage/book/bible,
/turf/open/floor/carpet,
/area/awaymission/jungleresort)
"ON" = (
/obj/effect/decal/cleanable/blood/splatter,
/obj/effect/decal/remains/human,
/obj/structure/stone_tile/burnt,
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 1
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"OU" = (
/obj/effect/turf_decal/weather/dirt,
/turf/open/floor/grass,
@@ -3030,7 +3125,7 @@
/obj/effect/decal/cleanable/blood/tracks{
dir = 8
},
/obj/structure/stone_tile/surrounding/cracked,
/obj/structure/stone_tile/center/burnt,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"QA" = (
@@ -3091,6 +3186,7 @@
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/clothing/glasses/meson/engine,
/obj/item/storage/belt/utility,
/turf/open/floor/plating,
/area/awaymission/jungleresort)
"Rm" = (
@@ -3224,11 +3320,8 @@
/obj/effect/decal/remains/human,
/obj/effect/decal/cleanable/blood/old,
/obj/structure/stone_tile/surrounding/cracked,
/obj/item/gun/ballistic/shotgun/sc_pump,
/obj/item/clothing/suit/armor/vest,
/obj/item/clothing/head/helmet,
/obj/item/ammo_casing/shotgun/buckshot,
/obj/item/ammo_casing/shotgun/buckshot,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"SV" = (
@@ -3246,6 +3339,7 @@
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 5
},
/obj/structure/stone_tile/burnt,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"Ta" = (
@@ -3290,6 +3384,7 @@
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 9
},
/obj/structure/stone_tile/center,
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"TG" = (
@@ -3508,7 +3603,7 @@
/area/awaymission/jungleresort)
"WD" = (
/obj/effect/decal/remains/human,
/obj/item/clothing/head/collectable/slime,
/obj/item/clothing/head/collectable/beret,
/turf/open/floor/plating/rust,
/area/awaymission/jungleresort)
"WE" = (
@@ -3573,6 +3668,11 @@
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"Xu" = (
/obj/structure/flora/junglebush/c,
/mob/living/simple_animal/hostile/gorilla/jungle,
/turf/open/floor/grass,
/area/awaymission/jungleresort)
"Xz" = (
/turf/open/floor/carpet/red,
/area/awaymission/jungleresort)
@@ -3639,6 +3739,7 @@
"Ye" = (
/obj/structure/closet/secure_closet/personal/cabinet,
/obj/item/toy/figure/syndie,
/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted,
/turf/open/floor/carpet/red,
/area/awaymission/jungleresort)
"Yf" = (
@@ -3748,6 +3849,9 @@
dir = 8
},
/obj/structure/stone_tile/surrounding_tile/burnt,
/obj/structure/stone_tile/surrounding_tile/cracked{
dir = 9
},
/turf/open/floor/plating/dirt/jungle,
/area/awaymission/jungleresort)
"ZH" = (
@@ -6362,8 +6466,8 @@ AR
AR
AR
AR
AR
oZ
jD
aL
fy
Dr
@@ -6513,8 +6617,8 @@ AR
AR
AR
AR
AR
AR
oZ
Gk
AC
GD
oZ
@@ -6668,8 +6772,8 @@ AR
oZ
iv
Qz
AR
AR
tm
oZ
AR
AR
AR
@@ -6819,6 +6923,7 @@ AR
oZ
wS
SZ
Hr
oZ
AR
AR
@@ -6834,7 +6939,6 @@ AR
AR
AR
AR
AR
rd
AF
YQ
@@ -6967,11 +7071,11 @@ AR
AR
AR
AR
AR
AR
yJ
oZ
AR
aL
yJ
TD
oZ
AR
AR
AR
@@ -7122,6 +7226,8 @@ AR
AR
oZ
Yp
az
ON
oZ
AR
AR
@@ -7137,8 +7243,6 @@ AR
AR
AR
AR
AR
AR
YQ
YM
cn
@@ -7166,7 +7270,7 @@ YQ
YQ
CN
YQ
YQ
HT
rd
YQ
YQ
@@ -7274,6 +7378,8 @@ AR
AR
oZ
TD
Ad
jw
oZ
AR
AR
@@ -7289,8 +7395,6 @@ AR
AR
AR
AR
AR
AR
YQ
aP
Wl
@@ -7427,7 +7531,7 @@ AR
oZ
aL
Xs
AR
oZ
AR
AR
AR
@@ -7579,7 +7683,7 @@ AR
AR
oZ
tH
AR
vz
AR
AR
AR
@@ -8261,7 +8365,7 @@ YQ
YQ
MW
CN
AF
lF
Wl
YQ
YQ
@@ -9006,7 +9110,7 @@ YQ
CN
YQ
YQ
YQ
HT
Wl
aP
YQ
@@ -9807,7 +9911,7 @@ YQ
YQ
YQ
YQ
YQ
HT
YQ
YQ
YQ
@@ -10950,7 +11054,7 @@ YQ
YQ
Fz
wH
YQ
HT
YQ
YQ
VU
@@ -11390,9 +11494,9 @@ AR
AR
AR
io
uh
pQ
pQ
VJ
AV
AV
QA
dF
io
@@ -11544,8 +11648,8 @@ AR
AR
AR
AR
AR
pQ
io
VJ
AV
QA
QA
@@ -13724,7 +13828,7 @@ io
du
YF
io
io
gC
io
io
ia
@@ -14218,7 +14322,7 @@ YQ
cn
ZV
MW
YQ
HT
rd
aP
vK
@@ -15051,7 +15155,7 @@ Wl
YQ
YQ
YQ
YQ
HT
rd
YQ
YQ
@@ -18177,8 +18281,8 @@ YQ
YQ
YQ
AF
AR
AR
yw
ou
AR
AR
AR
@@ -18329,9 +18433,9 @@ YQ
YM
Wl
Pg
AR
AR
AR
wd
Qp
Qp
AR
AR
AR
@@ -20699,7 +20803,7 @@ YQ
YQ
YQ
MW
rd
cY
Wl
YQ
YQ
@@ -22732,7 +22836,7 @@ AF
ZV
YQ
YQ
cn
Xu
YQ
YQ
YQ
@@ -23322,7 +23426,7 @@ YQ
CN
VU
dY
YQ
HT
YQ
aP
YQ
@@ -23577,7 +23681,7 @@ YQ
YQ
YQ
vK
YQ
HT
kr
YQ
AF
@@ -26562,3 +26666,4 @@ bG
bG
bG
"}

View File

@@ -191,6 +191,7 @@
#define TRAIT_MUSICIAN "musician"
#define TRAIT_PERMABONER "permanent_arousal"
#define TRAIT_NEVERBONER "never_aroused"
#define TRAIT_NYMPHO "nymphomaniac"
#define TRAIT_MASO "masochism"
#define TRAIT_HIGH_BLOOD "high_blood"
#define TRAIT_PARA "paraplegic"

View File

@@ -45,8 +45,8 @@
/datum/crafting_recipe/bloodsucker/blackcoffin
name = "Black Coffin"
result = /obj/structure/closet/crate/coffin/blackcoffin
tools = list(/obj/item/weldingtool,
/obj/item/screwdriver)
tools = list(TOOL_WELDER,
TOOL_SCREWDRIVER)
reqs = list(/obj/item/stack/sheet/cloth = 1,
/obj/item/stack/sheet/mineral/wood = 5,
/obj/item/stack/sheet/metal = 1)
@@ -72,8 +72,8 @@
/datum/crafting_recipe/bloodsucker/metalcoffin
name = "Metal Coffin"
result =/obj/structure/closet/crate/coffin/metalcoffin
tools = list(/obj/item/weldingtool,
/obj/item/screwdriver)
tools = list(TOOL_WELDER,
TOOL_SCREWDRIVER)
reqs = list(/obj/item/stack/sheet/metal = 5)
time = 100
subcategory = CAT_FURNITURE
@@ -84,9 +84,9 @@
name = "Persuasion Rack"
//desc = "For converting crewmembers into loyal Vassals."
result = /obj/structure/bloodsucker/vassalrack
tools = list(/obj/item/weldingtool,
//obj/item/screwdriver,
/obj/item/wrench
tools = list(TOOL_WELDER,
//TOOL_SCREWDRIVER,
TOOL_WRENCH
)
reqs = list(/obj/item/stack/sheet/mineral/wood = 3,
/obj/item/stack/sheet/metal = 2,
@@ -108,8 +108,8 @@
name = "Candelabrum"
//desc = "For converting crewmembers into loyal Vassals."
result = /obj/structure/bloodsucker/candelabrum
tools = list(/obj/item/weldingtool,
/obj/item/wrench
tools = list(TOOL_WELDER,
TOOL_WRENCH
)
reqs = list(/obj/item/stack/sheet/metal = 3,
/obj/item/stack/rods = 1,

View File

@@ -84,38 +84,37 @@ handles linking back and forth.
_MakeLocal()
/datum/component/remote_materials/proc/OnAttackBy(datum/source, obj/item/I, mob/user)
if (istype(I, /obj/item/multitool))
var/obj/item/multitool/M = I
if (!QDELETED(M.buffer) && istype(M.buffer, /obj/machinery/ore_silo))
if (silo == M.buffer)
if(I.tool_behaviour == TOOL_MULTITOOL)
if((I.buffer) && istype(I.buffer, /obj/machinery/ore_silo))
if(silo == I.buffer)
to_chat(user, "<span class='notice'>[parent] is already connected to [silo].</span>")
return COMPONENT_NO_AFTERATTACK
if (silo)
if(silo)
silo.connected -= src
silo.updateUsrDialog()
else if (mat_container)
else if(mat_container)
mat_container.retrieve_all()
qdel(mat_container)
silo = M.buffer
silo = I.buffer
silo.connected += src
silo.updateUsrDialog()
mat_container = silo.GetComponent(/datum/component/material_container)
to_chat(user, "<span class='notice'>You connect [parent] to [silo] from the multitool's buffer.</span>")
return COMPONENT_NO_AFTERATTACK
else if (silo && istype(I, /obj/item/stack))
if (silo.remote_attackby(parent, user, I))
else if(silo && istype(I, /obj/item/stack))
if(silo.remote_attackby(parent, user, I))
return COMPONENT_NO_AFTERATTACK
/datum/component/remote_materials/proc/on_hold()
return silo && silo.holds["[get_area(parent)]/[category]"]
/datum/component/remote_materials/proc/silo_log(obj/machinery/M, action, amount, noun, list/mats)
if (silo)
if(silo)
silo.silo_log(M || parent, action, amount, noun, mats)
/datum/component/remote_materials/proc/format_amount()
if (mat_container)
if(mat_container)
return "[mat_container.total_amount] / [mat_container.max_amount == INFINITY ? "Unlimited" : mat_container.max_amount] ([silo ? "remote" : "local"])"
else
return "0 / 0"

View File

@@ -125,7 +125,7 @@
else
if(!default_can_user_rotate(user, default_rotation_direction))
return
if(istype(I,/obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
BaseRot(user,default_rotation_direction)
return COMPONENT_NO_AFTERATTACK

View File

@@ -105,6 +105,22 @@
gain_text = "<span class='notice'>You desire to be hurt.</span>"
lose_text = "<span class='notice'>Pain has become less exciting for you.</span>"
/datum/quirk/libido
name = "Nymphomaniac"
desc = "You are much more sensitive to arousal."
value = 0
mob_trait = TRAIT_NYMPHO
gain_text = "<span class='notice'>You are feeling extra wild.</span>"
lose_text = "<span class='notice'>You don't feel that burning sensation anymore.</span>"
/datum/quirk/libido/add()
var/mob/living/carbon/human/H = quirk_holder
H.arousal_rate = 3 * initial(H.arousal_rate)
/datum/quirk/libido/remove()
var/mob/living/carbon/human/H = quirk_holder
H.arousal_rate = initial(H.arousal_rate)
/datum/quirk/alcohol_intolerance
name = "Alcohol Intolerance"
desc = "You take toxin damage from alcohol rather than getting drunk."

View File

@@ -265,11 +265,10 @@
reveal_wires = TRUE
// Same for anyone with an abductor multitool.
else if(user.is_holding_item_of_type(/obj/item/multitool/abductor))
reveal_wires = TRUE
// and advanced multitool
else if(user.is_holding_item_of_type(/obj/item/multitool/advanced))
reveal_wires = TRUE
else if(user.is_holding_tool_quality(TOOL_MULTITOOL))
var/obj/item/tool = user.is_holding_tool_quality(TOOL_MULTITOOL)
if(tool.show_wires)
reveal_wires = TRUE
// Station blueprints do that too, but only if the wires are not randomized.
else if(user.is_holding_item_of_type(/obj/item/areaeditor/blueprints) && !randomize)

View File

@@ -134,6 +134,7 @@
if(status_effect_type)
linked_status_effect = victim.apply_status_effect(status_effect_type, src)
SEND_SIGNAL(victim, COMSIG_CARBON_GAIN_WOUND, src, limb)
victim.emote("pain")
if(!victim.alerts["wound"]) // only one alert is shared between all of the wounds
victim.throw_alert("wound", /obj/screen/alert/status_effect/wound)

View File

@@ -992,7 +992,7 @@
return
/atom/proc/multitool_check_buffer(user, obj/item/I, silent = FALSE)
if(!istype(I, /obj/item/multitool))
if(!I.tool_behaviour == TOOL_MULTITOOL)
if(user && !silent)
to_chat(user, "<span class='warning'>[I] has no data buffer!</span>")
return FALSE

View File

@@ -82,7 +82,7 @@
O.add_fingerprint(user)
update_icon()
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
if(stat & BROKEN)
if(!O.tool_start_check(user, amount=0))
return

View File

@@ -73,7 +73,7 @@
O.add_fingerprint(user)
update_icon()
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
else if(O.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
if(obj_integrity < max_integrity)
if(!O.tool_start_check(user, amount=0))
return

View File

@@ -65,7 +65,7 @@
. += "button-board"
/obj/machinery/button/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(panel_open || allowed(user))
default_deconstruction_screwdriver(user, "button-open", "[skin]",W)
update_icon()
@@ -93,7 +93,7 @@
req_access = board.accesses
to_chat(user, "<span class='notice'>You add [W] to the button.</span>")
if(!device && !board && istype(W, /obj/item/wrench))
if(!device && !board && W.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You start unsecuring the button frame...</span>")
W.play_tool_sound(src)
if(W.use_tool(src, user, 40))

View File

@@ -39,7 +39,7 @@
switch(state)
if(1)
// State 1
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
if(weld(W, user))
to_chat(user, "<span class='notice'>You weld the assembly securely into place.</span>")
setAnchored(TRUE)
@@ -56,7 +56,7 @@
return
return
else if(istype(W, /obj/item/weldingtool))
else if(W.tool_behaviour == TOOL_WELDER)
if(weld(W, user))
to_chat(user, "<span class='notice'>You unweld the assembly from its place.</span>")
@@ -133,7 +133,9 @@
qdel(src)
return TRUE
/obj/structure/camera_assembly/proc/weld(obj/item/weldingtool/W, mob/living/user)
/obj/structure/camera_assembly/proc/weld(obj/item/W, mob/living/user)
if(!W.tool_behaviour == TOOL_WELDER)
return
if(!W.tool_start_check(user, amount=0))
return FALSE
to_chat(user, "<span class='notice'>You start to weld \the [src]...</span>")

View File

@@ -297,22 +297,20 @@
if(default_deconstruction_crowbar(W))
return
if(istype(W, /obj/item/multitool))
var/obj/item/multitool/P = W
if(istype(P.buffer, /obj/machinery/computer/cloning))
if(get_area(P.buffer) != get_area(src))
if(W.tool_behaviour == TOOL_MULTITOOL)
if(istype(W.buffer, /obj/machinery/computer/cloning))
if(get_area(W.buffer) != get_area(src))
to_chat(user, "<font color = #666633>-% Cannot link machines across power zones. Buffer cleared %-</font color>")
P.buffer = null
W.buffer = null
return
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
var/obj/machinery/computer/cloning/comp = P.buffer
to_chat(user, "<font color = #666633>-% Successfully linked [W.buffer] with [src] %-</font color>")
var/obj/machinery/computer/cloning/comp = W.buffer
if(connected)
connected.DetachCloner(src)
comp.AttachCloner(src)
else
P.buffer = src
to_chat(user, "<font color = #666633>-% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-</font color>")
W.buffer = src
to_chat(user, "<font color = #666633>-% Successfully stored [REF(W.buffer)] [W.buffer] in buffer %-</font color>")
return
var/mob/living/mob_occupant = occupant

View File

@@ -10,8 +10,8 @@
var/mob/living/silicon/ai/occupier = null
var/active = FALSE
/obj/machinery/computer/aifixer/attackby(obj/I, mob/user, params)
if(occupier && istype(I, /obj/item/screwdriver))
/obj/machinery/computer/aifixer/attackby(obj/item/I, mob/user, params)
if(occupier && I.tool_behaviour == TOOL_SCREWDRIVER)
if(stat & (NOPOWER|BROKEN))
to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge.</span>")
else

View File

@@ -7,14 +7,14 @@
add_fingerprint(user)
switch(state)
if(0)
if(istype(P, /obj/item/wrench))
if(P.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
setAnchored(TRUE)
state = 1
return
if(istype(P, /obj/item/weldingtool))
if(P.tool_behaviour == TOOL_WELDER)
if(!P.tool_start_check(user, amount=0))
return
@@ -26,7 +26,7 @@
qdel(src)
return
if(1)
if(istype(P, /obj/item/wrench))
if(P.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
if(P.use_tool(src, user, 20, volume=50) && state == 1)
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
@@ -46,13 +46,13 @@
else if(istype(P, /obj/item/circuitboard) && !circuit)
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
return
if(istype(P, /obj/item/screwdriver) && circuit)
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw [circuit] into place.</span>")
state = 2
icon_state = "2"
return
if(istype(P, /obj/item/crowbar) && circuit)
if(P.tool_behaviour == TOOL_CROWBAR && circuit)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove [circuit].</span>")
state = 1
@@ -62,7 +62,7 @@
circuit = null
return
if(2)
if(istype(P, /obj/item/screwdriver) && circuit)
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = 1
@@ -78,7 +78,7 @@
icon_state = "3"
return
if(3)
if(istype(P, /obj/item/wirecutters))
if(P.tool_behaviour == TOOL_WIRECUTTER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 2
@@ -98,7 +98,7 @@
src.icon_state = "4"
return
if(4)
if(istype(P, /obj/item/crowbar))
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = 3
@@ -106,7 +106,7 @@
var/obj/item/stack/sheet/glass/G = new(drop_location(), 2)
G.add_fingerprint(user)
return
if(istype(P, /obj/item/screwdriver))
if(P.tool_behaviour == TOOL_SCREWDRIVER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
var/obj/B = new circuit.build_path (loc, circuit)

View File

@@ -133,22 +133,20 @@
to_chat(user, "<span class='notice'>You insert [W].</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
src.updateUsrDialog()
else if(istype(W, /obj/item/multitool))
var/obj/item/multitool/P = W
if(istype(P.buffer, clonepod_type))
if(get_area(P.buffer) != get_area(src))
else if(W.tool_behaviour == TOOL_MULTITOOL)
if(istype(W.buffer, clonepod_type))
if(get_area(W.buffer) != get_area(src))
to_chat(user, "<font color = #666633>-% Cannot link machines across power zones. Buffer cleared %-</font color>")
P.buffer = null
W.buffer = null
return
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
var/obj/machinery/clonepod/pod = P.buffer
to_chat(user, "<font color = #666633>-% Successfully linked [W.buffer] with [src] %-</font color>")
var/obj/machinery/clonepod/pod = W.buffer
if(pod.connected)
pod.connected.DetachCloner(pod)
AttachCloner(pod)
else
P.buffer = src
to_chat(user, "<font color = #666633>-% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-</font color>")
W.buffer = src
to_chat(user, "<font color = #666633>-% Successfully stored [REF(W.buffer)] [W.buffer] in buffer %-</font color>")
return
else
return ..()
@@ -473,7 +471,7 @@
scanner.locked = prev_locked
src.updateUsrDialog()
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
/obj/machinery/computer/cloning/proc/scan_occupant(occupant)
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)

View File

@@ -23,11 +23,10 @@
if(W.tool_behaviour == TOOL_MULTITOOL)
if(!multitool_check_buffer(user, W))
return
var/obj/item/multitool/M = W
if(M.buffer && istype(M.buffer, /obj/machinery/launchpad))
if(W.buffer && istype(W.buffer, /obj/machinery/launchpad))
if(LAZYLEN(launchpads) < maximum_pads)
launchpads |= M.buffer
M.buffer = null
launchpads |= W.buffer
W.buffer = null
to_chat(user, "<span class='notice'>You upload the data from the [W.name]'s buffer.</span>")
else
to_chat(user, "<span class='warning'>[src] cannot handle any more connections!</span>")

View File

@@ -55,11 +55,12 @@
return connected_mechpad
/obj/machinery/computer/mechpad/multitool_act(mob/living/user, obj/item/tool)
if(!tool.tool_behaviour == TOOL_MULTITOOL)
return
if(!multitool_check_buffer(user, tool))
return
var/obj/item/multitool/multitool = tool
if(istype(multitool.buffer, /obj/machinery/mechpad))
var/obj/machinery/mechpad/buffered_console = multitool.buffer
if(istype(tool.buffer, /obj/machinery/mechpad))
var/obj/machinery/mechpad/buffered_console = tool.buffer
if(!(mechpads.len < maximum_pads))
to_chat(user, "<span class='warning'>[src] cannot handle any more connections!</span>")
return
@@ -69,13 +70,13 @@
connected_mechpad = buffered_console
connected_mechpad.connected_console = src
connected_mechpad.id = id
multitool.buffer = null
to_chat(user, "<span class='notice'>You connect the console to the pad with data from the [multitool.name]'s buffer.</span>")
tool.buffer = null
to_chat(user, "<span class='notice'>You connect the console to the pad with data from the [tool.name]'s buffer.</span>")
else
mechpads += buffered_console
LAZYADD(buffered_console.consoles, src)
multitool.buffer = null
to_chat(user, "<span class='notice'>You upload the data from the [multitool.name]'s buffer.</span>")
tool.buffer = null
to_chat(user, "<span class='notice'>You upload the data from the [tool.name]'s buffer.</span>")
/**
* Tries to call the launch proc on the connected mechpad, returns if there is no connected mechpad or there is no mecha on the pad

View File

@@ -90,7 +90,7 @@
icon_state = "box_1"
return
if(istype(P, /obj/item/screwdriver) && !anchored)
if(P.tool_behaviour == TOOL_SCREWDRIVER && !anchored)
user.visible_message("<span class='warning'>[user] disassembles the frame.</span>", \
"<span class='notice'>You start to disassemble the frame...</span>", "You hear banging and clanking.")
if(P.use_tool(src, user, 40, volume=50))
@@ -100,7 +100,7 @@
M.add_fingerprint(user)
qdel(src)
return
if(istype(P, /obj/item/wrench))
if(P.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
if(P.use_tool(src, user, 40, volume=75))
if(state == 1)
@@ -109,7 +109,7 @@
return
if(2)
if(istype(P, /obj/item/wrench))
if(P.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
if(P.use_tool(src, user, 40, volume=75))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
@@ -140,7 +140,7 @@
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
return
if(istype(P, /obj/item/wirecutters))
if(P.tool_behaviour == TOOL_WIRECUTTER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
state = 1
@@ -149,7 +149,7 @@
return
if(3)
if(istype(P, /obj/item/crowbar))
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
state = 2
circuit.forceMove(drop_location())
@@ -167,14 +167,14 @@
icon_state = "box_1"
return
if(istype(P, /obj/item/wrench) && !circuit.needs_anchored)
if(P.tool_behaviour == TOOL_WRENCH && !circuit.needs_anchored)
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
if(P.use_tool(src, user, 40, volume=75))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
setAnchored(!anchored)
return
if(istype(P, /obj/item/screwdriver))
if(P.tool_behaviour == TOOL_SCREWDRIVER)
var/component_check = 1
for(var/R in req_components)
if(req_components[R] > 0)

View File

@@ -35,7 +35,7 @@
/obj/machinery/jukebox/attackby(obj/item/O, mob/user, params)
if(!active && !(flags_1 & NODECONSTRUCT_1))
if(istype(O, /obj/item/wrench))
if(O.tool_behaviour == TOOL_WRENCH)
if(!anchored && !isinspace())
to_chat(user,"<span class='notice'>You secure [src] to the floor.</span>")
setAnchored(TRUE)

View File

@@ -99,19 +99,21 @@
return
..()
/obj/machinery/defibrillator_mount/multitool_act(mob/living/user, obj/item/multitool)
/obj/machinery/defibrillator_mount/multitool_act(mob/living/user, obj/item/W)
if(!W.tool_behaviour == TOOL_MULTITOOL)
return
if(!defib)
to_chat(user, "<span class='warning'>There isn't any defibrillator to clamp in!</span>")
return TRUE
if(!clamps_locked)
to_chat(user, "<span class='warning'>[src]'s clamps are disengaged!</span>")
return TRUE
user.visible_message("<span class='notice'>[user] presses [multitool] into [src]'s ID slot...</span>", \
user.visible_message("<span class='notice'>[user] presses [W] into [src]'s ID slot...</span>", \
"<span class='notice'>You begin overriding the clamps on [src]...</span>")
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
if(!do_after(user, 100, target = src) || !clamps_locked)
return
user.visible_message("<span class='notice'>[user] pulses [multitool], and [src]'s clamps slide up.</span>", \
user.visible_message("<span class='notice'>[user] pulses [W], and [src]'s clamps slide up.</span>", \
"<span class='notice'>You override the locking clamps on [src]!</span>")
playsound(src, 'sound/machines/locktoggle.ogg', 50, TRUE)
clamps_locked = FALSE

View File

@@ -26,7 +26,7 @@
return
/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && bar_material == METAL)
if(I.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM && bar_material == METAL)
if(obj_integrity < max_integrity)
if(!I.tool_start_check(user, amount=0))
return

View File

@@ -864,7 +864,7 @@
update_icon()
return
if(AIRLOCK_SECURITY_METAL)
if(istype(C, /obj/item/weldingtool))
if(C.tool_behaviour == TOOL_WELDER)
if(!C.tool_start_check(user, amount=2))
return
to_chat(user, "<span class='notice'>You begin cutting the panel's shielding...</span>")
@@ -879,10 +879,9 @@
update_icon()
return
if(AIRLOCK_SECURITY_PLASTEEL_I_S)
if(istype(C, /obj/item/crowbar))
var/obj/item/crowbar/W = C
if(C.tool_behaviour == TOOL_CROWBAR)
to_chat(user, "<span class='notice'>You start removing the inner layer of shielding...</span>")
if(W.use_tool(src, user, 40, volume=100))
if(C.use_tool(src, user, 40, volume=100))
if(!panel_open)
return
if(security_level != AIRLOCK_SECURITY_PLASTEEL_I_S)
@@ -896,7 +895,7 @@
update_icon()
return
if(AIRLOCK_SECURITY_PLASTEEL_I)
if(istype(C, /obj/item/weldingtool))
if(C.tool_behaviour == TOOL_WELDER)
if(!C.tool_start_check(user, amount=2))
return
to_chat(user, "<span class='notice'>You begin cutting the inner layer of shielding...</span>")
@@ -909,7 +908,7 @@
security_level = AIRLOCK_SECURITY_PLASTEEL_I_S
return
if(AIRLOCK_SECURITY_PLASTEEL_O_S)
if(istype(C, /obj/item/crowbar))
if(C.tool_behaviour == TOOL_CROWBAR)
to_chat(user, "<span class='notice'>You start removing outer layer of shielding...</span>")
if(C.use_tool(src, user, 40, volume=100))
if(!panel_open)
@@ -922,7 +921,7 @@
spawn_atom_to_turf(/obj/item/stack/sheet/plasteel, user.loc, 1)
return
if(AIRLOCK_SECURITY_PLASTEEL_O)
if(istype(C, /obj/item/weldingtool))
if(C.tool_behaviour == TOOL_WELDER)
if(!C.tool_start_check(user, amount=2))
return
to_chat(user, "<span class='notice'>You begin cutting the outer layer of shielding...</span>")
@@ -935,7 +934,7 @@
security_level = AIRLOCK_SECURITY_PLASTEEL_O_S
return
if(AIRLOCK_SECURITY_PLASTEEL)
if(istype(C, /obj/item/wirecutters))
if(C.tool_behaviour == TOOL_WIRECUTTER)
if(src.hasPower() && src.shock(user, 60)) // Protective grille of wiring is electrified
return
to_chat(user, "<span class='notice'>You start cutting through the outer grille.</span>")
@@ -946,7 +945,7 @@
"<span class='notice'>You cut through \the [src]'s outer grille.</span>")
security_level = AIRLOCK_SECURITY_PLASTEEL_O
return
if(istype(C, /obj/item/screwdriver))
if(C.tool_behaviour == TOOL_SCREWDRIVER)
if(panel_open && detonated)
to_chat(user, "<span class='warning'>[src] has no maintenance panel!</span>")
return
@@ -954,7 +953,7 @@
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the airlock.</span>")
C.play_tool_sound(src)
src.update_icon()
else if(istype(C, /obj/item/wirecutters) && note)
else if(C.tool_behaviour == TOOL_WIRECUTTER && note)
user.visible_message("<span class='notice'>[user] cuts down [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
C.play_tool_sound(src)
note.forceMove(get_turf(user))
@@ -999,7 +998,9 @@
return ..()
/obj/machinery/door/airlock/try_to_weld(obj/item/weldingtool/W, mob/user)
/obj/machinery/door/airlock/try_to_weld(obj/item/W, mob/user)
if(!W.tool_behaviour == TOOL_WELDER)
return
if(!operating && density)
if(user.a_intent != INTENT_HELP)
if(!W.tool_start_check(user, amount=0))
@@ -1028,12 +1029,14 @@
else
to_chat(user, "<span class='notice'>The airlock doesn't need repairing.</span>")
/obj/machinery/door/airlock/proc/weld_checks(obj/item/weldingtool/W, mob/user)
/obj/machinery/door/airlock/proc/weld_checks(obj/item/W, mob/user)
if(!W.tool_behaviour == TOOL_WELDER)
return
return !operating && density
/obj/machinery/door/airlock/try_to_crowbar(obj/item/I, mob/living/user)
var/beingcrowbarred = null
if(istype(I, /obj/item/crowbar) )
if(I.tool_behaviour == TOOL_CROWBAR)
beingcrowbarred = 1
else
beingcrowbarred = 0
@@ -1069,7 +1072,7 @@
else
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
if(istype(I, /obj/item/crowbar/power))
if(I.tool_behaviour == TOOL_CROWBAR)
if(hasPower() && isElectrified())
shock(user,100)//it's like sticking a forck in a power socket
return

View File

@@ -658,7 +658,7 @@
/obj/machinery/door/airlock/clockwork/proc/attempt_construction(obj/item/I, mob/living/user)
if(!I || !user || !user.canUseTopic(src))
return 0
else if(istype(I, /obj/item/wrench))
else if(I.tool_behaviour == TOOL_WRENCH)
if(construction_state == GEAR_SECURE)
user.visible_message("<span class='notice'>[user] begins loosening [src]'s cogwheel...</span>", "<span class='notice'>You begin loosening [src]'s cogwheel...</span>")
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_SECURE)
@@ -674,7 +674,7 @@
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
construction_state = GEAR_SECURE
return 1
else if(istype(I, /obj/item/crowbar))
else if(I.tool_behaviour == TOOL_CROWBAR)
if(construction_state == GEAR_SECURE)
to_chat(user, "<span class='warning'>[src]'s cogwheel is too tightly secured! Your [I.name] can't reach under it!</span>")
return 1

View File

@@ -173,7 +173,9 @@
/obj/machinery/door/proc/unrestricted_side(mob/M) //Allows for specific side of airlocks to be unrestrected (IE, can exit maint freely, but need access to enter)
return get_dir(src, M) & unres_sides
/obj/machinery/door/proc/try_to_weld(obj/item/weldingtool/W, mob/user)
/obj/machinery/door/proc/try_to_weld(obj/item/W, mob/user)
if(!W.tool_behaviour == TOOL_WELDER)
return
return
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)

View File

@@ -123,7 +123,9 @@
/obj/machinery/door/firedoor/try_to_activate_door(mob/user)
return
/obj/machinery/door/firedoor/try_to_weld(obj/item/weldingtool/W, mob/user)
/obj/machinery/door/firedoor/try_to_weld(obj/item/W, mob/user)
if(!W.tool_behaviour == TOOL_WELDER)
return
if(!W.tool_start_check(user, amount=0))
return
user.visible_message("<span class='notice'>[user] starts [welded ? "unwelding" : "welding"] [src].</span>", "<span class='notice'>You start welding [src].</span>")

View File

@@ -243,7 +243,7 @@
add_fingerprint(user)
if(!(flags_1&NODECONSTRUCT_1))
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(density || operating)
to_chat(user, "<span class='warning'>You need to open the door to access the maintenance panel!</span>")
return
@@ -252,7 +252,7 @@
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the [src.name].</span>")
return
if(istype(I, /obj/item/crowbar))
if(I.tool_behaviour == TOOL_CROWBAR)
if(panel_open && !density && !operating)
user.visible_message("[user] removes the electronics from the [src.name].", \
"<span class='notice'>You start to remove electronics from the [src.name]...</span>")

View File

@@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
return
/obj/machinery/doppler_array/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
if(!anchored && !isinspace())
anchored = TRUE
power_change()

View File

@@ -210,13 +210,13 @@
icon_state = icon_on
/obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/crowbar))
if(I.tool_behaviour == TOOL_CROWBAR)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_all()
I.play_tool_sound(src)
to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>")
else if(istype(I, /obj/item/weldingtool))
else if(I.tool_behaviour == TOOL_WELDER)
if(!(stat & BROKEN))
to_chat(user, "<span class='warning'>[src] doesn't need repairs.</span>")
return

View File

@@ -160,7 +160,7 @@
/obj/machinery/firealarm/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
if(istype(W, /obj/item/screwdriver) && buildstage == 2)
if(W.tool_behaviour == TOOL_SCREWDRIVER && buildstage == 2)
W.play_tool_sound(src)
panel_open = !panel_open
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
@@ -169,7 +169,7 @@
if(panel_open)
if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP)
if((W.tool_behaviour == TOOL_WELDER) && user.a_intent == INTENT_HELP)
if(obj_integrity < max_integrity)
if(!W.tool_start_check(user, amount=0))
return
@@ -184,7 +184,7 @@
switch(buildstage)
if(2)
if(istype(W, /obj/item/multitool))
if(W.tool_behaviour == TOOL_MULTITOOL)
detecting = !detecting
if (src.detecting)
user.visible_message("[user] has reconnected [src]'s detecting unit!", "<span class='notice'>You reconnect [src]'s detecting unit.</span>")
@@ -192,7 +192,7 @@
user.visible_message("[user] has disconnected [src]'s detecting unit!", "<span class='notice'>You disconnect [src]'s detecting unit.</span>")
return
else if (istype(W, /obj/item/wirecutters))
else if(W.tool_behaviour == TOOL_WIRECUTTER)
buildstage = 1
W.play_tool_sound(src)
new /obj/item/stack/cable_coil(user.loc, 5)
@@ -215,7 +215,7 @@
update_icon()
return
else if(istype(W, /obj/item/crowbar))
else if(W.tool_behaviour == TOOL_CROWBAR)
user.visible_message("[user.name] removes the electronics from [src.name].", \
"<span class='notice'>You start prying out the circuit...</span>")
if(W.use_tool(src, user, 20, volume=50))
@@ -247,7 +247,7 @@
update_icon()
return
else if(istype(W, /obj/item/wrench))
else if(W.tool_behaviour == TOOL_WRENCH)
user.visible_message("[user] removes the fire alarm assembly from the wall.", \
"<span class='notice'>You remove the fire alarm assembly from the wall.</span>")
var/obj/item/wallframe/firealarm/frame = new /obj/item/wallframe/firealarm()

View File

@@ -57,8 +57,8 @@
//Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
if (istype(W, /obj/item/wirecutters))
if (bulb)
if(W.tool_behaviour == TOOL_WIRECUTTER)
if(bulb)
user.visible_message("[user] begins to disconnect [src]'s flashbulb.", "<span class='notice'>You begin to disconnect [src]'s flashbulb...</span>")
if(W.use_tool(src, user, 30, volume=50) && bulb)
user.visible_message("[user] has disconnected [src]'s flashbulb!", "<span class='notice'>You disconnect [src]'s flashbulb.</span>")
@@ -66,7 +66,7 @@
bulb = null
power_change()
else if (istype(W, /obj/item/assembly/flash/handheld))
else if(istype(W, /obj/item/assembly/flash/handheld))
if (!bulb)
if(!user.transferItemToLoc(W, src))
return
@@ -76,7 +76,7 @@
else
to_chat(user, "<span class='warning'>A flashbulb is already installed in [src]!</span>")
else if (istype(W, /obj/item/wrench))
else if(W.tool_behaviour == TOOL_WRENCH)
if(!bulb)
to_chat(user, "<span class='notice'>You start unsecuring the flasher frame...</span>")
if(W.use_tool(src, user, 40, volume=50))
@@ -173,10 +173,10 @@
flash()
/obj/machinery/flasher/portable/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
W.play_tool_sound(src, 100)
if (!anchored && !isinspace())
if(!anchored && !isinspace())
to_chat(user, "<span class='notice'>[src] is now secured.</span>")
add_overlay("[base_state]-s")
setAnchored(TRUE)

View File

@@ -91,7 +91,7 @@
// src.sd_SetLuminosity(0)
/obj/machinery/sparker/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
add_fingerprint(user)
src.disable = !src.disable
if (src.disable)

View File

@@ -38,8 +38,7 @@
if(I.tool_behaviour == TOOL_MULTITOOL)
if(!multitool_check_buffer(user, I))
return
var/obj/item/multitool/M = I
M.buffer = src
I.buffer = src
to_chat(user, "<span class='notice'>You save the data in the [I.name]'s buffer.</span>")
return TRUE

View File

@@ -37,13 +37,14 @@
return TRUE
/obj/machinery/mechpad/multitool_act(mob/living/user, obj/item/tool)
if(!tool.tool_behaviour == TOOL_MULTITOOL)
return
if(!panel_open)
return
if(!multitool_check_buffer(user, tool))
return
var/obj/item/multitool/multitool = tool
multitool.buffer = src
to_chat(user, "<span class='notice'>You save the data in the [multitool.name]'s buffer.</span>")
tool.buffer = src
to_chat(user, "<span class='notice'>You save the data in the [tool.name]'s buffer.</span>")
return TRUE
/**

View File

@@ -89,7 +89,7 @@
if(T.intact)
return // prevent intraction when T-scanner revealed
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
open = !open
user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "<span class='notice'>You [open ? "open" : "close"] the beacon's cover.</span>")

View File

@@ -127,7 +127,9 @@ Buildable meters
/obj/item/pipe/attack_self(mob/user)
setDir(turn(dir,-90))
/obj/item/pipe/wrench_act(mob/living/user, obj/item/wrench/W)
/obj/item/pipe/wrench_act(mob/living/user, obj/item/W)
if(!W.tool_behaviour == TOOL_WRENCH)
return
if(!isturf(loc))
return TRUE
@@ -196,8 +198,9 @@ Buildable meters
w_class = WEIGHT_CLASS_BULKY
var/piping_layer = PIPING_LAYER_DEFAULT
/obj/item/pipe_meter/wrench_act(mob/living/user, obj/item/wrench/W)
/obj/item/pipe_meter/wrench_act(mob/living/user, obj/item/W)
if(!W.tool_behaviour == TOOL_WRENCH)
return
var/obj/machinery/atmospherics/pipe/pipe
for(var/obj/machinery/atmospherics/pipe/P in loc)
if(P.piping_layer == piping_layer)

View File

@@ -283,9 +283,9 @@
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user, params)
if(stat & BROKEN)
if(istype(I, /obj/item/crowbar))
//If the turret is destroyed, you can remove it with a crowbar to
//try and salvage its components
if(I.tool_behaviour == TOOL_CROWBAR)
//If the turret is destroyed, you can remove it with something
//that acts like a crowbar to try and salvage its components
to_chat(user, "<span class='notice'>You begin prying the metal coverings off...</span>")
if(I.use_tool(src, user, 20))
if(prob(70))
@@ -302,7 +302,7 @@
qdel(src)
return
else if((istype(I, /obj/item/wrench)) && (!on))
else if((I.tool_behaviour == TOOL_WRENCH) && (!on))
if(raised)
return
@@ -329,12 +329,11 @@
to_chat(user, "<span class='notice'>Controls are now [locked ? "locked" : "unlocked"].</span>")
else
to_chat(user, "<span class='alert'>Access denied.</span>")
else if(istype(I, /obj/item/multitool) && !locked)
else if(I.tool_behaviour == TOOL_MULTITOOL && !locked)
if(!multitool_check_buffer(user, I))
return
var/obj/item/multitool/M = I
M.buffer = src
to_chat(user, "<span class='notice'>You add [src] to multitool buffer.</span>")
I.buffer = src
to_chat(user, "<span class='notice'>You add [src] to [I]'s buffer.</span>")
else
return ..()
@@ -948,20 +947,19 @@
if(stat & BROKEN)
return
if (istype(I, /obj/item/multitool))
if(I.tool_behaviour == TOOL_MULTITOOL)
if(!multitool_check_buffer(user, I))
return
var/obj/item/multitool/M = I
if(M.buffer && istype(M.buffer, /obj/machinery/porta_turret))
turrets |= M.buffer
to_chat(user, "<span class='notice'>You link \the [M.buffer] with \the [src].</span>")
if(I.buffer && istype(I.buffer, /obj/machinery/porta_turret))
turrets |= I.buffer
to_chat(user, "<span class='notice'>You link \the [I.buffer] with \the [src].</span>")
return
if (issilicon(user))
if(issilicon(user))
return attack_hand(user)
if ( get_dist(src, user) == 0 ) // trying to unlock the interface
if (allowed(usr))
if(get_dist(src, user) == 0 ) // trying to unlock the interface
if(allowed(usr))
if(obj_flags & EMAGGED)
to_chat(user, "<span class='warning'>The turret control is unresponsive!</span>")
return

View File

@@ -23,14 +23,14 @@
//this is a bit unwieldy but self-explanatory
switch(build_step)
if(PTURRET_UNSECURED) //first step
if(istype(I, /obj/item/wrench) && !anchored)
if(I.tool_behaviour == TOOL_WRENCH && !anchored)
I.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
setAnchored(TRUE)
build_step = PTURRET_BOLTED
return
else if(istype(I, /obj/item/crowbar) && !anchored)
else if(I.tool_behaviour == TOOL_CROWBAR && !anchored)
I.play_tool_sound(src, 75)
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
new /obj/item/stack/sheet/metal( loc, 5)
@@ -48,7 +48,7 @@
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction!</span>")
return
else if(istype(I, /obj/item/wrench))
else if(I.tool_behaviour == TOOL_WRENCH)
I.play_tool_sound(src, 75)
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
setAnchored(FALSE)
@@ -57,13 +57,13 @@
if(PTURRET_START_INTERNAL_ARMOUR)
if(istype(I, /obj/item/wrench))
if(I.tool_behaviour == TOOL_WRENCH)
I.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
build_step = PTURRET_INTERNAL_ARMOUR_ON
return
else if(istype(I, /obj/item/weldingtool))
else if(I.tool_behaviour == TOOL_WELDER)
if(!I.tool_start_check(user, amount=5)) //uses up 5 fuel
return
@@ -89,7 +89,7 @@
build_step = PTURRET_GUN_EQUIPPED
return
else if(istype(I, /obj/item/wrench))
else if(I.tool_behaviour == TOOL_WRENCH)
I.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
build_step = PTURRET_START_INTERNAL_ARMOUR
@@ -106,7 +106,7 @@
if(PTURRET_SENSORS_ON)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
I.play_tool_sound(src, 100)
build_step = PTURRET_CLOSED
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
@@ -123,14 +123,14 @@
to_chat(user, "<span class='warning'>You need two sheets of metal to continue construction!</span>")
return
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
I.play_tool_sound(src, 100)
build_step = PTURRET_SENSORS_ON
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
return
if(PTURRET_START_EXTERNAL_ARMOUR)
if(istype(I, /obj/item/weldingtool))
if(I.tool_behaviour == TOOL_WELDER)
if(!I.tool_start_check(user, amount=5))
return
@@ -153,7 +153,7 @@
qdel(src)
return
else if(istype(I, /obj/item/crowbar))
else if(I.tool_behaviour == TOOL_CROWBAR)
I.play_tool_sound(src, 75)
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
new /obj/item/stack/sheet/metal(loc, 2)

View File

@@ -37,7 +37,7 @@
/obj/machinery/porta_turret_cover/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wrench) && !parent_turret.on)
if(I.tool_behaviour == TOOL_WRENCH && !parent_turret.on)
if(parent_turret.raised)
return
@@ -60,10 +60,9 @@
updateUsrDialog()
else
to_chat(user, "<span class='notice'>Access denied.</span>")
else if(istype(I, /obj/item/multitool) && !parent_turret.locked)
var/obj/item/multitool/M = I
M.buffer = parent_turret
to_chat(user, "<span class='notice'>You add [parent_turret] to multitool buffer.</span>")
else if(I.tool_behaviour == TOOL_MULTITOOL && !parent_turret.locked)
I.buffer = parent_turret
to_chat(user, "<span class='notice'>You add [parent_turret] to [I]'s buffer.</span>")
else
return ..()

View File

@@ -25,7 +25,7 @@
switch(stat)
if(1)
// Stat 1
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
if(weld(W, user))
to_chat(user, "<span class='notice'>You weld the fan assembly securely into place.</span>")
setAnchored(TRUE)
@@ -46,7 +46,7 @@
forceMove(F)
F.setDir(src.dir)
return
else if(istype(W, /obj/item/weldingtool))
else if(W.tool_behaviour == TOOL_WELDER)
if(weld(W, user))
to_chat(user, "<span class='notice'>You unweld the fan assembly from its place.</span>")
stat = 1
@@ -64,7 +64,9 @@
deconstruct()
return TRUE
/obj/machinery/fan_assembly/proc/weld(obj/item/weldingtool/W, mob/living/user)
/obj/machinery/fan_assembly/proc/weld(obj/item/W, mob/living/user)
if(!W.tool_behaviour == TOOL_WELDER)
return
if(!W.tool_start_check(user, amount=0))
return FALSE
switch(stat)

View File

@@ -55,19 +55,17 @@
return
if(panel_open)
if(istype(I, /obj/item/multitool))
var/obj/item/multitool/M = I
M.buffer = src
if(I.tool_behaviour == TOOL_MULTITOOL)
I.buffer = src
to_chat(user, "<span class='notice'>You save the data in [I]'s buffer. It can now be saved to pads with closed panels.</span>")
return TRUE
else if(istype(I, /obj/item/multitool))
var/obj/item/multitool/M = I
if(istype(M.buffer, /obj/machinery/quantumpad))
if(M.buffer == src)
else if(I.tool_behaviour == TOOL_MULTITOOL)
if(istype(I.buffer, /obj/machinery/quantumpad))
if(I.buffer == src)
to_chat(user, "<span class='warning'>You cannot link a pad to itself!</span>")
return TRUE
else
linked_pad = M.buffer
linked_pad = I.buffer
to_chat(user, "<span class='notice'>You link [src] to the one in [I]'s buffer.</span>")
return TRUE
else

View File

@@ -61,7 +61,7 @@
setCharging()
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
if(istype(G, /obj/item/wrench))
if(G.tool_behaviour == TOOL_WRENCH)
if(charging)
to_chat(user, "<span class='notice'>Remove the charging item first!</span>")
return
@@ -102,7 +102,7 @@
if(default_deconstruction_screwdriver(user, "rechargeropen", "recharger0", G))
return
if(panel_open && istype(G, /obj/item/crowbar))
if(panel_open && G.tool_behaviour == TOOL_CROWBAR)
default_deconstruction_crowbar(G)
return

View File

@@ -502,7 +502,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
messages += "<b>From:</b> [linkedsender]<br>[message]"
/obj/machinery/requests_console/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/crowbar))
if(O.tool_behaviour == TOOL_CROWBAR)
if(open)
to_chat(user, "<span class='notice'>You close the maintenance panel.</span>")
open = FALSE
@@ -511,7 +511,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
open = TRUE
update_icon()
return
if(istype(O, /obj/item/screwdriver))
if(O.tool_behaviour == TOOL_SCREWDRIVER)
if(open)
hackState = !hackState
if(hackState)

View File

@@ -146,7 +146,7 @@
return
/obj/machinery/shieldgen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
W.play_tool_sound(src, 100)
panel_open = !panel_open
if(panel_open)
@@ -165,7 +165,7 @@
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
update_icon()
else if(istype(W, /obj/item/wrench))
else if(W.tool_behaviour == TOOL_WRENCH)
if(locked)
to_chat(user, "<span class='warning'>The bolts are covered! Unlocking this would retract the covers.</span>")
return
@@ -343,7 +343,7 @@
return ..()
/obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
if(W.tool_behaviour == TOOL_WRENCH)
default_unfasten_wrench(user, W, 0)
else if(W.GetID())

View File

@@ -164,7 +164,7 @@
else
to_chat(user, "<span class='warning'>The hatch must be open to insert a power cell!</span>")
return
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
panel_open = !panel_open
user.visible_message("\The [user] [panel_open ? "opens" : "closes"] the hatch on \the [src].", "<span class='notice'>You [panel_open ? "open" : "close"] the hatch on \the [src].</span>")
update_icon()

View File

@@ -75,7 +75,7 @@ GLOBAL_VAR_INIT(singularity_counter, 0)
to_chat(user, "<span class='warning'>You need to screw the beacon to the floor first!</span>")
/obj/machinery/power/singularity_beacon/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(active)
to_chat(user, "<span class='warning'>You need to deactivate the beacon first!</span>")
return

View File

@@ -112,7 +112,7 @@
. = timer_set
/obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wrench) && can_unanchor)
if(I.tool_behaviour == TOOL_WRENCH && can_unanchor)
if(!anchored)
if(!isturf(loc) || isspaceturf(loc))
to_chat(user, "<span class='notice'>The bomb must be placed on solid ground to attach it.</span>")
@@ -130,7 +130,7 @@
else
to_chat(user, "<span class='warning'>The bolts are locked down!</span>")
else if(istype(I, /obj/item/screwdriver))
else if(I.tool_behaviour == TOOL_SCREWDRIVER)
open_panel = !open_panel
update_icon()
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
@@ -138,7 +138,7 @@
else if(is_wire_tool(I) && open_panel)
wires.interact(user)
else if(istype(I, /obj/item/crowbar))
else if(I.tool_behaviour == TOOL_CROWBAR)
if(open_panel && wires.is_all_cut())
if(payload)
to_chat(user, "<span class='notice'>You carefully pry out [payload].</span>")
@@ -158,7 +158,7 @@
to_chat(user, "<span class='notice'>You place [payload] into [src].</span>")
else
to_chat(user, "<span class='warning'>[payload] is already loaded into [src]! You'll have to remove it first.</span>")
else if(istype(I, /obj/item/weldingtool))
else if(I.tool_behaviour == TOOL_WELDER)
if(payload || !wires.is_all_cut() || !open_panel)
return
@@ -436,7 +436,7 @@
qdel(src)
/obj/item/bombcore/chemical/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/crowbar) && beakers.len > 0)
if(I.tool_behaviour == TOOL_CROWBAR && beakers.len > 0)
I.play_tool_sound(src)
for (var/obj/item/B in beakers)
B.forceMove(drop_location())

View File

@@ -80,7 +80,7 @@
ref = REF(pda)
)
data_out["message_logs"] += list(data)
return data_out
/obj/machinery/computer/message_monitor/ui_data(mob/user)
@@ -119,7 +119,7 @@
if(!linkedServer)
data_out["selected"] = null
return data_out
data_out["selected"] = list(
name = linkedServer.name,
id = linkedServer.id,
@@ -156,7 +156,7 @@
if(LAZYLEN(machinelist) > 0)
message = "FAILED: Cannot probe when buffer full"
return
for(var/obj/machinery/telecomms/message_server/T in GLOB.telecomms_list)
if(T.network == network)
LAZYADD(machinelist, T)
@@ -206,7 +206,7 @@
message = "NOTICE: Decryption key set."
return
message = incorrectkey
if("hack")
if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
message = noserver
@@ -225,7 +225,7 @@
else if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
message = noserver
return
var/datum/data_ref = locate(params["ref"])
if(istype(data_ref, /datum/data_rc_msg))
LAZYREMOVE(linkedServer.rc_msgs, data_ref)
@@ -258,7 +258,7 @@
else if(!(linkedServer.on && (linkedServer.toggled != FALSE)))
message = noserver
return
if("reset" in params)
ResetMessage()
return
@@ -311,7 +311,7 @@
return
custommessage = M
return
if("recepient" in params)
// Get out list of viable PDAs
var/list/obj/item/pda/sendPDAs = get_viewable_pdas()
@@ -324,8 +324,8 @@
update_static_data(usr)
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/living/user, params)
if(istype(O, /obj/item/screwdriver) && CHECK_BITFIELD(obj_flags, EMAGGED))
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
if(O.tool_behaviour == TOOL_SCREWDRIVER && CHECK_BITFIELD(obj_flags, EMAGGED))
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
//Why this though, you should make it emag to a board level. (i wont do it)
to_chat(user, "<span class='warning'>It is too hot to mess with!</span>")
else

View File

@@ -11,7 +11,7 @@
/obj/machinery/telecomms/attackby(obj/item/P, mob/user, params)
var/icon_closed = initial(icon_state)
var/icon_open = "[initial(icon_state)]_o"
if(!on)
icon_closed = "[initial(icon_state)]_off"
icon_open = "[initial(icon_state)]_o_off"
@@ -19,7 +19,7 @@
if(default_deconstruction_screwdriver(user, icon_open, icon_closed, P))
return
// Using a multitool lets you access the receiver's interface
else if(istype(P, /obj/item/multitool))
else if(P.tool_behaviour == TOOL_MULTITOOL)
attack_hand(user)
else if(default_deconstruction_crowbar(P))
@@ -42,7 +42,7 @@
. = list() //cpypaste from the vending bus
.["notice"] = temp
.["multitool"] = FALSE
var/obj/item/multitool/P = get_multitool(user)
var/obj/item/P = get_multitool(user)
if(P)
.["multitool"] = TRUE
.["multitool_buf"] = null //to clean the list!
@@ -113,7 +113,7 @@
if("network" in params)
if(!canAccess(usr))
return
var/newnet = sanitize(sanitize_text(params["network"], network))
var/newnet = sanitize(sanitize_text(params["network"], network))
if(length(newnet) > 15)
temp = "-% Too many characters in new network tag. %-"
return
@@ -122,19 +122,19 @@
temp = "-% New network tag assigned: \"[network]\" %-"
return
if("multitool")
var/obj/item/multitool/P = get_multitool(usr)
var/obj/item/P = get_multitool(usr)
if("Link" in params)
if(!canAccess(usr))
return
if(!istype(P))
if(!P.tool_behaviour == TOOL_MULTITOOL)
temp = "-% Unable to acquire buffer %-"
return
var/obj/machinery/telecomms/T = P.buffer
if(!istype(T) || T == src)
temp = "-% Unable to acquire buffer %-"
return
if(!(src in T.links))
LAZYADD(T.links, src)
@@ -158,7 +158,7 @@
return
P.buffer = src
temp = "% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-"
temp = "% Successfully stored [REF(P.buffer)] [P.buffer] in buffer %-"
if("unlink")
var/obj/machinery/telecomms/T = locate(params["value"])
@@ -167,7 +167,7 @@
if(!istype(T))
temp = "-% Unable to locate machine to unlink from, try again. %-"
return
temp = "-% Removed [REF(T)] [T.name] from linked entities. %-"
if(T.links) //lazyrem makes blank list null, which is good but some might cause runtime ee's
T.links.Remove(src)
@@ -198,7 +198,7 @@
var/x = text2num(params["remove"])
temp = "-% Removed frequency filter [x] %-"
freq_listening.Remove(x)
/obj/machinery/telecomms/relay/ui_act(action, params)
..()
switch(action)
@@ -243,7 +243,11 @@
// Check if the user can use it.
/obj/machinery/telecomms/proc/canInteract(mob/user)
if(hasSiliconAccessInArea(user) || istype(user.get_active_held_item(), /obj/item/multitool))
var/get = user.get_active_held_item()
var/obj/item/I = get
if(I.tool_behaviour == TOOL_MULTITOOL)
return TRUE
if(hasSiliconAccessInArea(user))
return TRUE
return FALSE
// Check if the user is nearby and has a multitool.
@@ -256,14 +260,16 @@
/obj/machinery/telecomms/proc/get_multitool(mob/user)
if(!canInteract(user))
return null
var/obj/item/multitool/P = user.get_active_held_item()
var/obj/item/P = user.get_active_held_item()
// Is the ref not a null? and is it the actual type?
if(istype(P))
if(P.tool_behaviour == TOOL_MULTITOOL)
return P
else if(isAI(user))
var/mob/living/silicon/ai/U = user
P = U.aiMulti
else if(iscyborg(user) && in_range(user, src))
if(istype(user.get_active_held_item(), /obj/item/multitool))
P = user.get_active_held_item()
var/get = user.get_active_held_item()
var/obj/item/I = get
if(I.tool_behaviour == TOOL_MULTITOOL)
I = user.get_active_held_item()
return P

View File

@@ -38,5 +38,5 @@
signal.broadcast()
/obj/machinery/telecomms/allinone/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/multitool))
if(P.tool_behaviour == TOOL_MULTITOOL)
return attack_hand(user)

View File

@@ -164,16 +164,15 @@
return ..()
/obj/machinery/teleport/station/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/multitool))
var/obj/item/multitool/M = W
if(W.tool_behaviour == TOOL_MULTITOOL)
if(panel_open)
M.buffer = src
W.buffer = src
to_chat(user, "<span class='caution'>You download the data to the [W.name]'s buffer.</span>")
else
if(M.buffer && istype(M.buffer, /obj/machinery/teleport/station) && M.buffer != src)
if(W.buffer && istype(W.buffer, /obj/machinery/teleport/station) && W.buffer != src)
if(linked_stations.len < efficiency)
linked_stations.Add(M.buffer)
M.buffer = null
linked_stations.Add(W.buffer)
W.buffer = null
to_chat(user, "<span class='caution'>You upload the data from the [W.name]'s buffer.</span>")
else
to_chat(user, "<span class='alert'>This station can't hold more information, try to use better parts.</span>")
@@ -185,7 +184,7 @@
else if(default_deconstruction_crowbar(W))
return
else if(istype(W, /obj/item/wirecutters))
else if(W.tool_behaviour == TOOL_WIRECUTTER)
if(panel_open)
link_console_and_hub()
to_chat(user, "<span class='caution'>You reconnect the station to nearby machinery.</span>")

View File

@@ -196,7 +196,7 @@
to_chat(user, "<span class='warning'>Invalid ID: Access denied.</span>")
else
to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>")
else if(istype(W, /obj/item/wrench))
else if(W.tool_behaviour == TOOL_WRENCH)
if(state==1)
state = 2
to_chat(user, "<span class='notice'>You undo the securing bolts.</span>")
@@ -204,7 +204,7 @@
state = 1
to_chat(user, "<span class='notice'>You tighten the securing bolts.</span>")
return
else if(istype(W, /obj/item/crowbar))
else if(W.tool_behaviour == TOOL_CROWBAR)
if(state==2)
state = 3
to_chat(user, "<span class='notice'>You open the hatch to the power unit.</span>")
@@ -220,7 +220,7 @@
else
to_chat(user, "<span class='warning'>You need two lengths of cable to fix this mech!</span>")
return
else if(istype(W, /obj/item/screwdriver) && user.a_intent != INTENT_HARM)
else if(W.tool_behaviour == TOOL_SCREWDRIVER && user.a_intent != INTENT_HARM)
if(internal_damage & MECHA_INT_TEMP_CONTROL)
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
to_chat(user, "<span class='notice'>You repair the damaged temperature controller.</span>")
@@ -248,7 +248,7 @@
to_chat(user, "<span class='notice'>There's already a powercell installed.</span>")
return
else if(istype(W, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
else if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
user.DelayNextAction(CLICK_CD_MELEE)
if(obj_integrity < max_integrity)
if(W.use_tool(src, user, 0, volume=50, amount=1))

View File

@@ -35,7 +35,7 @@
. += "<span class='notice'>The AI recovery beacon is active.</span>"
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool))
if(I.tool_behaviour == TOOL_WELDER)
if(salvage_num <= 0 || !length(welder_salvage))
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
return
@@ -54,7 +54,7 @@
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
return
else if(istype(I, /obj/item/wirecutters))
else if(I.tool_behaviour == TOOL_WIRECUTTER)
if(salvage_num <= 0)
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
return
@@ -67,7 +67,7 @@
else
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
else if(istype(I, /obj/item/crowbar))
else if(I.tool_behaviour == TOOL_CROWBAR)
if(crowbar_salvage && crowbar_salvage.len)
var/obj/S = pick(crowbar_salvage)
if(S)

View File

@@ -92,7 +92,7 @@
/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters))
if(I.tool_behaviour == TOOL_WIRECUTTER)
I.play_tool_sound(src, 100)
if(ruined)
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")

View File

@@ -112,6 +112,10 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/tool_behaviour = NONE
var/toolspeed = 1
//Special multitools
var/buffer = null
var/show_wires = FALSE
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
var/reach = 1 //In tiles, how far this weapon can reach; 1 for adjacent, which is default

View File

@@ -63,7 +63,7 @@
return
update_icon()
to_chat(user, "<span class='notice'>You add the cables to [src]. It now contains [loaded.amount].</span>")
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(!loaded)
return
if(ghetto && prob(10)) //Is it a ghetto RCL? If so, give it a 10% chance to fall apart

View File

@@ -63,7 +63,7 @@
to_chat(user, "Your name has been sent to your employers for approval.")
// Autoapproves after a certain time
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [html_encode(new_name)] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
/obj/item/station_charter/proc/reject_proposed(user)
if(!user)

View File

@@ -436,7 +436,7 @@
build_path = /obj/machinery/computer/rdconsole/core
/obj/item/circuitboard/computer/rdconsole/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(build_path == /obj/machinery/computer/rdconsole/core)
name = "R&D Console - Robotics (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/robotics

View File

@@ -358,7 +358,7 @@
build_path = PATH_HEATER
/obj/item/circuitboard/machine/thermomachine/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
var/obj/item/circuitboard/new_type
var/new_setting
switch(build_path)

View File

@@ -120,7 +120,7 @@
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_power()
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))

View File

@@ -166,7 +166,7 @@
to_chat(user, "<span class='notice'>[icon2html(src, user)] Target is free of radioactive contamination.</span>")
/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver) && (obj_flags & EMAGGED))
if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
if(scanning)
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
return 0

View File

@@ -50,7 +50,7 @@
else
to_chat(user, "<span class='notice'>[src] already has a diode installed.</span>")
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(diode)
to_chat(user, "<span class='notice'>You remove the [diode.name] from \the [src].</span>")
diode.forceMove(drop_location())

View File

@@ -26,10 +26,9 @@
throw_range = 7
throw_speed = 3
custom_materials = list(/datum/material/iron=50, /datum/material/glass=20)
var/obj/machinery/buffer // simple machine buffer for device linkage
buffer = null // simple machine buffer for device linkage
toolspeed = 1
usesound = 'sound/weapons/empty.ogg'
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
var/mode = 0
/obj/item/multitool/chaplain
@@ -72,7 +71,7 @@
if(selected_io)
icon_state += "_red"
/obj/item/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
/obj/item/proc/wire(var/datum/integrated_io/io, mob/user)
if(!io.holder.assembly)
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
return
@@ -101,7 +100,7 @@
update_icon()
/obj/item/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
/obj/item/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
if(!io1.linked.len || !io2.linked.len)
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
return
@@ -256,6 +255,7 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
show_wires = TRUE
/obj/item/multitool/advanced
name = "advanced multitool"
@@ -263,6 +263,7 @@
icon = 'icons/obj/advancedtools.dmi'
icon_state = "multitool"
toolspeed = 0.2
show_wires = TRUE
/obj/item/multitool/advanced/brass
name = "clockwork multitool"

View File

@@ -67,7 +67,7 @@ GLOBAL_LIST_EMPTY(power_sinks)
set_light(0)
/obj/item/powersink/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(mode == DISCONNECTED)
var/turf/T = loc
if(isturf(T) && !T.intact)

View File

@@ -278,7 +278,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
to_chat(user,"<span class='notice'>You upgrade [src].</span>")
bowmanize()
qdel(W)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(keyslot || keyslot2)
for(var/ch_name in channels)
SSradio.remove_object(src, GLOB.radiochannels[ch_name])

View File

@@ -23,7 +23,7 @@
freerange = TRUE
/obj/item/radio/intercom/ratvar/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "<span class='danger'>[src] is fastened to the wall with [is_servant_of_ratvar(user) ? "replicant alloy" : "some material you've never seen"], and can't be removed.</span>")
return //no unfastening!
. = ..()
@@ -57,7 +57,7 @@
. += "<span class='notice'>It's <i>unscrewed</i> from the wall, and can be <b>detached</b>.</span>"
/obj/item/radio/intercom/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(unfastened)
user.visible_message("<span class='notice'>[user] starts tightening [src]'s screws...</span>", "<span class='notice'>You start screwing in [src]...</span>")
if(I.use_tool(src, user, 30, volume=50))
@@ -69,7 +69,7 @@
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
unfastened = TRUE
return
else if(istype(I, /obj/item/wrench))
else if(I.tool_behaviour == TOOL_WRENCH)
if(!unfastened)
to_chat(user, "<span class='warning'>You need to unscrew [src] from the wall first!</span>")
return

View File

@@ -333,7 +333,7 @@
/obj/item/radio/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
unscrewed = !unscrewed
if(unscrewed)
to_chat(user, "<span class='notice'>The radio can now be attached and modified!</span>")
@@ -384,7 +384,7 @@
/obj/item/radio/borg/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(keyslot)
for(var/ch_name in channels)
SSradio.remove_object(src, GLOB.radiochannels[ch_name])

View File

@@ -893,7 +893,7 @@ GENETICS SCANNER
throw_range = 7
custom_materials = list(/datum/material/iron=200)
var/list/discovered = list() //hit a dna console to update the scanners database
var/list/buffer
buffer = list()
var/ready = TRUE
var/cooldown = 200

View File

@@ -314,7 +314,7 @@
/obj/item/tape/attackby(obj/item/I, mob/user, params)
if(ruined && istype(I, /obj/item/screwdriver) || istype(I, /obj/item/pen))
if(ruined && I.tool_behaviour == TOOL_SCREWDRIVER || istype(I, /obj/item/pen))
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
if(I.use_tool(src, user, 120))
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")

View File

@@ -253,7 +253,7 @@
possible_colors = list("purple")
/obj/item/dualsaber/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/multitool))
if(W.tool_behaviour == TOOL_MULTITOOL)
if(!hacked)
hacked = TRUE
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")

View File

@@ -79,7 +79,7 @@
flame_turf(turflist)
/obj/item/flamethrower/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench) && !status)//Taking this apart
if(W.tool_behaviour == TOOL_WRENCH && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.forceMove(T)
@@ -94,7 +94,7 @@
qdel(src)
return
else if(istype(W, /obj/item/screwdriver) && igniter && !lit)
else if(W.tool_behaviour == TOOL_SCREWDRIVER && igniter && !lit)
status = !status
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
update_icon()

View File

@@ -51,7 +51,7 @@
/obj/item/grenade/chem_grenade/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(stage == WIRED)
if(beakers.len)
stage_change(READY)
@@ -105,11 +105,11 @@
to_chat(user, "<span class='warning'>You need one length of coil to wire the assembly!</span>")
return
else if(stage == READY && istype(I, /obj/item/wirecutters) && !active)
else if(stage == READY && I.tool_behaviour == TOOL_WIRECUTTER && !active)
stage_change(WIRED)
to_chat(user, "<span class='notice'>You unlock the [initial(name)] assembly.</span>")
else if(stage == WIRED && istype(I, /obj/item/wrench))
else if(stage == WIRED && I.tool_behaviour == TOOL_WRENCH)
if(beakers.len)
for(var/obj/O in beakers)
O.forceMove(drop_location())
@@ -275,7 +275,7 @@
var/unit_spread = 10 // Amount of units per repeat. Can be altered with a multitool.
/obj/item/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/multitool))
if(I.tool_behaviour == TOOL_MULTITOOL)
switch(unit_spread)
if(0 to 24)
unit_spread += 5

View File

@@ -47,7 +47,7 @@
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
update_icon()
return
if(nadeassembly && istype(I, /obj/item/wirecutters))
if(nadeassembly && I.tool_behaviour == TOOL_WIRECUTTER)
I.play_tool_sound(src, 20)
nadeassembly.forceMove(get_turf(src))
nadeassembly.master = null
@@ -206,7 +206,7 @@
user.gib(1, 1)
/obj/item/grenade/plastic/c4/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
open_panel = !open_panel
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
else if(is_wire_tool(I))

View File

@@ -62,7 +62,7 @@
/obj/item/inducer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
W.play_tool_sound(src)
if(!opened)
to_chat(user, "<span class='notice'>You unscrew the battery compartment.</span>")

View File

@@ -279,7 +279,7 @@
to_chat(user, "<span class='notice'>[src] is now [choice].</span>")
/obj/item/melee/transforming/energy/sword/saber/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/multitool))
if(W.tool_behaviour == TOOL_MULTITOOL)
if(user.a_intent == INTENT_DISARM)
if(!active)
to_chat(user, "<span class='warning'>COLOR_SET</span>")
@@ -439,7 +439,9 @@
force_on = 15 //As strong a survival knife/bone dagger
/obj/item/melee/transforming/energy/sword/cx/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/melee/transforming/energy/sword/cx))
if(istype(W, /obj/item/melee/transforming/energy/sword/cx/traitor))
return
else if(istype(W, /obj/item/melee/transforming/energy/sword/cx))
if(HAS_TRAIT(W, TRAIT_NODROP) || HAS_TRAIT(src, TRAIT_NODROP))
to_chat(user, "<span class='warning'>\the [HAS_TRAIT(src, TRAIT_NODROP) ? src : W] is stuck to your hand, you can't attach it to \the [HAS_TRAIT(src, TRAIT_NODROP) ? W : src]!</span>")
return

View File

@@ -84,7 +84,7 @@
updateTank(W, 0, user)
else if(W.type == type)
to_chat(user, "<span class='warning'>You're fairly certain that putting a pneumatic cannon inside another pneumatic cannon would cause a spacetime disruption.</span>")
else if(istype(W, /obj/item/wrench))
else if(W.tool_behaviour == TOOL_WRENCH)
switch(pressureSetting)
if(1)
pressureSetting = 2
@@ -93,7 +93,7 @@
if(3)
pressureSetting = 1
to_chat(user, "<span class='notice'>You tweak \the [src]'s pressure output to [pressureSetting].</span>")
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(tank)
updateTank(tank, 1, user)
else if(loadedWeightClass >= maxWeightClass)

View File

@@ -36,7 +36,7 @@
to_chat(user, "<span class='warning'>\The [IT] is too small for \the [src].</span>")
return
updateTank(W, 0, user)
else if(istype(W, /obj/item/wrench))
else if(W.tool_behaviour == TOOL_WRENCH)
switch(fisto_setting)
if(1)
fisto_setting = 2
@@ -46,7 +46,7 @@
fisto_setting = 1
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You tweak \the [src]'s piston valve to [fisto_setting].</span>")
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(tank)
updateTank(tank, 1, user)

View File

@@ -226,7 +226,7 @@
else
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
else if (istype(W, /obj/item/multitool))
else if(W.tool_behaviour == TOOL_MULTITOOL)
if(check_completion())
Interact(user)
else
@@ -382,7 +382,7 @@
var/mob/living/living_user = usr
var/obj/item/item_in_hand = living_user.get_active_held_item()
if(!istype(item_in_hand, /obj/item/multitool))
if(!item_in_hand.tool_behaviour == TOOL_MULTITOOL)
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
return

View File

@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
return

View File

@@ -20,7 +20,7 @@
state = 0 //fine
/obj/item/stack/tile/light/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/crowbar))
if(O.tool_behaviour == TOOL_CROWBAR)
new/obj/item/stack/sheet/metal(user.loc)
amount--
new/obj/item/stack/light_w(user.loc)

View File

@@ -40,7 +40,7 @@
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
if(get_amount() < 4)
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
return

View File

@@ -36,14 +36,14 @@
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
if (istype(W, /obj/item/screwdriver))
if(W.tool_behaviour == TOOL_SCREWDRIVER)
if (W.use_tool(src, user, 20))
open =! open
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the service panel.</span>")
return
if (istype(W, /obj/item/wirecutters))
if(W.tool_behaviour == TOOL_WIRECUTTER)
to_chat(user, "<span class='danger'>[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be <b>pulsed</b>.</span>")
if ((istype(W, /obj/item/multitool)) && (!l_hacking))
if((W.tool_behaviour == TOOL_MULTITOOL) && (!l_hacking))
if(open == 1)
to_chat(user, "<span class='danger'>Now attempting to reset internal memory, please hold.</span>")
l_hacking = 1

View File

@@ -119,7 +119,7 @@
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon()
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))

View File

@@ -103,7 +103,7 @@
return (FIRELOSS)
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
flamethrower_screwdriver(I, user)
else if(istype(I, /obj/item/stack/rods))
flamethrower_rods(I, user)

View File

@@ -277,7 +277,7 @@
newSaber.hacked = TRUE
qdel(W)
qdel(src)
else if(istype(W, /obj/item/multitool))
else if(W.tool_behaviour == TOOL_MULTITOOL)
if(!hacked)
hacked = TRUE
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")

View File

@@ -61,7 +61,7 @@
return TRUE
/obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/multitool))
if(P.tool_behaviour == TOOL_MULTITOOL)
active = !active
to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.")
return
@@ -76,10 +76,10 @@
return ..()
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/wrench))
if(P.tool_behaviour == TOOL_WRENCH)
return default_unfasten_wrench(user, P, 20)
if(!anchored)
if(istype(P, /obj/item/weldingtool) && can_deconstruct)
if(P.tool_behaviour == TOOL_WELDER && can_deconstruct)
if(state != EMPTY_CORE)
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
return
@@ -105,13 +105,13 @@
circuit = P
return
if(CIRCUIT_CORE)
if(istype(P, /obj/item/screwdriver))
if(P.tool_behaviour == TOOL_SCREWDRIVER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
state = SCREWED_CORE
update_icon()
return
if(istype(P, /obj/item/crowbar))
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
state = EMPTY_CORE
@@ -120,7 +120,7 @@
circuit = null
return
if(SCREWED_CORE)
if(istype(P, /obj/item/screwdriver) && circuit)
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
state = CIRCUIT_CORE
@@ -139,7 +139,7 @@
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
return
if(CABLED_CORE)
if(istype(P, /obj/item/wirecutters))
if(P.tool_behaviour == TOOL_WIRECUTTER)
if(brain)
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
else
@@ -201,7 +201,7 @@
update_icon()
return
if(istype(P, /obj/item/crowbar) && brain)
if(P.tool_behaviour == TOOL_CROWBAR && brain)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the brain.</span>")
brain.forceMove(loc)
@@ -210,7 +210,7 @@
return
if(GLASS_CORE)
if(istype(P, /obj/item/crowbar))
if(P.tool_behaviour == TOOL_CROWBAR)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
state = CABLED_CORE
@@ -218,7 +218,7 @@
new /obj/item/stack/sheet/rglass(loc, 2)
return
if(istype(P, /obj/item/screwdriver))
if(P.tool_behaviour == TOOL_SCREWDRIVER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
if(brain)
@@ -247,7 +247,7 @@
P.transfer_ai("INACTIVE", "AICARD", src, user)
return
if(istype(P, /obj/item/screwdriver))
if(P.tool_behaviour == TOOL_SCREWDRIVER)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
state = GLASS_CORE

View File

@@ -62,7 +62,7 @@
pick_sign(user)
/obj/structure/sign/barsign/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/screwdriver))
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(!allowed(user))
to_chat(user, "<span class='info'>Access denied.</span>")
return

View File

@@ -37,7 +37,7 @@
return attack_hand(user)
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1&NODECONSTRUCT_1))
W.play_tool_sound(src)
deconstruct(TRUE)
else if(istype(W, /obj/item/bedsheet))

View File

@@ -77,7 +77,7 @@
qdel(src)
/obj/structure/chair/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
if(W.tool_behaviour == TOOL_WRENCH && !(flags_1 & NODECONSTRUCT_1))
W.play_tool_sound(src)
deconstruct()
else if(istype(W, /obj/item/assembly/shock_kit))

View File

@@ -45,7 +45,7 @@ LINEN BINS
return
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
if(!(flags_1 & HOLOGRAM_1) && (istype(I, /obj/item/wirecutters) || I.get_sharpness()))
if(!(flags_1 & HOLOGRAM_1) && (I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness()))
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
transfer_fingerprints_to(C)
C.add_fingerprint(user)

View File

@@ -25,7 +25,7 @@
var/max_mob_size = MOB_SIZE_HUMAN //Biggest mob_size accepted by the container
var/mob_storage_capacity = 3 // how many human sized mob/living can fit together inside a closet.
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
var/cutting_tool = /obj/item/weldingtool
var/cutting_tool = TOOL_WELDER
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
var/material_drop = /obj/item/stack/sheet/metal
@@ -302,7 +302,9 @@
update_icon()
return TRUE
/obj/structure/closet/proc/handle_lock_removal(mob/user, obj/item/screwdriver/S)
/obj/structure/closet/proc/handle_lock_removal(mob/user, obj/item/S)
if(!S.tool_behaviour == TOOL_SCREWDRIVER)
return
if(lock_in_use)
to_chat(user, "<span class='notice'>Wait for work on [src] to be done first!</span>")
return
@@ -357,7 +359,7 @@
if(opened)
if(istype(W, cutting_tool))
var/welder = FALSE
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You begin [welder ? "slicing" : "deconstructing"] \the [src] apart...</span>")
@@ -377,9 +379,9 @@
return TRUE
else if(istype(W, /obj/item/electronics/airlock))
handle_lock_addition(user, W)
else if(istype(W, /obj/item/screwdriver))
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
handle_lock_removal(user, W)
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
else if(W.tool_behaviour == TOOL_WELDER && can_weld_shut)
if(!W.tool_start_check(user, amount=0))
return
@@ -396,7 +398,7 @@
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
"<span class='italics'>You hear welding.</span>")
update_icon()
else if(istype(W, /obj/item/wrench) && anchorable)
else if(W.tool_behaviour == TOOL_WRENCH && anchorable)
if(isinspace() && !anchored)
return
setAnchored(!anchored)

View File

@@ -32,7 +32,7 @@
else
name = "body bag"
return
else if(istype(I, /obj/item/wirecutters))
else if(I.tool_behaviour == TOOL_WIRECUTTER)
to_chat(user, "<span class='notice'>You cut the tag off [src].</span>")
name = "body bag"
tagged = 0

View File

@@ -8,7 +8,7 @@
max_integrity = 70
integrity_failure = 0
can_weld_shut = 0
cutting_tool = /obj/item/wirecutters
cutting_tool = TOOL_WIRECUTTER
open_sound = "rustle"
material_drop = /obj/item/stack/sheet/cardboard
delivery_icon = "deliverybox"
@@ -74,7 +74,7 @@
mob_storage_capacity = 5
resistance_flags = NONE
move_speed_multiplier = 2
cutting_tool = /obj/item/weldingtool
cutting_tool = TOOL_WELDER
open_sound = 'sound/machines/click.ogg'
material_drop = /obj/item/stack/sheet/plasteel
#undef SNAKE_SPAM_TICKS

View File

@@ -5,7 +5,7 @@
resistance_flags = FLAMMABLE
max_integrity = 70
material_drop = /obj/item/stack/sheet/mineral/wood
cutting_tool = /obj/item/screwdriver
cutting_tool = TOOL_SCREWDRIVER
/obj/structure/closet/acloset
name = "strange closet"

View File

@@ -5,7 +5,7 @@
resistance_flags = FLAMMABLE
max_integrity = 70
material_drop = /obj/item/stack/sheet/mineral/wood
cutting_tool = /obj/item/screwdriver
cutting_tool = TOOL_SCREWDRIVER
/obj/structure/closet/secure_closet/bar/PopulateContents()
..()

View File

@@ -26,7 +26,7 @@
resistance_flags = FLAMMABLE
max_integrity = 70
material_drop = /obj/item/stack/sheet/mineral/wood
cutting_tool = /obj/item/screwdriver
cutting_tool = TOOL_SCREWDRIVER
/obj/structure/closet/secure_closet/personal/cabinet/PopulateContents()
new /obj/item/storage/backpack/satchel/leather/withwallet( src )

View File

@@ -155,7 +155,7 @@
resistance_flags = FLAMMABLE
max_integrity = 70
material_drop = /obj/item/stack/sheet/mineral/wood
cutting_tool = /obj/item/screwdriver
cutting_tool = TOOL_SCREWDRIVER
/obj/structure/closet/secure_closet/detective/PopulateContents()
..()

View File

@@ -16,7 +16,7 @@
to_chat(user, "<span class='warning'>You need a crowbar to pry this open!</span>")
/obj/structure/closet/crate/large/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/crowbar))
if(W.tool_behaviour == TOOL_CROWBAR)
if(manifest)
tear_manifest(user)

View File

@@ -108,7 +108,7 @@
toggle_lock(user)
else
to_chat(user, "<span class='warning'>Access denied.</span>")
else if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP && !broken)
else if(W.tool_behaviour == TOOL_WELDER && user.a_intent == INTENT_HELP && !broken)
if(obj_integrity < max_integrity)
if(!W.tool_start_check(user, amount=5))
return
@@ -121,7 +121,7 @@
else
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
else if(!alert && istype(W, /obj/item/crowbar) && openable) //Only applies to the lab cage and player made display cases
else if(!alert && W.tool_behaviour == TOOL_CROWBAR && openable) //Only applies to the lab cage and player made display cases
if(broken)
if(showpiece)
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
@@ -187,7 +187,7 @@
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wrench)) //The player can only deconstruct the wooden frame
if(I.tool_behaviour == TOOL_WRENCH) //The player can only deconstruct the wooden frame
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
I.play_tool_sound(src)
if(I.use_tool(src, user, 30))

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