Converts most istype(thing,tool) procs into an appropriate thing.is_tool() format

This commit is contained in:
Anewbe
2018-08-02 21:45:15 -05:00
parent 8b6377016f
commit 729ce71aa0
294 changed files with 20414 additions and 3197 deletions

View File

@@ -207,35 +207,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
if(0)
if(iswrench(O))
if(O.is_wrench())
playsound(src, O.usesound, 75, 1)
src.anchored = 1
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the external bolts.")
temp_state++
if(1)
if(iswrench(O))
if(O.is_wrench())
playsound(src, O.usesound, 75, 1)
src.anchored = 0
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
"You remove the external bolts.")
temp_state--
else if(iscoil(O))
else if(O.is_cable_coil())
if(O:use(1,user))
user.visible_message("[user.name] adds wires to the [src.name].", \
"You add some wires.")
temp_state++
if(2)
if(iswirecutter(O))//TODO:Shock user if its on?
if(O.is_wirecutter())//TODO:Shock user if its on?
user.visible_message("[user.name] removes some wires from the [src.name].", \
"You remove some wires.")
temp_state--
else if(isscrewdriver(O))
else if(O.is_screwdriver())
user.visible_message("[user.name] closes the [src.name]'s access panel.", \
"You close the access panel.")
temp_state++
if(3)
if(isscrewdriver(O))
if(O.is_screwdriver())
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
"You open the access panel.")
temp_state--
@@ -346,35 +346,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
var/temp_state = src.construction_state
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
if(0)
if(iswrench(O))
if(O.is_wrench())
playsound(src, O.usesound, 75, 1)
src.anchored = 1
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the external bolts.")
temp_state++
if(1)
if(iswrench(O))
if(O.is_wrench())
playsound(src, O.usesound, 75, 1)
src.anchored = 0
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
"You remove the external bolts.")
temp_state--
else if(iscoil(O))
else if(O.is_cable_coil())
if(O:use(1))
user.visible_message("[user.name] adds wires to the [src.name].", \
"You add some wires.")
temp_state++
if(2)
if(iswirecutter(O))//TODO:Shock user if its on?
if(O.is_wirecutter())//TODO:Shock user if its on?
user.visible_message("[user.name] removes some wires from the [src.name].", \
"You remove some wires.")
temp_state--
else if(isscrewdriver(O))
else if(O.is_screwdriver())
user.visible_message("[user.name] closes the [src.name]'s access panel.", \
"You close the access panel.")
temp_state++
if(3)
if(isscrewdriver(O))
if(O.is_screwdriver())
user.visible_message("[user.name] opens the [src.name]'s access panel.", \
"You open the access panel.")
temp_state--