mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 07:46:20 +00:00
It was removed in https://github.com/tgstation/tgstation/pull/27799 because the spear was broken and the Flans' AI sucked with not-great sprites and was all just one big reference. Original addition: https://github.com/tgstation/tgstation/pull/22270 This re-adds it, updates the map (now using airless turfs) with extra ambiance, using ash whelps (lavaland variation of ice whelps) instead of Flans, re-adds the spear, and adds armor as well this time around. The spear gives you a jump ability to crash down upon a player below you, rather than teleporting to wherever you throw the spear at. You can't attack while mid-air, you can go through tables but not walls/doors, and you also can't un-dualwield or drop the spear mid-jump. Landing on a mob deals double damage to them (36 to unarmored people), while landing on objects deals 150 damage to them (taken from savannah's jump ability, which was in turn taken from hulk's punching) It's also got some extra throw force (24 compared to default spear's 20) The armor has basic security-level armor but covers your whole body. Does not include space protection, and can be worn by Ian. Video demonstration https://github.com/user-attachments/assets/a77c3a0d-17d2-4e8d-88b6-cdbca8b1f2c3 New sprites demonstration https://github.com/user-attachments/assets/0e465351-5484-406f-8adc-ffa1ac180daf Armor demonstration https://github.com/user-attachments/assets/abdfcac6-65bf-443c-bde2-27d157ee3a80 Map  With the changes in https://github.com/tgstation/tgstation/pull/90771 I had to mess with ash whelp abilities a bit, I decided to make them use cold fire instead of hardcoding blue color on top of the fire sprites, and it now acts accordingly too https://github.com/user-attachments/assets/cfca0d70-d13d-4c73-996d-2d4a7519866d The jump was taken from Savannah Ivanov, and Goof's bunny jumping. This Re-implements a old spear that got removed for its buggyness/bad mapping and on the authors request as well not wanting to deal with it. Re-introduces the SkyBulge as a space ruin, referencing Dragoons from Final Fantasy. this just like any normal spear, but using the savannah jump mechanic, this allows you to close distances with the spear avoiding ranged projectiles in the jump, and if you directly land on your target you will do double the damage. 🆑 Ezel/Improvedname, Toriate, JohnFulpWillard add: Re-added the Dragoon Tomb lair, now has a Skybulge spear and Drachen armor. balance: Ice whelps now spit out cold fire. /🆑 --------- Co-authored-by: Jacquerel <hnevard@gmail.com>
147 lines
5.9 KiB
Plaintext
147 lines
5.9 KiB
Plaintext
//// COOLDOWN SYSTEMS
|
|
/*
|
|
* We have 2 cooldown systems: timer cooldowns (divided between stoppable and regular) and world.time cooldowns.
|
|
*
|
|
* When to use each?
|
|
*
|
|
* * Adding a commonly-checked cooldown, like on a subsystem to check for processing
|
|
* * * Use the world.time ones, as they are cheaper.
|
|
*
|
|
* * Adding a rarely-used one for special situations, such as giving an uncommon item a cooldown on a target.
|
|
* * * Timer cooldown, as adding a new variable on each mob to track the cooldown of said uncommon item is going too far.
|
|
*
|
|
* * Triggering events at the end of a cooldown.
|
|
* * * Timer cooldown, registering to its signal.
|
|
*
|
|
* * Being able to check how long left for the cooldown to end.
|
|
* * * Either world.time or stoppable timer cooldowns, depending on the other factors. Regular timer cooldowns do not support this.
|
|
*
|
|
* * Being able to stop the timer before it ends.
|
|
* * * Either world.time or stoppable timer cooldowns, depending on the other factors. Regular timer cooldowns do not support this.
|
|
*/
|
|
|
|
|
|
/*
|
|
* Cooldown system based on an datum-level associative lazylist using timers.
|
|
*/
|
|
|
|
//INDEXES
|
|
#define COOLDOWN_BORG_SELF_REPAIR "borg_self_repair"
|
|
#define COOLDOWN_EXPRESSPOD_CONSOLE "expresspod_console"
|
|
|
|
//Mecha cooldowns
|
|
#define COOLDOWN_MECHA_MESSAGE "mecha_message"
|
|
#define COOLDOWN_MECHA_EQUIPMENT(type) ("mecha_equip_[type]")
|
|
#define COOLDOWN_MECHA_MELEE_ATTACK "mecha_melee"
|
|
#define COOLDOWN_MECHA_SMOKE "mecha_smoke"
|
|
#define COOLDOWN_MECHA_SKYFALL "mecha_skyfall"
|
|
#define COOLDOWN_MECHA_MISSILE_STRIKE "mecha_missile_strike"
|
|
#define COOLDOWN_MECHA_CABIN_SEAL "mecha_cabin_seal"
|
|
|
|
//skybulge cooldown
|
|
#define COOLDOWN_SKYBULGE_JUMP "skybulge_jump"
|
|
|
|
//car cooldowns
|
|
#define COOLDOWN_CAR_HONK "car_honk"
|
|
|
|
//clown car cooldowns
|
|
#define COOLDOWN_CLOWNCAR_RANDOMNESS "clown_car_randomness"
|
|
|
|
// item cooldowns
|
|
#define COOLDOWN_SIGNALLER_SEND "cooldown_signaller_send"
|
|
#define COOLDOWN_TOOL_SOUND "cooldown_tool_sound"
|
|
|
|
//circuit cooldowns
|
|
#define COOLDOWN_CIRCUIT_SOUNDEMITTER "circuit_soundemitter"
|
|
#define COOLDOWN_CIRCUIT_SPEECH "circuit_speech"
|
|
#define COOLDOWN_CIRCUIT_PATHFIND_SAME "circuit_pathfind_same"
|
|
#define COOLDOWN_CIRCUIT_PATHFIND_DIF "circuit_pathfind_different"
|
|
#define COOLDOWN_CIRCUIT_TARGET_INTERCEPT "circuit_target_intercept"
|
|
#define COOLDOWN_CIRCUIT_VIEW_SENSOR "circuit_view_sensor"
|
|
|
|
// mob cooldowns
|
|
#define COOLDOWN_YAWN_PROPAGATION "yawn_propagation_cooldown"
|
|
|
|
//Shared cooldowns for actions
|
|
#define MOB_SHARED_COOLDOWN_1 (1<<0)
|
|
#define MOB_SHARED_COOLDOWN_2 (1<<1)
|
|
#define MOB_SHARED_COOLDOWN_3 (1<<2)
|
|
#define MOB_SHARED_COOLDOWN_BOT_ANNOUNCMENT (1<<3)
|
|
|
|
//TIMER COOLDOWN MACROS
|
|
|
|
#define COMSIG_CD_STOP(cd_index) "cooldown_[cd_index]"
|
|
#define COMSIG_CD_RESET(cd_index) "cd_reset_[cd_index]"
|
|
|
|
#define TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(end_cooldown), cd_source, cd_index), cd_time))
|
|
|
|
/// Checks if a timer based cooldown is NOT finished.
|
|
#define TIMER_COOLDOWN_RUNNING(cd_source, cd_index) LAZYACCESS(cd_source.cooldowns, cd_index)
|
|
|
|
/// Checks if a timer based cooldown is finished.
|
|
#define TIMER_COOLDOWN_FINISHED(cd_source, cd_index) (!TIMER_COOLDOWN_RUNNING(cd_source, cd_index))
|
|
|
|
#define TIMER_COOLDOWN_END(cd_source, cd_index) LAZYREMOVE(cd_source.cooldowns, cd_index)
|
|
|
|
/*
|
|
* Stoppable timer cooldowns.
|
|
* Use indexes the same as the regular tiemr cooldowns.
|
|
* They make use of the TIMER_COOLDOWN_RUNNING() and TIMER_COOLDOWN_END() macros the same, just not the TIMER_COOLDOWN_START() one.
|
|
* A bit more expensive than the regular timers, but can be reset before they end and the time left can be checked.
|
|
*/
|
|
|
|
#define S_TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(end_cooldown), cd_source, cd_index), cd_time, TIMER_STOPPABLE))
|
|
|
|
#define S_TIMER_COOLDOWN_RESET(cd_source, cd_index) reset_cooldown(cd_source, cd_index)
|
|
|
|
#define S_TIMER_COOLDOWN_TIMELEFT(cd_source, cd_index) (timeleft(TIMER_COOLDOWN_RUNNING(cd_source, cd_index)))
|
|
|
|
|
|
/*
|
|
* Cooldown system based on storing world.time on a variable, plus the cooldown time.
|
|
* Better performance over timer cooldowns, lower control. Same functionality.
|
|
*/
|
|
|
|
#define COOLDOWN_DECLARE(cd_index) var/##cd_index = 0
|
|
|
|
#define STATIC_COOLDOWN_DECLARE(cd_index) var/static/##cd_index = 0
|
|
|
|
#define COOLDOWN_START(cd_source, cd_index, cd_time) (cd_source.cd_index = world.time + (cd_time))
|
|
|
|
//Returns true if the cooldown has run its course, false otherwise
|
|
#define COOLDOWN_FINISHED(cd_source, cd_index) (cd_source.cd_index <= world.time)
|
|
|
|
#define COOLDOWN_RESET(cd_source, cd_index) cd_source.cd_index = 0
|
|
|
|
#define COOLDOWN_STARTED(cd_source, cd_index) (cd_source.cd_index != 0)
|
|
|
|
#define COOLDOWN_TIMELEFT(cd_source, cd_index) (max(0, cd_source.cd_index - world.time))
|
|
|
|
///adds to existing cooldown timer if its started, otherwise starts anew
|
|
#define COOLDOWN_INCREMENT(cd_source, cd_index, cd_increment) \
|
|
if(COOLDOWN_FINISHED(cd_source, cd_index)) { \
|
|
COOLDOWN_START(cd_source, cd_index, cd_increment); \
|
|
return; \
|
|
} \
|
|
cd_source.cd_index += (cd_increment); \
|
|
|
|
/*
|
|
* Same as the above cooldown system, but uses REALTIMEOFDAY
|
|
* Primarily only used for times that need to be tracked with the client, such as sound or animations
|
|
*/
|
|
|
|
#define CLIENT_COOLDOWN_DECLARE(cd_index) var/##cd_index = 0
|
|
|
|
#define CLIENT_STATIC_COOLDOWN_DECLARE(cd_index) var/static/##cd_index = 0
|
|
|
|
#define CLIENT_COOLDOWN_START(cd_source, cd_index, cd_time) (cd_source.cd_index = REALTIMEOFDAY + (cd_time))
|
|
|
|
//Returns true if the cooldown has run its course, false otherwise
|
|
#define CLIENT_COOLDOWN_FINISHED(cd_source, cd_index) (cd_source.cd_index <= REALTIMEOFDAY)
|
|
|
|
#define CLIENT_COOLDOWN_RESET(cd_source, cd_index) cd_source.cd_index = 0
|
|
|
|
#define CLIENT_COOLDOWN_STARTED(cd_source, cd_index) (cd_source.cd_index != 0)
|
|
|
|
#define CLIENT_COOLDOWN_TIMELEFT(cd_source, cd_index) (max(0, cd_source.cd_index - REALTIMEOFDAY))
|