mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] Refactors tool typechecks, refactors transforming tools, makes Altevian wrench into one (#7062)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Nadyr <41974248+Darlantanis@users.noreply.github.com>
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver
|
||||
if(src.broken == 2 && O.has_tool_quality(TOOL_SCREWDRIVER)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> starts to fix part of the microwave.", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
@@ -89,7 +89,7 @@
|
||||
"<span class='notice'>You have fixed part of the microwave.</span>" \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench
|
||||
else if(src.broken == 1 && O.has_tool_quality(TOOL_WRENCH)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> starts to fix part of the microwave.", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
@@ -190,10 +190,10 @@
|
||||
var/obj/item/weapon/grab/G = O
|
||||
to_chat(user, "<span class='warning'>This is ridiculous. You can not fit \the [G.affecting] in this [src].</span>")
|
||||
return 1
|
||||
else if(O.is_screwdriver())
|
||||
else if(O.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
default_deconstruction_screwdriver(user, O)
|
||||
return
|
||||
else if(O.is_crowbar())
|
||||
else if(O.has_tool_quality(TOOL_CROWBAR))
|
||||
if(default_deconstruction_crowbar(user, O))
|
||||
return
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user