mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 03:32:00 +00:00
## About The Pull Request Adds cliffs to the game! They're tiles usable for mapping to make mountainy area's and cliffs! I don't have any sprites for them yet, so just imagine it's a cliff really hard  THESE DO NOT REPLACE MULTI-Z AND NEVER WILL! They're just a neat way to add more depth to the game. You can’t really add 10 different z’s for one mountain, so this can be used to help map area’s with depth without overusing z-levels They've been mapped into the top part of the icebox outside. There's not a good way to do sides of cliffs yet (will need some thinking), so they're mapped in such a fashion where it doesn't matter much. Later, this area above icebox can be expanded with properly done side-cliffs, something like in stardew-valley would work for our grid-system:  Longer demonstration: https://www.youtube.com/watch?v=Eig4jXNZZRQ Eventually, I'll redo mapgen and add 3x3 icebox (definitely not coping) ## Why It's Good For The Game The incredible flatness of icebox drives me insane. While multi-z is great at giving it more depth, the actual terrain itself is still completely flat. Adding cliffs let's us add 'soft-mountains', which does wonders for making an area feel more alive (And I absolutely adore snowy mountains) ## Changelog 🆑 add: Adds cliffs to the north of icebox. Try not to fall of of them! /🆑 <details> <summary>Additional images (now outdated)</summary> https://github.com/tgstation/tgstation/assets/7501474/572dc749-596c-4cab-9693-43c2270aca96     </details> --------- Co-authored-by: Jacquerel <hnevard@gmail.com>
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
/// Lets a mob walk cliffs and keeps track of if they're alive or not to add/remove the trait
|
|
/datum/element/cliff_walking
|
|
|
|
/datum/element/cliff_walking/Attach(datum/target, climb_time, climb_stun)
|
|
. = ..()
|
|
|
|
if(!isliving(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
// Feel free to add more bespoke signals here if this gets implemented for more than just a few funny mobs
|
|
RegisterSignals(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_REVIVE), PROC_REF(update_cliff_walking))
|
|
|
|
update_cliff_walking(target)
|
|
|
|
/datum/element/cliff_walking/Detach(datum/source, ...)
|
|
. = ..()
|
|
|
|
UnregisterSignal(source, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_REVIVE))
|
|
|
|
/// Do some checks to see if we should walk the cliffs
|
|
/datum/element/cliff_walking/proc/update_cliff_walking(mob/living/climber)
|
|
SIGNAL_HANDLER
|
|
|
|
if(climber.stat != DEAD)
|
|
ADD_TRAIT(climber, TRAIT_CLIFF_WALKER, type)
|
|
return
|
|
|
|
REMOVE_TRAIT(climber, TRAIT_CLIFF_WALKER, type)
|
|
|
|
var/turf/open/cliff/cliff_tile = get_turf(climber)
|
|
if(!iscliffturf(cliff_tile))
|
|
return
|
|
|
|
cliff_tile.try_fall(climber)
|