Merge pull request #9844 from SamHPurp/screw-drivers-&-wirecutters

Fixes invisible Screwdrivers & wirecutters in the map editor
This commit is contained in:
Mark Mak
2018-10-14 19:39:14 +08:00
committed by GitHub
2 changed files with 12 additions and 4 deletions
+12 -4
View File
@@ -120,7 +120,7 @@
name = "screwdriver"
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = null
icon_state = "screwdriver_map"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
@@ -133,6 +133,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/Screwdriver.ogg'
toolspeed = 1
var/random_color = TRUE //if the screwdriver uses random coloring
/obj/item/screwdriver/nuke
name = "screwdriver"
@@ -146,7 +147,7 @@
/obj/item/screwdriver/New(loc, var/param_color = null)
..()
if(!icon_state)
if(random_color)
if(!param_color)
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
icon_state = "screwdriver_[param_color]"
@@ -168,6 +169,7 @@
desc = "A screwdriver made of brass. The handle feels freezing cold."
icon_state = "screwdriver_brass"
toolspeed = 0.5
random_color = FALSE
/obj/item/screwdriver/abductor
name = "alien screwdriver"
@@ -176,6 +178,7 @@
icon_state = "screwdriver"
usesound = 'sound/items/PSHOOM.ogg'
toolspeed = 0.1
random_color = FALSE
/obj/item/screwdriver/power
name = "hand drill"
@@ -192,6 +195,7 @@
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/screwdriver/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -215,7 +219,7 @@
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = null
icon_state = "cutters"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
@@ -229,10 +233,11 @@
usesound = 'sound/items/Wirecutter.ogg'
sharp = 1
toolspeed = 1
var/random_color = TRUE
/obj/item/wirecutters/New(loc, param_color = null)
..()
if(!icon_state)
if(random_color)
if(!param_color)
param_color = pick("yellow", "red")
icon_state = "cutters_[param_color]"
@@ -258,6 +263,7 @@
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
icon_state = "cutters_brass"
toolspeed = 0.5
random_color = FALSE
/obj/item/wirecutters/abductor
name = "alien wirecutters"
@@ -266,6 +272,7 @@
icon_state = "cutters"
toolspeed = 0.1
origin_tech = "materials=5;engineering=4;abductor=3"
random_color = FALSE
/obj/item/wirecutters/cyborg
name = "wirecutters"
@@ -281,6 +288,7 @@
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/wirecutters/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB