mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
## About The Pull Request Thirty files changed, one's not really changed, one's actually just a copy of a change from a different pr, because for the sake of pipe cleaners I decided to change the base turf. Probably wasn't a good idea. This one contains the full set of `/turf/` `attackby()`s(besides those meant for attacks), converted all at once because the tree of turf subtypes looks a lot more like a spire than a bush. Changes beyond conversion: I added messaging for when you're crowbarring transit tube pods out of the tubes because I genuinely wasted half an hour trying to figure out what I'd done wrong in conversion because they don't look any different so I thought it wasn't working. If you're reinforcing plating and the plating is reinforced mid-reinforcement you will no longer waste your plasteel reinforcing the reinforced plating. ## Why It's Good For The Game what are we at, ~120? I was expecting this to be a lot more drawn out, but most of them are really small. I'm gonna have to do a final pass of calls to `attackby()` once the dust settles, but the end of non-attack `attackby()`s is just a week away.
143 lines
5.1 KiB
Plaintext
143 lines
5.1 KiB
Plaintext
// Base chasm, defaults to oblivion but can be overridden
|
|
/turf/open/chasm
|
|
name = "chasm"
|
|
desc = "Watch your step."
|
|
baseturfs = /turf/open/chasm
|
|
icon = 'icons/turf/floors/chasms.dmi'
|
|
icon_state = "chasms-255"
|
|
base_icon_state = "chasms"
|
|
smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER
|
|
smoothing_groups = SMOOTH_GROUP_TURF_OPEN + SMOOTH_GROUP_TURF_CHASM
|
|
canSmoothWith = SMOOTH_GROUP_TURF_CHASM
|
|
turf_flags = NO_RUST
|
|
density = TRUE //This will prevent hostile mobs from pathing into chasms, while the canpass override will still let it function like an open turf
|
|
bullet_bounce_sound = null //abandon all hope ye who enter
|
|
rust_resistance = RUST_RESISTANCE_ABSOLUTE
|
|
|
|
/turf/open/chasm/Initialize(mapload)
|
|
. = ..()
|
|
apply_components(mapload)
|
|
|
|
/// Lets people walk into chasms.
|
|
/turf/open/chasm/CanAllowThrough(atom/movable/mover, border_dir)
|
|
. = ..()
|
|
return TRUE
|
|
|
|
/turf/open/chasm/proc/set_target(turf/target)
|
|
var/datum/component/chasm/chasm_component = GetComponent(/datum/component/chasm)
|
|
chasm_component.target_turf = target
|
|
|
|
/turf/open/chasm/proc/drop(atom/movable/AM)
|
|
var/datum/component/chasm/chasm_component = GetComponent(/datum/component/chasm)
|
|
chasm_component.drop(AM)
|
|
|
|
/turf/open/chasm/MakeSlippery(wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
|
|
return
|
|
|
|
/turf/open/chasm/MakeDry()
|
|
return
|
|
|
|
/turf/open/chasm/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
|
if(the_rcd.mode == RCD_TURF && the_rcd.rcd_design_path == /turf/open/floor/plating/rcd)
|
|
return list("delay" = 0, "cost" = 3)
|
|
return FALSE
|
|
|
|
/turf/open/chasm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, list/rcd_data)
|
|
if(rcd_data[RCD_DESIGN_MODE] == RCD_TURF && rcd_data[RCD_DESIGN_PATH] == /turf/open/floor/plating/rcd)
|
|
place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
|
|
|
|
/turf/open/chasm/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
|
underlay_appearance.icon = /turf/open/misc/asteroid/basalt::icon
|
|
underlay_appearance.icon_state = /turf/open/misc/asteroid/basalt::icon_state
|
|
return TRUE
|
|
|
|
/turf/open/chasm/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
|
. = ..()
|
|
if(ITEM_INTERACT_ANY_BLOCKER & .)
|
|
return .
|
|
|
|
if(istype(tool, /obj/item/stack/rods))
|
|
build_with_rods(tool, user)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
if(ismetaltile(tool))
|
|
build_with_floor_tiles(tool, user)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
|
|
/// Handles adding the chasm component to the turf (So stuff falls into it!)
|
|
/turf/open/chasm/proc/apply_components(mapload)
|
|
AddComponent(/datum/component/chasm, GET_TURF_BELOW(src), mapload)
|
|
|
|
/turf/open/chasm/can_cross_safely(atom/movable/crossing)
|
|
return HAS_TRAIT(src, TRAIT_CHASM_STOPPED) || HAS_TRAIT(crossing, TRAIT_MOVE_FLYING)
|
|
|
|
// Chasms for Lavaland, with planetary atmos and lava glow
|
|
/turf/open/chasm/lavaland
|
|
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
|
planetary_atmos = TRUE
|
|
baseturfs = /turf/open/chasm/lavaland
|
|
light_range = 1.9 //slightly less range than lava
|
|
light_power = 0.65 //less bright, too
|
|
light_color = LIGHT_COLOR_LAVA //let's just say you're falling into lava, that makes sense right
|
|
|
|
// Chasms for Ice moon, with planetary atmos and glow
|
|
/turf/open/chasm/icemoon
|
|
icon = 'icons/turf/floors/icechasms.dmi'
|
|
icon_state = "icechasms-255"
|
|
base_icon_state = "icechasms"
|
|
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
|
planetary_atmos = TRUE
|
|
baseturfs = /turf/open/chasm/icemoon
|
|
light_range = 1.9
|
|
light_power = 0.65
|
|
light_color = LIGHT_COLOR_PURPLE
|
|
|
|
/turf/open/chasm/icemoon/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
|
underlay_appearance.icon = /turf/open/misc/asteroid/snow/icemoon::icon
|
|
underlay_appearance.icon_state = /turf/open/misc/asteroid/snow/icemoon::icon_state
|
|
return TRUE
|
|
|
|
// Chasms for the jungle, with planetary atmos and a different icon
|
|
/turf/open/chasm/jungle
|
|
icon = 'icons/turf/floors/junglechasm.dmi'
|
|
icon_state = "junglechasm-255"
|
|
base_icon_state = "junglechasm"
|
|
planetary_atmos = TRUE
|
|
baseturfs = /turf/open/chasm/jungle
|
|
|
|
/turf/open/chasm/jungle/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
|
underlay_appearance.icon = /turf/open/misc/dirt::icon
|
|
underlay_appearance.icon_state = /turf/open/misc/dirt::icon_state
|
|
return TRUE
|
|
|
|
// Chasm that doesn't do any z-level nonsense and just kills/stores whoever steps into it.
|
|
/turf/open/chasm/true
|
|
desc = "There's nothing at the bottom. Absolutely nothing."
|
|
baseturfs = /turf/open/chasm/true
|
|
|
|
/turf/open/chasm/true/apply_components(mapload)
|
|
AddComponent(/datum/component/chasm, null, mapload) //Don't pass anything for below_turf.
|
|
|
|
/turf/open/chasm/true/no_smooth
|
|
smoothing_flags = NONE
|
|
|
|
/turf/open/chasm/true/no_smooth/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
|
return FALSE
|
|
|
|
/turf/open/chasm/true/no_smooth/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, list/rcd_data)
|
|
return FALSE
|
|
|
|
/turf/open/chasm/true/no_smooth/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
|
if(istype(tool, /obj/item/stack/rods))
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
if(ismetaltile(tool))
|
|
return ITEM_INTERACT_BLOCKING
|
|
|
|
return ..()
|