Merge pull request #17086 from MrPerson/planes_on_a_snake

Move some stuff from different layers to different planes
This commit is contained in:
Razharas
2016-04-29 15:51:41 +03:00
41 changed files with 93 additions and 108 deletions
-3
View File
@@ -1386,7 +1386,6 @@
M.unEquip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.Paralyse(5)
@@ -1416,7 +1415,6 @@
M.unEquip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
M.Paralyse(5)
@@ -1469,7 +1467,6 @@
M.unEquip(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
I.dropped(M)
if(istype(M, /mob/living/carbon/human))
@@ -259,7 +259,9 @@
user.visible_message("[user] unwelds the vent.", "<span class='notice'>You unweld the vent.</span>", "<span class='italics'>You hear welding.</span>")
welded = 0
update_icon()
pipe_vision_img = image(src, loc, layer = 20, dir = dir)
var/image/I = image(src, loc, dir = dir)
I.plane = PLANE_UI_OBJECTS
pipe_vision_img = I
return 0
else
return ..()
@@ -289,7 +291,9 @@
user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the vent", "You hear loud scraping noises.")
welded = 0
update_icon()
pipe_vision_img = image(src, loc, layer = 20, dir = dir)
var/image/I = image(src, loc, dir = dir)
I.plane = PLANE_UI_OBJECTS
pipe_vision_img = I
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
@@ -308,7 +308,9 @@
user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.")
welded = 0
update_icon()
pipe_vision_img = image(src, loc, layer = 20, dir = dir)
var/image/I = image(src, loc, dir = dir)
I.plane = PLANE_UI_OBJECTS
pipe_vision_img = I
return 0
else
return ..()
@@ -329,7 +331,9 @@
user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the scrubber.", "You hear loud scraping noises.")
welded = 0
update_icon()
pipe_vision_img = image(src, loc, layer = 20, dir = dir)
var/image/I = image(src, loc, dir = dir)
I.plane = PLANE_UI_OBJECTS
pipe_vision_img = I
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
+2 -1
View File
@@ -357,8 +357,10 @@ BLIND // can't see anything
I.transform *= 0.5 //halve the size so it doesn't overpower the under
I.pixel_x += 8
I.pixel_y -= 8
var/oldlayer = I.layer
I.layer = FLOAT_LAYER
overlays += I
I.layer = oldlayer
if(istype(loc, /mob/living/carbon/human))
@@ -492,7 +494,6 @@ BLIND // can't see anything
hastie.transform *= 2
hastie.pixel_x -= 8
hastie.pixel_y += 8
hastie.layer = initial(hastie.layer)
overlays = null
usr.put_in_hands(hastie)
hastie = null
+1 -1
View File
@@ -65,7 +65,7 @@
blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
blueeffect.icon = 'icons/effects/effects.dmi'
blueeffect.icon_state = "shieldsparkles"
blueeffect.layer = 17
blueeffect.plane = PLANE_EFFECTS_UNLIT
blueeffect.mouse_opacity = 0
M.client.screen += blueeffect
sleep(20)
+1 -1
View File
@@ -635,7 +635,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
if(!H.r_store) slots_free += ui_storage2
if(slots_free.len)
halitem.screen_loc = pick(slots_free)
halitem.layer = 50
halitem.plane = PLANE_UI_OBJECTS
switch(rand(1,6))
if(1) //revolver
halitem.icon = 'icons/obj/guns/projectile.dmi'
+1 -3
View File
@@ -27,7 +27,6 @@
*/
#define LIGHTING_CIRCULAR 1 //Comment this out to use old square lighting effects.
#define LIGHTING_LAYER 15 //Drawing layer for lighting
#define LIGHTING_CAP 10 //The lumcount level at which alpha is 0 and we're fully lit.
#define LIGHTING_CAP_FRAC (255/LIGHTING_CAP) //A precal'd variable we'll use in turf/redraw_lighting()
#define LIGHTING_ICON 'icons/effects/alphacolors.dmi'
@@ -236,7 +235,7 @@
/atom/movable/light
icon = LIGHTING_ICON
icon_state = LIGHTING_ICON_STATE
layer = LIGHTING_LAYER
plane = PLANE_LIGHTING
mouse_opacity = 0
blend_mode = BLEND_OVERLAY
invisibility = INVISIBILITY_LIGHTING
@@ -362,7 +361,6 @@
T.init_lighting()
T.update_lumcount(0)
#undef LIGHTING_LAYER
#undef LIGHTING_CIRCULAR
#undef LIGHTING_ICON
#undef LIGHTING_ICON_STATE
+3 -3
View File
@@ -253,7 +253,6 @@
new s.type(loc,s.max_amount)
s.use(s.max_amount)
s.loc = loc
s.layer = initial(s.layer)
/obj/machinery/mineral/ore_redemption/power_change()
..()
@@ -994,7 +993,8 @@
var/client/C = user.client
for(var/turf/closed/mineral/M in minerals)
var/turf/F = get_turf(M)
var/image/I = image('icons/turf/smoothrocks.dmi', loc = F, icon_state = M.scan_state, layer = 18)
var/image/I = image('icons/turf/smoothrocks.dmi', loc = F, icon_state = M.scan_state)
I.plane = PLANE_EFFECTS_UNLIT
C.images += I
spawn(30)
if(C)
@@ -1012,7 +1012,7 @@
C.icon_state = M.scan_state
/obj/effect/overlay/temp/mining_overlay
layer = 20
plane = PLANE_EFFECTS_UNLIT
icon = 'icons/turf/smoothrocks.dmi'
anchored = 1
mouse_opacity = 0
-5
View File
@@ -29,7 +29,6 @@
if(!l_hand)
W.loc = src //TODO: move to equipped?
l_hand = W
W.layer = 20 //TODO: move to equipped?
W.equipped(src,slot_l_hand)
if(pulling == W)
stop_pulling()
@@ -47,7 +46,6 @@
if(!r_hand)
W.loc = src
r_hand = W
W.layer = 20
W.equipped(src,slot_r_hand)
if(pulling == W)
stop_pulling()
@@ -92,7 +90,6 @@
return 1
else
W.loc = get_turf(src)
W.layer = initial(W.layer)
W.dropped(src)
return 0
@@ -154,8 +151,6 @@
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
return 1
@@ -32,7 +32,6 @@
I.screen_loc = null // will get moved if inventory is visible
I.loc = src
I.equipped(src, slot)
I.layer = 20
switch(slot)
if(slot_back)
+1
View File
@@ -833,6 +833,7 @@ Sorry Giacom. Please don't be mad :(
I = image(r_hand.icon, A, r_hand.icon_state, A.layer + 1)
else // Attacked with a fist?
return
I.plane = PLANE_EFFECTS_UNLIT
// Who can see the attack?
var/list/viewing = list()
@@ -48,7 +48,7 @@
if(!module_state_1)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_1 = O
O.layer = 20
O.plane = PLANE_UI_OBJECTS
O.screen_loc = inv1.screen_loc
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
@@ -58,7 +58,7 @@
else if(!module_state_2)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_2 = O
O.layer = 20
O.plane = PLANE_UI_OBJECTS
O.screen_loc = inv2.screen_loc
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
@@ -68,7 +68,7 @@
else if(!module_state_3)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_3 = O
O.layer = 20
O.plane = PLANE_UI_OBJECTS
O.screen_loc = inv3.screen_loc
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
@@ -84,7 +84,6 @@
robot_modules_background = new()
robot_modules_background.icon_state = "block"
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999)
update_icons()
@@ -94,7 +94,6 @@
I.screen_loc = null // will get moved if inventory is visible
I.loc = src
I.equipped(src, slot)
I.layer = 20
switch(slot)
if(slot_head)
@@ -37,7 +37,6 @@
hands_overlays += r_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
r_hand.layer = 20
r_hand.screen_loc = ui_rhand
client.screen |= r_hand
@@ -54,7 +53,6 @@
hands_overlays += l_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
l_hand.layer = 20
l_hand.screen_loc = ui_lhand
client.screen |= l_hand
+2 -2
View File
@@ -92,8 +92,8 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
for(var/X in totalMembers)
var/obj/machinery/atmospherics/A = X //all elements in totalMembers are necessarily of this type.
if(!A.pipe_vision_img)
A.pipe_vision_img = image(A, A.loc, layer = 20, dir = A.dir)
//20 for being above darkness
A.pipe_vision_img = image(A, A.loc, dir = A.dir)
A.pipe_vision_img.plane = PLANE_EFFECTS_UNLIT
pipes_shown += A.pipe_vision_img
if(client)
client.images += A.pipe_vision_img
+1 -1
View File
@@ -12,7 +12,7 @@
var/allow_upgrade = 1
var/last_upgrade = 0
layer = 21
plane = PLANE_UI_OBJECTS
item_state = "nothing"
w_class = 5
-1
View File
@@ -132,7 +132,6 @@
if (W)
W.loc = loc
W.dropped(src)
W.layer = initial(W.layer)
//Make mob invisible and spawn animation
notransform = 1
+1 -1
View File
@@ -201,7 +201,7 @@
var/atom/c = atoms[i]
for(j = sorted.len, j > 0, --j)
var/atom/c2 = sorted[j]
if(c2.layer <= c.layer)
if(c2.layer <= c.layer)//needs updating to account for plane
break
sorted.Insert(j+1, c)
@@ -118,7 +118,6 @@ var/global/list/rad_collectors = list()
if (!Z)
return
Z.loc = get_turf(src)
Z.layer = initial(Z.layer)
src.loaded_tank = null
if(active)
toggle_power()