Merge pull request #4613 from Neerti/1/21/2018_there_is_no_ceiling

Adds Missing Ceiling Overlay + Fixes Space on Roof
This commit is contained in:
Anewbe
2018-01-23 18:19:47 -06:00
committed by GitHub
16 changed files with 41 additions and 36 deletions
+3
View File
@@ -58,6 +58,8 @@ What is the naming convention for planes or layers?
////////////////////////////////////////////////////////////////////////////////////////
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
#define DECALS_LAYER 2.01
#define OVERTURF_LAYER 2.1
#define DOOR_OPEN_LAYER 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
//#define OBJ_LAYER 3 //For easy recordkeeping; this is a byond define
#define DOOR_CLOSED_LAYER 3.1 //Above most items if closed
@@ -91,6 +93,7 @@ What is the naming convention for planes or layers?
#define PLANE_CH_SPECIAL 23 //Special role icon (revhead or w/e)
#define PLANE_CH_STATUS_OOC 24 //OOC status hud for spooks
#define PLANE_MESONS 30 //Stuff seen with mesons, like open ceilings. This is 30 for downstreams.
//Fullscreen overlays under inventory
#define PLANE_FULLSCREEN 90 //Blindness, mesons, druggy, etc
+3 -1
View File
@@ -252,4 +252,6 @@
#define VIS_ADMIN2 17
#define VIS_ADMIN3 18
#define VIS_COUNT 18 //Must be highest number from above.
#define VIS_MESONS 19
#define VIS_COUNT 19 //Must be highest number from above.
-1
View File
@@ -1645,7 +1645,6 @@ area/space/atmosalert()
requires_power = 1
always_unpowered = 1
dynamic_lighting = 0
base_turf = /turf/space
auxport
name = "\improper Fore Port Solar Array"
+1 -4
View File
@@ -122,10 +122,7 @@
build_delay = deconstruct ? 50 : 20
build_cost = deconstruct ? 10 : 3
build_type = deconstruct ? "floor" : "wall"
if(F.check_destroy_override(F))
build_turf = deconstruct ? destroy_floor_override_path : /turf/simulated/wall
else
build_turf = deconstruct ? /turf/space : /turf/simulated/wall
build_turf = deconstruct ? get_base_turf_by_area(F) : /turf/simulated/wall
if(!build_type)
working = 0
+1 -1
View File
@@ -6,7 +6,7 @@ var/list/floor_decals = list()
/obj/effect/floor_decal
name = "floor decal"
icon = 'icons/turf/flooring/decals.dmi'
layer = TURF_LAYER + 0.01
layer = DECALS_LAYER
var/supplied_dir
/obj/effect/floor_decal/New(var/newloc, var/newdir, var/newcolour)
-10
View File
@@ -62,16 +62,6 @@
/turf/simulated/proc/initialize()
return
/turf/simulated/proc/check_destroy_override()
if(destroy_floor_override) //Don't bother doing the additional checks if we don't have to.
var/area/my_area = get_area(src)
// my_area = my_area.master
if(is_type_in_list(my_area, destroy_floor_override_ignore_areas))
return 0
if(z in destroy_floor_override_z_levels)
return 1
return 0
/turf/simulated/proc/AddTracks(var/typepath,var/bloodDNA,var/comingdir,var/goingdir,var/bloodcolor="#A10808")
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
if(!tracks)
+14
View File
@@ -1,5 +1,14 @@
var/list/flooring_cache = list()
var/image/no_ceiling_image = null
/hook/startup/proc/setup_no_ceiling_image()
cache_no_ceiling_image()
/proc/cache_no_ceiling_image()
no_ceiling_image = image(icon = 'icons/turf/open_space.dmi', icon_state = "no_ceiling", layer = OVERTURF_LAYER)
no_ceiling_image.plane = PLANE_MESONS
/turf/simulated/floor/update_icon(var/update_neighbors)
if(lava)
@@ -84,6 +93,11 @@ var/list/flooring_cache = list()
continue
F.update_icon()
// Show 'ceilingless' overlay.
var/turf/above = GetAbove(src)
if(above && isopenspace(above) && !istype(src, /turf/simulated/floor/outdoors)) // This won't apply to outdoor turfs since its assumed they don't have a ceiling anyways.
overlays |= no_ceiling_image
/turf/simulated/floor/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0)
if(!flooring_cache[cache_key])
var/image/I = image(icon = flooring.icon, icon_state = icon_base, dir = icon_dir)
+1 -4
View File
@@ -211,10 +211,7 @@
/turf/simulated/wall/ex_act(severity)
switch(severity)
if(1.0)
if(check_destroy_override())
src.ChangeTurf(destroy_floor_override_path)
else
src.ChangeTurf(/turf/space)
src.ChangeTurf(get_base_turf_by_area(src))
if(2.0)
if(prob(75))
take_damage(rand(150, 250))
+8 -3
View File
@@ -12,9 +12,14 @@
// Called after turf replaces old one
/turf/proc/post_change()
levelupdate()
var/turf/simulated/open/T = GetAbove(src)
if(istype(T))
T.update_icon()
var/turf/simulated/open/above = GetAbove(src)
if(istype(above))
above.update_icon()
var/turf/simulated/below = GetBelow(src)
if(istype(below))
below.update_icon() // To add or remove the 'ceiling-less' overlay.
//Creates a new turf
/turf/proc/ChangeTurf(var/turf/N, var/tell_universe=1, var/force_lighting_update = 0)
-11
View File
@@ -38,17 +38,6 @@ var/changelog_hash = ""
var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544)
var/round_progressing = 1
//On some maps, it does not make sense for space turf to appear when something blows up (e.g. on an asteroid colony, or planetside)
//The turf listed here is what is created after ex_act() and other tile-destroying procs are called on a turf that
//is not already in a blacklisted area.
//Set to 1 to enable it.
var/destroy_floor_override = 1
//Below is the path of turf used in place of space tiles.
var/destroy_floor_override_path = /turf/simulated/mineral/floor
//A list of z-levels to apply the override to. This is so z-levels like tcomms work as they did before.
var/list/destroy_floor_override_z_levels = list(1,4,5)
//Some areas you may want to not turn into the override path you made above, like space or the solars.
var/list/destroy_floor_override_ignore_areas = list(/area/space,/area/solar,/area/shuttle)
var/master_mode = "extended" // "extended"
var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode.
+1 -1
View File
@@ -70,7 +70,7 @@ BLIND // can't see anything
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
toggleable = 1
vision_flags = SEE_TURFS
enables_planes = (VIS_FULLBRIGHT)
enables_planes = list(VIS_FULLBRIGHT, VIS_MESONS)
/obj/item/clothing/glasses/meson/New()
..()
+2
View File
@@ -33,6 +33,8 @@
plane_masters[VIS_D_COLORBLIND] = new /obj/screen/plane_master/colorblindness //Colorblindness (affects world)
plane_masters[VIS_D_COLORBLINDI]= new /obj/screen/plane_master/colorblindness/items //Colorblindness (items in HUD, subplane of above, don't toggle)
plane_masters[VIS_MESONS] = new /obj/screen/plane_master{plane = PLANE_MESONS} //Meson-specific things like open ceilings.
..()
/datum/plane_holder/Destroy()
+1
View File
@@ -52,6 +52,7 @@
below = GetBelow(src)
turf_changed_event.register(below, src, /turf/simulated/open/update_icon)
levelupdate()
below.update_icon() // So the 'ceiling-less' overlay gets added.
for(var/atom/movable/A in src)
A.fall()
OS_controller.add_turf(src, 1)