Skip to content

Commit

Permalink
Adds a perspective map editor walls define to _build.dm (#14355)
Browse files Browse the repository at this point in the history
  • Loading branch information
DisturbHerb committed Jun 25, 2023
1 parent 8ded8aa commit 0ee20dc
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 4 deletions.
3 changes: 3 additions & 0 deletions _std/__build.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ o+` `-` ``..-:yooos-..----------..`
// Toggle this to turn .dispose() into qdel( ). Useful for trying to find lingering references locally.
//#define DISPOSE_IS_QDEL

// Toggle this to enable perspective wall icons in .dmm-compatible map editors. By default, icons in the editor will be flat.
//#define USE_PERSPECTIVE_EDITOR_WALLS

//------------- MAP OVERRIDES -------------//
//-------Special Events:
//#define MAP_OVERRIDE_CONSTRUCTION // Construction mode
Expand Down
3 changes: 3 additions & 0 deletions _std/setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ var/ZLOG_START_TIME
// this handles StrongDMM (and other editors using SpacemanDMM parser), toggle it manually if using a different editor
#if (defined(SPACEMAN_DMM) || defined(FASTDMM))
#define IN_MAP_EDITOR
#if (defined(USE_PERSPECTIVE_EDITOR_WALLS))
#define PERSPECTIVE_EDITOR_WALL
#endif
#endif

//do we want to check incoming clients to see if theyre using a vpn?
Expand Down
4 changes: 4 additions & 0 deletions code/modules/transport/shuttle/shuttle_turfobjs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/shuttle)
name = "shuttle wall"
desc = "A shuttle wall. Pretty reinforced."
icon = 'icons/turf/walls_shuttle.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall"
#else
icon_state = "mapwall"
#endif
light_mod = "wall-"
opacity = 0
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand Down
4 changes: 4 additions & 0 deletions code/obj/mining.dm
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/asteroid)
))
/turf/simulated/wall/auto/asteroid
icon = 'icons/turf/walls_asteroid.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "asteroid-perspective-map"
#else
icon_state = "asteroid-map"
#endif
mod = "asteroid-"
light_mod = "wall-"
plane = PLANE_WALL-1
Expand Down
17 changes: 14 additions & 3 deletions code/obj/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1080,26 +1080,37 @@ ADMIN_INTERACT_PROCS(/obj/window, proc/smash)
win_path = "/obj/window/auto"
full_win = 1
no_dirs = 1
icon_state = "wingrille_new"
color = "#A3DCFF"
icon_state = "wingrille_f"

reinforced
name = "reinforced autowindow grille spawner"
win_path = "/obj/window/auto/reinforced"
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "r-wingrille_new"
color = "#72c8fd"
#else
icon_state = "r-wingrille_f"
#endif

crystal
name = "crystal autowindow grille spawner"
win_path = "/obj/window/auto/crystal"
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "wingrille_new"
color = "#9e53cf"
color = "#A114FF"
#else
icon_state = "wingrille_f"
#endif

reinforced
name = "reinforced crystal autowindow grille spawner"
win_path = "/obj/window/auto/crystal/reinforced"
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "r-wingrille_new"
color = "#8713d4"
#else
icon_state = "r-wingrille_f"
#endif

tuff
name = "tuff stuff reinforced autowindow grille spawner"
Expand Down
78 changes: 77 additions & 1 deletion code/turf/turf_autoalign.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/jen)
))
/turf/simulated/wall/auto/jen
icon = 'icons/turf/walls_jen.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall"
#else
icon_state = "mapwall"
#endif
RL_OverlayIcon = 'icons/effects/lighting_overlays/walls_jen.dmi'
light_mod = "wall-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand Down Expand Up @@ -285,9 +289,13 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/reinforced/jen)
connects_with_overlay_exceptions = typecacheof(list(/turf/simulated/wall/auto/reinforced/jen))
/turf/simulated/wall/auto/reinforced/jen
icon = 'icons/turf/walls_jen.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall_r"
#else
icon_state = "mapwall_r"
#endif
RL_OverlayIcon = 'icons/effects/lighting_overlays/walls_jen.dmi'
light_mod = "wall-"
light_mod = "wall-jen-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID

the_tuff_stuff
Expand Down Expand Up @@ -355,7 +363,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/supernorn)
icon = 'icons/turf/walls_supernorn_smooth.dmi'
mod = "norn-"
light_mod = "wall-"
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall"
#else
icon_state = "mapwall"
#endif
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID

the_tuff_stuff
Expand Down Expand Up @@ -386,7 +398,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/reinforced/supernorn)
))
/turf/simulated/wall/auto/reinforced/supernorn
icon = 'icons/turf/walls_supernorn_smooth.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall_r"
#else
icon_state = "mapwall_r"
#endif
mod = "norn-R-"
light_mod = "wall-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand Down Expand Up @@ -418,7 +434,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/reinforced/supernorn/yellow)
))
/turf/simulated/wall/auto/reinforced/supernorn/yellow
icon = 'icons/turf/walls_manta.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall_r-Y"
#else
icon_state = "mapwall_r-Y"
#endif
mod = "norn-Y-"
light_mod = "wall-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand All @@ -441,7 +461,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/reinforced/supernorn/orange)
))
/turf/simulated/wall/auto/reinforced/supernorn/orange
icon = 'icons/turf/walls_manta.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall_r-O"
#else
icon_state = "mapwall_r-O"
#endif
mod = "norn-O-"
light_mod = "wall-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand All @@ -450,7 +474,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/reinforced/supernorn/orange)
TYPEINFO(/turf/simulated/wall/auto/supernorn/wood)
connect_overlay = 0
/turf/simulated/wall/auto/supernorn/wood
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall$$wood"
#else
icon_state = "mapwall$$wood"
#endif
default_material = "wood"

TYPEINFO(/turf/simulated/wall/auto/supernorn/wood)
Expand Down Expand Up @@ -486,7 +514,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/reinforced/supernorn/blackred)
))
/turf/simulated/wall/auto/reinforced/supernorn/blackred
icon = 'icons/turf/walls_manta.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall_r-BR"
#else
icon_state = "mapwall_r-BR"
#endif
mod = "norn-BR-"
light_mod = "wall-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand Down Expand Up @@ -536,7 +568,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/marsoutpost)
))
/turf/simulated/wall/auto/marsoutpost
icon = 'icons/turf/walls_marsoutpost.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "interior-0"
#else
icon_state = "interior-map"
#endif
light_mod = "wall-"

update_neighbors()
Expand Down Expand Up @@ -573,7 +609,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/old)
))
/turf/simulated/wall/auto/old
icon = 'icons/turf/walls_derelict.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "old-perspective-map"
#else
icon_state = "old-map"
#endif
mod = "old-"
light_mod = "wall-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand All @@ -600,7 +640,11 @@ TYPEINFO_NEW(/turf/simulated/wall/auto/reinforced/old)

/turf/simulated/wall/auto/reinforced/old
icon = 'icons/turf/walls_derelict.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "oldr-perspective-map"
#else
icon_state = "oldr-map"
#endif
mod = "oldr-"
light_mod = "wall-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand Down Expand Up @@ -735,7 +779,11 @@ TYPEINFO_NEW(/turf/unsimulated/wall/auto/supernorn)
connects_with_overlay = typecacheof(list(/obj/machinery/door, /obj/window, /obj/plasticflaps))
/turf/unsimulated/wall/auto/supernorn
icon = 'icons/turf/walls_supernorn_smooth.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall"
#else
icon_state = "mapwall"
#endif
light_mod = "wall-"
mod = "norn-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand All @@ -759,7 +807,11 @@ TYPEINFO_NEW(/turf/unsimulated/wall/auto/reinforced/supernorn)
connects_with_overlay = typecacheof(list(/obj/machinery/door, /obj/window, /obj/plasticflaps))
/turf/unsimulated/wall/auto/reinforced/supernorn
icon = 'icons/turf/walls_supernorn_smooth.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "perspective-mapwall_r"
#else
icon_state = "mapwall_r"
#endif
light_mod = "wall-"
mod = "norn-R-"
flags = ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
Expand Down Expand Up @@ -920,15 +972,23 @@ TYPEINFO_NEW(/turf/unsimulated/wall/auto/adventure/shuttle)
/turf/unsimulated/wall/auto/adventure/shuttle // fancy walls part 2: enough for debris field
name = "shuttle wall"
icon = 'icons/turf/walls_shuttle-debris.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "shuttle-0"
#else
icon_state = "shuttle-map"
#endif
mod = "shuttle-"

TYPEINFO(/turf/unsimulated/wall/auto/adventure/shuttle/dark)
TYPEINFO_NEW(/turf/unsimulated/wall/auto/adventure/shuttle/dark)
. = ..()
connect_overlay = 0
/turf/unsimulated/wall/auto/adventure/shuttle/dark
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "dshuttle-0"
#else
icon_state = "dshuttle-map"
#endif
mod = "dshuttle-"

TYPEINFO(/turf/unsimulated/wall/auto/adventure/bee)
Expand All @@ -940,7 +1000,11 @@ TYPEINFO_NEW(/turf/unsimulated/wall/auto/adventure/bee)
name = "hive wall"
desc = "Honeycomb's big, yeah yeah yeah."
icon = 'icons/turf/walls_beehive.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "bee-perspective-map"
#else
icon_state = "bee-map"
#endif
mod = "bee-"
plane = PLANE_WALL-1 //We don't want depth shadows

Expand Down Expand Up @@ -1054,7 +1118,11 @@ TYPEINFO_NEW(/turf/unsimulated/wall/auto/adventure/mars/interior)
name = "wall"
mod = "interior-"
icon = 'icons/turf/walls_marsoutpost.dmi'
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "interior-0"
#else
icon_state = "interior-map"
#endif


TYPEINFO(/turf/unsimulated/wall/auto/adventure/meat)
Expand Down Expand Up @@ -1102,12 +1170,20 @@ TYPEINFO_NEW(/turf/unsimulated/wall/auto/adventure/old)
name = "wall"
icon = 'icons/turf/walls_derelict.dmi'
mod = "old-"
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "old-perspective-map"
#else
icon_state = "old-map"
#endif

reinforced
name = "reinforced wall"
mod = "oldr-"
#ifdef PERSPECTIVE_EDITOR_WALL
icon_state = "oldr-perspective-map"
#else
icon_state = "oldr-map"
#endif


TYPEINFO(/turf/unsimulated/wall/auto/hedge)
Expand Down
Binary file modified icons/turf/walls_asteroid.dmi
Binary file not shown.
Binary file modified icons/turf/walls_beehive.dmi
Binary file not shown.
Binary file modified icons/turf/walls_derelict.dmi
Binary file not shown.
Binary file modified icons/turf/walls_jen.dmi
Binary file not shown.
Binary file modified icons/turf/walls_manta.dmi
Binary file not shown.
Binary file modified icons/turf/walls_marsoutpost.dmi
Binary file not shown.
Binary file modified icons/turf/walls_shuttle-debris.dmi
Binary file not shown.
Binary file modified icons/turf/walls_shuttle.dmi
Binary file not shown.
Binary file modified icons/turf/walls_supernorn_smooth.dmi
Binary file not shown.

0 comments on commit 0ee20dc

Please sign in to comment.