mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-22 12:46:40 +01:00
Hopefully fixes some tool-conversion things
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/catwalk/attackby(obj/item/C as obj, mob/user as mob)
|
||||
if(C.is_welder())
|
||||
if(istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.isOn())
|
||||
if(WT.remove_fuel(0, user))
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
rename_door(user)
|
||||
return
|
||||
|
||||
if(W.is_welder() && ( (istext(glass)) || (glass == 1) || (!anchored) ))
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0, user))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
@@ -212,7 +212,7 @@
|
||||
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
|
||||
anchored = !anchored
|
||||
|
||||
else if(W.is_cable_coil() && state == 0 && anchored)
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>")
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
return
|
||||
|
||||
// Repair
|
||||
if(health < maxhealth && W.is_welder())
|
||||
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/F = W
|
||||
if(F.welding)
|
||||
playsound(src.loc, F.usesound, 50, 1)
|
||||
|
||||
@@ -89,7 +89,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
switch(state)
|
||||
if("01")
|
||||
if(W.is_welder() && !anchored )
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
|
||||
@@ -130,7 +130,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
step = null
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(W.is_cable_coil() && anchored)
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
|
||||
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
if(!istype(W)) return//I really wish I did not need this
|
||||
|
||||
// Fixing.
|
||||
if(W.is_welder() && user.a_intent == I_HELP)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(health < maxhealth)
|
||||
if(WT.remove_fuel(1 ,user))
|
||||
@@ -294,7 +294,7 @@
|
||||
if(is_fulltile())
|
||||
mats.amount = 4
|
||||
qdel(src)
|
||||
else if(W.is_cable_coil() && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.use(1))
|
||||
playsound(src.loc, 'sound/effects/sparks1.ogg', 75, 1)
|
||||
@@ -572,7 +572,7 @@
|
||||
maxhealth = 80
|
||||
|
||||
/obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.is_multitool() && !anchored) // Only allow programming if unanchored!
|
||||
if(istype(W, /obj/item/device/multitool) && !anchored) // Only allow programming if unanchored!
|
||||
var/obj/item/device/multitool/MT = W
|
||||
// First check if they have a windowtint button buffered
|
||||
if(istype(MT.connectable, /obj/machinery/button/windowtint))
|
||||
@@ -632,7 +632,7 @@
|
||||
icon_state = "light[active]"
|
||||
|
||||
/obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.is_multitool())
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/MT = W
|
||||
if(!id)
|
||||
// If no ID is set yet (newly built button?) let them select an ID for first-time use!
|
||||
|
||||
Reference in New Issue
Block a user