mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 11:32:20 +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>
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
#define SUPPLY_POD_QUICK_DAMAGE 40
|
|
#define SUPPLY_POD_QUICK_FIRE_RANGE 2
|
|
|
|
/// Quickly throws a supply pod at the target, optionally with an item
|
|
/datum/smite/supply_pod_quick
|
|
name = "Supply Pod (Quick)"
|
|
|
|
/// What is sent down with the pod
|
|
var/target_path
|
|
|
|
/datum/smite/supply_pod_quick/configure(client/user)
|
|
var/attempted_target_path = input(
|
|
user,
|
|
"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):",
|
|
"Typepath",
|
|
"/obj/item/food/grown/harebell",
|
|
) as null|text
|
|
|
|
if (isnull(attempted_target_path)) //The user pressed "Cancel"
|
|
return FALSE
|
|
|
|
if (attempted_target_path == "empty")
|
|
target_path = null
|
|
return
|
|
|
|
// if you didn't type empty, we want to load the pod with a delivery
|
|
var/delivery = text2path(attempted_target_path)
|
|
if(!ispath(delivery))
|
|
delivery = pick_closest_path(attempted_target_path)
|
|
if(!delivery)
|
|
tgui_alert(user, "ERROR: Incorrect / improper path given.")
|
|
return FALSE
|
|
target_path = delivery
|
|
|
|
/datum/smite/supply_pod_quick/effect(client/user, mob/living/target)
|
|
. = ..()
|
|
podspawn(list(
|
|
"target" = get_turf(target),
|
|
"path" = /obj/structure/closet/supplypod/centcompod,
|
|
"style" = /datum/pod_style/centcom,
|
|
"spawn" = target_path,
|
|
"damage" = SUPPLY_POD_QUICK_DAMAGE,
|
|
"explosionSize" = list(0, 0, 0, SUPPLY_POD_QUICK_FIRE_RANGE),
|
|
"effectStun" = TRUE
|
|
))
|
|
|
|
#undef SUPPLY_POD_QUICK_DAMAGE
|
|
#undef SUPPLY_POD_QUICK_FIRE_RANGE
|