diff --git a/_maps/map_files/generic/centcomm.dmm b/_maps/map_files/generic/centcomm.dmm index f5bd0b3109f..da795627767 100644 --- a/_maps/map_files/generic/centcomm.dmm +++ b/_maps/map_files/generic/centcomm.dmm @@ -60,7 +60,9 @@ /turf/simulated/wall/indestructible/riveted, /area/space) "ao" = ( -/obj/structure/chair/stool/holostool, +/obj/structure/chair/stool/holostool{ + dir = 4 + }, /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/holofloor{ icon_state = "asteroid" @@ -157,13 +159,6 @@ /obj/structure/flora/ausbushes/grassybush, /turf/simulated/floor/holofloor/grass, /area/holodeck/source_picnicarea) -"aH" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet7-3" - }, -/area/holodeck/source_theatre) "aI" = ( /obj/machinery/door/airlock/centcom, /turf/simulated/floor/plasteel/dark/nitrogen, @@ -183,13 +178,6 @@ icon_state = "asteroid" }, /area/holodeck/source_desert) -"aM" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet15-15" - }, -/area/holodeck/source_theatre) "aN" = ( /turf/space, /area/space) @@ -226,20 +214,6 @@ icon_state = "red" }, /area/holodeck/source_emptycourt) -"aS" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet11-12" - }, -/area/holodeck/source_theatre) -"aV" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet5-1" - }, -/area/holodeck/source_theatre) "aW" = ( /turf/simulated/floor/holofloor{ dir = 5; @@ -259,19 +233,11 @@ icon_state = "asteroid" }, /area/holodeck/source_picnicarea) -"aZ" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet13-5" - }, -/area/holodeck/source_theatre) "ba" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet9-4" +/obj/structure/chair/stool/holostool{ + dir = 1 }, +/turf/simulated/floor/holofloor/carpet, /area/holodeck/source_theatre) "bb" = ( /obj/structure/table/holotable/wood, @@ -279,13 +245,6 @@ icon_state = "grimy" }, /area/holodeck/source_meetinghall) -"bc" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet6-0" - }, -/area/holodeck/source_meetinghall) "bd" = ( /turf/simulated/floor/holofloor{ icon = 'icons/turf/floors/plating.dmi'; @@ -296,20 +255,6 @@ /obj/machinery/computer/shuttle/ert, /turf/simulated/floor/plasteel/grimy, /area/centcom/specops) -"bf" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet14-0" - }, -/area/holodeck/source_meetinghall) -"bg" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet10-0" - }, -/area/holodeck/source_meetinghall) "bh" = ( /obj/structure/kitchenspike, /turf/simulated/floor/plasteel/dark/nitrogen, @@ -318,13 +263,6 @@ /obj/structure/table/wood, /turf/simulated/floor/plasteel/dark/nitrogen, /area/vox_station) -"bj" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet7-0" - }, -/area/holodeck/source_meetinghall) "bk" = ( /obj/machinery/door/airlock/centcom{ opacity = 1 @@ -334,52 +272,12 @@ "bl" = ( /turf/simulated/floor/plating/nitrogen, /area/vox_station) -"bm" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet15-0" - }, -/area/holodeck/source_meetinghall) -"bn" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet6-2" - }, -/area/holodeck/source_theatre) "bo" = ( /turf/simulated/floor/holofloor{ dir = 4; icon_state = "wood" }, /area/holodeck/source_theatre) -"bp" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet11-0" - }, -/area/holodeck/source_meetinghall) -"bq" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet14-10" - }, -/area/holodeck/source_theatre) -"br" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet5-0" - }, -/area/holodeck/source_meetinghall) -"bs" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet13-0" - }, -/area/holodeck/source_meetinghall) "bt" = ( /obj/structure/flora/ausbushes/fullgrass, /turf/simulated/floor/holofloor/grass, @@ -391,11 +289,10 @@ }, /area/holodeck/source_emptycourt) "bv" = ( -/obj/structure/chair/stool/holostool, -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet9-0" +/obj/structure/chair/stool/holostool{ + dir = 1 }, +/turf/simulated/floor/holofloor/carpet, /area/holodeck/source_meetinghall) "bz" = ( /obj/machinery/porta_turret/syndicate{ @@ -627,12 +524,6 @@ }, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/syndicate) -"cD" = ( -/turf/simulated/floor/holofloor{ - dir = 6; - icon_state = "carpetsymbol" - }, -/area/holodeck/source_meetinghall) "cE" = ( /turf/simulated/floor/holofloor{ dir = 8; @@ -4990,10 +4881,8 @@ aiControlDisabled = 1; frequency = 1379; hackProof = 1; - icon_state = "door_locked"; id_tag = "emergency_away"; - name = "Arrival Airlock"; - req_access = null + name = "Arrival Airlock" }, /turf/simulated/floor/plating, /area/centcom/evac) @@ -8744,24 +8633,12 @@ }, /turf/simulated/floor/plating/airless, /area/shuttle/syndicate) -"Ew" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet2-0" - }, -/area/holodeck/source_theatre) "Ex" = ( /obj/structure/shuttle/engine/propulsion{ icon_state = "burst_r" }, /turf/simulated/floor/plating/airless, /area/shuttle/supply) -"Ez" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet8-0" - }, -/area/holodeck/source_meetinghall) "EA" = ( /obj/structure/table/reinforced, /obj/machinery/chem_dispenser/soda, @@ -8965,13 +8842,6 @@ /obj/effect/spawner/window/plastitanium, /turf/simulated/floor/plating/nitrogen, /area/shuttle/vox) -"Fn" = ( -/obj/structure/grille, -/obj/structure/window/full/shuttle{ - icon_state = "17" - }, -/turf/simulated/floor/plating, -/area/shuttle/escape) "Fo" = ( /obj/structure/closet/crate/internals, /obj/item/tank/internals/oxygen/red, @@ -9576,12 +9446,6 @@ "IS" = ( /turf/simulated/floor/plasteel, /area/tdome/tdomeadmin) -"IU" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet10-8" - }, -/area/holodeck/source_theatre) "IV" = ( /obj/machinery/vending/cigarette, /turf/simulated/floor/mineral/plastitanium/red, @@ -10010,12 +9874,6 @@ }, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/administration) -"LG" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet1-0" - }, -/area/holodeck/source_theatre) "LH" = ( /obj/structure/table/reinforced, /obj/item/storage/backpack/medic, @@ -10287,7 +10145,7 @@ /obj/structure/flora/ausbushes/ywflowers, /obj/structure/flora/ausbushes/fernybush, /obj/structure/window/full/shuttle, -/turf/simulated/floor/grass, +/turf/simulated/floor/grass/no_creep, /area/shuttle/escape) "Ny" = ( /obj/machinery/optable, @@ -11315,7 +11173,7 @@ /obj/structure/flora/ausbushes/ppflowers, /obj/structure/flora/ausbushes/sunnybush, /obj/structure/window/full/shuttle, -/turf/simulated/floor/grass, +/turf/simulated/floor/grass/no_creep, /area/shuttle/escape) "TU" = ( /obj/machinery/ai_status_display, @@ -11459,10 +11317,7 @@ /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/syndicate_elite) "UK" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet3-0" - }, +/turf/simulated/floor/holofloor/carpet, /area/holodeck/source_theatre) "UM" = ( /obj/structure/flora/grass/brown, @@ -11498,6 +11353,15 @@ /obj/structure/chair/comfy/shuttle, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/specops) +"Vb" = ( +/obj/structure/chair/stool/holostool{ + dir = 8 + }, +/obj/effect/decal/cleanable/dirt, +/turf/simulated/floor/holofloor{ + icon_state = "asteroid" + }, +/area/holodeck/source_picnicarea) "Vc" = ( /obj/structure/closet/crate/medical, /obj/item/reagent_containers/glass/bottle/morphine, @@ -11987,10 +11851,7 @@ /turf/simulated/wall/mineral/plastitanium, /area/shuttle/vox) "XT" = ( -/turf/simulated/floor/holofloor{ - dir = 4; - icon_state = "carpet4-0" - }, +/turf/simulated/floor/holofloor/carpet, /area/holodeck/source_meetinghall) "XW" = ( /turf/simulated/floor/plating, @@ -12288,9 +12149,7 @@ /area/holodeck/source_emptycourt) "ZV" = ( /obj/structure/grille, -/obj/structure/window/full/shuttle{ - icon_state = "14" - }, +/obj/structure/window/full/shuttle, /turf/simulated/floor/plating, /area/shuttle/escape) "ZZ" = ( @@ -44080,7 +43939,7 @@ Ef cP Jx PX -Fn +ZV TY DW aN @@ -69358,8 +69217,8 @@ Rj bH QT aY -ao -ao +Vb +Vb aY QT bH @@ -70131,10 +69990,10 @@ aO bo bo bo -Ew UK UK -LG +UK +UK cd cm cm @@ -70386,22 +70245,22 @@ al aO aO bo -bn -aH -aH -aH -aH -aV +UK +ba +ba +ba +ba +ba cd cm XT bb cm -bc -bj -bj -bj -br +bv +bv +bv +bv +bv cm cc aN @@ -70643,22 +70502,22 @@ al aO aO bo -bq -aM -aM -aM -aM -aZ +UK +ba +ba +ba +ba +ba cd cm -cD +XT bb cm -bf -bm -bm -bm -bs +bv +bv +bv +bv +bv cm cc aN @@ -70900,21 +70759,21 @@ al aO aO bo -IU -aS -aS -aS -aS +UK +ba +ba +ba +ba ba cd cm -Ez +XT bb cm -bg -bp -bp -bp +bv +bv +bv +bv bv cm cc @@ -71159,10 +71018,10 @@ aO Hp bo bo -Ew UK UK -LG +UK +UK cd cm cm diff --git a/code/__DEFINES/bitfields.dm b/code/__DEFINES/bitfields.dm new file mode 100644 index 00000000000..19a962fbffe --- /dev/null +++ b/code/__DEFINES/bitfields.dm @@ -0,0 +1,4 @@ +#define DEFINE_BITFIELD(_variable, _flags) /datum/bitfield/##_variable { \ + flags = ##_flags; \ + variable = #_variable; \ +} diff --git a/code/__DEFINES/icon_smoothing.dm b/code/__DEFINES/icon_smoothing.dm new file mode 100644 index 00000000000..63b63d92387 --- /dev/null +++ b/code/__DEFINES/icon_smoothing.dm @@ -0,0 +1,126 @@ +/* smoothing_flags */ +/// Smoothing system in where adjacencies are calculated and used to build an image by mounting each corner at runtime. +#define SMOOTH_CORNERS (1<<0) +/// Smoothing system in where adjacencies are calculated and used to select a pre-baked icon_state, encoded by bitmasking. +#define SMOOTH_BITMASK (1<<1) +/// Atom has diagonal corners, with underlays under them. +#define SMOOTH_DIAGONAL_CORNERS (1<<2) +/// Atom will smooth with the borders of the map. +#define SMOOTH_BORDER (1<<3) +/// Atom is currently queued to smooth. +#define SMOOTH_QUEUED (1<<4) +/// Smooths with objects, and will thus need to scan turfs for contents. +#define SMOOTH_OBJ (1<<5) + +DEFINE_BITFIELD(smoothing_flags, list( + "SMOOTH_CORNERS" = SMOOTH_CORNERS, + "SMOOTH_BITMASK" = SMOOTH_BITMASK, + "SMOOTH_DIAGONAL_CORNERS" = SMOOTH_DIAGONAL_CORNERS, + "SMOOTH_BORDER" = SMOOTH_BORDER, + "SMOOTH_QUEUED" = SMOOTH_QUEUED, + "SMOOTH_OBJ" = SMOOTH_OBJ, +)) + +/*smoothing macros*/ + +#define QUEUE_SMOOTH(thing_to_queue) if(thing_to_queue.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) {SSicon_smooth.add_to_queue(thing_to_queue)} + +#define QUEUE_SMOOTH_NEIGHBORS(thing_to_queue) for(var/neighbor in orange(1, thing_to_queue)) {var/atom/atom_neighbor = neighbor; QUEUE_SMOOTH(atom_neighbor)} + +/**SMOOTHING GROUPS + * Groups of things to smooth with. + * * Contained in the `list/smoothing_groups` variable. + * * Matched with the `list/canSmoothWith` variable to check whether smoothing is possible or not. + */ + +#define S_TURF(num) ((24 * 0) + num) //Not any different from the number itself, but kept this way in case someone wants to expand it by adding stuff before it. +/* /turf only */ + +#define SMOOTH_GROUP_TURF S_TURF(0) ///turf/simulated +#define SMOOTH_GROUP_TURF_CHASM S_TURF(1) ///turf/simulated/chasm, /turf/simulated/floor/fakepit +#define SMOOTH_GROUP_FLOOR_LAVA S_TURF(2) ///turf/simulated/lava/smooth +#define SMOOTH_GROUP_FLOOR_TRANSPARENT_GLASS S_TURF(3) ///turf/simulated/transparent/glass + +#define SMOOTH_GROUP_FLOOR S_TURF(4) ///turf/simulated/floor + +#define SMOOTH_GROUP_FLOOR_GRASS S_TURF(5) ///turf/simulated/floor/plating/grass +#define SMOOTH_GROUP_FLOOR_ICE S_TURF(6) ///turf/simulated/floor/plating/ice +#define SMOOTH_GROUP_BEACH_WATER S_TURF(7) ///turf/simulated/floor/beach/away/water/ +#define SMOOTH_GROUP_GLASS_FLOOR S_TURF(8) ///turf/simulated/floor/transparent/glass and subtypes +#define SMOOTH_GROUP_GLASS_FLOOR_TITANIUM S_TURF(9) ///turf/simulated/floor/transparent/glass/titanium and subtypes + +#define SMOOTH_GROUP_CARPET S_TURF(10) ///turf/simulated/floor/carpet +#define SMOOTH_GROUP_CARPET_BLACK S_TURF(11) +#define SMOOTH_GROUP_CARPET_BLUE S_TURF(12) +#define SMOOTH_GROUP_CARPET_CYAN S_TURF(13) +#define SMOOTH_GROUP_CARPET_GREEN S_TURF(14) +#define SMOOTH_GROUP_CARPET_ROYALBLACK S_TURF(15) +#define SMOOTH_GROUP_CARPET_ROYALBLUE S_TURF(17) +#define SMOOTH_GROUP_CARPET_RED S_TURF(17) +#define SMOOTH_GROUP_CARPET_ORANGE S_TURF(18) +#define SMOOTH_GROUP_CARPET_PURPLE S_TURF(19) + +#define SMOOTH_GROUP_SIMULATED_TURFS S_TURF(24) ///turf/simulated +#define SMOOTH_GROUP_MATERIAL_WALLS S_TURF(25) ///turf/simulated/wall/material +#define SMOOTH_GROUP_SYNDICATE_WALLS S_TURF(26) ///turf/simulated/wall/r_wall/syndicate, /turf/simulated/indestructible/syndicate +#define SMOOTH_GROUP_HOTEL_WALLS S_TURF(27) ///turf/simulated/indestructible/hotelwall +#define SMOOTH_GROUP_MINERAL_WALLS S_TURF(28) ///turf/simulated/mineral, /turf/simulated/indestructible +#define SMOOTH_GROUP_BOSS_WALLS S_TURF(29) ///turf/simulated/indestructible/riveted/boss +#define SMOOTH_GROUP_SURVIVAL_TITANIUM_WALLS S_TURF(30) ///turf/simulated/wall/mineral/titanium/survival + +#define SMOOTH_GROUP_GRASS S_TURF(31) ///turf/simulated/floor/grass +#define SMOOTH_GROUP_JUNGLE_GRASS S_TURF(32) ///turf/simulated/floor/grass/jungle + +#define MAX_S_TURF SMOOTH_GROUP_JUNGLE_GRASS //Always match this value with the one above it. + + +#define S_OBJ(num) (MAX_S_TURF + 1 + num) +/* /obj included */ + +#define SMOOTH_GROUP_WALLS S_OBJ(0) ///turf/simulated/wall, /obj/structure/falsewall +#define SMOOTH_GROUP_URANIUM_WALLS S_OBJ(1) ///turf/simulated/wall/mineral/uranium, /obj/structure/falsewall/uranium +#define SMOOTH_GROUP_GOLD_WALLS S_OBJ(2) ///turf/simulated/wall/mineral/gold, /obj/structure/falsewall/gold +#define SMOOTH_GROUP_SILVER_WALLS S_OBJ(3) ///turf/simulated/wall/mineral/silver, /obj/structure/falsewall/silver +#define SMOOTH_GROUP_DIAMOND_WALLS S_OBJ(4) ///turf/simulated/wall/mineral/diamond, /obj/structure/falsewall/diamond +#define SMOOTH_GROUP_PLASMA_WALLS S_OBJ(5) ///turf/simulated/wall/mineral/plasma, /obj/structure/falsewall/plasma +#define SMOOTH_GROUP_BANANIUM_WALLS S_OBJ(6) ///turf/simulated/wall/mineral/bananium, /obj/structure/falsewall/bananium +#define SMOOTH_GROUP_SANDSTONE_WALLS S_OBJ(7) ///turf/simulated/wall/mineral/sandstone, /obj/structure/falsewall/sandstone +#define SMOOTH_GROUP_WOOD_WALLS S_OBJ(8) ///turf/simulated/wall/mineral/wood, /obj/structure/falsewall/wood +#define SMOOTH_GROUP_IRON_WALLS S_OBJ(9) ///turf/simulated/wall/mineral/iron, /obj/structure/falsewall/iron +#define SMOOTH_GROUP_ABDUCTOR_WALLS S_OBJ(10) ///turf/simulated/wall/mineral/abductor, /obj/structure/falsewall/abductor +#define SMOOTH_GROUP_TITANIUM_WALLS S_OBJ(11) ///turf/simulated/wall/mineral/titanium, /obj/structure/falsewall/titanium +#define SMOOTH_GROUP_PLASTITANIUM_WALLS S_OBJ(13) ///turf/simulated/wall/mineral/plastitanium, /obj/structure/falsewall/plastitanium +#define SMOOTH_GROUP_SURVIVAL_TIANIUM_POD S_OBJ(14) ///turf/simulated/wall/mineral/titanium/survival/pod, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod +#define SMOOTH_GROUP_HIERO_WALL S_OBJ(15) ///obj/effect/temp_visual/elite_tumor_wall, /obj/effect/temp_visual/hierophant/wall +#define SMOOTH_GROUP_BRASS_WALL S_OBJ(16) ///turf/simulated/wall/mineral/brass, /obj/structure/falsewall/brass + + +#define SMOOTH_GROUP_WINDOW_FULLTILE S_OBJ(21) ///turf/simulated/indestructible/fakeglass, /obj/structure/window/full/basic, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /obj/structure/window/full/reinforced +#define SMOOTH_GROUP_WINDOW_FULLTILE_BRASS S_OBJ(22) ///obj/structure/window/brass/fulltile +#define SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM S_OBJ(23) ///turf/simulated/indestructible/opsglass, /obj/structure/window/plasma/reinforced/plastitanium +#define SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE S_OBJ(24) ///obj/structure/window/shuttle + +#define SMOOTH_GROUP_LATTICE S_OBJ(30) ///obj/structure/lattice + +#define SMOOTH_GROUP_AIRLOCK S_OBJ(40) ///obj/machinery/door/airlock + +#define SMOOTH_GROUP_TABLES S_OBJ(50) ///obj/structure/table +#define SMOOTH_GROUP_WOOD_TABLES S_OBJ(51) ///obj/structure/table/wood +#define SMOOTH_GROUP_FANCY_WOOD_TABLES S_OBJ(52) ///obj/structure/table/wood/fancy +#define SMOOTH_GROUP_BRASS_TABLES S_OBJ(53) ///obj/structure/table/brass +#define SMOOTH_GROUP_ABDUCTOR_TABLES S_OBJ(54) ///obj/structure/table/abductor +#define SMOOTH_GROUP_GLASS_TABLES S_OBJ(55) ///obj/structure/table/glass + +#define SMOOTH_GROUP_ALIEN_NEST S_OBJ(59) ///obj/structure/bed/nest +#define SMOOTH_GROUP_ALIEN_RESIN S_OBJ(60) ///obj/structure/alien/resin +#define SMOOTH_GROUP_ALIEN_WALLS S_OBJ(61) ///obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane +#define SMOOTH_GROUP_ALIEN_WEEDS S_OBJ(62) ///obj/structure/alien/weeds + +#define SMOOTH_GROUP_SECURITY_BARRICADE S_OBJ(63) ///obj/structure/barricade/security +#define SMOOTH_GROUP_SANDBAGS S_OBJ(64) ///obj/structure/barricade/sandbags + +#define SMOOTH_GROUP_SHUTTLE_PARTS S_OBJ(66) ///obj/structure/window/shuttle, /obj/structure/window/plasma/reinforced/plastitanium, /turf/simulated/indestructible/opsglass, /obj/structure/shuttle + +#define SMOOTH_GROUP_CLEANABLE_DIRT S_OBJ(67) ///obj/effect/decal/cleanable/dirt + +#define SMOOTH_GROUP_RIPPLE S_OBJ(68) ///obj/effect/temp_visual/ripple diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index bff5100982a..b899e3fe4c7 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -12,6 +12,7 @@ #define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals #define SPACE_LAYER 1.8 +#define GRASS_UNDER_LAYER 1.9 //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define #define MID_TURF_LAYER 2.02 #define HIGH_TURF_LAYER 2.03 diff --git a/code/__HELPERS/bitflag_lists.dm b/code/__HELPERS/bitflag_lists.dm new file mode 100644 index 00000000000..a665d92cd41 --- /dev/null +++ b/code/__HELPERS/bitflag_lists.dm @@ -0,0 +1,25 @@ +GLOBAL_LIST_EMPTY(bitflag_lists) + +/** + * System for storing bitflags past the 24 limit, making use of an associative list. + * + * Macro converts a list of integers into an associative list of bitflag entries for quicker comparison. + * Example: list(0, 4, 26, 32)) => list( "0" = ( (1<<0) | (1<<4) ), "1" = ( (1<<2) | (1<<8) ) ) + * Lists are cached into a global list of lists to avoid identical duplicates. + * This system makes value comparisons faster than pairing every element of one list with every element of the other for evaluation. + * + * Arguments: + * * target - List of integers. + */ +#define SET_BITFLAG_LIST(target) \ + do { \ + var/txt_signature = target.Join("-"); \ + if(!GLOB.bitflag_lists[txt_signature]) { \ + var/list/new_bitflag_list = list(); \ + for(var/value in target) { \ + new_bitflag_list["[round(value / 24)]"] |= (1 << (value % 24)); \ + }; \ + GLOB.bitflag_lists[txt_signature] = new_bitflag_list; \ + }; \ + target = GLOB.bitflag_lists[txt_signature]; \ + } while (FALSE) diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 90873b6309a..8ee7bfc0e2f 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -1,16 +1,17 @@ //generic (by snowflake) tile smoothing code; smooth your icons with this! /* - Each tile is divided in 4 corners, each corner has an image associated to it; the tile is then overlayed by these 4 images - To use this, just set your atom's 'smooth' var to 1. If your atom can be moved/unanchored, set its 'can_be_unanchored' var to 1. + Each tile is divided in 4 corners, each corner has an appearance associated to it; the tile is then overlayed by these 4 appearances + To use this, just set your atom's 'smoothing_flags' var to 1. If your atom can be moved/unanchored, set its 'can_be_unanchored' var to 1. If you don't want your atom's icon to smooth with anything but atoms of the same type, set the list 'canSmoothWith' to null; - Otherwise, put all types you want the atom icon to smooth with in 'canSmoothWith' INCLUDING THE TYPE OF THE ATOM ITSELF. + Otherwise, put all the smoothing groups you want the atom icon to smooth with in 'canSmoothWith', including the group of the atom itself. + Smoothing groups are just shared flags between objects. If one of the 'canSmoothWith' of A matches one of the `smoothing_groups` of B, then A will smooth with B. Each atom has its own icon file with all the possible corner states. See 'smooth_wall.dmi' for a template. DIAGONAL SMOOTHING INSTRUCTIONS To make your atom smooth diagonally you need all the proper icon states (see 'smooth_wall.dmi' for a template) and - to add the 'SMOOTH_DIAGONAL' flag to the atom's smooth var (in addition to either SMOOTH_TRUE or SMOOTH_MORE). + to add the 'SMOOTH_DIAGONAL_CORNERS' flag to the atom's smoothing_flags var (in addition to either SMOOTH_TRUE or SMOOTH_MORE). For turfs, what appears under the diagonal corners depends on the turf that was in the same position previously: if you make a wall on a plating floor, you will see plating under the diagonal wall corner, if it was space, you will see space. @@ -20,302 +21,399 @@ A non null 'fixed_underlay' list var will skip copying the previous turf appearance and always use the list. If the list is not set properly, the underlay will default to regular floor plating. - To see an example of a diagonal wall, see '/turf/simulated/wall/shuttle' and its subtypes. + To see an example of a diagonal wall, see '/turf/simulated/wall/mineral/titanium' and its subtypes. */ //Redefinitions of the diagonal directions so they can be stored in one var without conflicts -#define N_NORTH 2 -#define N_SOUTH 4 -#define N_EAST 16 -#define N_WEST 256 -#define N_NORTHEAST 32 -#define N_NORTHWEST 512 -#define N_SOUTHEAST 64 -#define N_SOUTHWEST 1024 +#define NORTH_JUNCTION NORTH //(1<<0) +#define SOUTH_JUNCTION SOUTH //(1<<1) +#define EAST_JUNCTION EAST //(1<<2) +#define WEST_JUNCTION WEST //(1<<3) +#define NORTHEAST_JUNCTION (1<<4) +#define SOUTHEAST_JUNCTION (1<<5) +#define SOUTHWEST_JUNCTION (1<<6) +#define NORTHWEST_JUNCTION (1<<7) -#define SMOOTH_FALSE 0 //not smooth -#define SMOOTH_TRUE 1 //smooths with exact specified types or just itself -#define SMOOTH_MORE 2 //smooths with all subtypes of specified types or just itself (this value can replace SMOOTH_TRUE) -#define SMOOTH_DIAGONAL 4 //if atom should smooth diagonally, this should be present in 'smooth' var -#define SMOOTH_BORDER 8 //atom will smooth with the borders of the map +DEFINE_BITFIELD(smoothing_junction, list( + "NORTH_JUNCTION" = NORTH_JUNCTION, + "SOUTH_JUNCTION" = SOUTH_JUNCTION, + "EAST_JUNCTION" = EAST_JUNCTION, + "WEST_JUNCTION" = WEST_JUNCTION, + "NORTHEAST_JUNCTION" = NORTHEAST_JUNCTION, + "SOUTHEAST_JUNCTION" = SOUTHEAST_JUNCTION, + "SOUTHWEST_JUNCTION" = SOUTHWEST_JUNCTION, + "NORTHWEST_JUNCTION" = NORTHWEST_JUNCTION, +)) -#define NULLTURF_BORDER 123456789 + +#define NO_ADJ_FOUND 0 +#define ADJ_FOUND 1 +#define NULLTURF_BORDER 2 #define DEFAULT_UNDERLAY_ICON 'icons/turf/floors.dmi' #define DEFAULT_UNDERLAY_ICON_STATE "plating" -#define DEFAULT_UNDERLAY_IMAGE image(DEFAULT_UNDERLAY_ICON, DEFAULT_UNDERLAY_ICON_STATE) -/atom/var/smooth = SMOOTH_FALSE -/atom/var/top_left_corner -/atom/var/top_right_corner -/atom/var/bottom_left_corner -/atom/var/bottom_right_corner -/atom/var/list/canSmoothWith = null // TYPE PATHS I CAN SMOOTH WITH~~~~~ If this is null and atom is smooth, it smooths only with itself -/atom/movable/var/can_be_unanchored = FALSE -/turf/var/list/fixed_underlay = null -/proc/calculate_adjacencies(atom/A) - if(!A.loc) - return 0 +#define SET_ADJ_IN_DIR(source, junction, direction, direction_flag) \ + do { \ + var/turf/neighbor = get_step(source, direction); \ + if(!neighbor) { \ + if(source.smoothing_flags & SMOOTH_BORDER) { \ + junction |= direction_flag; \ + }; \ + }; \ + else { \ + if(!isnull(neighbor.smoothing_groups)) { \ + for(var/target in source.canSmoothWith) { \ + if(!(source.canSmoothWith[target] & neighbor.smoothing_groups[target])) { \ + continue; \ + }; \ + junction |= direction_flag; \ + break; \ + }; \ + }; \ + if(!(junction & direction_flag) && source.smoothing_flags & SMOOTH_OBJ) { \ + for(var/obj/thing in neighbor) { \ + if(!thing.anchored || isnull(thing.smoothing_groups)) { \ + continue; \ + }; \ + for(var/target in source.canSmoothWith) { \ + if(!(source.canSmoothWith[target] & thing.smoothing_groups[target])) { \ + continue; \ + }; \ + junction |= direction_flag; \ + break; \ + }; \ + if(junction & direction_flag) { \ + break; \ + }; \ + }; \ + }; \ + }; \ + } while(FALSE) - var/adjacencies = 0 - var/atom/movable/AM - if(ismovable(A)) - AM = A - if(AM.can_be_unanchored && !AM.anchored) - return 0 +///Scans all adjacent turfs to find targets to smooth with. +/atom/proc/calculate_adjacencies() + . = NONE + + if(!loc) + return for(var/direction in GLOB.cardinal) - AM = find_type_in_direction(A, direction) - if(AM == NULLTURF_BORDER) - if((A.smooth & SMOOTH_BORDER)) - adjacencies |= 1 << direction - else if( (AM && !istype(AM)) || (istype(AM) && AM.anchored) ) - adjacencies |= 1 << direction + switch(find_type_in_direction(direction)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= direction //BYOND and smooth dirs are the same for cardinals + if(ADJ_FOUND) + . |= direction //BYOND and smooth dirs are the same for cardinals - if(adjacencies & N_NORTH) - if(adjacencies & N_WEST) - AM = find_type_in_direction(A, NORTHWEST) - if(AM == NULLTURF_BORDER) - if((A.smooth & SMOOTH_BORDER)) - adjacencies |= N_NORTHWEST - else if( (AM && !istype(AM)) || (istype(AM) && AM.anchored) ) - adjacencies |= N_NORTHWEST - if(adjacencies & N_EAST) - AM = find_type_in_direction(A, NORTHEAST) - if(AM == NULLTURF_BORDER) - if((A.smooth & SMOOTH_BORDER)) - adjacencies |= N_NORTHEAST - else if( (AM && !istype(AM)) || (istype(AM) && AM.anchored) ) - adjacencies |= N_NORTHEAST + if(. & NORTH_JUNCTION) + if(. & WEST_JUNCTION) + switch(find_type_in_direction(NORTHWEST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= NORTHWEST_JUNCTION + if(ADJ_FOUND) + . |= NORTHWEST_JUNCTION - if(adjacencies & N_SOUTH) - if(adjacencies & N_WEST) - AM = find_type_in_direction(A, SOUTHWEST) - if(AM == NULLTURF_BORDER) - if((A.smooth & SMOOTH_BORDER)) - adjacencies |= N_SOUTHWEST - else if( (AM && !istype(AM)) || (istype(AM) && AM.anchored) ) - adjacencies |= N_SOUTHWEST - if(adjacencies & N_EAST) - AM = find_type_in_direction(A, SOUTHEAST) - if(AM == NULLTURF_BORDER) - if((A.smooth & SMOOTH_BORDER)) - adjacencies |= N_SOUTHEAST - else if( (AM && !istype(AM)) || (istype(AM) && AM.anchored) ) - adjacencies |= N_SOUTHEAST + if(. & EAST_JUNCTION) + switch(find_type_in_direction(NORTHEAST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= NORTHEAST_JUNCTION + if(ADJ_FOUND) + . |= NORTHEAST_JUNCTION - return adjacencies + if(. & SOUTH_JUNCTION) + if(. & WEST_JUNCTION) + switch(find_type_in_direction(SOUTHWEST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= SOUTHWEST_JUNCTION + if(ADJ_FOUND) + . |= SOUTHWEST_JUNCTION -//do not use, use queue_smooth(atom) -/proc/smooth_icon(atom/A) - if(!A || !A.smooth || !A.z) + if(. & EAST_JUNCTION) + switch(find_type_in_direction(SOUTHEAST)) + if(NULLTURF_BORDER) + if((smoothing_flags & SMOOTH_BORDER)) + . |= SOUTHEAST_JUNCTION + if(ADJ_FOUND) + . |= SOUTHEAST_JUNCTION + + +/atom/movable/calculate_adjacencies() + if(can_be_unanchored && !anchored) + return NONE + return ..() + + +//do not use, use QUEUE_SMOOTH(atom) +/atom/proc/smooth_icon() + smoothing_flags &= ~SMOOTH_QUEUED + if(!z) //nullspace are not sending their best + error("[type] called smooth_icon() without being on a z-level") return - if(QDELETED(A)) - return - if(A.smooth & (SMOOTH_TRUE | SMOOTH_MORE)) - var/adjacencies = calculate_adjacencies(A) - - if(A.smooth & SMOOTH_DIAGONAL) - A.diagonal_smooth(adjacencies) + if(smoothing_flags & SMOOTH_CORNERS) + if(smoothing_flags & SMOOTH_DIAGONAL_CORNERS) + corners_diagonal_smooth(calculate_adjacencies()) else - cardinal_smooth(A, adjacencies) + corners_cardinal_smooth(src, calculate_adjacencies()) + else if(smoothing_flags & SMOOTH_BITMASK) + bitmask_smooth() -/atom/proc/diagonal_smooth(adjacencies) + +/atom/proc/corners_diagonal_smooth(adjacencies) switch(adjacencies) - if(N_NORTH|N_WEST) + if(NORTH_JUNCTION|WEST_JUNCTION) replace_smooth_overlays("d-se","d-se-0") - if(N_NORTH|N_EAST) + if(NORTH_JUNCTION|EAST_JUNCTION) replace_smooth_overlays("d-sw","d-sw-0") - if(N_SOUTH|N_WEST) + if(SOUTH_JUNCTION|WEST_JUNCTION) replace_smooth_overlays("d-ne","d-ne-0") - if(N_SOUTH|N_EAST) + if(SOUTH_JUNCTION|EAST_JUNCTION) replace_smooth_overlays("d-nw","d-nw-0") - if(N_NORTH|N_WEST|N_NORTHWEST) + if(NORTH_JUNCTION|WEST_JUNCTION|NORTHWEST_JUNCTION) replace_smooth_overlays("d-se","d-se-1") - if(N_NORTH|N_EAST|N_NORTHEAST) + if(NORTH_JUNCTION|EAST_JUNCTION|NORTHEAST_JUNCTION) replace_smooth_overlays("d-sw","d-sw-1") - if(N_SOUTH|N_WEST|N_SOUTHWEST) + if(SOUTH_JUNCTION|WEST_JUNCTION|SOUTHWEST_JUNCTION) replace_smooth_overlays("d-ne","d-ne-1") - if(N_SOUTH|N_EAST|N_SOUTHEAST) + if(SOUTH_JUNCTION|EAST_JUNCTION|SOUTHEAST_JUNCTION) replace_smooth_overlays("d-nw","d-nw-1") else - cardinal_smooth(src, adjacencies) + corners_cardinal_smooth(src, adjacencies) return icon_state = "" return adjacencies -//only walls should have a need to handle underlays -/turf/simulated/wall/diagonal_smooth(adjacencies) - adjacencies = reverse_ndir(..()) - if(adjacencies) - var/mutable_appearance/underlay_appearance = mutable_appearance(layer = TURF_LAYER, plane = FLOOR_PLANE) - var/list/U = list(underlay_appearance) - if(fixed_underlay) - if(fixed_underlay["space"]) - underlay_appearance.icon = 'icons/turf/space.dmi' - underlay_appearance.icon_state = SPACE_ICON_STATE - underlay_appearance.plane = PLANE_SPACE - else - underlay_appearance.icon = fixed_underlay["icon"] - underlay_appearance.icon_state = fixed_underlay["icon_state"] - else - var/turned_adjacency = turn(adjacencies, 180) - var/turf/T = get_step(src, turned_adjacency) - if(!T.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) - T = get_step(src, turn(adjacencies, 135)) - if(!T.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) - T = get_step(src, turn(adjacencies, 225)) - //if all else fails, ask our own turf - if(!T.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency) && !get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) - underlay_appearance.icon = DEFAULT_UNDERLAY_ICON - underlay_appearance.icon_state = DEFAULT_UNDERLAY_ICON_STATE - underlays = U - // Drop posters which were previously placed on this wall. - for(var/obj/structure/sign/poster/P in src) - P.roll_and_drop(src) - -/proc/cardinal_smooth(atom/A, adjacencies) +/atom/proc/corners_cardinal_smooth(atom/A, adjacencies) //NW CORNER var/nw = "1-i" - if((adjacencies & N_NORTH) && (adjacencies & N_WEST)) - if(adjacencies & N_NORTHWEST) + if((adjacencies & NORTH_JUNCTION) && (adjacencies & WEST_JUNCTION)) + if(adjacencies & NORTHWEST_JUNCTION) nw = "1-f" else nw = "1-nw" else - if(adjacencies & N_NORTH) + if(adjacencies & NORTH_JUNCTION) nw = "1-n" - else if(adjacencies & N_WEST) + else if(adjacencies & WEST_JUNCTION) nw = "1-w" //NE CORNER var/ne = "2-i" - if((adjacencies & N_NORTH) && (adjacencies & N_EAST)) - if(adjacencies & N_NORTHEAST) + if((adjacencies & NORTH_JUNCTION) && (adjacencies & EAST_JUNCTION)) + if(adjacencies & NORTHEAST_JUNCTION) ne = "2-f" else ne = "2-ne" else - if(adjacencies & N_NORTH) + if(adjacencies & NORTH_JUNCTION) ne = "2-n" - else if(adjacencies & N_EAST) + else if(adjacencies & EAST_JUNCTION) ne = "2-e" //SW CORNER var/sw = "3-i" - if((adjacencies & N_SOUTH) && (adjacencies & N_WEST)) - if(adjacencies & N_SOUTHWEST) + if((adjacencies & SOUTH_JUNCTION) && (adjacencies & WEST_JUNCTION)) + if(adjacencies & SOUTHWEST_JUNCTION) sw = "3-f" else sw = "3-sw" else - if(adjacencies & N_SOUTH) + if(adjacencies & SOUTH_JUNCTION) sw = "3-s" - else if(adjacencies & N_WEST) + else if(adjacencies & WEST_JUNCTION) sw = "3-w" //SE CORNER var/se = "4-i" - if((adjacencies & N_SOUTH) && (adjacencies & N_EAST)) - if(adjacencies & N_SOUTHEAST) + if((adjacencies & SOUTH_JUNCTION) && (adjacencies & EAST_JUNCTION)) + if(adjacencies & SOUTHEAST_JUNCTION) se = "4-f" else se = "4-se" else - if(adjacencies & N_SOUTH) + if(adjacencies & SOUTH_JUNCTION) se = "4-s" - else if(adjacencies & N_EAST) + else if(adjacencies & EAST_JUNCTION) se = "4-e" - var/list/New = list() + var/list/new_overlays = list() if(A.top_left_corner != nw) - A.overlays -= A.top_left_corner + A.cut_overlay(top_left_corner) A.top_left_corner = nw - New += nw + new_overlays += nw if(A.top_right_corner != ne) - A.overlays -= A.top_right_corner + A.cut_overlay(top_right_corner) A.top_right_corner = ne - New += ne + new_overlays += ne if(A.bottom_right_corner != sw) - A.overlays -= A.bottom_right_corner + A.cut_overlay(bottom_right_corner) A.bottom_right_corner = sw - New += sw + new_overlays += sw if(A.bottom_left_corner != se) - A.overlays -= A.bottom_left_corner + A.cut_overlay(bottom_left_corner) A.bottom_left_corner = se - New += se + new_overlays += se - if(New.len) - A.overlays.Add(New) + if(new_overlays.len) + A.add_overlay(new_overlays) -/proc/find_type_in_direction(atom/source, direction) - var/turf/target_turf = get_step(source, direction) + +///Scans direction to find targets to smooth with. +/atom/proc/find_type_in_direction(direction) + var/turf/target_turf = get_step(src, direction) if(!target_turf) return NULLTURF_BORDER - if(source.canSmoothWith) - var/atom/A - if(source.smooth & SMOOTH_MORE) - for(var/a_type in source.canSmoothWith) - if( istype(target_turf, a_type) ) - return target_turf - A = locate(a_type) in target_turf - if(A) - return A - return null + var/area/target_area = get_area(target_turf) + var/area/source_area = get_area(src) + if((source_area.area_limited_icon_smoothing && !istype(target_area, source_area.area_limited_icon_smoothing)) || (target_area.area_limited_icon_smoothing && !istype(source_area, target_area.area_limited_icon_smoothing))) + return NO_ADJ_FOUND + + if(isnull(canSmoothWith)) //special case in which it will only smooth with itself + if(isturf(src)) + return (type == target_turf.type) ? ADJ_FOUND : NO_ADJ_FOUND + var/atom/matching_obj = locate(type) in target_turf + return (matching_obj && matching_obj.type == type) ? ADJ_FOUND : NO_ADJ_FOUND + + if(!isnull(target_turf.smoothing_groups)) + for(var/target in canSmoothWith) + if(!(canSmoothWith[target] & target_turf.smoothing_groups[target])) + continue + return ADJ_FOUND + + if(smoothing_flags & SMOOTH_OBJ) + for(var/am in target_turf) + var/atom/movable/thing = am + if(!thing.anchored || isnull(thing.smoothing_groups)) + continue + for(var/target in canSmoothWith) + if(!(canSmoothWith[target] & thing.smoothing_groups[target])) + continue + return ADJ_FOUND + + return NO_ADJ_FOUND + + +/** + * Basic smoothing proc. The atom checks for adjacent directions to smooth with and changes the icon_state based on that. + * + * Returns the previous smoothing_junction state so the previous state can be compared with the new one after the proc ends, and see the changes, if any. + * +*/ +/atom/proc/bitmask_smooth() + var/new_junction = NONE + + for(var/direction in GLOB.cardinal) //Cardinal case first. + SET_ADJ_IN_DIR(src, new_junction, direction, direction) + + if(!(new_junction & (NORTH|SOUTH)) || !(new_junction & (EAST|WEST))) + set_smoothed_icon_state(new_junction) + return + + if(new_junction & NORTH_JUNCTION) + if(new_junction & WEST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, NORTHWEST, NORTHWEST_JUNCTION) + + if(new_junction & EAST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, NORTHEAST, NORTHEAST_JUNCTION) + + if(new_junction & SOUTH_JUNCTION) + if(new_junction & WEST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, SOUTHWEST, SOUTHWEST_JUNCTION) + + if(new_junction & EAST_JUNCTION) + SET_ADJ_IN_DIR(src, new_junction, SOUTHEAST, SOUTHEAST_JUNCTION) + + set_smoothed_icon_state(new_junction) + + +///Changes the icon state based on the new junction bitmask. Returns the old junction value. +/atom/proc/set_smoothed_icon_state(new_junction) + . = smoothing_junction + smoothing_junction = new_junction + icon_state = "[base_icon_state]-[smoothing_junction]" + + +/turf/simulated/set_smoothed_icon_state(new_junction) + . = ..() + if(smoothing_flags & SMOOTH_DIAGONAL_CORNERS) + switch(new_junction) + if( + NORTH_JUNCTION|WEST_JUNCTION, + NORTH_JUNCTION|EAST_JUNCTION, + SOUTH_JUNCTION|WEST_JUNCTION, + SOUTH_JUNCTION|EAST_JUNCTION, + NORTH_JUNCTION|WEST_JUNCTION|NORTHWEST_JUNCTION, + NORTH_JUNCTION|EAST_JUNCTION|NORTHEAST_JUNCTION, + SOUTH_JUNCTION|WEST_JUNCTION|SOUTHWEST_JUNCTION, + SOUTH_JUNCTION|EAST_JUNCTION|SOUTHEAST_JUNCTION + ) + icon_state = "[base_icon_state]-[smoothing_junction]-d" + if(!fixed_underlay && new_junction != .) // Mutable underlays? + var/junction_dir = reverse_ndir(smoothing_junction) + var/turned_adjacency = reverse_direction(junction_dir) + var/turf/neighbor_turf = get_step(src, turned_adjacency & (NORTH|SOUTH)) + var/mutable_appearance/underlay_appearance = mutable_appearance(layer = TURF_LAYER, plane = FLOOR_PLANE) + if(!neighbor_turf.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) + neighbor_turf = get_step(src, turned_adjacency & (EAST|WEST)) + if(!neighbor_turf.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) + neighbor_turf = get_step(src, turned_adjacency) + if(!neighbor_turf.get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) + if(!get_smooth_underlay_icon(underlay_appearance, src, turned_adjacency)) //if all else fails, ask our own turf + underlay_appearance.icon = DEFAULT_UNDERLAY_ICON + underlay_appearance.icon_state = DEFAULT_UNDERLAY_ICON_STATE + underlays = list(underlay_appearance) + + +/turf/simulated/floor/set_smoothed_icon_state(new_junction) + if(broken || burnt) + return + return ..() - for(var/a_type in source.canSmoothWith) - if(a_type == target_turf.type) - return target_turf - A = locate(a_type) in target_turf - if(A && A.type == a_type) - return A - return null - else - if(isturf(source)) - return source.type == target_turf.type ? target_turf : null - var/atom/A = locate(source.type) in target_turf - return A && A.type == source.type ? A : null //Icon smoothing helpers - /proc/smooth_zlevel(zlevel, now = FALSE) var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)) for(var/V in away_turfs) var/turf/T = V - if(T.smooth) + if(T.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) if(now) - smooth_icon(T) + T.smooth_icon() else - queue_smooth(T) + QUEUE_SMOOTH(T) for(var/R in T) var/atom/A = R - if(A.smooth) + if(A.smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) if(now) - smooth_icon(A) + A.smooth_icon() else - queue_smooth(A) + QUEUE_SMOOTH(A) + /atom/proc/clear_smooth_overlays() - overlays -= top_left_corner + cut_overlay(top_left_corner) top_left_corner = null - overlays -= top_right_corner + cut_overlay(top_right_corner) top_right_corner = null - overlays -= bottom_right_corner + cut_overlay(bottom_right_corner) bottom_right_corner = null - overlays -= bottom_left_corner + cut_overlay(bottom_left_corner) bottom_left_corner = null + /atom/proc/replace_smooth_overlays(nw, ne, sw, se) clear_smooth_overlays() var/list/O = list() @@ -327,64 +425,70 @@ O += sw bottom_right_corner = se O += se - overlays.Add(O) + add_overlay(O) + /proc/reverse_ndir(ndir) switch(ndir) - if(N_NORTH) + if(NORTH_JUNCTION) return NORTH - if(N_SOUTH) + if(SOUTH_JUNCTION) return SOUTH - if(N_WEST) + if(WEST_JUNCTION) return WEST - if(N_EAST) + if(EAST_JUNCTION) return EAST - if(N_NORTHWEST) + if(NORTHWEST_JUNCTION) return NORTHWEST - if(N_NORTHEAST) + if(NORTHEAST_JUNCTION) return NORTHEAST - if(N_SOUTHEAST) + if(SOUTHEAST_JUNCTION) return SOUTHEAST - if(N_SOUTHWEST) + if(SOUTHWEST_JUNCTION) return SOUTHWEST - if(N_NORTH|N_WEST) + if(NORTH_JUNCTION | WEST_JUNCTION) return NORTHWEST - if(N_NORTH|N_EAST) + if(NORTH_JUNCTION | EAST_JUNCTION) return NORTHEAST - if(N_SOUTH|N_WEST) + if(SOUTH_JUNCTION | WEST_JUNCTION) return SOUTHWEST - if(N_SOUTH|N_EAST) + if(SOUTH_JUNCTION | EAST_JUNCTION) return SOUTHEAST - if(N_NORTH|N_WEST|N_NORTHWEST) + if(NORTH_JUNCTION | WEST_JUNCTION | NORTHWEST_JUNCTION) return NORTHWEST - if(N_NORTH|N_EAST|N_NORTHEAST) + if(NORTH_JUNCTION | EAST_JUNCTION | NORTHEAST_JUNCTION) return NORTHEAST - if(N_SOUTH|N_WEST|N_SOUTHWEST) + if(SOUTH_JUNCTION | WEST_JUNCTION | SOUTHWEST_JUNCTION) return SOUTHWEST - if(N_SOUTH|N_EAST|N_SOUTHEAST) + if(SOUTH_JUNCTION | EAST_JUNCTION | SOUTHEAST_JUNCTION) return SOUTHEAST else - return 0 + return NONE -//SSicon_smooth -/proc/queue_smooth_neighbors(atom/A) - for(var/V in orange(1,A)) - var/atom/T = V - if(T.smooth) - queue_smooth(T) - -//SSicon_smooth -/proc/queue_smooth(atom/A) - if(SSicon_smooth) - SSicon_smooth.smooth_queue[A] = A - SSicon_smooth.can_fire = 1 - else - smooth_icon(A) //Example smooth wall /turf/simulated/wall/smooth name = "smooth wall" icon = 'icons/turf/smooth_wall.dmi' icon_state = "smooth" - smooth = SMOOTH_TRUE|SMOOTH_DIAGONAL|SMOOTH_BORDER + smoothing_flags = SMOOTH_CORNERS|SMOOTH_DIAGONAL_CORNERS|SMOOTH_BORDER + smoothing_groups = null canSmoothWith = null + +#undef NORTH_JUNCTION +#undef SOUTH_JUNCTION +#undef EAST_JUNCTION +#undef WEST_JUNCTION +#undef NORTHEAST_JUNCTION +#undef NORTHWEST_JUNCTION +#undef SOUTHEAST_JUNCTION +#undef SOUTHWEST_JUNCTION + +#undef NO_ADJ_FOUND +#undef ADJ_FOUND +#undef NULLTURF_BORDER + +#undef DEFAULT_UNDERLAY_ICON +#undef DEFAULT_UNDERLAY_ICON_STATE + +#undef SET_ADJ_IN_DIR diff --git a/code/__HELPERS/string_assoc_lists.dm b/code/__HELPERS/string_assoc_lists.dm new file mode 100644 index 00000000000..cded3a34969 --- /dev/null +++ b/code/__HELPERS/string_assoc_lists.dm @@ -0,0 +1,17 @@ +GLOBAL_LIST_EMPTY(string_assoc_lists) + +/** + * Caches associative lists with non-numeric stringify-able index keys and stringify-able values (text/typepath -> text/path/number). + */ +/datum/proc/string_assoc_list(list/values) + var/list/string_id = list() + for(var/val in values) + string_id += "[val]_[values[val]]" + string_id = string_id.Join("-") + + . = GLOB.string_assoc_lists[string_id] + + if(.) + return + + return GLOB.string_assoc_lists[string_id] = values diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm new file mode 100644 index 00000000000..4ca56d2e497 --- /dev/null +++ b/code/_globalvars/bitfields.dm @@ -0,0 +1,6 @@ +/// Specifies a bitfield for smarter debugging +/datum/bitfield + /// The variable name that contains the bitfield + var/variable + /// An associative list of the readable flag and its true value + var/list/flags diff --git a/code/controllers/subsystem/icon_smooth.dm b/code/controllers/subsystem/icon_smooth.dm index 785c874eea6..b149112f5f7 100644 --- a/code/controllers/subsystem/icon_smooth.dm +++ b/code/controllers/subsystem/icon_smooth.dm @@ -12,7 +12,7 @@ SUBSYSTEM_DEF(icon_smooth) while(smooth_queue.len) var/atom/A = smooth_queue[smooth_queue.len] smooth_queue.len-- - smooth_icon(A) + A.smooth_icon() if(MC_TICK_CHECK) return if(!smooth_queue.len) @@ -22,12 +22,12 @@ SUBSYSTEM_DEF(icon_smooth) log_startup_progress("Smoothing atoms...") // Smooth EVERYTHING in the world for(var/turf/T in world) - if(T.smooth) - smooth_icon(T) + if(T.smoothing_flags) + T.smooth_icon() for(var/A in T) var/atom/AA = A - if(AA.smooth) - smooth_icon(AA) + if(AA.smoothing_flags) + AA.smooth_icon() CHECK_TICK // Incase any new atoms were added to the smoothing queue for whatever reason @@ -37,7 +37,19 @@ SUBSYSTEM_DEF(icon_smooth) var/atom/A = V if(!A || A.z <= 2) continue - smooth_icon(A) + A.smooth_icon() CHECK_TICK return ..() + +/datum/controller/subsystem/icon_smooth/proc/add_to_queue(atom/thing) + if(thing.smoothing_flags & SMOOTH_QUEUED) + return + thing.smoothing_flags |= SMOOTH_QUEUED + smooth_queue += thing + if(!can_fire) + can_fire = TRUE + +/datum/controller/subsystem/icon_smooth/proc/remove_from_queues(atom/thing) + thing.smoothing_flags &= ~SMOOTH_QUEUED + smooth_queue -= thing diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 5ba3191c429..447442a9ac0 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -76,6 +76,8 @@ ///Used to decide what the maximum time between ambience is var/max_ambience_cooldown = 90 SECONDS + var/area/area_limited_icon_smoothing + /area/New(loc, ...) if(!there_can_be_many) // Has to be done in New else the maploader will fuck up and find subtypes for the parent GLOB.all_unique_areas[type] = src diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e815dd545ac..6c18982600c 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -59,6 +59,25 @@ /// Last color calculated for the the chatmessage overlays. Used for caching. var/chat_color + ///Icon-smoothing behavior. + var/smoothing_flags = NONE + ///Smoothing variable + var/top_left_corner + ///Smoothing variable + var/top_right_corner + ///Smoothing variable + var/bottom_left_corner + ///Smoothing variable + var/bottom_right_corner + ///What smoothing groups does this atom belongs to, to match canSmoothWith. If null, nobody can smooth with it. + var/list/smoothing_groups = null + ///List of smoothing groups this atom can smooth with. If this is null and atom is smooth, it smooths only with itself. + var/list/canSmoothWith = null + ///What directions this is currently smoothing with. IMPORTANT: This uses the smoothing direction flags as defined in icon_smoothing.dm, instead of the BYOND flags. + var/smoothing_junction = null //This starts as null for us to know when it's first set, but after that it will hold a 8-bit mask ranging from 0 to 255. + ///Used for changing icon states for different base sprites. + var/base_icon_state + /atom/New(loc, ...) SHOULD_CALL_PARENT(TRUE) if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New() @@ -108,6 +127,15 @@ ComponentInitialize() + if(length(smoothing_groups)) + sortTim(smoothing_groups) //In case it's not properly ordered, let's avoid duplicate entries with the same values. + SET_BITFLAG_LIST(smoothing_groups) + if(length(canSmoothWith)) + sortTim(canSmoothWith) + if(canSmoothWith[length(canSmoothWith)] > MAX_S_TURF) //If the last element is higher than the maximum turf-only value, then it must scan turf contents for smoothing targets. + smoothing_flags |= SMOOTH_OBJ + SET_BITFLAG_LIST(canSmoothWith) + return INITIALIZE_HINT_NORMAL //called if Initialize returns INITIALIZE_HINT_LATELOAD diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 83277765444..1bb5a062e4b 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -715,12 +715,14 @@ Congratulations! You are now trained for invasive xenobiology research!"} name = "alien table" desc = "Advanced flat surface technology at work!" icon = 'icons/obj/smooth_structures/alien_table.dmi' - icon_state = "alien_table" + icon_state = "alien_table-0" + base_icon_state = "alien_table" buildstack = /obj/item/stack/sheet/mineral/abductor framestack = /obj/item/stack/sheet/mineral/abductor buildstackamount = 1 framestackamount = 1 - canSmoothWith = null + smoothing_groups = list(SMOOTH_GROUP_ABDUCTOR_TABLES) + canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_TABLES) frame = /obj/structure/table_frame/abductor /obj/machinery/optable/abductor diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 4de42931b6d..84b96119e2b 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -327,19 +327,43 @@ /turf/simulated/floor/holofloor/ thermal_conductivity = 0 icon_state = "plating" -/turf/simulated/floor/holofloor/grass - name = "Lush Grass" - icon_state = "grass1" - floor_tile = /obj/item/stack/tile/grass -/turf/simulated/floor/holofloor/grass/Initialize(mapload) +/turf/simulated/floor/holofloor/carpet + name = "carpet" + icon = 'icons/turf/floors/carpet.dmi' + icon_state = "carpet-255" + base_icon_state = "carpet" + floor_tile = /obj/item/stack/tile/carpet + broken_states = list("damaged") + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET) + canSmoothWith = list(SMOOTH_GROUP_CARPET) + footstep = FOOTSTEP_CARPET + barefootstep = FOOTSTEP_CARPET_BAREFOOT + clawfootstep = FOOTSTEP_CARPET_BAREFOOT + heavyfootstep = FOOTSTEP_GENERIC_HEAVY + +/turf/simulated/floor/holofloor/carpet/Initialize(mapload) . = ..() update_icon() -/turf/simulated/floor/holofloor/grass/update_icon() - ..() - if(!(icon_state in list("grass1", "grass2", "grass3", "grass4", "sand"))) - icon_state = "grass[pick("1","2","3","4")]" +/turf/simulated/floor/holofloor/carpet/update_icon() + if(!..()) + return 0 + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH(src) +/turf/simulated/floor/holofloor/grass + name = "Lush Grass" + icon = 'icons/turf/floors/grass.dmi' + icon_state = "grass-0" + base_icon_state = "grass" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_GRASS) + canSmoothWith = list(SMOOTH_GROUP_GRASS, SMOOTH_GROUP_JUNGLE_GRASS) + pixel_x = -9 + pixel_y = -9 + layer = ABOVE_OPEN_TURF_LAYER + floor_tile = /obj/item/stack/tile/grass /turf/simulated/floor/holofloor/attackby(obj/item/W as obj, mob/user as mob, params) return @@ -363,14 +387,16 @@ /obj/structure/table/holotable flags = NODECONSTRUCT - canSmoothWith = list(/obj/structure/table/holotable) + canSmoothWith = list(SMOOTH_GROUP_TABLES) /obj/structure/table/holotable/wood name = "wooden table" desc = "A square piece of wood standing on four wooden legs. It can not move." icon = 'icons/obj/smooth_structures/wood_table.dmi' - icon_state = "wood_table" - canSmoothWith = list(/obj/structure/table/holotable/wood) + icon_state = "wood_table-0" + base_icon_state = "wood_table" + smoothing_groups = list(SMOOTH_GROUP_WOOD_TABLES) //Don't smooth with SMOOTH_GROUP_TABLES + canSmoothWith = list(SMOOTH_GROUP_WOOD_TABLES) /obj/structure/chair/stool/holostool flags = NODECONSTRUCT diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 76f0de8b269..04da69784eb 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -210,7 +210,7 @@ anchored = 1 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags = NODECONSTRUCT - var/base_icon_state = "body_scanner_0" + base_icon_state = "body_scanner_0" var/occupied_icon_state = "body_scanner_1" var/on_store_message = "has entered long-term storage." var/on_store_name = "Cryogenic Oversight" diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index c8b19751c68..faa249c8035 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -108,14 +108,16 @@ name = "sandbags" desc = "Bags of sand. Self explanatory." icon = 'icons/obj/smooth_structures/sandbags.dmi' - icon_state = "sandbags" + icon_state = "sandbags-0" + base_icon_state = "sandbags" max_integrity = 280 proj_pass_rate = 20 pass_flags = LETPASSTHROW bar_material = SAND climbable = TRUE - smooth = SMOOTH_TRUE - canSmoothWith = list(/obj/structure/barricade/sandbags, /turf/simulated/wall, /turf/simulated/wall/r_wall, /obj/structure/falsewall, /obj/structure/falsewall/reinforced, /turf/simulated/wall/rust, /turf/simulated/wall/r_wall/rust, /obj/structure/barricade/security) + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_SANDBAGS) + canSmoothWith = list(SMOOTH_GROUP_SANDBAGS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SECURITY_BARRICADE) stacktype = null /obj/structure/barricade/security diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 478d5abc02d..c0d163e59c2 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -60,6 +60,7 @@ GLOBAL_LIST_EMPTY(airlock_overlays) siemens_strength = 1 flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 rad_insulation = RAD_MEDIUM_INSULATION + smoothing_groups = list(SMOOTH_GROUP_AIRLOCK) var/security_level = 0 //How much are wires secured var/aiControlDisabled = AICONTROLDISABLED_OFF var/hackProof = FALSE // if TRUE, this door can't be hacked by the AI diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 6ef46e63d85..93ef91a8011 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -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) diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index 17f37c4f478..7f112658a23 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -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" diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 6f18d7a9588..73d4290f3fb 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -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 ..() diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index c24432f9644..afd3ad54a11 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -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) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 96caf288d2d..7f982c601fe 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -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() diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 34eda470895..7ee548d2d39 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -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 diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 5ee5518af11..3fcadd33a17 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -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 diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index f43c3c2c1c9..ff4b8c98132 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -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, "The supporting rods look like they could be cut.") @@ -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) . = ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index 17645de3c78..3a1c7ad85f3 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -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 diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 6dd727c6bbd..b06eca9ef90 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -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 "The top is screwed on, but the main bolts are also visible." /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 diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 3da55a8f17e..53966b1725b 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -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 diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 80325022e05..09b7babbef2 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -106,7 +106,7 @@ /turf/simulated/ChangeTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE) . = ..() - queue_smooth_neighbors(src) + QUEUE_SMOOTH_NEIGHBORS(src) /turf/simulated/proc/is_shielded() diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index ec03b67c425..959dab35e1b 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -2,10 +2,12 @@ name = "chasm" desc = "Watch your step." baseturf = /turf/simulated/floor/chasm - smooth = SMOOTH_TRUE | SMOOTH_BORDER | SMOOTH_MORE icon = 'icons/turf/floors/Chasms.dmi' - icon_state = "smooth" - canSmoothWith = list(/turf/simulated/floor/chasm) + icon_state = "chasms-255" + base_icon_state = "chasms" + smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_TURF_CHASM) + canSmoothWith = list(SMOOTH_GROUP_TURF_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 var/static/list/falling_atoms = list() //Atoms currently falling into the chasm var/static/list/forbidden_types = typecacheof(list( diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 86a1e119dad..58f9052db92 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -44,21 +44,21 @@ /turf/simulated/floor/grass name = "grass patch" - icon_state = "grass1" + icon = 'icons/turf/floors/grass.dmi' + icon_state = "grass-0" + base_icon_state = "grass" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_GRASS) + canSmoothWith = list(SMOOTH_GROUP_GRASS, SMOOTH_GROUP_JUNGLE_GRASS) + transform = matrix(1, 0, -9, 0, 1, -9) //Yes, these sprites are 50x50px, big grass control the industry + layer = ABOVE_OPEN_TURF_LAYER + broken_states = list("damaged") floor_tile = /obj/item/stack/tile/grass - broken_states = list("sand") footstep = FOOTSTEP_GRASS barefootstep = FOOTSTEP_GRASS clawfootstep = FOOTSTEP_GRASS heavyfootstep = FOOTSTEP_GENERIC_HEAVY -/turf/simulated/floor/grass/Initialize(mapload) - . = ..() - update_icon() - -/turf/simulated/floor/grass/update_icon() - icon_state = "grass[pick("1","2","3","4")]" - /turf/simulated/floor/grass/attackby(obj/item/C, mob/user, params) if(..()) return @@ -68,17 +68,37 @@ playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) make_plating() +/turf/simulated/floor/grass/jungle + name = "jungle grass" + icon = 'icons/turf/floors/junglegrass.dmi' + icon_state = "junglegrass-0" + base_icon_state = "junglegrass" + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_GRASS, SMOOTH_GROUP_JUNGLE_GRASS) + +/turf/simulated/floor/grass/no_creep //This vairant shows up under normal turfs so fits in the regular 32x32 sprite + smoothing_flags = null + smoothing_groups = null + canSmoothWith = null + layer = GRASS_UNDER_LAYER + +/turf/simulated/floor/grass/jungle/no_creep //This vairant shows up under normal turfs so fits in the regular 32x32 sprite + smoothing_flags = null + smoothing_groups = null + canSmoothWith = null + layer = GRASS_UNDER_LAYER //Carpets /turf/simulated/floor/carpet name = "carpet" icon = 'icons/turf/floors/carpet.dmi' - icon_state = "carpet" + icon_state = "carpet-255" + base_icon_state = "carpet" floor_tile = /obj/item/stack/tile/carpet broken_states = list("damaged") - smooth = SMOOTH_TRUE - canSmoothWith = null + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET) + canSmoothWith = list(SMOOTH_GROUP_CARPET) footstep = FOOTSTEP_CARPET barefootstep = FOOTSTEP_CARPET_BAREFOOT clawfootstep = FOOTSTEP_CARPET_BAREFOOT @@ -92,12 +112,16 @@ if(!..()) return 0 if(!broken && !burnt) - if(smooth) - queue_smooth(src) + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH(src) else make_plating() - if(smooth) - queue_smooth_neighbors(src) + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH_NEIGHBORS(src) + +//Carpet variant for mapping aid, functionally the same as parent after smoothing. +/turf/simulated/floor/carpet/lone + icon_state = "carpet-0" /turf/simulated/floor/carpet/break_tile() broken = 1 @@ -113,47 +137,56 @@ /turf/simulated/floor/carpet/black icon = 'icons/turf/floors/carpet_black.dmi' floor_tile = /obj/item/stack/tile/carpet/black - canSmoothWith = list(/turf/simulated/floor/carpet/black) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_BLACK) + canSmoothWith = list(SMOOTH_GROUP_CARPET_BLACK) /turf/simulated/floor/carpet/blue icon = 'icons/turf/floors/carpet_blue.dmi' floor_tile = /obj/item/stack/tile/carpet/blue - canSmoothWith = list(/turf/simulated/floor/carpet/blue) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_BLUE) + canSmoothWith = list(SMOOTH_GROUP_CARPET_BLUE) /turf/simulated/floor/carpet/cyan icon = 'icons/turf/floors/carpet_cyan.dmi' floor_tile = /obj/item/stack/tile/carpet/cyan - canSmoothWith = list(/turf/simulated/floor/carpet/cyan) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_CYAN) + canSmoothWith = list(SMOOTH_GROUP_CARPET_CYAN) /turf/simulated/floor/carpet/green icon = 'icons/turf/floors/carpet_green.dmi' floor_tile = /obj/item/stack/tile/carpet/green - canSmoothWith = list(/turf/simulated/floor/carpet/green) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_GREEN) + canSmoothWith = list(SMOOTH_GROUP_CARPET_GREEN) /turf/simulated/floor/carpet/orange icon = 'icons/turf/floors/carpet_orange.dmi' floor_tile = /obj/item/stack/tile/carpet/orange - canSmoothWith = list(/turf/simulated/floor/carpet/orange) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_ORANGE) + canSmoothWith = list(SMOOTH_GROUP_CARPET_ORANGE) /turf/simulated/floor/carpet/purple icon = 'icons/turf/floors/carpet_purple.dmi' floor_tile = /obj/item/stack/tile/carpet/purple - canSmoothWith = list(/turf/simulated/floor/carpet/purple) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_PURPLE) + canSmoothWith = list(SMOOTH_GROUP_CARPET_PURPLE) /turf/simulated/floor/carpet/red icon = 'icons/turf/floors/carpet_red.dmi' floor_tile = /obj/item/stack/tile/carpet/red - canSmoothWith = list(/turf/simulated/floor/carpet/red) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_RED) + canSmoothWith = list(SMOOTH_GROUP_CARPET_RED) /turf/simulated/floor/carpet/royalblack icon = 'icons/turf/floors/carpet_royalblack.dmi' floor_tile = /obj/item/stack/tile/carpet/royalblack - canSmoothWith = list(/turf/simulated/floor/carpet/royalblack) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_ROYALBLACK) + canSmoothWith = list(SMOOTH_GROUP_CARPET_ROYALBLACK) /turf/simulated/floor/carpet/royalblue icon = 'icons/turf/floors/carpet_royalblue.dmi' floor_tile = /obj/item/stack/tile/carpet/royalblue - canSmoothWith = list(/turf/simulated/floor/carpet/royalblue) + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_CARPET, SMOOTH_GROUP_CARPET_ROYALBLUE) + canSmoothWith = list(SMOOTH_GROUP_CARPET_ROYALBLUE) //End of carpets @@ -162,6 +195,7 @@ icon_state = "0" floor_tile = /obj/item/stack/tile/fakespace broken_states = list("damaged") + smoothing_flags = NONE plane = PLANE_SPACE /turf/simulated/floor/fakespace/Initialize(mapload) @@ -178,4 +212,4 @@ icon = 'icons/goonstation/turf/floor.dmi' icon_state = "arcade" floor_tile = /obj/item/stack/tile/arcade_carpet - smooth = SMOOTH_FALSE + smoothing_flags = NONE diff --git a/code/game/turfs/simulated/floor/indestructible.dm b/code/game/turfs/simulated/floor/indestructible.dm index 67e3f3f5ecd..58ab2b29708 100644 --- a/code/game/turfs/simulated/floor/indestructible.dm +++ b/code/game/turfs/simulated/floor/indestructible.dm @@ -81,7 +81,7 @@ nitrogen = 23 temperature = 300 planetary_atmos = TRUE - smooth = SMOOTH_TRUE + smoothing_flags = SMOOTH_CORNERS /turf/simulated/floor/indestructible/hierophant/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) return FALSE diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm index 94b72006040..66d8fb8dc0a 100644 --- a/code/game/turfs/simulated/floor/lava.dm +++ b/code/game/turfs/simulated/floor/lava.dm @@ -127,9 +127,11 @@ name = "lava" baseturf = /turf/simulated/floor/plating/lava/smooth icon = 'icons/turf/floors/lava.dmi' - icon_state = "unsmooth" - smooth = SMOOTH_MORE | SMOOTH_BORDER - canSmoothWith = list(/turf/simulated/floor/plating/lava/smooth) + icon_state = "lava-255" + base_icon_state = "lava" + smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER + smoothing_groups = list(SMOOTH_GROUP_TURF, SMOOTH_GROUP_FLOOR_LAVA) + canSmoothWith = list(SMOOTH_GROUP_FLOOR_LAVA) /turf/simulated/floor/plating/lava/smooth/lava_land_surface temperature = 300 diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 96b79588793..b4c957cbba2 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -1,12 +1,12 @@ /turf/simulated/floor/vault icon = 'icons/turf/floors.dmi' icon_state = "rockvault" - smooth = SMOOTH_FALSE + smoothing_flags = NONE /turf/simulated/wall/vault icon = 'icons/turf/walls.dmi' icon_state = "rockvault" - smooth = SMOOTH_FALSE + smoothing_flags = NONE /turf/simulated/floor/bluegrid icon = 'icons/turf/floors.dmi' diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index ad26fa8919e..e8574e06d62 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -11,6 +11,7 @@ barefootstep = FOOTSTEP_HARD_BAREFOOT clawfootstep = FOOTSTEP_HARD_CLAW heavyfootstep = FOOTSTEP_GENERIC_HEAVY + smoothing_groups = list(SMOOTH_GROUP_TURF) /turf/simulated/floor/plating/Initialize(mapload) . = ..() @@ -374,15 +375,15 @@ /turf/simulated/floor/plating/ice name = "ice sheet" desc = "A sheet of solid ice. Looks slippery." - icon = 'icons/turf/floors/ice_turfs.dmi' + icon = 'icons/turf/floors/ice_turf.dmi' icon_state = "unsmooth" oxygen = 22 nitrogen = 82 temperature = 180 baseturf = /turf/simulated/floor/plating/ice slowdown = TRUE - smooth = SMOOTH_TRUE - canSmoothWith = list(/turf/simulated/floor/plating/ice/smooth, /turf/simulated/floor/plating/ice) + smoothing_flags = SMOOTH_CORNERS + canSmoothWith = list(SMOOTH_GROUP_FLOOR_ICE) /turf/simulated/floor/plating/ice/Initialize(mapload) . = ..() @@ -393,8 +394,8 @@ /turf/simulated/floor/plating/ice/smooth icon_state = "smooth" - smooth = SMOOTH_MORE | SMOOTH_BORDER - canSmoothWith = list(/turf/simulated/floor/plating/ice/smooth, /turf/simulated/floor/plating/ice) + smoothing_flags = SMOOTH_CORNERS | SMOOTH_BORDER + canSmoothWith = list(SMOOTH_GROUP_FLOOR_ICE) /turf/simulated/floor/plating/nitrogen oxygen = 0 diff --git a/code/game/turfs/simulated/floor/transparent.dm b/code/game/turfs/simulated/floor/transparent.dm index 81030c4d294..cbda1a32ed9 100644 --- a/code/game/turfs/simulated/floor/transparent.dm +++ b/code/game/turfs/simulated/floor/transparent.dm @@ -2,10 +2,12 @@ name = "glass floor" desc = "Don't jump on it... Or do, I'm not your mom." icon = 'icons/turf/floors/glass.dmi' - icon_state = "unsmooth" + icon_state = "glass-0" + base_icon_state = "glass" baseturf = /turf/space - smooth = SMOOTH_TRUE - canSmoothWith = list(/turf/simulated/floor/transparent/glass, /turf/simulated/floor/transparent/glass/reinforced, /turf/simulated/floor/transparent/glass/plasma, /turf/simulated/floor/transparent/glass/reinforced/plasma) + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_GLASS_FLOOR) + canSmoothWith = list(SMOOTH_GROUP_GLASS_FLOOR) footstep = FOOTSTEP_GLASS barefootstep = FOOTSTEP_GLASS_BAREFOOT clawfootstep = FOOTSTEP_GLASS_BAREFOOT @@ -78,6 +80,8 @@ name = "reinforced glass floor" desc = "Jump on it, it can cope. Promise..." icon = 'icons/turf/floors/reinf_glass.dmi' + icon_state = "reinf_glass-0" + base_icon_state = "reinf_glass" thermal_conductivity = 0.035 heat_capacity = 1600 @@ -89,6 +93,8 @@ name = "plasma glass floor" desc = "Wait, was space always that color?" icon = 'icons/turf/floors/plasmaglass.dmi' + icon_state = "plasmaglass-0" + base_icon_state = "plasmaglass" thermal_conductivity = 0.030 heat_capacity = 32000 @@ -96,6 +102,8 @@ name = "reinforced plasma glass floor" desc = "For when you REALLY don't want your floor choice to suffocate everyone." icon = 'icons/turf/floors/reinf_plasmaglass.dmi' + icon_state = "reinf_plasmaglass-0" + base_icon_state = "reinf_plasmaglass" thermal_conductivity = 0.025 heat_capacity = 325000 @@ -103,10 +111,15 @@ name = "titanium glass floor" desc = "Stylish AND strong!" icon = 'icons/turf/floors/titaniumglass.dmi' - canSmoothWith = list(/turf/simulated/floor/transparent/glass/titanium, /turf/simulated/floor/transparent/glass/titanium/plasma) + icon_state = "titaniumglass-0" + base_icon_state = "titaniumglass" + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_GLASS_FLOOR_TITANIUM) + canSmoothWith = list(SMOOTH_GROUP_GLASS_FLOOR_TITANIUM) thermal_conductivity = 0.025 heat_capacity = 1600 /turf/simulated/floor/transparent/glass/titanium/plasma name = "plastitanium glass floor" icon = 'icons/turf/floors/plastitaniumglass.dmi' + icon_state = "plastitaniumglass-0" + base_icon_state = "plastitaniumglass" diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 2cbce40cde2..812ad0976dc 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -2,11 +2,13 @@ /turf/simulated/mineral //wall piece name = "rock" - icon = 'icons/turf/mining.dmi' - icon_state = "rock" - var/smooth_icon = 'icons/turf/smoothrocks.dmi' - smooth = SMOOTH_MORE | SMOOTH_BORDER - canSmoothWith = null + icon = 'icons/turf/smoothrocks.dmi' + icon_state = "smoothrocks-0" + base_icon_state = "smoothrocks" + transform = matrix(1, 0, -4, 0, 1, -4) + smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_MINERAL_WALLS) + canSmoothWith = list(SMOOTH_GROUP_MINERAL_WALLS) baseturf = /turf/simulated/floor/plating/asteroid/airless opacity = 1 density = TRUE @@ -26,12 +28,6 @@ var/defer_change = 0 /turf/simulated/mineral/Initialize(mapload) - if(!canSmoothWith) - canSmoothWith = list(/turf/simulated/mineral) - var/matrix/M = new - M.Translate(-4, -4) - transform = M - icon = smooth_icon . = ..() if(mineralType && mineralAmt && spread && spreadChance) for(var/dir in GLOB.cardinal) @@ -45,14 +41,7 @@ /turf/simulated/mineral/shuttleRotate(rotation) setDir(angle2dir(rotation + dir2angle(dir))) - queue_smooth(src) - -/turf/simulated/mineral/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) - if(turf_type) - underlay_appearance.icon = initial(turf_type.icon) - underlay_appearance.icon_state = initial(turf_type.icon_state) - return TRUE - return ..() + QUEUE_SMOOTH(src) /turf/simulated/mineral/attackby(obj/item/I, mob/user, params) if(!user.IsAdvancedToolUser()) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index f0cb71fe2ee..1abd2147003 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -6,7 +6,12 @@ name = "wall" desc = "A huge chunk of metal used to separate rooms." icon = 'icons/turf/walls/wall.dmi' - icon_state = "wall" + icon_state = "wall-0" + base_icon_state = "wall" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WALLS) + var/rotting = FALSE var/damage = 0 @@ -36,14 +41,19 @@ var/sheet_amount = 2 var/girder_type = /obj/structure/girder - canSmoothWith = list( - /turf/simulated/wall, - /turf/simulated/wall/r_wall, - /obj/structure/falsewall, - /obj/structure/falsewall/reinforced, - /turf/simulated/wall/rust, - /turf/simulated/wall/r_wall/rust) - smooth = SMOOTH_TRUE +/turf/simulated/wall/Initialize(mapload) + . = ..() + if(smoothing_flags & SMOOTH_DIAGONAL_CORNERS && fixed_underlay) //Set underlays for the diagonal walls. + var/mutable_appearance/underlay_appearance = mutable_appearance(layer = TURF_LAYER, plane = FLOOR_PLANE) + if(fixed_underlay["space"]) + underlay_appearance.icon = 'icons/turf/space.dmi' + underlay_appearance.icon_state = SPACE_ICON_STATE + underlay_appearance.plane = PLANE_SPACE + else + underlay_appearance.icon = fixed_underlay["icon"] + underlay_appearance.icon_state = fixed_underlay["icon_state"] + fixed_underlay = string_assoc_list(fixed_underlay) + underlays += underlay_appearance /turf/simulated/wall/BeforeChange() for(var/obj/effect/overlay/wall_rot/WR in src) @@ -76,7 +86,7 @@ if(!damage_overlays[1]) //list hasn't been populated generate_overlays() - queue_smooth(src) + QUEUE_SMOOTH(src) if(!damage) if(damage_overlay) overlays -= damage_overlays[damage_overlay] diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 37208cd0b81..8ac7c8c973e 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -56,10 +56,12 @@ name = "necropolis wall" desc = "A thick, seemingly indestructible stone wall." icon = 'icons/turf/walls/boss_wall.dmi' - icon_state = "wall" - canSmoothWith = list(/turf/simulated/wall/indestructible/boss, /turf/simulated/wall/indestructible/boss/see_through) + icon_state = "boss_wall-0" + base_icon_state = "boss_wall" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BOSS_WALLS) + canSmoothWith = list(SMOOTH_GROUP_BOSS_WALLS) baseturf = /turf/simulated/floor/plating/asteroid/basalt - smooth = SMOOTH_TRUE /turf/simulated/wall/indestructible/boss/see_through opacity = FALSE @@ -69,12 +71,13 @@ desc = "A wall made out of a strange metal. The squares on it pulse in a predictable pattern." icon = 'icons/turf/walls/hierophant_wall.dmi' icon_state = "wall" - smooth = SMOOTH_TRUE + smoothing_flags = SMOOTH_CORNERS /turf/simulated/wall/indestructible/sandstone icon = 'icons/turf/walls/sandstone_wall.dmi' - icon_state = "sandstone" - canSmoothWith = list(/turf/simulated/wall/mineral/sandstone, /turf/simulated/wall/indestructible/sandstone, /obj/structure/falsewall/sandstone) + icon_state = "sandstone_wall-0" + base_icon_state = "sandstone_wall" + smoothing_flags = SMOOTH_BITMASK /turf/simulated/wall/indestructible/splashscreen name = "Space Station 13" @@ -84,23 +87,28 @@ /turf/simulated/wall/indestructible/uranium icon = 'icons/turf/walls/uranium_wall.dmi' - icon_state = "uranium" - smooth = SMOOTH_TRUE - canSmoothWith = list(/turf/simulated/wall/mineral/uranium, /obj/structure/falsewall/uranium, /turf/simulated/wall/indestructible/uranium) + icon_state = "uranium_wall-0" + base_icon_state = "uranium_wall" + smoothing_flags = SMOOTH_BITMASK + canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS) /turf/simulated/wall/indestructible/wood icon = 'icons/turf/walls/wood_wall.dmi' - icon_state = "wood" - smooth = SMOOTH_TRUE - canSmoothWith = list(/turf/simulated/wall/mineral/wood, /obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood/nonmetal, /turf/simulated/wall/indestructible/wood) + icon_state = "wood_wall-0" + base_icon_state = "wood_wall" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_WOOD_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WOOD_WALLS) /turf/simulated/wall/indestructible/alien name = "alien wall" desc = "A wall with alien alloy plating." icon = 'icons/turf/walls/abductor_wall.dmi' - icon_state = "abductor" - smooth = SMOOTH_TRUE|SMOOTH_DIAGONAL - canSmoothWith = list(/turf/simulated/wall/mineral/abductor, /obj/structure/falsewall/abductor, /turf/simulated/wall/indestructible/alien) + icon_state = "abductor-0" + base_icon_state = "abductor" + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS) + canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS) /turf/simulated/wall/indestructible/abductor icon = 'icons/turf/walls.dmi' @@ -115,9 +123,11 @@ name = "window" icon = 'icons/obj/smooth_structures/reinforced_window.dmi' icon_state = "fake_window" + base_icon_state = "reinforced_window" opacity = FALSE - smooth = SMOOTH_TRUE - canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass) + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE) + canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE) /turf/simulated/wall/indestructible/fakeglass/Initialize(mapload) . = ..() @@ -128,10 +138,12 @@ /turf/simulated/wall/indestructible/opsglass name = "window" icon = 'icons/obj/smooth_structures/plastitanium_window.dmi' - icon_state = "plastitanium_window" + icon_state = "plastitanium_window-0" + base_icon_state = "plastitanium_window" opacity = FALSE - smooth = SMOOTH_TRUE - canSmoothWith = list(/turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium) + smoothing_flags = SMOOTH_BITMASK + 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) /turf/simulated/wall/indestructible/opsglass/Initialize(mapload) . = ..() @@ -152,11 +164,17 @@ icon_state = "snowrock" /turf/simulated/wall/indestructible/riveted - icon = 'icons/turf/walls.dmi' - icon_state = "riveted" + icon = 'icons/turf/walls/riveted.dmi' + icon_state = "riveted-0" + base_icon_state = "riveted" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WALLS) /turf/simulated/wall/indestructible/syndicate icon = 'icons/turf/walls/plastitanium_wall.dmi' - icon_state = "map-shuttle" - smooth = SMOOTH_MORE | SMOOTH_DIAGONAL - canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/indestructible/syndicate, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/shuttle/engine, /obj/structure/falsewall/plastitanium, /turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium) + icon_state = "plastitanium_wall-0" + base_icon_state = "plastitanium_wall" + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SYNDICATE_WALLS) + canSmoothWith = list(SMOOTH_GROUP_SYNDICATE_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 6e8891f64e0..4da47e7660f 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -4,8 +4,8 @@ icon_state = "" var/last_event = 0 var/active = null + smoothing_flags = SMOOTH_BITMASK canSmoothWith = null - smooth = SMOOTH_TRUE /turf/simulated/wall/mineral/shuttleRotate(rotation) return //This override is needed to properly rotate the object when on a shuttle that is rotated. @@ -14,52 +14,64 @@ 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" sheet_type = /obj/item/stack/sheet/mineral/gold explosion_block = 0 //gold is a soft metal you dingus. - canSmoothWith = list(/turf/simulated/wall/mineral/gold, /obj/structure/falsewall/gold) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_GOLD_WALLS) + canSmoothWith = list(SMOOTH_GROUP_GOLD_WALLS) /turf/simulated/wall/mineral/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" sheet_type = /obj/item/stack/sheet/mineral/silver - canSmoothWith = list(/turf/simulated/wall/mineral/silver, /obj/structure/falsewall/silver) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SILVER_WALLS) + canSmoothWith = list(SMOOTH_GROUP_SILVER_WALLS) /turf/simulated/wall/mineral/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" sheet_type = /obj/item/stack/sheet/mineral/diamond explosion_block = 3 - canSmoothWith = list(/turf/simulated/wall/mineral/diamond, /obj/structure/falsewall/diamond) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_DIAMOND_WALLS) + canSmoothWith = list(SMOOTH_GROUP_DIAMOND_WALLS) /turf/simulated/wall/mineral/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" sheet_type = /obj/item/stack/sheet/mineral/bananium - canSmoothWith = list(/turf/simulated/wall/mineral/bananium, /obj/structure/falsewall/bananium) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BANANIUM_WALLS) + canSmoothWith = list(SMOOTH_GROUP_BANANIUM_WALLS) /turf/simulated/wall/mineral/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" sheet_type = /obj/item/stack/sheet/mineral/sandstone explosion_block = 0 - canSmoothWith = list(/turf/simulated/wall/mineral/sandstone, /turf/simulated/wall/indestructible/sandstone, /obj/structure/falsewall/sandstone) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SANDSTONE_WALLS) + canSmoothWith = list(SMOOTH_GROUP_SANDSTONE_WALLS) /turf/simulated/wall/mineral/uranium 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" sheet_type = /obj/item/stack/sheet/mineral/uranium - canSmoothWith = list(/turf/simulated/wall/mineral/uranium, /obj/structure/falsewall/uranium, /turf/simulated/wall/indestructible/uranium) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS) + canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS) /turf/simulated/wall/mineral/uranium/proc/radiate() if(!active) @@ -87,10 +99,12 @@ name = "plasma wall" desc = "A wall with plasma plating. This is definitely a bad idea." icon = 'icons/turf/walls/plasma_wall.dmi' - icon_state = "plasma" + icon_state = "plasma_wall-0" + base_icon_state = "plasma_wall" sheet_type = /obj/item/stack/sheet/mineral/plasma thermal_conductivity = 0.04 - canSmoothWith = list(/turf/simulated/wall/mineral/plasma, /obj/structure/falsewall/plasma) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS) + canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS) /turf/simulated/wall/mineral/plasma/attackby(obj/item/W as obj, mob/user as mob) if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite @@ -138,19 +152,24 @@ name = "alien wall" desc = "A strange-looking alien wall." icon = 'icons/turf/walls/plasma_wall.dmi' - icon_state = "plasma" + icon_state = "abductor_wall-0" + base_icon_state = "abductor_wall" sheet_type = /obj/item/stack/sheet/mineral/abductor - canSmoothWith = list(/turf/simulated/wall/mineral/alien, /obj/structure/falsewall/alien) + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS) + canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS) /turf/simulated/wall/mineral/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" sheet_type = /obj/item/stack/sheet/wood hardness = 70 explosion_block = 0 - canSmoothWith = list(/turf/simulated/wall/mineral/wood, /obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood/nonmetal, /turf/simulated/wall/indestructible/wood) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_WOOD_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WOOD_WALLS) /turf/simulated/wall/mineral/wood/attackby(obj/item/W, mob/user) if(W.sharp && W.force) @@ -166,52 +185,59 @@ desc = "A solidly wooden wall. It's a bit weaker than a wall made with metal." girder_type = /obj/structure/barricade/wooden hardness = 50 - canSmoothWith = list(/turf/simulated/wall/mineral/wood, /obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood/nonmetal, /turf/simulated/wall/indestructible/wood) + canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_WOOD_WALLS) /turf/simulated/wall/mineral/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" sheet_type = /obj/item/stack/rods sheet_amount = 5 - canSmoothWith = list(/turf/simulated/wall/mineral/iron, /obj/structure/falsewall/iron) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_IRON_WALLS) + canSmoothWith = list(SMOOTH_GROUP_IRON_WALLS) /turf/simulated/wall/mineral/abductor name = "alien wall" desc = "A wall with alien alloy plating." icon = 'icons/turf/walls/abductor_wall.dmi' - icon_state = "abductor" - smooth = SMOOTH_TRUE|SMOOTH_DIAGONAL + icon_state = "abductor_wall-0" + base_icon_state = "abductor_wall" sheet_type = /obj/item/stack/sheet/mineral/abductor explosion_block = 3 - canSmoothWith = list(/turf/simulated/wall/mineral/abductor, /obj/structure/falsewall/abductor, /turf/simulated/wall/indestructible/alien) + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS) + canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS) /////////////////////Titanium walls///////////////////// /turf/simulated/wall/mineral/titanium //has to use this path due to how building walls works name = "wall" desc = "A light-weight titanium wall used in shuttles." - icon = 'icons/turf/walls/shuttle_wall.dmi' - icon_state = "map-shuttle" + icon = 'icons/turf/walls/plastinum_wall.dmi' + icon_state = "plastinum_wall-0" + base_icon_state = "plastinum_wall" explosion_block = 3 flags_2 = CHECK_RICOCHET_2 sheet_type = /obj/item/stack/sheet/mineral/titanium - smooth = SMOOTH_MORE|SMOOTH_DIAGONAL - 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, /obj/structure/falsewall/titanium) + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + smoothing_groups = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE) + canSmoothWith = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE) /turf/simulated/wall/mineral/titanium/nodiagonal - smooth = SMOOTH_MORE icon_state = "map-shuttle_nd" + base_icon_state = "plastinum_wall" + smoothing_flags = SMOOTH_BITMASK /turf/simulated/wall/mineral/titanium/nosmooth - icon = 'icons/turf/shuttle.dmi' - icon_state = "wall" - smooth = SMOOTH_FALSE + icon_state = "plastinum_wall" + smoothing_flags = NONE /turf/simulated/wall/mineral/titanium/overspace icon_state = "map-overspace" - fixed_underlay = list("space"=1) + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + fixed_underlay = list("space" = TRUE) //sub-type to be used for interior shuttle walls //won't get an underlay of the destination turf on shuttle move @@ -240,15 +266,19 @@ name = "pod wall" desc = "An easily-compressable wall used for temporary shelter." icon = 'icons/turf/walls/survival_pod_walls.dmi' - icon_state = "smooth" - smooth = SMOOTH_MORE|SMOOTH_DIAGONAL - canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock, /obj/structure/window/full, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine) + icon_state = "survival_pod_walls-0" + base_icon_state = "survival_pod_walls" + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + smoothing_groups = list(SMOOTH_GROUP_PLASTITANIUM_WALLS) + canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) /turf/simulated/wall/mineral/titanium/survival/nodiagonal - smooth = SMOOTH_MORE + icon = 'icons/turf/walls/survival_pod_walls.dmi' + icon_state = "survival_pod_walls-0" + base_icon_state = "survival_pod_walls" + smoothing_flags = SMOOTH_BITMASK /turf/simulated/wall/mineral/titanium/survival/pod - canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod) //undeconstructable type for derelict //these walls are undeconstructable/unthermitable @@ -260,11 +290,11 @@ fixed_underlay = list("icon"='icons/turf/floors.dmi', "icon_state"="darkredfull") /turf/simulated/wall/mineral/titanium/nodecon/nodiagonal - smooth = SMOOTH_MORE + smoothing_flags = SMOOTH_CORNERS icon_state = "map-shuttle_nd" /turf/simulated/wall/mineral/titanium/nodecon/nosmooth - smooth = SMOOTH_FALSE + smoothing_flags = NONE icon = 'icons/turf/shuttle.dmi' icon_state = "wall" @@ -287,24 +317,28 @@ name = "wall" desc = "An evil wall of plasma and titanium." icon = 'icons/turf/walls/plastitanium_wall.dmi' - icon_state = "map-shuttle" + icon_state = "plastitanium_wall-0" + base_icon_state = "plastitanium_wall" explosion_block = 4 sheet_type = /obj/item/stack/sheet/mineral/plastitanium - smooth = SMOOTH_MORE|SMOOTH_DIAGONAL - canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/indestructible/syndicate, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/shuttle/engine, /obj/structure/falsewall/plastitanium, /turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium) + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + smoothing_groups = list(SMOOTH_GROUP_PLASTITANIUM_WALLS) + canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) /turf/simulated/wall/mineral/plastitanium/nodiagonal - smooth = SMOOTH_MORE icon_state = "map-shuttle_nd" + base_icon_state = "plastitanium_wall" + smoothing_flags = SMOOTH_BITMASK /turf/simulated/wall/mineral/plastitanium/nosmooth icon = 'icons/turf/shuttle.dmi' icon_state = "wall" - smooth = SMOOTH_FALSE + smoothing_flags = NONE /turf/simulated/wall/mineral/plastitanium/overspace icon_state = "map-overspace" - fixed_underlay = list("space"=1) + smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS + fixed_underlay = list("space" = TRUE) //have to copypaste this code /turf/simulated/wall/mineral/plastitanium/interior/copyTurf(turf/T) diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index b5026e64673..f5f33ec7728 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -2,9 +2,10 @@ name = "runed metal wall" desc = "A cold metal wall engraved with indecipherable symbols. Studying them causes your head to pound." icon = 'icons/turf/walls/cult_wall.dmi' - icon_state = "cult" + icon_state = "cult_wall-0" + base_icon_state = "cult_wall" + smoothing_flags = SMOOTH_BITMASK canSmoothWith = null - smooth = SMOOTH_FALSE sheet_type = /obj/item/stack/sheet/runed_metal sheet_amount = 1 girder_type = /obj/structure/girder/cult @@ -36,13 +37,17 @@ name = "rusted wall" desc = "A rusted metal wall." icon = 'icons/turf/walls/rusty_wall.dmi' - icon_state = "arust" + icon_state = "rusty_wall-0" + base_icon_state = "rusty_wall" + smoothing_flags = SMOOTH_BITMASK /turf/simulated/wall/r_wall/rust name = "rusted reinforced wall" desc = "A huge chunk of rusted reinforced metal." icon = 'icons/turf/walls/rusty_reinforced_wall.dmi' - icon_state = "rrust" + icon_state = "rusty_reinforced_wall-0" + base_icon_state = "rusty_reinforced_wall" + smoothing_flags = SMOOTH_BITMASK //Clockwork walls /turf/simulated/wall/clockwork @@ -56,6 +61,8 @@ girder_type = /obj/structure/clockwork/wall_gear var/heated var/obj/effect/clockwork/overlay/wall/realappearance + smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BRASS_WALL) + canSmoothWith = list(SMOOTH_GROUP_BRASS_WALL) /turf/simulated/wall/clockwork/Initialize() . = ..() diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index d840ff2c355..b572105ccce 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -2,7 +2,9 @@ name = "reinforced wall" desc = "A huge chunk of reinforced metal used to separate rooms." icon = 'icons/turf/walls/reinforced_wall.dmi' - icon_state = "r_wall" + icon_state = "reinforced_wall-0" + base_icon_state = "reinforced_wall" + smoothing_flags = SMOOTH_BITMASK opacity = 1 density = 1 explosion_block = 2 @@ -69,7 +71,7 @@ return d_state = RWALL_INTACT update_icon() - queue_smooth_neighbors(src) + QUEUE_SMOOTH_NEIGHBORS(src) to_chat(user, "You repair the last of the damage.") return else @@ -213,11 +215,12 @@ if(d_state) icon_state = "r_wall-[d_state]" - smooth = SMOOTH_FALSE - clear_smooth_overlays() + smoothing_flags = NONE else - smooth = SMOOTH_TRUE - icon_state = "" + smoothing_flags = SMOOTH_BITMASK + icon_state = "[base_icon_state]-[smoothing_junction]" + QUEUE_SMOOTH_NEIGHBORS(src) + QUEUE_SMOOTH(src) /turf/simulated/wall/r_wall/devastate_wall() new sheet_type(src, sheet_amount) diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index a107250f18d..b943673c14b 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -28,6 +28,16 @@ stack_trace("Warning: [src]([type]) initialized multiple times!") initialized = TRUE + if(length(smoothing_groups)) + sortTim(smoothing_groups) //In case it's not properly ordered, let's avoid duplicate entries with the same values. + SET_BITFLAG_LIST(smoothing_groups) + + if(length(canSmoothWith)) + sortTim(canSmoothWith) + if(canSmoothWith[length(canSmoothWith)] > MAX_S_TURF) //If the last element is higher than the maximum turf-only value, then it must scan turf contents for smoothing targets. + smoothing_flags |= SMOOTH_OBJ + SET_BITFLAG_LIST(canSmoothWith) + var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) add_overlay(/obj/effect/fullbright) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index fd8d2ecf040..0df41ba0928 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -8,6 +8,9 @@ var/slowdown = 0 //negative for faster, positive for slower var/transparent_floor = FALSE //used to check if pipes should be visible under the turf or not + ///Icon-smoothing variable to map a diagonal wall corner with a fixed underlay. + var/list/fixed_underlay = null + ///Properties for open tiles (/floor) /// All the gas vars, on the turf, are meant to be utilized for initializing a gas datum and setting its first gas values; the turf vars are never further modified at runtime; it is never directly used for calculations by the atmospherics system. var/oxygen = 0 @@ -46,8 +49,16 @@ vis_contents.Cut() levelupdate() - if(smooth) - queue_smooth(src) + if(length(smoothing_groups)) + sortTim(smoothing_groups) //In case it's not properly ordered, let's avoid duplicate entries with the same values. + SET_BITFLAG_LIST(smoothing_groups) + if(length(canSmoothWith)) + sortTim(canSmoothWith) + if(canSmoothWith[length(canSmoothWith)] > MAX_S_TURF) //If the last element is higher than the maximum turf-only value, then it must scan turf contents for smoothing targets. + smoothing_flags |= SMOOTH_OBJ + SET_BITFLAG_LIST(canSmoothWith) + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH(src) visibilityChanged() for(var/atom/movable/AM in src) diff --git a/code/modules/awaymissions/mission_code/beach.dm b/code/modules/awaymissions/mission_code/beach.dm index 418e256fd8d..39e9f6d0040 100644 --- a/code/modules/awaymissions/mission_code/beach.dm +++ b/code/modules/awaymissions/mission_code/beach.dm @@ -86,6 +86,7 @@ barefootstep = FOOTSTEP_WATER clawfootstep = FOOTSTEP_WATER heavyfootstep = FOOTSTEP_WATER + smoothing_groups = list(SMOOTH_GROUP_BEACH_WATER) /turf/simulated/floor/beach/away/water/Entered(atom/movable/AM, atom/OldLoc) . = ..() @@ -120,13 +121,11 @@ /turf/simulated/floor/beach/away/water/drop name = "Water" icon = 'icons/turf/floors/seadrop.dmi' - icon_state = "seadrop" + icon_state = "seadrop-0" + base_icon_state = "seadrop" water_overlay_image = null - smooth = SMOOTH_TRUE - canSmoothWith = list( - /turf/simulated/floor/beach/away/water/drop, /turf/simulated/floor/beach/away/water/drop/dense, - /turf/simulated/floor/beach/away/water, /turf/simulated/floor/beach/away/water/dense, - /turf/simulated/floor/beach/away/water/edge_drop) + smoothing_flags = SMOOTH_BITMASK + canSmoothWith = list(SMOOTH_GROUP_BEACH_WATER) var/obj/effect/beach_drop_overlay/water_overlay baseturf = /turf/simulated/floor/beach/away/water/drop @@ -141,13 +140,11 @@ /obj/effect/beach_drop_overlay name = "Water" icon = 'icons/turf/floors/seadrop-o.dmi' + base_icon_state = "seadrop-o" layer = MOB_LAYER + 0.1 - smooth = SMOOTH_TRUE + smoothing_flags = SMOOTH_BITMASK + canSmoothWith = list(SMOOTH_GROUP_BEACH_WATER) anchored = 1 - canSmoothWith = list( - /turf/simulated/floor/beach/away/water/drop, /turf/simulated/floor/beach/away/water/drop/dense, - /turf/simulated/floor/beach/away/water, /turf/simulated/floor/beach/away/water/dense, - /turf/simulated/floor/beach/away/water/edge_drop) /turf/simulated/floor/beach/away/water/drop/dense density = TRUE @@ -155,6 +152,7 @@ /turf/simulated/floor/beach/away/water/deep name = "Deep Water" + smoothing_groups = list() icon_state = "seadeep" water_overlay_image = "water_deep" baseturf = /turf/simulated/floor/beach/away/water/deep diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index 0c18062d189..80326a6c141 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -14,12 +14,12 @@ subtimer = start_watch() log_debug("Smoothing tiles") for(var/turf/T in smoothTurfs) - if(T.smooth) - queue_smooth(T) + if(T.smoothing_flags) + QUEUE_SMOOTH(T) for(var/R in T) var/atom/A = R - if(A.smooth) - queue_smooth(A) + if(A.smoothing_flags) + QUEUE_SMOOTH(A) log_debug("\tTook [stop_watch(subtimer)]s") log_debug("Late setup finished - took [stop_watch(total_timer)]s") diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index ca0a4df5f69..9baa785a556 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -73,10 +73,12 @@ /obj/structure/window/full/shuttle/survival_pod name = "pod window" icon = 'icons/obj/smooth_structures/pod_window.dmi' - icon_state = "smooth" - smooth = SMOOTH_MORE + icon_state = "pod_window-0" + base_icon_state = "pod_window" + smoothing_flags = SMOOTH_BITMASK glass_type = /obj/item/stack/sheet/titaniumglass - canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/full/shuttle/survival_pod) + smoothing_groups = list(SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_SURVIVAL_TIANIUM_POD) + canSmoothWith = list(SMOOTH_GROUP_SURVIVAL_TIANIUM_POD) /obj/structure/window/reinforced/survival_pod name = "pod window" @@ -128,7 +130,9 @@ /obj/structure/table/survival_pod icon = 'icons/obj/lavaland/survival_pod.dmi' icon_state = "table" - smooth = SMOOTH_FALSE + smoothing_flags = NONE + smoothing_groups = null + canSmoothWith = null //Sleeper /obj/machinery/sleeper/survival_pod diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 92318dbe450..7618bea4f07 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -100,7 +100,7 @@ Difficulty: Hard /datum/action/innate/megafauna_attack/hallucination_surround name = "Surround Target" icon_icon = 'icons/turf/walls/wall.dmi' - button_icon_state = "wall" + button_icon_state = "wall-0" chosen_message = "You are now surrounding the target you click on with hallucinations." chosen_attack_num = 3 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index a85bff9c834..8aec856c8c5 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -512,18 +512,23 @@ Difficulty: Hard /obj/effect/temp_visual/hierophant/wall //smoothing and pooling were not friends, but pooling is dead. name = "vortex wall" icon = 'icons/turf/walls/hierophant_wall_temp.dmi' - icon_state = "wall" + icon_state = "hierophant_wall_temp-0" + base_icon_state = "hierophant_wall_temp" + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_HIERO_WALL) + canSmoothWith = list(SMOOTH_GROUP_HIERO_WALL) light_range = MINIMUM_USEFUL_LIGHT_RANGE duration = 100 - smooth = SMOOTH_TRUE /obj/effect/temp_visual/hierophant/wall/Initialize(mapload, new_caster) . = ..() - queue_smooth_neighbors(src) - queue_smooth(src) + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH_NEIGHBORS(src) + QUEUE_SMOOTH(src) /obj/effect/temp_visual/hierophant/wall/Destroy() - queue_smooth_neighbors(src) + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH_NEIGHBORS(src) return ..() /obj/effect/temp_visual/hierophant/wall/CanPass(atom/movable/mover, turf/target) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm index 45f8222d335..0812991bfb9 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm @@ -293,4 +293,5 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa name = "swarmer catwalk" desc = "A catwalk-like mesh, produced by swarmers to allow them to navigate hostile terrain." icon = 'icons/obj/smooth_structures/swarmer_catwalk.dmi' - icon_state = "swarmer_catwalk" + icon_state = "swarmer_catwalk-0" + base_icon_state = "swarmer_catwalk" diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm index 4c5a16a05ed..dabf5417f1f 100644 --- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm +++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm @@ -6,10 +6,10 @@ icon = 'icons/effects/spacevines.dmi' icon_state = "flower_bud" layer = MOB_LAYER + 0.9 - opacity = 0 - canSmoothWith = list() - smooth = SMOOTH_FALSE - var/growth_time = 1200 + opacity = FALSE + canSmoothWith = null + smoothing_flags = NONE + var/growth_time = 120 SECONDS /obj/structure/alien/resin/flower_bud_enemy/New() ..() diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 280e8da9f03..ff3650f7009 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -88,7 +88,7 @@ flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 light_range = 4 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF - var/base_icon_state = "darkmatter" + base_icon_state = "darkmatter" ///The id of our supermatter var/supermatter_id = 1 diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 41ffa226227..2fb16126c56 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -684,7 +684,7 @@ flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 plane = FLOOR_PLANE layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes - var/base_icon_state // initial icon state on map + base_icon_state // initial icon state on map // new pipe, set the icon_state as on map /obj/structure/disposalpipe/Initialize(mapload) diff --git a/code/modules/ruins/lavalandruin_code/dead_ratvar.dm b/code/modules/ruins/lavalandruin_code/dead_ratvar.dm index 0d56293f1bc..743a799855a 100644 --- a/code/modules/ruins/lavalandruin_code/dead_ratvar.dm +++ b/code/modules/ruins/lavalandruin_code/dead_ratvar.dm @@ -47,17 +47,17 @@ name = "clockwork wall" icon = 'icons/turf/walls/clockwork_wall.dmi' icon_state = "clockwork_wall" - canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass) - smooth = SMOOTH_TRUE + canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BRASS_WALL) + smoothing_flags = SMOOTH_CORNERS layer = CLOSED_TURF_LAYER /obj/effect/clockwork/overlay/wall/Initialize(mapload) . = ..() - queue_smooth_neighbors(src) - addtimer(CALLBACK(GLOBAL_PROC, .proc/queue_smooth, src), 1) + QUEUE_SMOOTH_NEIGHBORS(src) + QUEUE_SMOOTH(src) /obj/effect/clockwork/overlay/wall/Destroy() - queue_smooth_neighbors(src) + QUEUE_SMOOTH_NEIGHBORS(src) return ..() /obj/effect/clockwork/overlay/floor diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 1d9f6970135..0b1215235ea 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -57,8 +57,8 @@ // After docking // /atom/proc/postDock(obj/docking_port/S1) - if(smooth) - queue_smooth(src) + if(smoothing_flags) + QUEUE_SMOOTH(src) /mob/postDock() update_parallax_contents() diff --git a/code/modules/shuttle/ripple.dm b/code/modules/shuttle/ripple.dm index 3d3b52d9023..30bf49594ad 100644 --- a/code/modules/shuttle/ripple.dm +++ b/code/modules/shuttle/ripple.dm @@ -4,10 +4,12 @@ visual disturbances. It's probably best not to be on top of these \ when whatever is tunneling comes through." icon = 'icons/turf/floors/ripple.dmi' - icon_state = "ripple" + icon_state = "ripple-0" + base_icon_state = "ripple" anchored = TRUE density = FALSE - smooth = SMOOTH_TRUE + smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_RIPPLE) layer = RIPPLE_LAYER alpha = 0 duration = 3 * SHUTTLE_RIPPLE_TIME @@ -15,5 +17,5 @@ /obj/effect/temp_visual/ripple/New() . = ..() - queue_smooth(src) + QUEUE_SMOOTH(src) animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME) diff --git a/code/modules/shuttle/shuttle_rotate.dm b/code/modules/shuttle/shuttle_rotate.dm index 9d1989e70fb..8822dbc51ce 100644 --- a/code/modules/shuttle/shuttle_rotate.dm +++ b/code/modules/shuttle/shuttle_rotate.dm @@ -11,8 +11,8 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate setDir(angle2dir(rotation+dir2angle(dir))) //resmooth if need be. - if(smooth && (params & ROTATE_SMOOTH)) - queue_smooth(src) + if(params & ROTATE_SMOOTH && smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH(src) //rotate the pixel offsets too. if((pixel_x || pixel_y) && (params & ROTATE_OFFSET)) diff --git a/icons/effects/dirt.dmi b/icons/effects/dirt.dmi index 5c8bc8f61a0..69c698f1f3f 100644 Binary files a/icons/effects/dirt.dmi and b/icons/effects/dirt.dmi differ diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index eb888d9ce47..980194721f0 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/mob/alien.dmi b/icons/mob/alien.dmi index 0dd9df5691e..487bc2f556f 100644 Binary files a/icons/mob/alien.dmi and b/icons/mob/alien.dmi differ diff --git a/icons/obj/smooth_structures/alien/nest.dmi b/icons/obj/smooth_structures/alien/nest.dmi index ac04f45c0bd..6de377886f9 100644 Binary files a/icons/obj/smooth_structures/alien/nest.dmi and b/icons/obj/smooth_structures/alien/nest.dmi differ diff --git a/icons/obj/smooth_structures/alien/resin_membrane.dmi b/icons/obj/smooth_structures/alien/resin_membrane.dmi index c7d484d7c07..1ea306eaa66 100644 Binary files a/icons/obj/smooth_structures/alien/resin_membrane.dmi and b/icons/obj/smooth_structures/alien/resin_membrane.dmi differ diff --git a/icons/obj/smooth_structures/alien/resin_wall.dmi b/icons/obj/smooth_structures/alien/resin_wall.dmi index 45169192020..7d837172b8c 100644 Binary files a/icons/obj/smooth_structures/alien/resin_wall.dmi and b/icons/obj/smooth_structures/alien/resin_wall.dmi differ diff --git a/icons/obj/smooth_structures/alien/weednode.dmi b/icons/obj/smooth_structures/alien/weednode.dmi new file mode 100644 index 00000000000..e8a0e000e1b Binary files /dev/null and b/icons/obj/smooth_structures/alien/weednode.dmi differ diff --git a/icons/obj/smooth_structures/alien/weeds1.dmi b/icons/obj/smooth_structures/alien/weeds1.dmi new file mode 100644 index 00000000000..0809848b55f Binary files /dev/null and b/icons/obj/smooth_structures/alien/weeds1.dmi differ diff --git a/icons/obj/smooth_structures/alien/weeds2.dmi b/icons/obj/smooth_structures/alien/weeds2.dmi new file mode 100644 index 00000000000..567e9bfb715 Binary files /dev/null and b/icons/obj/smooth_structures/alien/weeds2.dmi differ diff --git a/icons/obj/smooth_structures/alien/weeds3.dmi b/icons/obj/smooth_structures/alien/weeds3.dmi new file mode 100644 index 00000000000..1903262a371 Binary files /dev/null and b/icons/obj/smooth_structures/alien/weeds3.dmi differ diff --git a/icons/obj/smooth_structures/alien_table.dmi b/icons/obj/smooth_structures/alien_table.dmi index e2384b57e00..63492d241ba 100644 Binary files a/icons/obj/smooth_structures/alien_table.dmi and b/icons/obj/smooth_structures/alien_table.dmi differ diff --git a/icons/obj/smooth_structures/brass_table.dmi b/icons/obj/smooth_structures/brass_table.dmi index f3cc8bb9ee5..c48f99062e2 100644 Binary files a/icons/obj/smooth_structures/brass_table.dmi and b/icons/obj/smooth_structures/brass_table.dmi differ diff --git a/icons/obj/smooth_structures/catwalk.dmi b/icons/obj/smooth_structures/catwalk.dmi index 4b71fb50731..0920cc571f1 100644 Binary files a/icons/obj/smooth_structures/catwalk.dmi and b/icons/obj/smooth_structures/catwalk.dmi differ diff --git a/icons/obj/smooth_structures/clockwork_window.dmi b/icons/obj/smooth_structures/clockwork_window.dmi index e326e93ce8d..674a16d43e0 100644 Binary files a/icons/obj/smooth_structures/clockwork_window.dmi and b/icons/obj/smooth_structures/clockwork_window.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table.dmi b/icons/obj/smooth_structures/fancy_table.dmi index a08fd3212cc..475ca392ba0 100644 Binary files a/icons/obj/smooth_structures/fancy_table.dmi and b/icons/obj/smooth_structures/fancy_table.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_black.dmi b/icons/obj/smooth_structures/fancy_table_black.dmi index f9b8d3eb83e..86d4410533f 100644 Binary files a/icons/obj/smooth_structures/fancy_table_black.dmi and b/icons/obj/smooth_structures/fancy_table_black.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_blue.dmi b/icons/obj/smooth_structures/fancy_table_blue.dmi index 07e13e99e64..cb0fe3c8faf 100644 Binary files a/icons/obj/smooth_structures/fancy_table_blue.dmi and b/icons/obj/smooth_structures/fancy_table_blue.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_cyan.dmi b/icons/obj/smooth_structures/fancy_table_cyan.dmi index 4f1a90e33b2..8343ae6761a 100644 Binary files a/icons/obj/smooth_structures/fancy_table_cyan.dmi and b/icons/obj/smooth_structures/fancy_table_cyan.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_green.dmi b/icons/obj/smooth_structures/fancy_table_green.dmi index ea7f8daa99f..86c1746a7df 100644 Binary files a/icons/obj/smooth_structures/fancy_table_green.dmi and b/icons/obj/smooth_structures/fancy_table_green.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_orange.dmi b/icons/obj/smooth_structures/fancy_table_orange.dmi index fe0375ddbb8..f55ef38ac55 100644 Binary files a/icons/obj/smooth_structures/fancy_table_orange.dmi and b/icons/obj/smooth_structures/fancy_table_orange.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_purple.dmi b/icons/obj/smooth_structures/fancy_table_purple.dmi index c404a9eb5f4..52bdb02980c 100644 Binary files a/icons/obj/smooth_structures/fancy_table_purple.dmi and b/icons/obj/smooth_structures/fancy_table_purple.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_red.dmi b/icons/obj/smooth_structures/fancy_table_red.dmi index 8bca0ca8c94..eb84340873b 100644 Binary files a/icons/obj/smooth_structures/fancy_table_red.dmi and b/icons/obj/smooth_structures/fancy_table_red.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_royalblack.dmi b/icons/obj/smooth_structures/fancy_table_royalblack.dmi index 064b7c1945e..3fafd6b23c2 100644 Binary files a/icons/obj/smooth_structures/fancy_table_royalblack.dmi and b/icons/obj/smooth_structures/fancy_table_royalblack.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_royalblue.dmi b/icons/obj/smooth_structures/fancy_table_royalblue.dmi index 9d0eba7265e..bd4400bfb0a 100644 Binary files a/icons/obj/smooth_structures/fancy_table_royalblue.dmi and b/icons/obj/smooth_structures/fancy_table_royalblue.dmi differ diff --git a/icons/obj/smooth_structures/glass_table.dmi b/icons/obj/smooth_structures/glass_table.dmi index 3cd0ac8f552..747aaac3359 100644 Binary files a/icons/obj/smooth_structures/glass_table.dmi and b/icons/obj/smooth_structures/glass_table.dmi differ diff --git a/icons/obj/smooth_structures/lattice.dmi b/icons/obj/smooth_structures/lattice.dmi index 5adab0caf1b..d9223ded775 100644 Binary files a/icons/obj/smooth_structures/lattice.dmi and b/icons/obj/smooth_structures/lattice.dmi differ diff --git a/icons/obj/smooth_structures/plasma_window.dmi b/icons/obj/smooth_structures/plasma_window.dmi index b5249e13a8a..eaed6f219e0 100644 Binary files a/icons/obj/smooth_structures/plasma_window.dmi and b/icons/obj/smooth_structures/plasma_window.dmi differ diff --git a/icons/obj/smooth_structures/plastitanium_window.dmi b/icons/obj/smooth_structures/plastitanium_window.dmi index 82ac0306159..14ec56a59c4 100644 Binary files a/icons/obj/smooth_structures/plastitanium_window.dmi and b/icons/obj/smooth_structures/plastitanium_window.dmi differ diff --git a/icons/obj/smooth_structures/pod_window.dmi b/icons/obj/smooth_structures/pod_window.dmi index 643449e5335..46d4208b4b5 100644 Binary files a/icons/obj/smooth_structures/pod_window.dmi and b/icons/obj/smooth_structures/pod_window.dmi differ diff --git a/icons/obj/smooth_structures/poker_table.dmi b/icons/obj/smooth_structures/poker_table.dmi index 86c10a7334b..b34193035d0 100644 Binary files a/icons/obj/smooth_structures/poker_table.dmi and b/icons/obj/smooth_structures/poker_table.dmi differ diff --git a/icons/obj/smooth_structures/reinforced_table.dmi b/icons/obj/smooth_structures/reinforced_table.dmi index 095314e711c..79f2042564b 100644 Binary files a/icons/obj/smooth_structures/reinforced_table.dmi and b/icons/obj/smooth_structures/reinforced_table.dmi differ diff --git a/icons/obj/smooth_structures/reinforced_window.dmi b/icons/obj/smooth_structures/reinforced_window.dmi index fba02f6d945..a66b648786d 100644 Binary files a/icons/obj/smooth_structures/reinforced_window.dmi and b/icons/obj/smooth_structures/reinforced_window.dmi differ diff --git a/icons/obj/smooth_structures/rice_window.dmi b/icons/obj/smooth_structures/rice_window.dmi index 5b3bebb2539..3680926e7fa 100644 Binary files a/icons/obj/smooth_structures/rice_window.dmi and b/icons/obj/smooth_structures/rice_window.dmi differ diff --git a/icons/obj/smooth_structures/rplasma_window.dmi b/icons/obj/smooth_structures/rplasma_window.dmi index 9da045e0350..173b8d53766 100644 Binary files a/icons/obj/smooth_structures/rplasma_window.dmi and b/icons/obj/smooth_structures/rplasma_window.dmi differ diff --git a/icons/obj/smooth_structures/sandbags.dmi b/icons/obj/smooth_structures/sandbags.dmi index 8ac099555a8..6ff5bfbd7eb 100644 Binary files a/icons/obj/smooth_structures/sandbags.dmi and b/icons/obj/smooth_structures/sandbags.dmi differ diff --git a/icons/obj/smooth_structures/shuttle_window.dmi b/icons/obj/smooth_structures/shuttle_window.dmi index 85924dc449b..09d210c7615 100644 Binary files a/icons/obj/smooth_structures/shuttle_window.dmi and b/icons/obj/smooth_structures/shuttle_window.dmi differ diff --git a/icons/obj/smooth_structures/swarmer_catwalk.dmi b/icons/obj/smooth_structures/swarmer_catwalk.dmi index b247132eacb..47f16b73af4 100644 Binary files a/icons/obj/smooth_structures/swarmer_catwalk.dmi and b/icons/obj/smooth_structures/swarmer_catwalk.dmi differ diff --git a/icons/obj/smooth_structures/table.dmi b/icons/obj/smooth_structures/table.dmi index c7c81d59fa1..526f8900a97 100644 Binary files a/icons/obj/smooth_structures/table.dmi and b/icons/obj/smooth_structures/table.dmi differ diff --git a/icons/obj/smooth_structures/table_greyscale.dmi b/icons/obj/smooth_structures/table_greyscale.dmi new file mode 100644 index 00000000000..988e41d9e4e Binary files /dev/null and b/icons/obj/smooth_structures/table_greyscale.dmi differ diff --git a/icons/obj/smooth_structures/tinted_window.dmi b/icons/obj/smooth_structures/tinted_window.dmi index c0cffb23b88..59b690110e5 100644 Binary files a/icons/obj/smooth_structures/tinted_window.dmi and b/icons/obj/smooth_structures/tinted_window.dmi differ diff --git a/icons/obj/smooth_structures/window.dmi b/icons/obj/smooth_structures/window.dmi index a0d424f1957..4b78390251e 100644 Binary files a/icons/obj/smooth_structures/window.dmi and b/icons/obj/smooth_structures/window.dmi differ diff --git a/icons/obj/smooth_structures/wood_table.dmi b/icons/obj/smooth_structures/wood_table.dmi index bea333126e3..8991b4a3a94 100644 Binary files a/icons/obj/smooth_structures/wood_table.dmi and b/icons/obj/smooth_structures/wood_table.dmi differ diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi index 06de9f94fd2..0bb64ddd08e 100644 Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ diff --git a/icons/turf/floors/Chasms.dmi b/icons/turf/floors/Chasms.dmi index 7901c84a48c..2e93b539112 100644 Binary files a/icons/turf/floors/Chasms.dmi and b/icons/turf/floors/Chasms.dmi differ diff --git a/icons/turf/floors/ash.dmi b/icons/turf/floors/ash.dmi index 6c4c1cbc36d..1ebe8d71397 100644 Binary files a/icons/turf/floors/ash.dmi and b/icons/turf/floors/ash.dmi differ diff --git a/icons/turf/floors/carpet.dmi b/icons/turf/floors/carpet.dmi index e1dc199b7f5..9040e45da56 100644 Binary files a/icons/turf/floors/carpet.dmi and b/icons/turf/floors/carpet.dmi differ diff --git a/icons/turf/floors/carpet_black.dmi b/icons/turf/floors/carpet_black.dmi index 0bae9ac8cf1..6818b746c50 100644 Binary files a/icons/turf/floors/carpet_black.dmi and b/icons/turf/floors/carpet_black.dmi differ diff --git a/icons/turf/floors/carpet_blue.dmi b/icons/turf/floors/carpet_blue.dmi index cd3e7f01aa8..7192f42efcb 100644 Binary files a/icons/turf/floors/carpet_blue.dmi and b/icons/turf/floors/carpet_blue.dmi differ diff --git a/icons/turf/floors/carpet_cyan.dmi b/icons/turf/floors/carpet_cyan.dmi index a1fbb6f9487..19bb9d38ba4 100644 Binary files a/icons/turf/floors/carpet_cyan.dmi and b/icons/turf/floors/carpet_cyan.dmi differ diff --git a/icons/turf/floors/carpet_green.dmi b/icons/turf/floors/carpet_green.dmi index bd945c45e17..b714cbf44f0 100644 Binary files a/icons/turf/floors/carpet_green.dmi and b/icons/turf/floors/carpet_green.dmi differ diff --git a/icons/turf/floors/carpet_orange.dmi b/icons/turf/floors/carpet_orange.dmi index 316dd135e22..70ec6019684 100644 Binary files a/icons/turf/floors/carpet_orange.dmi and b/icons/turf/floors/carpet_orange.dmi differ diff --git a/icons/turf/floors/carpet_purple.dmi b/icons/turf/floors/carpet_purple.dmi index 8cc886139cc..9601c3f82c3 100644 Binary files a/icons/turf/floors/carpet_purple.dmi and b/icons/turf/floors/carpet_purple.dmi differ diff --git a/icons/turf/floors/carpet_red.dmi b/icons/turf/floors/carpet_red.dmi index 2327b49a017..bdad2e1302b 100644 Binary files a/icons/turf/floors/carpet_red.dmi and b/icons/turf/floors/carpet_red.dmi differ diff --git a/icons/turf/floors/carpet_royalblack.dmi b/icons/turf/floors/carpet_royalblack.dmi index 77418dc06f8..7539e7f5b7b 100644 Binary files a/icons/turf/floors/carpet_royalblack.dmi and b/icons/turf/floors/carpet_royalblack.dmi differ diff --git a/icons/turf/floors/carpet_royalblue.dmi b/icons/turf/floors/carpet_royalblue.dmi index bc2014c9ac6..428946b1aac 100644 Binary files a/icons/turf/floors/carpet_royalblue.dmi and b/icons/turf/floors/carpet_royalblue.dmi differ diff --git a/icons/turf/floors/glass.dmi b/icons/turf/floors/glass.dmi index 1d0f13d0c06..f266c9a7926 100644 Binary files a/icons/turf/floors/glass.dmi and b/icons/turf/floors/glass.dmi differ diff --git a/icons/turf/floors/grass.dmi b/icons/turf/floors/grass.dmi new file mode 100644 index 00000000000..e3dc219bc4f Binary files /dev/null and b/icons/turf/floors/grass.dmi differ diff --git a/icons/turf/floors/ice_turf.dmi b/icons/turf/floors/ice_turf.dmi new file mode 100644 index 00000000000..61574645759 Binary files /dev/null and b/icons/turf/floors/ice_turf.dmi differ diff --git a/icons/turf/floors/ice_turfs.dmi b/icons/turf/floors/ice_turfs.dmi deleted file mode 100644 index 2bee5887fe8..00000000000 Binary files a/icons/turf/floors/ice_turfs.dmi and /dev/null differ diff --git a/icons/turf/floors/junglegrass.dmi b/icons/turf/floors/junglegrass.dmi new file mode 100644 index 00000000000..f2944d18cf6 Binary files /dev/null and b/icons/turf/floors/junglegrass.dmi differ diff --git a/icons/turf/floors/lava.dmi b/icons/turf/floors/lava.dmi index 0f7b5d3fa15..3b889c9a5f6 100644 Binary files a/icons/turf/floors/lava.dmi and b/icons/turf/floors/lava.dmi differ diff --git a/icons/turf/floors/plasmaglass.dmi b/icons/turf/floors/plasmaglass.dmi index 629d8be41ec..3a9b95dc440 100644 Binary files a/icons/turf/floors/plasmaglass.dmi and b/icons/turf/floors/plasmaglass.dmi differ diff --git a/icons/turf/floors/plastitaniumglass.dmi b/icons/turf/floors/plastitaniumglass.dmi index 39a56f32b00..a5539bbf156 100644 Binary files a/icons/turf/floors/plastitaniumglass.dmi and b/icons/turf/floors/plastitaniumglass.dmi differ diff --git a/icons/turf/floors/reinf_glass.dmi b/icons/turf/floors/reinf_glass.dmi index c5072fd11e0..d6b96b4bd51 100644 Binary files a/icons/turf/floors/reinf_glass.dmi and b/icons/turf/floors/reinf_glass.dmi differ diff --git a/icons/turf/floors/reinf_plasmaglass.dmi b/icons/turf/floors/reinf_plasmaglass.dmi index c46025e5291..29bf4e75706 100644 Binary files a/icons/turf/floors/reinf_plasmaglass.dmi and b/icons/turf/floors/reinf_plasmaglass.dmi differ diff --git a/icons/turf/floors/ripple.dmi b/icons/turf/floors/ripple.dmi index bf5b0869c82..51020089e74 100644 Binary files a/icons/turf/floors/ripple.dmi and b/icons/turf/floors/ripple.dmi differ diff --git a/icons/turf/floors/rocky_ash.dmi b/icons/turf/floors/rocky_ash.dmi new file mode 100644 index 00000000000..cc6847dc588 Binary files /dev/null and b/icons/turf/floors/rocky_ash.dmi differ diff --git a/icons/turf/floors/seadrop-o.dmi b/icons/turf/floors/seadrop-o.dmi index c0f325af36a..82d1954b57e 100644 Binary files a/icons/turf/floors/seadrop-o.dmi and b/icons/turf/floors/seadrop-o.dmi differ diff --git a/icons/turf/floors/seadrop.dmi b/icons/turf/floors/seadrop.dmi index 2752d5f60ba..5d93bc9f3eb 100644 Binary files a/icons/turf/floors/seadrop.dmi and b/icons/turf/floors/seadrop.dmi differ diff --git a/icons/turf/floors/snow_turf.dmi b/icons/turf/floors/snow_turf.dmi new file mode 100644 index 00000000000..8b70aa44896 Binary files /dev/null and b/icons/turf/floors/snow_turf.dmi differ diff --git a/icons/turf/floors/titaniumglass.dmi b/icons/turf/floors/titaniumglass.dmi index 597487ff175..791481571f3 100644 Binary files a/icons/turf/floors/titaniumglass.dmi and b/icons/turf/floors/titaniumglass.dmi differ diff --git a/icons/turf/smoothrocks.dmi b/icons/turf/smoothrocks.dmi index ba2bbce9551..0948aaaaa3b 100644 Binary files a/icons/turf/smoothrocks.dmi and b/icons/turf/smoothrocks.dmi differ diff --git a/icons/turf/walls/abductor_wall.dmi b/icons/turf/walls/abductor_wall.dmi index 0ddff469211..d1d7d66cf0f 100644 Binary files a/icons/turf/walls/abductor_wall.dmi and b/icons/turf/walls/abductor_wall.dmi differ diff --git a/icons/turf/walls/bananium_wall.dmi b/icons/turf/walls/bananium_wall.dmi index b8922638e6c..abf70635337 100644 Binary files a/icons/turf/walls/bananium_wall.dmi and b/icons/turf/walls/bananium_wall.dmi differ diff --git a/icons/turf/walls/boss_wall.dmi b/icons/turf/walls/boss_wall.dmi index a197aac8ce3..eb0992e86e0 100644 Binary files a/icons/turf/walls/boss_wall.dmi and b/icons/turf/walls/boss_wall.dmi differ diff --git a/icons/turf/walls/clockwork_wall.dmi b/icons/turf/walls/clockwork_wall.dmi index 8263e901d00..d6f1872d7c0 100644 Binary files a/icons/turf/walls/clockwork_wall.dmi and b/icons/turf/walls/clockwork_wall.dmi differ diff --git a/icons/turf/walls/coated_reinforced_wall.dmi b/icons/turf/walls/coated_reinforced_wall.dmi deleted file mode 100644 index 13d6879f49f..00000000000 Binary files a/icons/turf/walls/coated_reinforced_wall.dmi and /dev/null differ diff --git a/icons/turf/walls/cult_wall.dmi b/icons/turf/walls/cult_wall.dmi index db9f60933d4..4990c4474ff 100644 Binary files a/icons/turf/walls/cult_wall.dmi and b/icons/turf/walls/cult_wall.dmi differ diff --git a/icons/turf/walls/diamond_wall.dmi b/icons/turf/walls/diamond_wall.dmi index 8dff3420119..1dd44ba283f 100644 Binary files a/icons/turf/walls/diamond_wall.dmi and b/icons/turf/walls/diamond_wall.dmi differ diff --git a/icons/turf/walls/gold_wall.dmi b/icons/turf/walls/gold_wall.dmi index 107487b9d23..7012124c271 100644 Binary files a/icons/turf/walls/gold_wall.dmi and b/icons/turf/walls/gold_wall.dmi differ diff --git a/icons/turf/walls/hierophant_wall.dmi b/icons/turf/walls/hierophant_wall.dmi index 8963db4e996..3d417d70871 100644 Binary files a/icons/turf/walls/hierophant_wall.dmi and b/icons/turf/walls/hierophant_wall.dmi differ diff --git a/icons/turf/walls/hierophant_wall_temp.dmi b/icons/turf/walls/hierophant_wall_temp.dmi index 9f0d4b8d23c..235f8347cee 100644 Binary files a/icons/turf/walls/hierophant_wall_temp.dmi and b/icons/turf/walls/hierophant_wall_temp.dmi differ diff --git a/icons/turf/walls/icedmetal_wall.dmi b/icons/turf/walls/icedmetal_wall.dmi index 4cd148e5cfa..b069da4394d 100644 Binary files a/icons/turf/walls/icedmetal_wall.dmi and b/icons/turf/walls/icedmetal_wall.dmi differ diff --git a/icons/turf/walls/icerock_wall.dmi b/icons/turf/walls/icerock_wall.dmi new file mode 100644 index 00000000000..0cc2b55bffa Binary files /dev/null and b/icons/turf/walls/icerock_wall.dmi differ diff --git a/icons/turf/walls/iron_wall.dmi b/icons/turf/walls/iron_wall.dmi index f3380868c7d..351109bdd3f 100644 Binary files a/icons/turf/walls/iron_wall.dmi and b/icons/turf/walls/iron_wall.dmi differ diff --git a/icons/turf/walls/materialwall.dmi b/icons/turf/walls/materialwall.dmi new file mode 100644 index 00000000000..1027effda94 Binary files /dev/null and b/icons/turf/walls/materialwall.dmi differ diff --git a/icons/turf/walls/mountain_wall.dmi b/icons/turf/walls/mountain_wall.dmi new file mode 100644 index 00000000000..574b35b7f1b Binary files /dev/null and b/icons/turf/walls/mountain_wall.dmi differ diff --git a/icons/turf/walls/plasma_wall.dmi b/icons/turf/walls/plasma_wall.dmi index 133cd7cd78e..c2f10843c6d 100644 Binary files a/icons/turf/walls/plasma_wall.dmi and b/icons/turf/walls/plasma_wall.dmi differ diff --git a/icons/turf/walls/plastinum_wall.dmi b/icons/turf/walls/plastinum_wall.dmi new file mode 100644 index 00000000000..d14f44a8ebd Binary files /dev/null and b/icons/turf/walls/plastinum_wall.dmi differ diff --git a/icons/turf/walls/plastitanium_wall.dmi b/icons/turf/walls/plastitanium_wall.dmi index 4f556752c24..b1af818a012 100644 Binary files a/icons/turf/walls/plastitanium_wall.dmi and b/icons/turf/walls/plastitanium_wall.dmi differ diff --git a/icons/turf/walls/red_wall.dmi b/icons/turf/walls/red_wall.dmi new file mode 100644 index 00000000000..5eb26cf6a30 Binary files /dev/null and b/icons/turf/walls/red_wall.dmi differ diff --git a/icons/turf/walls/reinforced_rock.dmi b/icons/turf/walls/reinforced_rock.dmi new file mode 100644 index 00000000000..f2621f5a863 Binary files /dev/null and b/icons/turf/walls/reinforced_rock.dmi differ diff --git a/icons/turf/walls/reinforced_wall.dmi b/icons/turf/walls/reinforced_wall.dmi index 13b57ef7a36..35d64734e14 100644 Binary files a/icons/turf/walls/reinforced_wall.dmi and b/icons/turf/walls/reinforced_wall.dmi differ diff --git a/icons/turf/walls/riveted.dmi b/icons/turf/walls/riveted.dmi new file mode 100644 index 00000000000..e3746885e48 Binary files /dev/null and b/icons/turf/walls/riveted.dmi differ diff --git a/icons/turf/walls/rock_wall.dmi b/icons/turf/walls/rock_wall.dmi index c07657149ac..b6f81475833 100644 Binary files a/icons/turf/walls/rock_wall.dmi and b/icons/turf/walls/rock_wall.dmi differ diff --git a/icons/turf/walls/rusty_reinforced_wall.dmi b/icons/turf/walls/rusty_reinforced_wall.dmi index 97ea672a730..e2636950d27 100644 Binary files a/icons/turf/walls/rusty_reinforced_wall.dmi and b/icons/turf/walls/rusty_reinforced_wall.dmi differ diff --git a/icons/turf/walls/rusty_wall.dmi b/icons/turf/walls/rusty_wall.dmi index 410aee27068..ca27a10fe07 100644 Binary files a/icons/turf/walls/rusty_wall.dmi and b/icons/turf/walls/rusty_wall.dmi differ diff --git a/icons/turf/walls/sandstone_wall.dmi b/icons/turf/walls/sandstone_wall.dmi index 200d7ba43cd..d53e686ee50 100644 Binary files a/icons/turf/walls/sandstone_wall.dmi and b/icons/turf/walls/sandstone_wall.dmi differ diff --git a/icons/turf/walls/shuttle_wall.dmi b/icons/turf/walls/shuttle_wall.dmi deleted file mode 100644 index 71166f3d7b6..00000000000 Binary files a/icons/turf/walls/shuttle_wall.dmi and /dev/null differ diff --git a/icons/turf/walls/silver_wall.dmi b/icons/turf/walls/silver_wall.dmi index 9bb915e9a76..f0f170fdfe3 100644 Binary files a/icons/turf/walls/silver_wall.dmi and b/icons/turf/walls/silver_wall.dmi differ diff --git a/icons/turf/walls/snow_wall.dmi b/icons/turf/walls/snow_wall.dmi index d9df05b0d7c..833f7245e46 100644 Binary files a/icons/turf/walls/snow_wall.dmi and b/icons/turf/walls/snow_wall.dmi differ diff --git a/icons/turf/walls/survival_pod_walls.dmi b/icons/turf/walls/survival_pod_walls.dmi index b364e3da054..01700f1ed6f 100644 Binary files a/icons/turf/walls/survival_pod_walls.dmi and b/icons/turf/walls/survival_pod_walls.dmi differ diff --git a/icons/turf/walls/uranium_wall.dmi b/icons/turf/walls/uranium_wall.dmi index 53146d93f12..c03886e0087 100644 Binary files a/icons/turf/walls/uranium_wall.dmi and b/icons/turf/walls/uranium_wall.dmi differ diff --git a/icons/turf/walls/wall.dmi b/icons/turf/walls/wall.dmi index c330038999a..651227fe8de 100644 Binary files a/icons/turf/walls/wall.dmi and b/icons/turf/walls/wall.dmi differ diff --git a/icons/turf/walls/wood_wall.dmi b/icons/turf/walls/wood_wall.dmi index a218c70a521..60b785c5030 100644 Binary files a/icons/turf/walls/wood_wall.dmi and b/icons/turf/walls/wood_wall.dmi differ diff --git a/paradise.dme b/paradise.dme index 9119d30949a..eba537a0a4e 100644 --- a/paradise.dme +++ b/paradise.dme @@ -28,6 +28,7 @@ #include "code\__DEFINES\admin.dm" #include "code\__DEFINES\antagonists.dm" #include "code\__DEFINES\atmospherics.dm" +#include "code\__DEFINES\bitfields.dm" #include "code\__DEFINES\bots.dm" #include "code\__DEFINES\callbacks.dm" #include "code\__DEFINES\clothing.dm" @@ -47,6 +48,7 @@ #include "code\__DEFINES\genetics.dm" #include "code\__DEFINES\hud.dm" #include "code\__DEFINES\hydroponics.dm" +#include "code\__DEFINES\icon_smoothing.dm" #include "code\__DEFINES\instruments.dm" #include "code\__DEFINES\inventory.dm" #include "code\__DEFINES\is_helpers.dm" @@ -100,6 +102,7 @@ #include "code\__HELPERS\_string_lists.dm" #include "code\__HELPERS\AnimationLibrary.dm" #include "code\__HELPERS\api.dm" +#include "code\__HELPERS\bitflag_lists.dm" #include "code\__HELPERS\cmp.dm" #include "code\__HELPERS\constants.dm" #include "code\__HELPERS\debugger.dm" @@ -119,6 +122,7 @@ #include "code\__HELPERS\qdel.dm" #include "code\__HELPERS\radiation.dm" #include "code\__HELPERS\sanitize_values.dm" +#include "code\__HELPERS\string_assoc_lists.dm" #include "code\__HELPERS\text.dm" #include "code\__HELPERS\time.dm" #include "code\__HELPERS\tool_helpers.dm" @@ -131,6 +135,7 @@ #include "code\__HELPERS\sorts\InsertSort.dm" #include "code\__HELPERS\sorts\MergeSort.dm" #include "code\__HELPERS\sorts\TimSort.dm" +#include "code\_globalvars\bitfields.dm" #include "code\_globalvars\configuration.dm" #include "code\_globalvars\game_modes.dm" #include "code\_globalvars\genetics.dm"