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 07:57:21 -07:00
committed by GitHub
parent ae600a7d40
commit bcf90593ed
34 changed files with 67 additions and 7 deletions
+1
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "soulstone"
item_state = "electronic"
belt_icon = "soulstone"
var/icon_state_full = "soulstone2"
desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artifact's power."
w_class = WEIGHT_CLASS_TINY
+2
View File
@@ -119,6 +119,8 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
// item hover FX
/// Is this item inside a storage object?
var/in_storage = FALSE
// For assigning a belt overlay icon state in belts.dmi
var/belt_icon = null
/// Holder var for the item outline filter, null when no outline filter on the item.
var/outline_filter
+1
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/device.dmi'
icon_state = "flash"
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
belt_icon = "flash"
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
@@ -6,6 +6,7 @@
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
icon_state = "defib-on"
item_state = "defib"
belt_icon = "defib"
var/icon_base = "defib"
var/cooldown = FALSE
@@ -46,6 +46,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "lightreplacer0"
item_state = "electronic"
belt_icon = "light_replacer"
w_class = WEIGHT_CLASS_SMALL
flags = CONDUCT
slot_flags = SLOT_BELT
+2 -1
View File
@@ -81,10 +81,11 @@ REAGENT SCANNER
to_chat(user, "<span class='notice'>Subject is not addicted to any reagents.</span>")
/obj/item/healthanalyzer
name = "Health Analyzer"
name = "health analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "health"
item_state = "healthanalyzer"
belt_icon = "health_analyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
@@ -11,10 +11,11 @@
*/
/obj/item/rad_laser
name = "Health Analyzer"
name = "health analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "health2"
item_state = "healthanalyzer"
belt_icon = "health_analyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end."
flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
@@ -171,6 +171,7 @@
singular_name = "advanced trauma kit"
desc = "An advanced trauma kit for severe injuries."
icon_state = "traumakit"
belt_icon = "traumakit"
max_amount = 6
heal_brute = 25
stop_bleeding = 0
@@ -219,6 +220,7 @@
singular_name = "advanced burn kit"
desc = "An advanced treatment kit for severe burns."
icon_state = "burnkit"
belt_icon = "burnkit"
heal_burn = 25
/obj/item/stack/medical/ointment/advanced/cyborg
+2
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
item_state = "crowbar"
belt_icon = "crowbar"
usesound = 'sound/items/crowbar.ogg'
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -66,6 +67,7 @@
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
belt_icon = "jaws"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2"
usesound = 'sound/items/jaws_pry.ogg'
@@ -11,6 +11,7 @@
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
icon = 'icons/obj/device.dmi'
icon_state = "multitool"
belt_icon = "multitool"
flags = CONDUCT
force = 0
w_class = WEIGHT_CLASS_SMALL
@@ -4,6 +4,7 @@
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver_map"
belt_icon = "screwdriver"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
@@ -74,6 +75,7 @@
desc = "A simple hand drill with a screwdriver bit attached."
icon_state = "drill_screw"
item_state = "drill"
belt_icon = "hand_drill"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
+4
View File
@@ -6,6 +6,7 @@
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
belt_icon = "welder"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 3
@@ -192,6 +193,7 @@
name = "industrial welding tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
belt_icon = "welder_ind"
maximum_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=60)
origin_tech = "engineering=2;plasmatech=2"
@@ -227,6 +229,7 @@
desc = "An upgraded welder based off the industrial welder."
icon_state = "upindwelder"
item_state = "upindwelder"
belt_icon = "welder_upg"
maximum_fuel = 80
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "engineering=3;plasmatech=2"
@@ -236,6 +239,7 @@
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
icon_state = "exwelder"
item_state = "exwelder"
belt_icon = "welder_exp"
maximum_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
@@ -3,6 +3,7 @@
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
belt_icon = "wirecutters"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
@@ -82,6 +83,7 @@
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
belt_icon = "jaws"
origin_tech = "materials=2;engineering=2"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
+2
View File
@@ -4,6 +4,7 @@
desc = "A wrench with common uses. Can be found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
belt_icon = "wrench"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
@@ -50,6 +51,7 @@
desc = "A simple powered drill with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
belt_icon = "hand_drill"
usesound = 'sound/items/drill_use.ogg'
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
@@ -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
@@ -20,6 +20,7 @@
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "weedspray"
item_state = "plantbgone"
belt_icon = null
volume = 100
container_type = OPENCONTAINER
slot_flags = SLOT_BELT
@@ -39,6 +40,7 @@
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "pestspray"
item_state = "plantbgone"
belt_icon = null
volume = 100
container_type = OPENCONTAINER
slot_flags = SLOT_BELT
@@ -57,6 +59,7 @@
desc = "It's used for removing weeds or scratching your back."
icon_state = "cultivator"
item_state = "cultivator"
belt_icon = "cultivator"
origin_tech = "engineering=2;biotech=2"
flags = CONDUCT
force = 5
@@ -81,6 +84,7 @@
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
icon_state = "hatchet"
item_state = "hatchet"
belt_icon = "hatchet"
flags = CONDUCT
force = 12
w_class = WEIGHT_CLASS_TINY
@@ -143,6 +143,7 @@
desc = "A small tool for digging and moving dirt."
icon_state = "spade"
item_state = "spade"
belt_icon = "spade"
force = 5
throwforce = 7
w_class = WEIGHT_CLASS_SMALL
+1
View File
@@ -484,6 +484,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
icon = 'icons/obj/power.dmi'
icon_state = "coil"
item_state = "coil_red"
belt_icon = "cable_coil"
amount = MAXCOIL
max_amount = MAXCOIL
merge_type = /obj/item/stack/cable_coil // This is here to let its children merge between themselves
@@ -4,6 +4,7 @@
ammo_type = /obj/item/ammo_casing/magic
icon_state = "nothingwand"
item_state = "wand"
belt_icon = "wand_nothing"
w_class = WEIGHT_CLASS_SMALL
can_charge = 0
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
@@ -63,6 +64,7 @@
fire_sound = 'sound/magic/wandodeath.ogg'
ammo_type = /obj/item/ammo_casing/magic/death
icon_state = "deathwand"
belt_icon = "wand_death"
max_charges = 3 //3, 2, 2, 1
/obj/item/gun/magic/wand/death/zap_self(mob/living/user)
@@ -88,6 +90,7 @@
ammo_type = /obj/item/ammo_casing/magic/heal
fire_sound = 'sound/magic/staff_healing.ogg'
icon_state = "revivewand"
belt_icon = "wand_revive"
max_charges = 3 //3, 2, 2, 1
/obj/item/gun/magic/wand/resurrection/zap_self(mob/living/user)
@@ -111,6 +114,7 @@
ammo_type = /obj/item/ammo_casing/magic/change
fire_sound = 'sound/magic/staff_change.ogg'
icon_state = "polywand"
belt_icon = "wand_polymorph"
max_charges = 10 //10, 5, 5, 4
/obj/item/gun/magic/wand/polymorph/zap_self(mob/living/user)
@@ -127,6 +131,7 @@
desc = "This wand will wrench targets through space and time to move them somewhere else."
ammo_type = /obj/item/ammo_casing/magic/teleport
icon_state = "telewand"
belt_icon = "wand_tele"
max_charges = 10 //10, 5, 5, 4
no_den_usage = TRUE
fire_sound = 'sound/magic/wand_teleport.ogg'
@@ -149,6 +154,7 @@
ammo_type = /obj/item/ammo_casing/magic/door
fire_sound = 'sound/magic/staff_door.ogg'
icon_state = "doorwand"
belt_icon = "wand_door"
max_charges = 20 //20, 10, 10, 7
no_den_usage = TRUE
@@ -167,6 +173,7 @@
fire_sound = 'sound/magic/fireball.ogg'
ammo_type = /obj/item/ammo_casing/magic/fireball
icon_state = "firewand"
belt_icon = "wand_fireball"
max_charges = 8 //8, 4, 4, 3
/obj/item/gun/magic/wand/fireball/zap_self(mob/living/user)
@@ -7,6 +7,7 @@
desc = "A dropper. Transfers 5 units."
icon_state = "dropper"
item_state = "dropper"
belt_icon = "dropper"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(1, 2, 3, 4, 5)
volume = 5
@@ -119,6 +119,7 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "beaker"
item_state = "beaker"
belt_icon = "beaker"
materials = list(MAT_GLASS=500)
var/obj/item/assembly_holder/assembly = null
var/can_assembly = 1
@@ -226,6 +227,7 @@
name = "vial"
desc = "A small glass vial. Can hold up to 25 units."
icon_state = "vial"
belt_icon = "vial"
materials = list(MAT_GLASS=250)
volume = 25
amount_per_transfer_from_this = 10
@@ -8,6 +8,7 @@
icon = 'icons/obj/hypo.dmi'
item_state = "hypo"
icon_state = "hypo"
belt_icon = "hypospray"
amount_per_transfer_from_this = 5
volume = 30
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
@@ -101,6 +102,7 @@
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
icon_state = "autoinjector"
item_state = "autoinjector"
belt_icon = "autoinjector"
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10)
volume = 10
@@ -4,6 +4,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "cleaner"
item_state = "cleaner"
belt_icon = "space_cleaner"
flags = NOBLUDGEON
container_type = OPENCONTAINER
slot_flags = SLOT_BELT
@@ -150,6 +151,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "pepperspray"
item_state = "pepperspray"
belt_icon = null
volume = 40
spray_maxrange = 4
amount_per_transfer_from_this = 5
@@ -162,6 +164,7 @@
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "sunflower"
item_state = "sunflower"
belt_icon = null
amount_per_transfer_from_this = 1
volume = 10
list_reagents = list("water" = 10)
@@ -235,5 +238,6 @@
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "plantbgone"
item_state = "plantbgone"
belt_icon = null
volume = 100
list_reagents = list("glyphosate" = 100)
@@ -8,6 +8,7 @@
icon = 'icons/goonstation/objects/syringe.dmi'
item_state = "syringe_0"
icon_state = "0"
belt_icon = "syringe"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list()
volume = 15
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 21 KiB