mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 13:02:38 +00:00
Implements the Modernizing radiation design document ( https://hackmd.io/@tgstation/rJNIyeBHt ) and replaces the current radiation sources with the new system, as well as replacing/removing a bunch of old consumers of radiation that either had no reason to exist, or could be replaced by something else. Diverges from the doc in that items radiation don't go up like explained. I was going to, but items get irradiated so easily that it just feels pretty lame. Items still get irradiated, but it's mostly just so that radiation sources look cooler (wow, lots of stuff around going green), and for things like the geiger counter. Instead of the complicated radiation_wave system, radiation now just checks everything between the radiation source and the potential target, losing power along the way based on the radiation insulation of whats in between. If this reaches too low a point (specified by radiation_pulse consumers), then the radiation will not pass. Otherwise, will roll a chance to irradiate. Uranium structures allow a delay before irradiating, so stay away!
127 lines
4.4 KiB
Plaintext
127 lines
4.4 KiB
Plaintext
/obj/structure/lattice
|
|
name = "lattice"
|
|
desc = "A lightweight support lattice. These hold our station together."
|
|
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
|
icon_state = "lattice-255"
|
|
base_icon_state = "lattice"
|
|
density = FALSE
|
|
anchored = TRUE
|
|
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 80, ACID = 50)
|
|
max_integrity = 50
|
|
layer = LATTICE_LAYER //under pipes
|
|
plane = FLOOR_PLANE
|
|
obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_LATTICE)
|
|
canSmoothWith = list(SMOOTH_GROUP_LATTICE, SMOOTH_GROUP_OPEN_FLOOR, SMOOTH_GROUP_WALLS)
|
|
var/number_of_mats = 1
|
|
var/build_material = /obj/item/stack/rods
|
|
|
|
|
|
/obj/structure/lattice/examine(mob/user)
|
|
. = ..()
|
|
. += deconstruction_hints(user)
|
|
|
|
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
|
|
return span_notice("The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.")
|
|
|
|
/obj/structure/lattice/Initialize(mapload)
|
|
. = ..()
|
|
for(var/obj/structure/lattice/LAT in loc)
|
|
if(LAT == src)
|
|
continue
|
|
stack_trace("multiple lattices found in ([loc.x], [loc.y], [loc.z])")
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
/obj/structure/lattice/blob_act(obj/structure/blob/B)
|
|
return
|
|
|
|
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
|
if(resistance_flags & INDESTRUCTIBLE)
|
|
return
|
|
if(C.tool_behaviour == TOOL_WIRECUTTER)
|
|
to_chat(user, span_notice("Slicing [name] joints ..."))
|
|
deconstruct()
|
|
else
|
|
var/turf/T = get_turf(src)
|
|
return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
|
|
|
|
/obj/structure/lattice/deconstruct(disassembled = TRUE)
|
|
if(!(flags_1 & NODECONSTRUCT_1))
|
|
new build_material(get_turf(src), number_of_mats)
|
|
qdel(src)
|
|
|
|
/obj/structure/lattice/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
|
if(the_rcd.mode == RCD_FLOORWALL)
|
|
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 2)
|
|
|
|
/obj/structure/lattice/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
|
if(passed_mode == RCD_FLOORWALL)
|
|
to_chat(user, span_notice("You build a floor."))
|
|
var/turf/T = src.loc
|
|
if(isspaceturf(T))
|
|
T.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
|
|
qdel(src)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/structure/lattice/singularity_pull(S, current_size)
|
|
if(current_size >= STAGE_FOUR)
|
|
deconstruct()
|
|
|
|
/obj/structure/lattice/catwalk
|
|
name = "catwalk"
|
|
desc = "A catwalk for easier EVA maneuvering and cable placement."
|
|
icon = 'icons/obj/smooth_structures/catwalk.dmi'
|
|
icon_state = "catwalk-0"
|
|
base_icon_state = "catwalk"
|
|
number_of_mats = 2
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_LATTICE, SMOOTH_GROUP_CATWALK, SMOOTH_GROUP_OPEN_FLOOR)
|
|
canSmoothWith = list(SMOOTH_GROUP_CATWALK)
|
|
obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP
|
|
|
|
/obj/structure/lattice/catwalk/deconstruction_hints(mob/user)
|
|
return span_notice("The supporting rods look like they could be <b>cut</b>.")
|
|
|
|
/obj/structure/lattice/catwalk/Move()
|
|
var/turf/T = loc
|
|
for(var/obj/structure/cable/C in T)
|
|
C.deconstruct()
|
|
..()
|
|
|
|
/obj/structure/lattice/catwalk/deconstruct()
|
|
var/turf/T = loc
|
|
for(var/obj/structure/cable/C in T)
|
|
C.deconstruct()
|
|
..()
|
|
|
|
/obj/structure/lattice/lava
|
|
name = "heatproof support lattice"
|
|
desc = "A specialized support beam for building across lava. Watch your step."
|
|
icon = 'icons/obj/smooth_structures/catwalk.dmi'
|
|
icon_state = "catwalk-0"
|
|
base_icon_state = "catwalk"
|
|
number_of_mats = 1
|
|
color = "#5286b9ff"
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_LATTICE, SMOOTH_GROUP_OPEN_FLOOR)
|
|
canSmoothWith = list(SMOOTH_GROUP_LATTICE)
|
|
obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP
|
|
resistance_flags = FIRE_PROOF | LAVA_PROOF
|
|
|
|
/obj/structure/lattice/lava/deconstruction_hints(mob/user)
|
|
return span_notice("The rods look like they could be <b>cut</b>, but the <i>heat treatment will shatter off</i>. There's space for a <i>tile</i>.")
|
|
|
|
/obj/structure/lattice/lava/attackby(obj/item/C, mob/user, params)
|
|
. = ..()
|
|
if(istype(C, /obj/item/stack/tile/iron))
|
|
var/obj/item/stack/tile/iron/P = C
|
|
if(P.use(1))
|
|
to_chat(user, span_notice("You construct a floor plating, as lava settles around the rods."))
|
|
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
|
|
new /turf/open/floor/plating(locate(x, y, z))
|
|
else
|
|
to_chat(user, span_warning("You need one floor tile to build atop [src]."))
|
|
return
|