diff --git a/code/__DEFINES/achievements.dm b/code/__DEFINES/achievements.dm index 60b9ed03948..e46fef9123e 100644 --- a/code/__DEFINES/achievements.dm +++ b/code/__DEFINES/achievements.dm @@ -55,6 +55,7 @@ #define MEDAL_GODS_WRATH "God's Wrath" #define MEDAL_EARTHQUAKE_VICTIM "Earthquake Victim" #define MEDAL_DEBT_EXTINGUISHED "Debt Extinguished" +#define MEDAL_SISYPHUS "Sisyphus" #define MEDAL_ARCHMAGE "Archmage" #define MEDAL_THEORETICAL_LIMITS "All Within Theoretical Limits" diff --git a/code/datums/achievements/misc_achievements.dm b/code/datums/achievements/misc_achievements.dm index e92fc3bc56b..1d7b9da3a01 100644 --- a/code/datums/achievements/misc_achievements.dm +++ b/code/datums/achievements/misc_achievements.dm @@ -227,3 +227,8 @@ database_id = MEDAL_DEBT_EXTINGUISHED icon_state = "outdebted" +/datum/award/achievement/misc/sisyphus + name = "Ordeal of Sisyphus" + desc = "Successfully carry a boulder from Lavaland all the way to Centcom, without ever dropping it. We must imagine you're happy to unlock this." + database_id = MEDAL_SISYPHUS + icon_state = "sisyphus" diff --git a/code/datums/components/sisyphus_awarder.dm b/code/datums/components/sisyphus_awarder.dm new file mode 100644 index 00000000000..36fc344c746 --- /dev/null +++ b/code/datums/components/sisyphus_awarder.dm @@ -0,0 +1,49 @@ +/** + * This component awards the sisyphus achievement if you cart a boulder from lavaland to centcom + * It's not really reusable but its a component just to encapsulate and destroy the behaviour neatly + */ +/datum/component/sisyphus_awarder + /// What poor sap is hauling this rock? + var/mob/living/sisyphus + +/datum/component/sisyphus_awarder/Initialize() + if (!istype(parent, /obj/item/boulder)) + return COMPONENT_INCOMPATIBLE + +/datum/component/sisyphus_awarder/RegisterWithParent() + RegisterSignal(parent, COMSIG_ITEM_POST_EQUIPPED, PROC_REF(on_picked_up)) + +/datum/component/sisyphus_awarder/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_ITEM_POST_EQUIPPED, COMSIG_MOVABLE_MOVED)) + if (!isnull(sisyphus)) + UnregisterSignal(sisyphus, list(COMSIG_ENTER_AREA, COMSIG_QDELETING)) + sisyphus = null + +/// Called when we're picked up, check if we're in the right place to start our epic journey +/datum/component/sisyphus_awarder/proc/on_picked_up(atom/source, mob/living/the_taker) + SIGNAL_HANDLER + if (!istype(get_area(the_taker), /area/lavaland)) + qdel(src) + return + UnregisterSignal(parent, COMSIG_ITEM_POST_EQUIPPED) + RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_dropped)) + RegisterSignal(the_taker, COMSIG_ENTER_AREA, PROC_REF(on_bearer_changed_area)) + RegisterSignal(the_taker, COMSIG_QDELETING, PROC_REF(on_dropped)) + sisyphus = the_taker + +/// If you ever drop this shit you fail the challenge +/datum/component/sisyphus_awarder/proc/on_dropped() + SIGNAL_HANDLER + qdel(src) // Your quest ends here + +/// If we changed area see if we arrived +/datum/component/sisyphus_awarder/proc/on_bearer_changed_area(mob/living/chosen_one, area/entered_area) + SIGNAL_HANDLER + var/atom/atom_parent = parent + if (atom_parent.loc != chosen_one) + qdel(src) // Hey! How did you do that? + return + if (entered_area.type != /area/centcom/central_command_areas/evacuation) + return // Don't istype because taking pods doesn't count + chosen_one.client?.give_award(/datum/award/achievement/misc/sisyphus, chosen_one) + qdel(src) diff --git a/code/modules/mining/boulder_processing/boulder.dm b/code/modules/mining/boulder_processing/boulder.dm index 796e382b21a..555ea50dff3 100644 --- a/code/modules/mining/boulder_processing/boulder.dm +++ b/code/modules/mining/boulder_processing/boulder.dm @@ -8,9 +8,10 @@ desc = "This rocks." icon_state = "ore" icon = 'icons/obj/ore.dmi' - item_flags = NO_MAT_REDEMPTION + item_flags = NO_MAT_REDEMPTION | SLOWS_WHILE_IN_HAND throw_range = 2 throw_speed = 0.5 + slowdown = 1.5 drag_slowdown = 1.5 // It's still a big rock. ///When a refinery machine is working on this boulder, we'll set this. Re reset when the process is finished, but the boulder may still be refined/operated on further. @@ -26,6 +27,7 @@ . = ..() register_context() AddComponent(/datum/component/two_handed, require_twohands = TRUE, force_unwielded = 0, force_wielded = 5) //Heavy as all hell, it's a boulder, dude. + AddComponent(/datum/component/sisyphus_awarder) /obj/item/boulder/Destroy(force) SSore_generation.available_boulders -= src diff --git a/icons/ui_icons/achievements/achievements.dmi b/icons/ui_icons/achievements/achievements.dmi index ff62bd7e374..143d0dc0a03 100644 Binary files a/icons/ui_icons/achievements/achievements.dmi and b/icons/ui_icons/achievements/achievements.dmi differ diff --git a/tgstation.dme b/tgstation.dme index a0c82a3c54a..b8fce0fde7c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1184,6 +1184,7 @@ #include "code\datums\components\simple_access.dm" #include "code\datums\components\simple_bodycam.dm" #include "code\datums\components\singularity.dm" +#include "code\datums\components\sisyphus_awarder.dm" #include "code\datums\components\sitcomlaughter.dm" #include "code\datums\components\sizzle.dm" #include "code\datums\components\slippery.dm"