Datumizes pod types (#85033)

## 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

![image](https://github.com/user-attachments/assets/851ea009-508b-4958-996e-d46a758b2f62)

and this is a sin against nature and god

![image](https://github.com/user-attachments/assets/6b0cd374-1305-4fe6-9ab6-4912c9cb4461)

![image](https://github.com/user-attachments/assets/88c83f60-af9d-4ea9-af5f-c0810a6d9c66)
ends up as

![image](https://github.com/user-attachments/assets/2cb9e264-895d-49b9-b228-e04ac1353ba1)
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
/🆑
This commit is contained in:
SmArtKar
2024-07-21 21:52:21 +01:00
committed by GitHub
parent 185ec16472
commit 2c0f5d181a
30 changed files with 247 additions and 158 deletions
+11 -11
View File
@@ -2,26 +2,26 @@
name = "supplypods"
/datum/asset/spritesheet/supplypods/create_spritesheets()
for (var/style in 1 to length(GLOB.podstyles))
if (style == STYLE_SEETHROUGH)
Insert("pod_asset[style]", icon('icons/obj/supplypods.dmi' , "seethrough-icon"))
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 = GLOB.podstyles[style][POD_BASE]
var/base = style::icon_state
if (!base)
Insert("pod_asset[style]", icon('icons/obj/supplypods.dmi', "invisible-icon"))
Insert("pod_asset[style::id]", icon('icons/obj/supplypods.dmi', "invisible-icon"))
continue
var/icon/podIcon = icon('icons/obj/supplypods.dmi', base)
var/door = GLOB.podstyles[style][POD_DOOR]
var/door = style::has_door
if (door)
door = "[base]_door"
podIcon.Blend(icon('icons/obj/supplypods.dmi', door), ICON_OVERLAY)
var/shape = GLOB.podstyles[style][POD_SHAPE]
if (shape == POD_SHAPE_NORML)
var/decal = GLOB.podstyles[style][POD_DECAL]
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 = GLOB.podstyles[style][POD_GLOW]
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]", podIcon)
Insert("pod_asset[style::id]", podIcon)