// Base chasm, defaults to oblivion but can be overridden /turf/open/chasm name = "chasm" desc = "Watch your step." baseturfs = /turf/open/chasm smooth = SMOOTH_TRUE | SMOOTH_BORDER | SMOOTH_MORE icon = 'icons/turf/floors/chasms.dmi' icon_state = "smooth" canSmoothWith = list(/turf/open/floor/fakepit, /turf/open/chasm) 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 dirt_buildup_allowed = FALSE /turf/open/chasm/Initialize() . = ..() AddComponent(/datum/component/chasm, SSmapping.get_turf_below(src)) /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) switch(the_rcd.mode) if(RCD_FLOORWALL) return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3) return FALSE /turf/open/chasm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) switch(passed_mode) if(RCD_FLOORWALL) to_chat(user, "You build a floor.") PlaceOnTop(/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 = 'icons/turf/floors.dmi' underlay_appearance.icon_state = "basalt" return TRUE /turf/open/chasm/attackby(obj/item/C, mob/user, params, area/area_restriction) ..() if(istype(C, /obj/item/stack/rods)) var/obj/item/stack/rods/R = C var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) if(!L) if(R.use(1)) to_chat(user, "You construct a lattice.") playsound(src, 'sound/weapons/genhit.ogg', 50, 1) // Create a lattice, without reverting to our baseturf new /obj/structure/lattice(src) else to_chat(user, "You need one rod to build a lattice.") return if(istype(C, /obj/item/stack/tile/plasteel)) var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) if(L) var/obj/item/stack/tile/plasteel/S = C if(S.use(1)) qdel(L) playsound(src, 'sound/weapons/genhit.ogg', 50, 1) to_chat(user, "You build a floor.") // Create a floor, which has this chasm underneath it PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) else to_chat(user, "You need one floor tile to build a floor!") else to_chat(user, "The plating is going to need some support! Place metal rods first.") /turf/open/chasm/CanPass(atom/movable/mover, turf/target) return 1 // 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' 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 // Chasms for the jungle, with planetary atmos and a different icon /turf/open/chasm/jungle icon = 'icons/turf/floors/junglechasm.dmi' initial_gas_mix = LAVALAND_DEFAULT_ATMOS 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 = 'icons/turf/floors.dmi' underlay_appearance.icon_state = "dirt" return TRUE //For Bag of Holding Bombs /turf/open/chasm/magic name = "tear in the fabric of reality" desc = "Where does it lead?" icon = 'icons/turf/floors/magic_chasm.dmi' baseturfs = /turf/open/chasm/magic light_range = 1.9 light_power = 0.65 /turf/open/chasm/magic/Initialize() . = ..() var/turf/T = safepick(get_area_turfs(/area/fabric_of_reality)) if(T) set_target(T)