mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
* Implements Cardinal Smoothing Support, Misc Smoothing Cleanup (#84402) ## About The Pull Request [Implements a new cardinal only bitmask smoothing mode](https://github.com/tgstation/tgstation/commit/d56556491813657e5ba794ec856649f01291c39a) The icon cutter supports generating cardinal only dmis, we should support using them. This is fairly trivial, just involves skipping a step to handle diagonals. While I'm here, makes adding new smoothing modes easier by creating a "using smoothing" group define [Removes undef for smoothing junctions](https://github.com/tgstation/tgstation/pull/84402/commits/4c0a4d6e34f79769ab20c989620f396f4b4a3fe0) It is useful to be able to reference these in the general codebase, they should not be considered scoped to just icon smoothing [Fixes a copypasta issue breaking burn states for asteroid snow](https://github.com/tgstation/tgstation/commit/a41b31dbe21676aa95cb6a625d8f4deb3233faba) [Removes SMOOTH_BROKEN_TURF and SMOOTH_BURNT_TURF](https://github.com/tgstation/tgstation/commit/8a9a340728680b2988abd19631495e955de9ebf1) Bitflags should not be this specific, this should be a var on /turf/open, so that's what I'm making it. ## Why It's Good For The Game Upstreams a bit of wallening work, cleans up the codebase some ## Changelog 🆑 fix: Some varieties of snow now visually melt properly again when burned /🆑 * Implements Cardinal Smoothing Support, Misc Smoothing Cleanup --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
/turf/open/misc/grass
|
|
name = "grass"
|
|
desc = "A patch of grass."
|
|
icon = 'icons/turf/floors.dmi'
|
|
icon_state = "grass"
|
|
base_icon_state = "grass"
|
|
baseturfs = /turf/open/misc/sandy_dirt
|
|
bullet_bounce_sound = null
|
|
footstep = FOOTSTEP_GRASS
|
|
barefootstep = FOOTSTEP_GRASS
|
|
clawfootstep = FOOTSTEP_GRASS
|
|
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_FLOOR_GRASS
|
|
canSmoothWith = SMOOTH_GROUP_FLOOR_GRASS + SMOOTH_GROUP_CLOSED_TURFS
|
|
smooth_broken = TRUE
|
|
smooth_burnt = TRUE
|
|
layer = HIGH_TURF_LAYER
|
|
rust_resistance = RUST_RESISTANCE_ORGANIC
|
|
damaged_dmi = 'icons/turf/floors/grass_damaged.dmi'
|
|
/// The icon used for smoothing.
|
|
var/smooth_icon = 'icons/turf/floors/grass.dmi'
|
|
/// The base icon_state for the broken state.
|
|
var/base_broken_icon_state = "grass_damaged"
|
|
/// The base icon_state for the burnt state.
|
|
var/base_burnt_icon_state = "grass_damaged"
|
|
|
|
/turf/open/misc/grass/broken_states()
|
|
if (!smoothing_junction || !smooth_broken)
|
|
return list("[base_broken_icon_state]-255")
|
|
|
|
return list("[base_broken_icon_state]-[smoothing_junction]")
|
|
|
|
/turf/open/misc/grass/burnt_states()
|
|
if (!smoothing_junction || !smooth_burnt)
|
|
return list("[base_burnt_icon_state]-255")
|
|
|
|
return list("[base_burnt_icon_state]-[smoothing_junction]")
|
|
|
|
/turf/open/misc/grass/Initialize(mapload)
|
|
. = ..()
|
|
if(smoothing_flags)
|
|
var/matrix/translation = new
|
|
translation.Translate(LARGE_TURF_SMOOTHING_X_OFFSET, LARGE_TURF_SMOOTHING_Y_OFFSET)
|
|
transform = translation
|
|
icon = smooth_icon
|
|
|
|
if(is_station_level(z))
|
|
GLOB.station_turfs += src
|
|
|
|
|
|
/turf/open/misc/grass/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
|
. = ..()
|
|
if (!.)
|
|
return
|
|
|
|
if(!smoothing_flags)
|
|
return
|
|
|
|
underlay_appearance.transform = transform
|
|
|
|
|
|
/turf/open/misc/grass/lavaland
|
|
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|