Small belt overlay rewrite, and tool overlays for toolbelts
This commit is contained in:
@@ -573,6 +573,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/proc/get_belt_overlay() //Returns the icon used for overlaying the object on a belt
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state)
|
||||
|
||||
/obj/item/proc/is_hot()
|
||||
return heat
|
||||
|
||||
|
||||
@@ -7,13 +7,20 @@
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
max_integrity = 300
|
||||
var/content_overlays = FALSE //If this is true, the belt will gain overlays based on what it's holding
|
||||
|
||||
/obj/item/weapon/storage/belt/update_icon()
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
add_overlay("[I.name]")
|
||||
if(content_overlays)
|
||||
for(var/obj/item/I in contents)
|
||||
var/mutable_appearance/M = I.get_belt_overlay()
|
||||
add_overlay(M)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/belt/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/belt/utility
|
||||
name = "toolbelt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
||||
desc = "Holds tools."
|
||||
@@ -34,10 +41,11 @@
|
||||
/obj/item/device/radio,
|
||||
/obj/item/clothing/gloves
|
||||
)
|
||||
content_overlays = TRUE
|
||||
|
||||
/obj/item/weapon/storage/belt/utility/chief
|
||||
name = "Chief Engineer's toolbelt"
|
||||
desc = "Holds tools, looks snazzy"
|
||||
name = "\improper Chief Engineer's toolbelt" //"the Chief Engineer's toolbelt", because "Chief Engineer's toolbelt" is not a proper noun
|
||||
desc = "Holds tools, looks snazzy."
|
||||
icon_state = "utilitybelt_ce"
|
||||
item_state = "utility_ce"
|
||||
|
||||
@@ -157,6 +165,7 @@
|
||||
/obj/item/clothing/gloves/,
|
||||
/obj/item/weapon/restraints/legcuffs/bola
|
||||
)
|
||||
content_overlays = TRUE
|
||||
|
||||
/obj/item/weapon/storage/belt/security/full/PopulateContents()
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
|
||||
@@ -181,6 +181,16 @@
|
||||
M.appearance_flags = RESET_COLOR
|
||||
. += M
|
||||
|
||||
/obj/item/weapon/screwdriver/get_belt_overlay()
|
||||
if(random_color)
|
||||
var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver")
|
||||
var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_head")
|
||||
body.color = color
|
||||
head.overlays += body
|
||||
return head
|
||||
else
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state)
|
||||
|
||||
/obj/item/weapon/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
@@ -203,7 +213,7 @@
|
||||
name = "alien screwdriver"
|
||||
desc = "An ultrasonic screwdriver."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "screwdriver"
|
||||
icon_state = "screwdriver_a"
|
||||
item_state = "screwdriver_nuke"
|
||||
usesound = 'sound/items/pshoom.ogg'
|
||||
toolspeed = 0.1
|
||||
|
||||
Reference in New Issue
Block a user