Files
Bubberstation/code/game/objects/items/trash.dm
FalloutFalcon d2f34e33be moves abstract_type up to datum, spawners wont spawn them (#92909)
## About The Pull Request
moves all implementations (im aware of) for "Im a parent type dont spawn
me please" to the datum layer to standardized behavior
adds a standerized proc for filtering out "bad" items that we dont want
spawning. applies to it the subtype vendor, gifts, and a new spawner and
mystery box for a random gun (neither playerfacing)
"port" of https://github.com/shiptest-ss13/Shiptest/pull/4621



https://github.com/user-attachments/assets/22f6f0b2-b44e-411a-b3dc-6b97dc0287aa

small warning: I dont have EVERY abstract type defined right now but,
ive done a good enough job for now. Im tired of data entry rn
## Why It's Good For The Game
standardizing behavior. Might be a micro hit to performance however

having this lets us not rely on icon state to determine whether
something is a parent type and makes it much easier to tell something is
a parent type (could be applied further to things like admin spawning
menus and things like that).

need feedback on if this is actually good for the game.
## Changelog
🆑
add: Soda cans show up in the silver slime drink table.
add: Examine tag for items that are not mean to show up ingame.
refactor: Standardizes how gifts rule out abstract types.
fix: gifts no longer check if something has an inhand, massively
expanding the list of potential items.
/🆑
2025-09-13 00:36:15 +02:00

243 lines
6.2 KiB
Plaintext

//Added by Jack Rost
/obj/item/trash
icon = 'icons/obj/service/janitor.dmi'
lefthand_file = 'icons/mob/inhands/items/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/food_righthand.dmi'
abstract_type = /obj/item/trash
desc = "This is rubbish."
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
item_flags = NOBLUDGEON|SKIP_FANTASY_ON_SPAWN
custom_materials = list(/datum/material/plastic=SMALL_MATERIAL_AMOUNT*2)
/obj/item/trash/Initialize(mapload)
var/turf/T = get_turf(src)
if(T && is_station_level(T.z))
SSblackbox.record_feedback("tally", "station_mess_created", 1, name)
return ..()
/obj/item/trash/Destroy()
var/turf/T = get_turf(src)
if(T && is_station_level(T.z))
SSblackbox.record_feedback("tally", "station_mess_destroyed", 1, name)
return ..()
/obj/item/trash/raisins
name = "\improper 4no raisins"
icon_state= "4no_raisins"
custom_materials = list(/datum/material/cardboard=SMALL_MATERIAL_AMOUNT*2)
/obj/item/trash/candy
name = "candy"
icon_state= "candy"
/obj/item/trash/cheesie
name = "cheesie honkers"
icon_state = "cheesie_honkers"
/obj/item/trash/chips
name = "chips"
icon_state = "chips"
/obj/item/trash/shrimp_chips
name = "shrimp chips"
icon_state = "shrimp_chips"
/obj/item/trash/boritos
name = "boritos bag"
icon_state = "boritos"
grind_results = list(/datum/reagent/aluminium = 1) //from the mylar bag
/obj/item/trash/boritos/green
icon_state = "boritosgreen"
/obj/item/trash/boritos/red
icon_state = "boritosred"
/obj/item/trash/boritos/purple
icon_state = "boritospurple"
/obj/item/trash/popcorn
name = "popcorn"
icon_state = "popcorn"
custom_materials = list(/datum/material/cardboard=SMALL_MATERIAL_AMOUNT*2)
/obj/item/trash/popcorn/caramel
name = "empty caramel popcorn"
desc = "Now it's not a sweet snack, but just a sticky bag..."
icon_state = "empty_caramel_popcorn"
/obj/item/trash/popcorn/salty
name = "empty salty popcorn"
desc = "It looks like there are only a few grains of salt left at the bottom of the bag..."
icon_state = "empty_salty_popcorn"
/obj/item/trash/sosjerky
name = "\improper Scaredy's Private Reserve Beef Jerky"
icon_state = "sosjerky"
/obj/item/trash/syndi_cakes
name = "syndi-cakes"
icon_state = "syndi_cakes"
custom_materials = list(/datum/material/cardboard=SMALL_MATERIAL_AMOUNT*2)
/obj/item/trash/energybar
name = "energybar wrapper"
icon_state = "energybar"
/obj/item/trash/fleet_ration
name = "surplus fleet wrapper"
desc = "In the Mothic Fleet every individual wrapper is carefully recycled and repurposed into fresh material. Over here they are more commonly dropped directly onto the floor."
icon_state = "moth_ration"
custom_materials = list(/datum/material/cardboard=SMALL_MATERIAL_AMOUNT*2)
/obj/item/trash/pistachios
name = "pistachios pack"
icon_state = "pistachios_pack"
/obj/item/trash/semki
name = "semki pack"
icon_state = "semki_pack"
/obj/item/trash/semki/healthy
name = "nibbled sunflower seeds"
icon_state = "sunseeds"
custom_materials = null
/obj/item/trash/tray
name = "tray"
icon_state = "tray"
resistance_flags = NONE
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*4)
/obj/item/trash/candle
name = "melted candle"
icon = 'icons/obj/candle.dmi'
icon_state = "candle4"
custom_materials = null
/obj/item/trash/candle/Initialize(mapload)
. = ..()
AddElement(/datum/element/floor_placeable)
/obj/item/trash/flare
name = "burnt flare"
icon = 'icons/obj/lighting.dmi'
icon_state = "flare-empty"
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*2,/datum/material/glass=SMALL_MATERIAL_AMOUNT,)
/obj/item/trash/can
name = "crushed can"
icon_state = "cola"
resistance_flags = NONE
grind_results = list(/datum/reagent/aluminium = 10)
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*2)
/obj/item/trash/can/food
icon = 'icons/obj/food/canned.dmi'
icon_state = "peachcan_empty"
/obj/item/trash/can/food/peaches
name = "canned peaches"
icon_state = "peachcan_empty"
/obj/item/trash/can/food/peaches/maint
name = "Maintenance Peaches"
icon_state = "peachcanmaint_empty"
/obj/item/trash/can/food/beans
name = "tin of beans"
icon_state = "beans_empty"
/obj/item/trash/can/Initialize(mapload)
. = ..()
pixel_x = rand(-4,4)
pixel_y = rand(-4,4)
/obj/item/trash/peanuts
name = "\improper Gallery peanuts packet"
desc = "This thread is trash!"
icon_state = "peanuts"
/obj/item/trash/cnds
name = "\improper C&Ds packet"
icon_state = "cnds"
/obj/item/trash/can/food/envirochow
name = "dog eat dog envirochow"
icon_state = "envirochow_empty"
/obj/item/trash/can/food/tomatoes
name = "canned San Marzano tomatoes"
icon_state = "tomatoescan_empty"
/obj/item/trash/can/food/pine_nuts
name = "canned pine nuts"
icon_state = "pinenutscan_empty"
/obj/item/trash/can/food/jellyfish
name = "canned gunner jellyfish"
icon_state = "jellyfish_empty"
/obj/item/trash/can/food/desert_snails
name = "canned desert snails"
icon_state = "snails_empty"
/obj/item/trash/can/food/larvae
name = "canned bee larva"
icon_state = "larvae_empty"
/obj/item/trash/spacers_sidekick
name = "\improper Spacer's Sidekick packet"
icon_state = "spacers_sidekick"
/obj/item/trash/ready_donk
name = "empty Ready-donk"
desc = "It's been Donk-decimated."
icon_state = "ready_donk"
/obj/item/trash/can/food/squid_ink
name = "canned squid ink"
icon_state = "squidinkcan_empty"
/obj/item/trash/can/food/chap
name = "can of CHAP"
icon_state = "chapcan_empty"
/obj/item/trash/hot_shots
name = "\improper Hot Shots box"
icon_state = "hot_shots"
/obj/item/trash/sticko
name = "\improper Sticko box"
icon_state = "sticko"
custom_materials = list(/datum/material/cardboard=SMALL_MATERIAL_AMOUNT*2)
/obj/item/trash/sticko/matcha
icon_state = "sticko_matcha"
/obj/item/trash/sticko/nutty
icon_state = "sticko_nutty"
/obj/item/trash/sticko/pineapple
icon_state = "sticko_pineapple"
/obj/item/trash/sticko/yuyake
icon_state = "sticko_yuyake"
/obj/item/trash/shok_roks
name = "\improper Shok-Roks packet"
icon_state = "shok_roks"
/obj/item/trash/shok_roks/citrus
icon_state = "shok_roks_citrus"
/obj/item/trash/shok_roks/berry
icon_state = "shok_roks_berry"
/obj/item/trash/shok_roks/tropical
icon_state = "shok_roks_tropical"
/obj/item/trash/shok_roks/lanternfruit
icon_state = "shok_roks_lanternfruit"