Improves belt item overlay code, Adds new belt item overlay sprites (#17568)

* belt-improvements-and-sprites

* fixes my fix of botany belt allowed contents
This commit is contained in:
atteria
2022-04-12 15:57:21 +01:00
committed by GitHub
parent ae600a7d40
commit bcf90593ed
34 changed files with 67 additions and 7 deletions
@@ -4,6 +4,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "dnainjector"
item_state = "dnainjector"
belt_icon = "syringe"
var/block = 0
var/datum/dna2/record/buf = null
throw_speed = 3
@@ -515,6 +515,7 @@
/obj/item/grenade/chem_grenade/cleaner
belt_icon = "grenade"
payload_name = "cleaner"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = READY
@@ -2,6 +2,7 @@
name = "flashbang"
icon_state = "flashbang"
item_state = "flashbang"
belt_icon = "flashbang"
origin_tech = "materials=2;combat=3"
light_power = 10
light_color = LIGHT_COLOR_WHITE
@@ -4,6 +4,7 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
belt_icon = "handcuffs"
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 5
@@ -83,6 +84,7 @@
icon = 'icons/obj/mining.dmi'
icon_state = "sinewcuff"
item_state = "sinewcuff"
belt_icon = null
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
@@ -90,6 +92,7 @@
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_white"
belt_icon = null
origin_tech = "engineering=2"
materials = list(MAT_METAL=150, MAT_GLASS=75)
breakouttime = 300 //Deciseconds = 30s
@@ -4,6 +4,7 @@
icon = 'icons/obj/device.dmi'
icon_state = "signmaker"
item_state = "electronic"
belt_icon = "holosign_creator"
force = 0
w_class = WEIGHT_CLASS_SMALL
throwforce = 0
@@ -31,7 +31,7 @@
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
icon = 'icons/obj/janitor.dmi'
icon_state = "trashbag"
belt_icon = "trashbag"
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_SMALL
slot_flags = null
@@ -75,6 +75,7 @@
name = "trash bag of holding"
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
icon_state = "bluetrashbag"
belt_icon = "trashbag_blue"
origin_tech = "materials=4;bluespace=4;engineering=4;plasmatech=3"
max_combined_w_class = 60
storage_slots = 60
@@ -15,9 +15,9 @@
/obj/item/storage/belt/update_icon()
if(use_item_overlays)
overlays.Cut()
cut_overlays()
for(var/obj/item/I in contents)
overlays += "[I.name]"
add_overlay("[I.belt_icon]")
..()
/obj/item/storage/belt/proc/can_use()
@@ -203,6 +203,7 @@
/obj/item/wirecutters,
/obj/item/wrench,
/obj/item/reagent_containers/spray/weedspray,
/obj/item/reagent_containers/spray/plantbgone,
/obj/item/reagent_containers/spray/pestspray
)
@@ -273,7 +274,7 @@
storage_slots = 6
use_item_overlays = TRUE
can_hold = list(
"/obj/item/soulstone"
/obj/item/soulstone
)
/obj/item/storage/belt/soulstone/full/populate_contents()
@@ -290,7 +291,7 @@
materials = list(MAT_GOLD=400)
storage_slots = TRUE
can_hold = list(
"/obj/item/clothing/mask/luchador"
/obj/item/clothing/mask/luchador
)
/obj/item/storage/belt/military
@@ -403,6 +404,7 @@
/obj/item/soap,
/obj/item/holosign_creator,
/obj/item/melee/flyswatter,
/obj/item/storage/bag/trash
)
/obj/item/storage/belt/janitor/full/populate_contents()
@@ -165,6 +165,7 @@
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cigpacket"
item_state = "cigpacket"
belt_icon = "patch_pack"
w_class = WEIGHT_CLASS_SMALL
throwforce = 2
slot_flags = SLOT_BELT
@@ -223,6 +223,7 @@
icon_state = "pill_canister"
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
belt_icon = "pill_bottle"
w_class = WEIGHT_CLASS_SMALL
can_hold = list(/obj/item/reagent_containers/food/pill)
cant_hold = list(/obj/item/reagent_containers/food/pill/patch)
@@ -305,6 +306,7 @@
name = "patch pack"
desc = "It's a container for storing medical patches."
icon_state = "patch_pack"
belt_icon = "patch_pack"
can_hold = list(/obj/item/reagent_containers/food/pill/patch)
cant_hold = list()
rapid_intake_message = "flips the lid of the patch pack open and begins rapidly stamping patches on themselves!"
@@ -4,6 +4,7 @@
icon_state = "stunbaton"
var/base_icon = "stunbaton"
item_state = "baton"
belt_icon = "stunbaton"
slot_flags = SLOT_BELT
force = 10
throwforce = 7