mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 05:51:56 +00:00
Killing off inconsistencies with impact wrenches / combi-tools (#7269)
Part 1 in the "why my impact wrench no wrench bolt" saga tl;dr for end users: combitools / impact wrenches now work on everything their non-powered versions do (except mechs and RIGs, tune in next time on dragon ball Z for that) essentially all this PR does is murder every istype() check possible that could use a helper function instead, most notably many pen checks with ispen(). it also repaths combitools and powerdrills to /obj/item/weapon so they aren't instantly taken out of contention by half of the known attackby() prompts I already squashed a couple runtimes here and there from the pen changes and it's possible I missed another because pencode is another scourge upon our lives
This commit is contained in:
@@ -387,7 +387,7 @@ var/list/cleanbot_types // Going to use this to generate a list of types once th
|
||||
to_chat(user, "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>")
|
||||
qdel(src)
|
||||
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
else if(O.ispen())
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
/obj/item/weapon/secbot_assembly/ed209_assembly/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
..()
|
||||
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
if(W.ispen())
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
else if(W.ispen())
|
||||
var/t = input(user, "Enter new robot name", name, created_name) as text
|
||||
t = sanitize(t, MAX_NAME_LEN)
|
||||
if(!t)
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
to_chat(user, "<span class='notice'>You add the sensor to the toolbox and tiles!</span>")
|
||||
qdel(src)
|
||||
return 1
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
else if (W.ispen())
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
@@ -371,7 +371,7 @@
|
||||
to_chat(user, "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>")
|
||||
qdel(src)
|
||||
return 1
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
else if(W.ispen())
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
|
||||
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
if(W.ispen())
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
|
||||
@@ -597,7 +597,7 @@
|
||||
|
||||
/mob/living/bot/secbot/attackby(var/obj/item/O, var/mob/user)
|
||||
..()
|
||||
if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/weapon/pen) || istype(O, /obj/item/device/pda))
|
||||
if(istype(O, /obj/item/weapon/card/id) || O.ispen() || istype(O, /obj/item/device/pda))
|
||||
return
|
||||
|
||||
target = user
|
||||
@@ -708,7 +708,7 @@
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
else if(O.ispen())
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", name, created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
|
||||
@@ -356,7 +356,7 @@ var/global/list/robot_modules = list(
|
||||
/obj/item/weapon/robot_module/engineering/construction/New()
|
||||
..()
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/powerdrill(src)
|
||||
src.modules += new /obj/item/weapon/powerdrill(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/rfd/construction/borg(src)
|
||||
|
||||
@@ -1207,8 +1207,8 @@ proc/is_blind(A)
|
||||
|
||||
#undef SAFE_PERP
|
||||
|
||||
/mob/proc/get_multitool(var/obj/item/device/multitool/P)
|
||||
if(istype(P))
|
||||
/mob/proc/get_multitool(var/obj/P)
|
||||
if(P.ismultitool())
|
||||
return P
|
||||
|
||||
/mob/abstract/observer/get_multitool()
|
||||
|
||||
Reference in New Issue
Block a user