Rubber toolboxes.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
name = "artistic toolbox"
|
||||
desc = "A toolbox painted bright green. Looking at it makes you feel uneasy."
|
||||
icon_state = "his_grace"
|
||||
item_state = "artistic_toolbox"
|
||||
item_state = "toolbox_green"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
|
||||
|
||||
/obj/item/storage/toolbox
|
||||
name = "toolbox"
|
||||
desc = "Danger. Very robust."
|
||||
@@ -16,21 +18,25 @@
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
var/latches = "single_latch"
|
||||
var/has_latches = TRUE
|
||||
var/can_rubberify = TRUE
|
||||
|
||||
/obj/item/storage/toolbox/Initialize()
|
||||
/obj/item/storage/toolbox/Initialize(mapload)
|
||||
. = ..()
|
||||
if(has_latches)
|
||||
if(prob(10))
|
||||
latches = "double_latch"
|
||||
if(prob(1))
|
||||
latches = "triple_latch"
|
||||
if(mapload && can_rubberify && prob(5))
|
||||
rubberify()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/toolbox/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
if(has_latches)
|
||||
add_overlay(latches)
|
||||
var/icon/I = icon('icons/obj/storage.dmi', latches)
|
||||
add_overlay(I)
|
||||
|
||||
|
||||
/obj/item/storage/toolbox/suicide_act(mob/user)
|
||||
@@ -39,8 +45,6 @@
|
||||
|
||||
/obj/item/storage/toolbox/emergency
|
||||
name = "emergency toolbox"
|
||||
icon_state = "red"
|
||||
item_state = "toolbox_red"
|
||||
|
||||
/obj/item/storage/toolbox/emergency/PopulateContents()
|
||||
new /obj/item/crowbar/red(src)
|
||||
@@ -59,6 +63,7 @@
|
||||
name = "rusty red toolbox"
|
||||
icon_state = "toolbox_red_old"
|
||||
has_latches = FALSE
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/mechanical
|
||||
name = "mechanical toolbox"
|
||||
@@ -77,6 +82,7 @@
|
||||
name = "rusty blue toolbox"
|
||||
icon_state = "toolbox_blue_old"
|
||||
has_latches = FALSE
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/mechanical/old/heirloom
|
||||
name = "old, robust toolbox" //this will be named "X family toolbox"
|
||||
@@ -151,6 +157,7 @@
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
attack_verb = list("robusted", "crushed", "smashed")
|
||||
can_rubberify = FALSE
|
||||
var/fabricator_type = /obj/item/clockwork/replica_fabricator/scarab
|
||||
|
||||
/obj/item/storage/toolbox/brass/ComponentInitialize()
|
||||
@@ -191,6 +198,7 @@
|
||||
item_state = "toolbox_blue"
|
||||
w_class = WEIGHT_CLASS_HUGE //heyo no bohing this!
|
||||
force = 18 //spear damage
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/plastitanium/afterattack(atom/A, mob/user, proximity)
|
||||
. = ..()
|
||||
@@ -204,7 +212,7 @@
|
||||
name = "artistic toolbox"
|
||||
desc = "A toolbox painted bright green. Why anyone would store art supplies in a toolbox is beyond you, but it has plenty of extra space."
|
||||
icon_state = "green"
|
||||
item_state = "artistic_toolbox"
|
||||
item_state = "toolbox_green"
|
||||
w_class = WEIGHT_CLASS_GIGANTIC //Holds more than a regular toolbox!
|
||||
|
||||
/obj/item/storage/toolbox/artistic/ComponentInitialize()
|
||||
@@ -235,6 +243,7 @@
|
||||
throwforce = 14
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/gold_real/PopulateContents()
|
||||
new /obj/item/screwdriver/nuke(src)
|
||||
@@ -259,3 +268,48 @@
|
||||
has_latches = FALSE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
can_rubberify = FALSE
|
||||
|
||||
/obj/item/storage/toolbox/proc/rubberify()
|
||||
name = "rubber [name]"
|
||||
desc = replacetext(desc, "Danger", "Bouncy")
|
||||
desc = replacetext(desc, "robust", "safe")
|
||||
desc = replacetext(desc, "heavier", "bouncier")
|
||||
flags_1 = null
|
||||
materials = null
|
||||
damtype = STAMINA
|
||||
force += 5 //to compensate the higher stamina K.O. threshold compared to actual health.
|
||||
throwforce += 5
|
||||
attack_verb += "bounced"
|
||||
if(!GLOB.rubber_toolbox_icons[icon_state])
|
||||
generate_rubber_toolbox_icon()
|
||||
icon = GLOB.rubber_toolbox_icons[icon_state]
|
||||
AddComponent(/datum/component/bouncy)
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/toolbox/proc/generate_rubber_toolbox_icon()
|
||||
var/icon/new_icon = icon(icon, icon_state)
|
||||
var/icon/smooth = icon('icons/obj/storage.dmi', "rubber_toolbox_blend")
|
||||
new_icon.Blend(smooth, ICON_MULTIPLY)
|
||||
new_icon = fcopy_rsc(new_icon)
|
||||
GLOB.rubber_toolbox_icons[icon_state] = new_icon
|
||||
|
||||
/obj/item/storage/toolbox/rubber
|
||||
name = "rubber toolbox"
|
||||
desc = "Bouncy. Very safe."
|
||||
flags_1 = null
|
||||
materials = null
|
||||
damtype = STAMINA
|
||||
force = 17
|
||||
throwforce = 17
|
||||
attack_verb = list("robusted", "bounced")
|
||||
can_rubberify = FALSE //we are already the future.
|
||||
|
||||
/obj/item/storage/toolbox/rubber/Initialize()
|
||||
icon_state = pick("blue", "red", "yellow", "green")
|
||||
item_state = "toolbox_[icon_state]"
|
||||
if(!GLOB.rubber_toolbox_icons[icon_state])
|
||||
generate_rubber_toolbox_icon()
|
||||
icon = GLOB.rubber_toolbox_icons[icon_state]
|
||||
. = ..()
|
||||
AddComponent(/datum/component/bouncy)
|
||||
@@ -294,7 +294,7 @@
|
||||
name = "windup toolbox"
|
||||
desc = "A replica toolbox that rumbles when you turn the key."
|
||||
icon_state = "his_grace"
|
||||
item_state = "artistic_toolbox"
|
||||
item_state = "toolbox_green"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
var/active = FALSE
|
||||
|
||||
Reference in New Issue
Block a user