mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
## About The Pull Request Changes supply pods to use datums instead of a massive nested list to store data and index defines as styles. Complete feature parity. ## Why It's Good For The Game this is nightmare fuel to work with  and this is a sin against nature and god   ends up as  which is ??? Using a nested list to store pod data is a very bad idea, it has horrible formatting, is unreadable without having index defines open in a second tab and is not extendable. And as you can see above, if someone added another pod type before 14th everything would break because other pod type lists **__only have 8 elements__** instead of 10 like the seethrough one does. ## Changelog 🆑 refactor: Pod code now uses datums instead of being a huge nested list /🆑
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
/datum/asset/spritesheet/supplypods
|
|
name = "supplypods"
|
|
|
|
/datum/asset/spritesheet/supplypods/create_spritesheets()
|
|
for (var/datum/pod_style/style as anything in typesof(/datum/pod_style))
|
|
if (ispath(style, /datum/pod_style/seethrough))
|
|
Insert("pod_asset[style::id]", icon('icons/obj/supplypods.dmi' , "seethrough-icon"))
|
|
continue
|
|
var/base = style::icon_state
|
|
if (!base)
|
|
Insert("pod_asset[style::id]", icon('icons/obj/supplypods.dmi', "invisible-icon"))
|
|
continue
|
|
var/icon/podIcon = icon('icons/obj/supplypods.dmi', base)
|
|
var/door = style::has_door
|
|
if (door)
|
|
door = "[base]_door"
|
|
podIcon.Blend(icon('icons/obj/supplypods.dmi', door), ICON_OVERLAY)
|
|
var/shape = style::shape
|
|
if (shape == POD_SHAPE_NORMAL)
|
|
var/decal = style::decal_icon
|
|
if (decal)
|
|
podIcon.Blend(icon('icons/obj/supplypods.dmi', decal), ICON_OVERLAY)
|
|
var/glow = style::glow_color
|
|
if (glow)
|
|
glow = "pod_glow_[glow]"
|
|
podIcon.Blend(icon('icons/obj/supplypods.dmi', glow), ICON_OVERLAY)
|
|
Insert("pod_asset[style::id]", podIcon)
|