[IDB Ignore] Refactor icon smoothing to use 8-bit bitmasking (#16620)

This commit is contained in:
S34N
2021-12-15 17:04:24 +01:00
committed by GitHub
parent 5445b71cd5
commit ac6f9b4725
162 changed files with 1271 additions and 870 deletions
+1
View File
@@ -6,6 +6,7 @@
var/buckle_offset = 0
var/max_buckled_mobs = 1
var/buckle_prevents_pull = FALSE
var/can_be_unanchored = FALSE
//Interaction
/atom/movable/attack_hand(mob/living/user)
@@ -43,13 +43,23 @@
layer = TURF_LAYER
icon = 'icons/effects/dirt.dmi'
icon_state = "dirt"
canSmoothWith = list(/obj/effect/decal/cleanable/dirt, /turf/simulated/wall, /obj/structure/falsewall)
smooth = SMOOTH_MORE
base_icon_state = "dirt"
smoothing_flags = NONE
smoothing_groups = list(SMOOTH_GROUP_CLEANABLE_DIRT)
canSmoothWith = list(SMOOTH_GROUP_CLEANABLE_DIRT, SMOOTH_GROUP_WALLS)
mouse_opacity = FALSE
/obj/effect/decal/cleanable/dirt/Initialize(mapload)
/obj/effect/decal/cleanable/dirt/Initialize()
. = ..()
icon_state = ""
QUEUE_SMOOTH_NEIGHBORS(src)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/effect/decal/cleanable/dirt/Destroy()
QUEUE_SMOOTH_NEIGHBORS(src)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH_NEIGHBORS(src)
return ..()
/obj/effect/decal/cleanable/dirt/blackpowder
name = "black powder"
@@ -66,11 +66,11 @@
return TRUE
if(random_icon_states && length(src.random_icon_states) > 0)
src.icon_state = pick(src.random_icon_states)
if(smooth)
queue_smooth(src)
queue_smooth_neighbors(src)
if(smoothing_flags)
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/effect/decal/cleanable/Destroy()
if(smooth)
queue_smooth_neighbors(src)
if(smoothing_flags)
QUEUE_SMOOTH_NEIGHBORS(src)
return ..()
+2 -2
View File
@@ -24,7 +24,7 @@
var/safety = TRUE //if you can zap people with the defibs on harm mode
var/combat = FALSE //can we revive through space suits?
var/heart_attack = FALSE //can it give instant heart attacks when zapped on harm intent with combat?
var/base_icon_state = "defibpaddles"
base_icon_state = "defibpaddles"
var/obj/item/twohanded/shockpaddles/paddle_type = /obj/item/twohanded/shockpaddles
/obj/item/defibrillator/get_cell()
@@ -297,7 +297,7 @@
var/revivecost = 1000
var/cooldown = FALSE
var/busy = FALSE
var/base_icon_state = "defibpaddles"
base_icon_state = "defibpaddles"
var/obj/item/defibrillator/defib
/obj/item/twohanded/shockpaddles/New(mainunit)
+7 -6
View File
@@ -9,11 +9,12 @@
/obj/structure/New()
..()
if(smooth)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
queue_smooth(src)
queue_smooth_neighbors(src)
icon_state = ""
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
if(smoothing_flags & SMOOTH_CORNERS)
icon_state = ""
if(climbable)
verbs += /obj/structure/proc/climb_on
if(SSticker)
@@ -27,10 +28,10 @@
/obj/structure/Destroy()
if(SSticker)
GLOB.cameranet.updateVisibility(src)
if(smooth)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
var/turf/T = get_turf(src)
spawn(0)
queue_smooth_neighbors(T)
QUEUE_SMOOTH_NEIGHBORS(T)
return ..()
/obj/structure/proc/climb_on()
+25 -49
View File
@@ -42,13 +42,15 @@
name = "resin"
desc = "Looks like some kind of thick resin."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "resin"
icon_state = "resin_wall-0"
base_icon_state = "resin_wall"
density = TRUE
opacity = TRUE
anchored = TRUE
canSmoothWith = list(/obj/structure/alien/resin)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN)
canSmoothWith = list(SMOOTH_GROUP_ALIEN_RESIN)
max_integrity = 200
smooth = SMOOTH_TRUE
var/resintype = null
/obj/structure/alien/resin/Initialize()
@@ -72,9 +74,10 @@
name = "resin wall"
desc = "Thick resin solidified into a wall."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "wall0" //same as resin, but consistency ho!
resintype = "wall"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
icon_state = "resin_wall-0"
base_icon_state = "resin_wall"
smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN, SMOOTH_GROUP_ALIEN_WALLS)
canSmoothWith = list(SMOOTH_GROUP_ALIEN_WALLS)
/obj/structure/alien/resin/wall/BlockSuperconductivity()
return 1
@@ -88,11 +91,13 @@
name = "resin membrane"
desc = "Resin just thin enough to let light pass through."
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
icon_state = "membrane0"
icon_state = "resin_membrane-0"
base_icon_state = "resin_membrane"
opacity = 0
max_integrity = 160
resintype = "membrane"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN, SMOOTH_GROUP_ALIEN_WALLS)
canSmoothWith = list(SMOOTH_GROUP_ALIEN_WALLS)
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
@@ -112,10 +117,16 @@
desc = "A thick resin surface covers the floor."
anchored = TRUE
density = FALSE
layer = TURF_LAYER
layer = ABOVE_OPEN_TURF_LAYER
plane = FLOOR_PLANE
icon_state = "weeds"
icon = 'icons/obj/smooth_structures/alien/weeds1.dmi'
icon_state = "weeds1-0"
base_icon_state = "weeds1"
max_integrity = 15
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_ALIEN_RESIN, SMOOTH_GROUP_ALIEN_WEEDS)
canSmoothWith = list(SMOOTH_GROUP_ALIEN_WEEDS, SMOOTH_GROUP_WALLS)
transform = matrix(1, 0, -4, 0, 1, -4)
var/obj/structure/alien/weeds/node/linked_node = null
var/static/list/weedImageCache
@@ -128,15 +139,12 @@
return
if(icon_state == "weeds")
icon_state = pick("weeds", "weeds1", "weeds2")
fullUpdateWeedOverlays()
spawn(rand(150, 200))
if(src)
Life()
/obj/structure/alien/weeds/Destroy()
var/turf/T = loc
for(var/obj/structure/alien/weeds/W in range(1,T))
W.updateWeedOverlays()
QUEUE_SMOOTH_NEIGHBORS(src)
linked_node = null
return ..()
@@ -162,45 +170,13 @@
if(exposed_temperature > 300)
take_damage(5, BURN, 0, 0)
/obj/structure/alien/weeds/proc/updateWeedOverlays()
overlays.Cut()
if(!weedImageCache || !weedImageCache.len)
weedImageCache = list()
weedImageCache.len = 4
weedImageCache[WEED_NORTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_n", layer=2.11, pixel_y = -32)
weedImageCache[WEED_SOUTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_s", layer=2.11, pixel_y = 32)
weedImageCache[WEED_EAST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_e", layer=2.11, pixel_x = -32)
weedImageCache[WEED_WEST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_w", layer=2.11, pixel_x = 32)
var/turf/N = get_step(src, NORTH)
var/turf/S = get_step(src, SOUTH)
var/turf/E = get_step(src, EAST)
var/turf/W = get_step(src, WEST)
if(!locate(/obj/structure/alien) in N.contents)
if(istype(N, /turf/simulated/floor))
overlays += weedImageCache[WEED_SOUTH_EDGING]
if(!locate(/obj/structure/alien) in S.contents)
if(istype(S, /turf/simulated/floor))
overlays += weedImageCache[WEED_NORTH_EDGING]
if(!locate(/obj/structure/alien) in E.contents)
if(istype(E, /turf/simulated/floor))
overlays += weedImageCache[WEED_WEST_EDGING]
if(!locate(/obj/structure/alien) in W.contents)
if(istype(W, /turf/simulated/floor))
overlays += weedImageCache[WEED_EAST_EDGING]
/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
for(var/obj/structure/alien/weeds/W in range(1,src))
W.updateWeedOverlays()
//Weed nodes
/obj/structure/alien/weeds/node
name = "glowing resin"
desc = "Blue bioluminescence shines from beneath the surface."
icon_state = "weednode"
icon = 'icons/obj/smooth_structures/alien/weednode.dmi'
icon_state = "weednode-0"
base_icon_state = "weednode"
light_range = 1
var/node_range = NODERANGE
+99 -60
View File
@@ -11,7 +11,8 @@
desc = "A huge chunk of metal used to seperate rooms."
anchored = TRUE
icon = 'icons/turf/walls/wall.dmi'
icon_state = "wall"
icon_state = "wall-0"
base_icon_state = "wall"
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
rad_insulation = RAD_MEDIUM_INSULATION
@@ -25,15 +26,9 @@
opacity = TRUE
max_integrity = 100
canSmoothWith = list(
/turf/simulated/wall,
/turf/simulated/wall/r_wall,
/obj/structure/falsewall,
/obj/structure/falsewall/brass,
/obj/structure/falsewall/reinforced, // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS. //because we do smooth with real r-walls now
/turf/simulated/wall/rust,
/turf/simulated/wall/r_wall/rust)
smooth = SMOOTH_TRUE
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS)
canSmoothWith = list(SMOOTH_GROUP_WALLS)
/obj/structure/falsewall/Initialize(mapload)
. = ..()
@@ -72,39 +67,41 @@
opening = 1
if(density)
do_the_flick()
sleep(4)
flick("fwall_opening", src)
density = 0
set_opacity(0)
update_icon(0)
update_icon()
else
var/srcturf = get_turf(src)
for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield
opening = 0
return
do_the_flick()
flick("fwall_closing", src)
density = 1
sleep(4)
set_opacity(1)
update_icon()
air_update_turf(1)
opening = 0
update_icon()
/obj/structure/falsewall/proc/do_the_flick()
if(density)
smooth = SMOOTH_FALSE
clear_smooth_overlays()
flick("fwall_opening", src)
else
flick("fwall_closing", src)
/obj/structure/falsewall/update_icon()
if(density)
icon_state = initial(icon_state)
smooth = SMOOTH_TRUE
queue_smooth(src)
if(opening)
if(density)
icon_state = "fwall_opening"
smoothing_flags = NONE
clear_smooth_overlays()
else
icon_state = "fwall_closing"
else
icon_state = "fwall_open"
if(density)
icon_state = initial(icon_state)
smoothing_flags = SMOOTH_CORNERS
icon_state = "[base_icon_state]-[smoothing_junction]"
smoothing_flags = SMOOTH_BITMASK
QUEUE_SMOOTH(src)
else
icon_state = "fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = TRUE)
var/turf/T = get_turf(src)
@@ -165,9 +162,11 @@
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls/reinforced_wall.dmi'
icon_state = "r_wall"
icon_state = "reinforced_wall-0"
base_icon_state = "reinforced_wall"
walltype = /turf/simulated/wall/r_wall
mineral = /obj/item/stack/sheet/plasteel
smoothing_flags = SMOOTH_BITMASK
/obj/structure/falsewall/reinforced/examine_status(mob/user)
. = ..()
@@ -188,12 +187,15 @@
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon = 'icons/turf/walls/uranium_wall.dmi'
icon_state = "uranium"
icon_state = "uranium_wall-0"
base_icon_state = "uranium_wall"
mineral = /obj/item/stack/sheet/mineral/uranium
walltype = /turf/simulated/wall/mineral/uranium
var/active = null
var/last_event = 0
canSmoothWith = list(/turf/simulated/wall/mineral/uranium, /obj/structure/falsewall/uranium, /turf/simulated/wall/indestructible/uranium)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS)
canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS)
/obj/structure/falsewall/uranium/attackby(obj/item/W as obj, mob/user as mob, params)
radiate()
@@ -220,28 +222,37 @@
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon = 'icons/turf/walls/gold_wall.dmi'
icon_state = "gold"
icon_state = "gold_wall-0"
base_icon_state = "gold_wall"
mineral = /obj/item/stack/sheet/mineral/gold
walltype = /turf/simulated/wall/mineral/gold
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_GOLD_WALLS)
canSmoothWith = list(SMOOTH_GROUP_GOLD_WALLS)
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny."
icon = 'icons/turf/walls/silver_wall.dmi'
icon_state = "silver"
icon_state = "silver_wall-0"
base_icon_state = "silver_wall"
mineral = /obj/item/stack/sheet/mineral/silver
walltype = /turf/simulated/wall/mineral/silver
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SILVER_WALLS)
canSmoothWith = list(SMOOTH_GROUP_SILVER_WALLS)
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon = 'icons/turf/walls/diamond_wall.dmi'
icon_state = "diamond"
icon_state = "diamond_wall-0"
base_icon_state = "diamond_wall"
mineral = /obj/item/stack/sheet/mineral/diamond
walltype = /turf/simulated/wall/mineral/diamond
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_DIAMOND_WALLS)
canSmoothWith = list(SMOOTH_GROUP_DIAMOND_WALLS)
max_integrity = 800
@@ -249,10 +260,13 @@
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = "plasma"
icon_state = "plasma_wall-0"
base_icon_state = "plasma_wall"
mineral = /obj/item/stack/sheet/mineral/plasma
walltype = /turf/simulated/wall/mineral/plasma
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS)
canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS)
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
if(is_hot(W) > 300)
@@ -278,85 +292,110 @@
/obj/structure/falsewall/alien
name = "alien wall"
desc = "A strange-looking alien wall."
icon = 'icons/turf/walls/plasma_wall.dmi'
icon_state = "plasma"
icon = 'icons/turf/walls/abductor_wall.dmi'
icon_state = "abductor_wall-0"
base_icon_state = "abductor_wall"
mineral = /obj/item/stack/sheet/mineral/abductor
walltype = /turf/simulated/wall/mineral/abductor
canSmoothWith = list(/turf/simulated/wall/mineral/abductor, /obj/structure/falsewall/abductor, /turf/simulated/wall/indestructible/alien)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS)
canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS)
/obj/structure/falsewall/bananium
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon = 'icons/turf/walls/bananium_wall.dmi'
icon_state = "bananium"
icon_state = "bananium_wall-0"
base_icon_state = "bananium_wall"
mineral = /obj/item/stack/sheet/mineral/bananium
walltype = /turf/simulated/wall/mineral/bananium
canSmoothWith = list(/obj/structure/falsewall/bananium, /turf/simulated/wall/mineral/bananium)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BANANIUM_WALLS)
canSmoothWith = list(SMOOTH_GROUP_BANANIUM_WALLS)
/obj/structure/falsewall/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon = 'icons/turf/walls/sandstone_wall.dmi'
icon_state = "sandstone"
icon_state = "sandstone_wall-0"
base_icon_state = "sandstone_wall"
mineral = /obj/item/stack/sheet/mineral/sandstone
walltype = /turf/simulated/wall/mineral/sandstone
canSmoothWith = list(/turf/simulated/wall/mineral/sandstone, /turf/simulated/wall/indestructible/sandstone, /obj/structure/falsewall/sandstone)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SANDSTONE_WALLS)
canSmoothWith = list(SMOOTH_GROUP_SANDSTONE_WALLS)
/obj/structure/falsewall/wood
name = "wooden wall"
desc = "A wall with wooden plating. Stiff."
icon = 'icons/turf/walls/wood_wall.dmi'
icon_state = "wood"
icon_state = "wood_wall-0"
base_icon_state = "wood_wall"
mineral = /obj/item/stack/sheet/wood
walltype = /turf/simulated/wall/mineral/wood
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_WOOD_WALLS)
canSmoothWith = list(SMOOTH_GROUP_WOOD_WALLS)
/obj/structure/falsewall/iron
name = "rough metal wall"
desc = "A wall with rough metal plating."
icon = 'icons/turf/walls/iron_wall.dmi'
icon_state = "iron"
icon_state = "iron_wall-0"
base_icon_state = "iron_wall"
mineral = /obj/item/stack/rods
mineral_amount = 5
walltype = /turf/simulated/wall/mineral/iron
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_IRON_WALLS)
canSmoothWith = list(SMOOTH_GROUP_IRON_WALLS)
/obj/structure/falsewall/abductor
name = "alien wall"
desc = "A wall with alien alloy plating."
icon = 'icons/turf/walls/abductor_wall.dmi'
icon_state = "abductor"
icon_state = "abductor_wall-0"
base_icon_state = "abductor_wall"
mineral = /obj/item/stack/sheet/mineral/abductor
walltype = /turf/simulated/wall/mineral/abductor
canSmoothWith = list(/obj/structure/falsewall/abductor, /turf/simulated/wall/mineral/abductor)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS)
canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS)
/obj/structure/falsewall/titanium
desc = "A light-weight titanium wall used in shuttles."
icon = 'icons/turf/walls/shuttle_wall.dmi'
icon_state = "shuttle"
icon = 'icons/turf/walls/plastinum_wall.dmi'
icon_state = "plastinum_wall-0"
base_icon_state = "plastinum_wall"
mineral = /obj/item/stack/sheet/mineral/titanium
walltype = /turf/simulated/wall/mineral/titanium
smooth = SMOOTH_MORE
canSmoothWith = list(/turf/simulated/wall/mineral/titanium, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_TITANIUM_WALLS)
canSmoothWith = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)
/obj/structure/falsewall/plastitanium
desc = "An evil wall of plasma and titanium."
icon = 'icons/turf/walls/plastitanium_wall.dmi'
icon_state = "shuttle"
icon_state = "plastitanium_wall-0"
base_icon_state = "plastitanium_wall"
mineral = /obj/item/stack/sheet/mineral/plastitanium
walltype = /turf/simulated/wall/mineral/plastitanium
smooth = SMOOTH_MORE
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/indestructible/syndicate, /turf/simulated/wall/mineral/plastitanium/nodiagonal, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater, /turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASTITANIUM_WALLS)
canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)
/obj/structure/falsewall/brass
name = "clockwork wall"
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
icon = 'icons/turf/walls/clockwork_wall.dmi'
icon_state = "clockwork_wall"
icon_state = "clockwork_wall-0"
base_icon_state = "clockwork_wall"
resistance_flags = FIRE_PROOF | ACID_PROOF
mineral_amount = 1
canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BRASS_WALL)
canSmoothWith = list(SMOOTH_GROUP_BRASS_WALL)
girder_type = /obj/structure/clockwork/wall_gear/displaced
walltype = /turf/simulated/wall/clockwork
mineral = /obj/item/stack/tile/brass
+12 -14
View File
@@ -2,7 +2,8 @@
name = "lattice"
desc = "A lightweight support lattice."
icon = 'icons/obj/smooth_structures/lattice.dmi'
icon_state = "lattice"
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, RAD = 0, FIRE = 80, ACID = 50)
@@ -10,11 +11,9 @@
layer = LATTICE_LAYER //under pipes
plane = FLOOR_PLANE
var/number_of_rods = 1
canSmoothWith = list(/obj/structure/lattice,
/turf/simulated/floor,
/turf/simulated/wall,
/obj/structure/falsewall)
smooth = SMOOTH_MORE
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_LATTICE)
canSmoothWith = list(SMOOTH_GROUP_LATTICE, SMOOTH_GROUP_FLOOR, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_TURF, SMOOTH_GROUP_WINDOW_FULLTILE)
/obj/structure/lattice/Initialize(mapload)
. = ..()
@@ -70,10 +69,12 @@
name = "catwalk"
desc = "A catwalk for easier EVA maneuvering and cable placement."
icon = 'icons/obj/smooth_structures/catwalk.dmi'
icon_state = "catwalk"
icon_state = "catwalk-0"
base_icon_state = "catwalk"
number_of_rods = 2
smooth = SMOOTH_TRUE
canSmoothWith = null
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_LATTICE, SMOOTH_GROUP_FLOOR)
canSmoothWith = list(SMOOTH_GROUP_LATTICE)
/obj/structure/lattice/catwalk/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The supporting rods look like they could be <b>cut</b>.</span>")
@@ -93,11 +94,8 @@
/obj/structure/lattice/catwalk/clockwork
name = "clockwork catwalk"
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
canSmoothWith = list(/obj/structure/lattice,
/turf/simulated/floor,
/turf/simulated/wall,
/obj/structure/falsewall)
smooth = SMOOTH_MORE
smoothing_flags = SMOOTH_CORNERS
smoothing_groups = null
/obj/structure/lattice/catwalk/clockwork/Initialize(mapload)
. = ..()
@@ -4,9 +4,13 @@
name = "alien nest"
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
icon = 'icons/mob/alien.dmi'
icon_state = "nest"
icon_state = "nest-0"
base_icon_state = "nest"
max_integrity = 120
var/image/nest_overlay
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_ALIEN_NEST)
canSmoothWith = list(SMOOTH_GROUP_ALIEN_NEST)
comfort = 0
flags = NODECONSTRUCT
+53 -49
View File
@@ -16,7 +16,8 @@
name = "table"
desc = "A square piece of metal standing on four metal legs. It can not move."
icon = 'icons/obj/smooth_structures/table.dmi'
icon_state = "table"
icon_state = "table-0"
base_icon_state = "table"
density = TRUE
anchored = TRUE
layer = TABLE_LAYER
@@ -24,8 +25,9 @@
climbable = TRUE
max_integrity = 100
integrity_failure = 30
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_TABLES)
canSmoothWith = list(SMOOTH_GROUP_TABLES)
var/frame = /obj/structure/table_frame
var/framestack = /obj/item/stack/rods
var/buildstack = /obj/item/stack/sheet/metal
@@ -48,10 +50,10 @@
return "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>"
/obj/structure/table/update_icon()
if(smooth && !flipped)
if((smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) && !flipped)
icon_state = ""
queue_smooth(src)
queue_smooth_neighbors(src)
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
if(flipped)
clear_smooth_overlays()
@@ -339,7 +341,7 @@
if(dir != NORTH)
layer = 5
flipped = 1
smooth = SMOOTH_FALSE
smoothing_flags = NONE
flags |= ON_BORDER
for(var/D in list(turn(direction, 90), turn(direction, -90)))
if(locate(/obj/structure/table,get_step(src,D)))
@@ -365,7 +367,7 @@
layer = initial(layer)
flipped = 0
smooth = initial(smooth)
smoothing_flags = initial(smoothing_flags)
flags &= ~ON_BORDER
for(var/D in list(turn(dir, 90), turn(dir, -90)))
if(locate(/obj/structure/table,get_step(src,D)))
@@ -384,9 +386,11 @@
name = "glass table"
desc = "Looks fragile. You should totally flip it. It is begging for it."
icon = 'icons/obj/smooth_structures/glass_table.dmi'
icon_state = "glass_table"
icon_state = "glass_table-0"
base_icon_state = "glass_table"
buildstack = /obj/item/stack/sheet/glass
canSmoothWith = null
smoothing_groups = list(SMOOTH_GROUP_GLASS_TABLES)
canSmoothWith = list(SMOOTH_GROUP_GLASS_TABLES)
max_integrity = 70
resistance_flags = ACID_PROOF
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
@@ -469,12 +473,14 @@
name = "wooden table"
desc = "Do not apply fire to this. Rumour says it burns easily."
icon = 'icons/obj/smooth_structures/wood_table.dmi'
icon_state = "wood_table"
icon_state = "wood_table-0"
base_icon_state = "wood_table"
frame = /obj/structure/table_frame/wood
framestack = /obj/item/stack/sheet/wood
buildstack = /obj/item/stack/sheet/wood
max_integrity = 70
canSmoothWith = list(/obj/structure/table/wood, /obj/structure/table/wood/poker)
smoothing_groups = list(SMOOTH_GROUP_WOOD_TABLES) //Don't smooth with SMOOTH_GROUP_TABLES
canSmoothWith = list(SMOOTH_GROUP_WOOD_TABLES)
resistance_flags = FLAMMABLE
/obj/structure/table/wood/narsie_act(total_override = TRUE)
@@ -485,7 +491,8 @@
name = "gambling table"
desc = "A seedy table for seedy dealings in seedy places."
icon = 'icons/obj/smooth_structures/poker_table.dmi'
icon_state = "poker_table"
icon_state = "poker_table-0"
base_icon_state = "poker_table"
buildstack = /obj/item/stack/tile/carpet
/obj/structure/table/wood/poker/narsie_act()
@@ -499,84 +506,76 @@
name = "fancy table"
desc = "A standard metal table frame covered with an amazingly fancy, patterned cloth."
icon = 'icons/obj/smooth_structures/fancy_table.dmi'
icon_state = "fancy_table"
icon_state = "fancy_table-0"
base_icon_state = "fancy_table"
frame = /obj/structure/table_frame
framestack = /obj/item/stack/rods
buildstack = /obj/item/stack/tile/carpet
canSmoothWith = list(/obj/structure/table/wood/fancy,
/obj/structure/table/wood/fancy/black,
/obj/structure/table/wood/fancy/blue,
/obj/structure/table/wood/fancy/cyan,
/obj/structure/table/wood/fancy/green,
/obj/structure/table/wood/fancy/orange,
/obj/structure/table/wood/fancy/purple,
/obj/structure/table/wood/fancy/red,
/obj/structure/table/wood/fancy/royalblack,
/obj/structure/table/wood/fancy/royalblue)
var/smooth_icon = 'icons/obj/smooth_structures/fancy_table.dmi'
smoothing_groups = list(SMOOTH_GROUP_FANCY_WOOD_TABLES) //Don't smooth with SMOOTH_GROUP_TABLES or SMOOTH_GROUP_WOOD_TABLES
canSmoothWith = list(SMOOTH_GROUP_FANCY_WOOD_TABLES)
/obj/structure/table/wood/fancy/flip(direction)
return FALSE
/obj/structure/table/wood/fancy/Initialize()
. = ..()
icon = smooth_icon
QUEUE_SMOOTH(src)
/obj/structure/table/wood/fancy/black
icon_state = "fancy_table_black"
icon_state = "fancy_table_black-0"
base_icon_state = "fancy_table_black"
buildstack = /obj/item/stack/tile/carpet/black
icon = 'icons/obj/smooth_structures/fancy_table_black.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_black.dmi'
/obj/structure/table/wood/fancy/blue
icon_state = "fancy_table_blue"
icon_state = "fancy_table_blue-0"
base_icon_state = "fancy_table_blue"
buildstack = /obj/item/stack/tile/carpet/blue
icon = 'icons/obj/smooth_structures/fancy_table_blue.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_blue.dmi'
/obj/structure/table/wood/fancy/cyan
icon_state = "fancy_table_cyan"
icon_state = "fancy_table_cyan-0"
base_icon_state = "fancy_table_cyan"
buildstack = /obj/item/stack/tile/carpet/cyan
icon = 'icons/obj/smooth_structures/fancy_table_cyan.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_cyan.dmi'
/obj/structure/table/wood/fancy/green
icon_state = "fancy_table_green"
icon_state = "fancy_table_green-0"
base_icon_state = "fancy_table_green"
buildstack = /obj/item/stack/tile/carpet/green
icon = 'icons/obj/smooth_structures/fancy_table_green.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_green.dmi'
/obj/structure/table/wood/fancy/orange
icon_state = "fancy_table_orange"
icon_state = "fancy_table_orange-0"
base_icon_state = "fancy_table_orange"
buildstack = /obj/item/stack/tile/carpet/orange
icon = 'icons/obj/smooth_structures/fancy_table_orange.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_orange.dmi'
/obj/structure/table/wood/fancy/purple
icon_state = "fancy_table_purple"
icon_state = "fancy_table_purple-0"
base_icon_state = "fancy_table_purple"
buildstack = /obj/item/stack/tile/carpet/purple
icon = 'icons/obj/smooth_structures/fancy_table_purple.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_purple.dmi'
/obj/structure/table/wood/fancy/red
icon_state = "fancy_table_red"
icon_state = "fancy_table_red-0"
base_icon_state = "fancy_table_red"
buildstack = /obj/item/stack/tile/carpet/red
icon = 'icons/obj/smooth_structures/fancy_table_red.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_red.dmi'
/obj/structure/table/wood/fancy/royalblack
icon_state = "fancy_table_royalblack"
icon_state = "fancy_table_royalblack-0"
base_icon_state = "fancy_table_royalblack"
buildstack = /obj/item/stack/tile/carpet/royalblack
icon = 'icons/obj/smooth_structures/fancy_table_royalblack.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblack.dmi'
/obj/structure/table/wood/fancy/royalblue
icon_state = "fancy_table_royalblue"
icon_state = "fancy_table_royalblue-0"
base_icon_state = "fancy_table_royalblue"
buildstack = /obj/item/stack/tile/carpet/royalblue
icon = 'icons/obj/smooth_structures/fancy_table_royalblue.dmi'
smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblue.dmi'
/*
* Reinforced tables
@@ -585,10 +584,11 @@
name = "reinforced table"
desc = "A reinforced version of the four legged table."
icon = 'icons/obj/smooth_structures/reinforced_table.dmi'
icon_state = "r_table"
icon_state = "reinforced_table-0"
base_icon_state = "reinforced_table"
deconstruction_ready = FALSE
buildstack = /obj/item/stack/sheet/plasteel
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
canSmoothWith = list(SMOOTH_GROUP_TABLES)
max_integrity = 200
integrity_failure = 50
armor = list(MELEE = 10, BULLET = 30, LASER = 30, ENERGY = 100, BOMB = 20, BIO = 0, RAD = 0, FIRE = 80, ACID = 70)
@@ -618,14 +618,16 @@
name = "brass table"
desc = "A solid, slightly beveled brass table."
icon = 'icons/obj/smooth_structures/brass_table.dmi'
icon_state = "brass_table"
icon_state = "brass_table-0"
base_icon_state = "brass_table"
resistance_flags = FIRE_PROOF | ACID_PROOF
frame = /obj/structure/table_frame/brass
framestack = /obj/item/stack/tile/brass
buildstack = /obj/item/stack/tile/brass
framestackamount = 1
buildstackamount = 1
canSmoothWith = list(/obj/structure/table/reinforced/brass)
smoothing_groups = list(SMOOTH_GROUP_BRASS_TABLES) //Don't smooth with SMOOTH_GROUP_TABLES
canSmoothWith = list(SMOOTH_GROUP_BRASS_TABLES)
/obj/structure/table/reinforced/brass/narsie_act()
take_damage(rand(15, 45), BRUTE)
@@ -638,7 +640,9 @@
name = "surgical tray"
desc = "A small metal tray with wheels."
anchored = FALSE
smooth = SMOOTH_FALSE
smoothing_flags = NONE
smoothing_groups = null
canSmoothWith = null
icon = 'icons/obj/stationobjs.dmi'
icon_state = "tray"
buildstack = /obj/item/stack/sheet/mineral/titanium
+32 -28
View File
@@ -451,8 +451,8 @@
//This proc is used to update the icons of nearby windows.
/obj/structure/window/proc/update_nearby_icons()
update_icon()
if(smooth)
queue_smooth_neighbors(src)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/structure/window/update_icon()
if(!QDELETED(src))
@@ -461,8 +461,8 @@
var/ratio = obj_integrity / max_integrity
ratio = CEILING(ratio * 4, 1) * 25
if(smooth)
queue_smooth(src)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH(src)
cut_overlay(crack_overlay)
if(ratio > 75)
@@ -613,27 +613,28 @@
level = 3
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE)
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE)
/obj/structure/window/full/basic
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
icon = 'icons/obj/smooth_structures/window.dmi'
icon_state = "window"
icon_state = "window-0"
base_icon_state = "window"
max_integrity = 50
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
/obj/structure/window/full/plasmabasic
name = "plasma window"
desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
icon = 'icons/obj/smooth_structures/plasma_window.dmi'
icon_state = "plasmawindow"
icon_state = "plasma_window-0"
base_icon_state = "plasma_window"
glass_decal = /obj/effect/decal/cleanable/glass/plasma
shardtype = /obj/item/shard/plasma
glass_type = /obj/item/stack/sheet/plasmaglass
heat_resistance = 32000
max_integrity = 300
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
explosion_block = 1
armor = list(MELEE = 75, BULLET = 5, LASER = 0, ENERGY = 0, BOMB = 45, BIO = 100, RAD = 100, FIRE = 99, ACID = 100)
rad_insulation = RAD_NO_INSULATION
@@ -642,12 +643,11 @@
name = "reinforced plasma window"
desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
icon = 'icons/obj/smooth_structures/rplasma_window.dmi'
icon_state = "rplasmawindow"
icon_state = "rplasma_window-0"
base_icon_state = "rplasma_window"
glass_decal = /obj/effect/decal/cleanable/glass/plasma
shardtype = /obj/item/shard/plasma
glass_type = /obj/item/stack/sheet/plasmarglass
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
reinf = TRUE
max_integrity = 1000
explosion_block = 2
@@ -661,9 +661,8 @@
name = "reinforced window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
icon_state = "r_window"
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
icon_state = "reinforced_window-0"
base_icon_state = "reinforced_window"
max_integrity = 100
reinf = TRUE
heat_resistance = 1600
@@ -682,26 +681,29 @@
name = "tinted window"
desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
icon = 'icons/obj/smooth_structures/tinted_window.dmi'
icon_state = "tinted_window"
icon_state = "tinted_window-0"
base_icon_state = "tinted_window"
opacity = 1
/obj/structure/window/full/reinforced/ice
icon = 'icons/obj/smooth_structures/rice_window.dmi'
icon_state = "ice_window"
icon_state = "rice_window-0" //Welcome to the rice fields, motherfucker.
base_icon_state = "rice_window"
max_integrity = 150
/obj/structure/window/full/shuttle
name = "shuttle window"
desc = "A reinforced, air-locked pod window."
icon = 'icons/obj/smooth_structures/shuttle_window.dmi'
icon_state = "shuttle_window"
icon_state = "shuttle_window-0"
base_icon_state = "shuttle_window"
max_integrity = 100
reinf = TRUE
heat_resistance = 1600
explosion_block = 3
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
smooth = SMOOTH_TRUE
canSmoothWith = null
smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE, SMOOTH_GROUP_TITANIUM_WALLS)
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE, SMOOTH_GROUP_TITANIUM_WALLS)
glass_type = /obj/item/stack/sheet/titaniumglass
/obj/structure/window/full/shuttle/narsie_act()
@@ -714,17 +716,17 @@
name = "plastitanium window"
desc = "An evil looking window of plasma and titanium."
icon = 'icons/obj/smooth_structures/plastitanium_window.dmi'
icon_state = "plastitanium_window"
icon_state = "plastitanium_window-0"
base_icon_state = "plastitanium_window"
max_integrity = 100
reinf = TRUE
heat_resistance = 1600
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
rad_insulation = RAD_HEAVY_INSULATION
smooth = SMOOTH_TRUE
canSmoothWith = null
explosion_block = 3
glass_type = /obj/item/stack/sheet/plastitaniumglass
canSmoothWith = list(/turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium)
smoothing_groups = list(SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM, SMOOTH_GROUP_PLASTITANIUM_WALLS)
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM, SMOOTH_GROUP_SYNDICATE_WALLS, SMOOTH_GROUP_PLASTITANIUM_WALLS)
/obj/structure/window/reinforced/clockwork
name = "brass window"
@@ -761,9 +763,11 @@
animate(src, color = previouscolor, time = 8)
/obj/structure/window/reinforced/clockwork/fulltile
icon_state = "clockwork_window"
smooth = SMOOTH_TRUE
canSmoothWith = null
icon_state = "clockwork_window-0"
base_icon_state = "clockwork_window"
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE, SMOOTH_GROUP_WINDOW_FULLTILE_BRASS)
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE_BRASS)
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
dir = FULLTILE_WINDOW_DIR