fixes some issues with planes; (#11266)

- blob
- hologram vs vehicle.

combines some layers into eachother.
This commit is contained in:
DrCelt
2016-08-03 21:43:54 -07:00
committed by clusterfack
parent a578030200
commit d8404d73df
7 changed files with 26 additions and 22 deletions

View File

@@ -83,13 +83,12 @@ What is the naming convention for planes or layers?
#define WIRE_LAYER 6 #define WIRE_LAYER 6
#define RUNE_LAYER 7 #define RUNE_LAYER 7
#define WIRE_TERMINAL_LAYER 8 #define WIRE_TERMINAL_LAYER 8
#define NAV_BEACON_LAYER 9 #define ABOVE_TILE_LAYER 9
#define UNARY_PIPE_LAYER 10 #define UNARY_PIPE_LAYER 10
#define MECH_RECHARGE_LAYER 11 #define MOUSETRAP_LAYER 11
#define MOUSETRAP_LAYER 12 #define FIREAXE_LOCKER_LAYER 12
#define FIREAXE_LOCKER_LAYER 13 #define BLOOD_LAYER 13
#define BLOOD_LAYER 14 #define WEED_LAYER 14
#define WEED_LAYER 15
#define NOIR_BLOOD_PLANE -17 // For blood which is red, will appear to people under the influence of the noir colour matrix. -if changing this, make sure that the blood layer changes too. #define NOIR_BLOOD_PLANE -17 // For blood which is red, will appear to people under the influence of the noir colour matrix. -if changing this, make sure that the blood layer changes too.

View File

@@ -421,20 +421,17 @@ var/list/blob_looks = list(
if(!spawning) if(!spawning)
for(var/obj/effect/blob/B in orange(src,1)) for(var/obj/effect/blob/B in orange(src,1))
if(B.spawning == 1) if(B.spawning == 1)
anim(target = loc, a_icon = icon, flick_anim = "connect_spawn", sleeptime = 15, direction = get_dir(src,B), lay = layer+0.1, offX = -16, offY = -16) anim(target = loc, a_icon = icon, flick_anim = "connect_spawn", sleeptime = 15, direction = get_dir(src,B), lay = layer, offX = -16, offY = -16,plane = plane)
spawn(8) spawn(8)
update_icon() update_icon()
else if(!B.dying && !B.spawning) else if(!B.dying && !B.spawning)
if(spawnend) if(spawnend)
anim(target = loc, a_icon = icon, flick_anim = "connect_spawn", sleeptime = 15, direction = get_dir(src,B), lay = layer+0.1, offX = -16, offY = -16) anim(target = loc, a_icon = icon, flick_anim = "connect_spawn", sleeptime = 15, direction = get_dir(src,B), lay = layer, offX = -16, offY = -16,plane = plane)
else else
if(istype(B,/obj/effect/blob/core)) if(istype(B,/obj/effect/blob/core))
overlays += image(icon,"connect",dir = get_dir(src,B)) overlays += image(icon,"connect",dir = get_dir(src,B))
else else
var/num = rand(1,100) overlays += image(icon,"connect",dir = get_dir(src,B))
num /= 10000
overlays += image(icon,"connect",dir = get_dir(src,B), layer = layer-num)
if(spawnend) if(spawnend)
spawn(10) spawn(10)
@@ -443,7 +440,4 @@ var/list/blob_looks = list(
..() ..()
else else
if(health <= 15) if(health <= 15)
icon_state = "blob_damaged" icon_state = "blob_damaged"
return

View File

@@ -37,6 +37,9 @@ var/const/HOLOPAD_MODE = 0
var/last_request = 0 //to prevent request spam. ~Carn var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating. var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
flags = HEAR flags = HEAR
plane = ABOVE_TURF_PLANE
layer = ABOVE_TILE_LAYER
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests. /obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user)) if(!istype(user))

View File

@@ -9,7 +9,7 @@
desc = "A radio beacon used for bot navigation." desc = "A radio beacon used for bot navigation."
level = 1 // underfloor level = 1 // underfloor
plane = ABOVE_TURF_PLANE plane = ABOVE_TURF_PLANE
layer = NAV_BEACON_LAYER layer = ABOVE_TILE_LAYER
anchored = 1 anchored = 1
var/locked = 1 // true if controls are locked var/locked = 1 // true if controls are locked

View File

@@ -7,7 +7,7 @@
var/obj/mecha/recharging_mecha = null var/obj/mecha/recharging_mecha = null
var/capacitor_max = 0 //How much can be stored var/capacitor_max = 0 //How much can be stored
var/capacitor_stored = 0 //How much is presently stored var/capacitor_stored = 0 //How much is presently stored
layer = MECH_RECHARGE_LAYER layer = ABOVE_TILE_LAYER
plane = ABOVE_TURF_PLANE plane = ABOVE_TURF_PLANE
anchored = 1 anchored = 1
density = 0 density = 0

View File

@@ -29,7 +29,8 @@
var/max_health = 100 var/max_health = 100
var/destroyed = 0 var/destroyed = 0
var/inertia_dir = 0 var/inertia_dir = 0
plane = MOB_PLANE plane = ABOVE_HUMAN_PLANE
layer = VEHICLE_LAYER
var/can_spacemove = 0 var/can_spacemove = 0
var/ethereal = 0 var/ethereal = 0
@@ -89,7 +90,6 @@
return 1 return 1
if(mykey) if(mykey)
return user.is_holding_item(mykey) return user.is_holding_item(mykey)
return 0
/obj/structure/bed/chair/vehicle/relaymove(var/mob/living/user, direction) /obj/structure/bed/chair/vehicle/relaymove(var/mob/living/user, direction)
if(user.incapacitated() || destroyed) if(user.incapacitated() || destroyed)
@@ -140,7 +140,6 @@
if(istype(src.loc, /turf/space) && (!src.Process_Spacemove(0, user))) if(istype(src.loc, /turf/space) && (!src.Process_Spacemove(0, user)))
var/turf/space/S = src.loc var/turf/space/S = src.loc
S.Entered(src)*/ S.Entered(src)*/
return 0
/obj/structure/bed/chair/vehicle/proc/Process_Spacemove(var/check_drift = 0, mob/user) /obj/structure/bed/chair/vehicle/proc/Process_Spacemove(var/check_drift = 0, mob/user)
@@ -241,8 +240,10 @@
/obj/structure/bed/chair/vehicle/handle_layer() /obj/structure/bed/chair/vehicle/handle_layer()
if(dir == SOUTH) if(dir == SOUTH)
plane = ABOVE_HUMAN_PLANE plane = ABOVE_HUMAN_PLANE
layer = VEHICLE_LAYER
else else
plane = OBJ_PLANE plane = OBJ_PLANE
layer = ABOVE_OBJ_LAYER
/obj/structure/bed/chair/vehicle/update_dir() /obj/structure/bed/chair/vehicle/update_dir()
. = ..() . = ..()

View File

@@ -28,13 +28,15 @@
//Does not require sleeptime, specifies for how long the animation should be allowed to exist before returning to pool //Does not require sleeptime, specifies for how long the animation should be allowed to exist before returning to pool
//Does not require animation direction, but you can specify //Does not require animation direction, but you can specify
//Does not require a name //Does not require a name
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num, name as text, lay as num, offX as num, offY as num, col as text, alph as num) proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num, name as text, lay as num, offX as num, offY as num, col as text, alph as num,plane as num)
//This proc throws up either an icon or an animation for a specified amount of time. //This proc throws up either an icon or an animation for a specified amount of time.
//The variables should be apparent enough. //The variables should be apparent enough.
if(!location && target) if(!location && target)
location = get_turf(target) location = get_turf(target)
if(location && !target) if(location && !target)
target = location target = location
if(!location && !target)
return
var/atom/movable/overlay/animation = getFromPool(/atom/movable/overlay, location) var/atom/movable/overlay/animation = getFromPool(/atom/movable/overlay, location)
if(name) if(name)
animation.name = name animation.name = name
@@ -49,6 +51,11 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
animation.layer = target:layer+1 animation.layer = target:layer+1
else else
animation.layer = lay animation.layer = lay
if(target && istype(target,/atom))
if(!plane)
animation.plane = target:plane
else
animation.plane = plane
if(offX) if(offX)
animation.pixel_x = offX animation.pixel_x = offX
if(offY) if(offY)