mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-24 08:31:54 +00:00
* 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  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 /🆑 * Datumizes pod types * [MIRROR] Datumizes pod types [MDB IGNORE] (#3917) * 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  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 /🆑 * Datumizes pod types * modular updates --------- Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: NovaBot13 <novasector13@gmail.com> Co-authored-by: Fluffles <piecopresident@gmail.com> --------- Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: NovaBot13 <novasector13@gmail.com> Co-authored-by: Fluffles <piecopresident@gmail.com> Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
18 lines
537 B
Plaintext
18 lines
537 B
Plaintext
GLOBAL_LIST_INIT(discountable_packs, init_discountable_packs())
|
|
|
|
/proc/init_discountable_packs()
|
|
var/list/packs = list()
|
|
for(var/datum/supply_pack/prototype as anything in subtypesof(/datum/supply_pack))
|
|
var/discountable = initial(prototype.discountable)
|
|
if(discountable)
|
|
LAZYADD(packs[discountable], prototype)
|
|
return packs
|
|
|
|
GLOBAL_LIST_INIT(pack_discount_odds, list(
|
|
SUPPLY_PACK_STD_DISCOUNTABLE = 45,
|
|
SUPPLY_PACK_UNCOMMON_DISCOUNTABLE = 4,
|
|
SUPPLY_PACK_RARE_DISCOUNTABLE = 1,
|
|
))
|
|
|
|
GLOBAL_LIST_EMPTY(supplypod_loading_bays)
|