mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Move some stuff from different layers to different planes
Moves everything on a 15+ layer to a plane. So now you get screen catcher (-99, was already on a plane), lighting (15), effects that ignore lighting (16), fullscreen UI effects (18), screen objects used to build the UI (19), actual equipment in the UI slots (20), and everything else (0). Also created a file to contain plane and layer defines for hopeful eventual use. Hopefully this doesn't change anything now but does enable some nifty new features in the future.
This commit is contained in:
18
code/__DEFINES/layers_planes.dm
Normal file
18
code/__DEFINES/layers_planes.dm
Normal file
@@ -0,0 +1,18 @@
|
||||
//Contains all our layer and plane defines
|
||||
|
||||
//If you want more information on how byond renders things, look here http://www.byond.com/forum/?post=2042210
|
||||
|
||||
#define PLANE_CLICKCATCHER -99
|
||||
|
||||
#define PLANE_GAME 0 //This might need splitting into different planes later, but for now it will do
|
||||
|
||||
#define PLANE_LIGHTING 15
|
||||
#define PLANE_EFFECTS_UNLIT 16
|
||||
|
||||
#define PLANE_FULLSCREEN 18
|
||||
#define LAYER_DAMAGE 18.1
|
||||
#define LAYER_BLIND 18.2
|
||||
#define LAYER_CRIT 18.3
|
||||
|
||||
#define PLANE_UI_BASE 19 //All the screen objects go here
|
||||
#define PLANE_UI_OBJECTS 20 //Your actual equipment being displayed
|
||||
@@ -688,6 +688,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
curblend = A.blend_mode
|
||||
|
||||
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
|
||||
// TODO: Needs to support overlays/underlays on different planes from parent
|
||||
var/list/layers = list()
|
||||
var/image/copy
|
||||
// Add the atom's icon itself, without pixel_x/y offsets.
|
||||
|
||||
@@ -495,14 +495,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return y
|
||||
|
||||
|
||||
/proc/anim(turf/location,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
||||
/proc/anim(turf/location, atom/movable/target, a_icon, a_icon_state as text, flick_anim as text, sleeptime = 0, direction as num)
|
||||
//This proc throws up either an icon or an animation for a specified amount of time.
|
||||
//The variables should be apparent enough.
|
||||
var/atom/movable/overlay/animation = new(location)
|
||||
if(direction)
|
||||
animation.dir = direction
|
||||
animation.icon = a_icon
|
||||
animation.layer = target:layer+1
|
||||
animation.layer = target.layer+1
|
||||
animation.plane = target.plane
|
||||
if(a_icon_state)
|
||||
animation.icon_state = a_icon_state
|
||||
else
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#define CLICKCATCHER_PLANE -99
|
||||
@@ -325,7 +325,7 @@
|
||||
/obj/screen/click_catcher
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "click_catcher"
|
||||
plane = CLICKCATCHER_PLANE
|
||||
plane = PLANE_CLICKCATCHER
|
||||
mouse_opacity = 2
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
|
||||
|
||||
@@ -37,9 +37,12 @@
|
||||
|
||||
if(new_master)
|
||||
var/old_layer = new_master.layer
|
||||
var/old_plane = new_master.plane
|
||||
new_master.layer = FLOAT_LAYER
|
||||
new_master.plane = PLANE_UI_OBJECTS
|
||||
alert.overlays += new_master
|
||||
new_master.layer = old_layer
|
||||
new_master.plane = old_plane
|
||||
alert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts()
|
||||
alert.master = new_master
|
||||
else
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
blobpwrdisplay.icon_state = "block"
|
||||
blobpwrdisplay.screen_loc = ui_health
|
||||
blobpwrdisplay.mouse_opacity = 0
|
||||
blobpwrdisplay.layer = 20
|
||||
blobpwrdisplay.plane = PLANE_UI_BASE
|
||||
infodisplay += blobpwrdisplay
|
||||
|
||||
healths = new /obj/screen/healths/blob()
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
#define FULLSCREEN_LAYER 18
|
||||
#define DAMAGE_LAYER FULLSCREEN_LAYER + 0.1
|
||||
#define BLIND_LAYER DAMAGE_LAYER + 0.1
|
||||
#define CRIT_LAYER BLIND_LAYER + 0.1
|
||||
|
||||
/mob
|
||||
var/list/screens = list()
|
||||
|
||||
@@ -63,7 +58,7 @@
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
icon_state = "default"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
layer = FULLSCREEN_LAYER
|
||||
plane = PLANE_FULLSCREEN
|
||||
mouse_opacity = 0
|
||||
var/severity = 0
|
||||
|
||||
@@ -74,19 +69,19 @@
|
||||
|
||||
/obj/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = DAMAGE_LAYER
|
||||
layer = LAYER_DAMAGE
|
||||
|
||||
/obj/screen/fullscreen/oxy
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = DAMAGE_LAYER
|
||||
layer = LAYER_DAMAGE
|
||||
|
||||
/obj/screen/fullscreen/crit
|
||||
icon_state = "passage"
|
||||
layer = CRIT_LAYER
|
||||
layer = LAYER_CRIT
|
||||
|
||||
/obj/screen/fullscreen/blind
|
||||
icon_state = "blackimageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
layer = LAYER_BLIND
|
||||
|
||||
/obj/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
@@ -110,8 +105,3 @@
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "druggy"
|
||||
|
||||
#undef FULLSCREEN_LAYER
|
||||
#undef BLIND_LAYER
|
||||
#undef DAMAGE_LAYER
|
||||
#undef CRIT_LAYER
|
||||
|
||||
@@ -31,11 +31,8 @@
|
||||
name = "Faith"
|
||||
icon_state = "deity_power"
|
||||
screen_loc = ui_deitypower
|
||||
layer = 20
|
||||
|
||||
/obj/screen/deity_follower_display
|
||||
name = "Followers"
|
||||
icon_state = "deity_followers"
|
||||
screen_loc = ui_deityfollowers
|
||||
layer = 20
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
|
||||
else
|
||||
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
|
||||
A.layer = 20
|
||||
A.plane = PLANE_UI_OBJECTS //need to move this to module init eventually
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/obj/screen
|
||||
name = ""
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
layer = 20
|
||||
plane = PLANE_UI_BASE
|
||||
unacidable = 1
|
||||
appearance_flags = APPEARANCE_UI
|
||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||
@@ -29,7 +29,6 @@
|
||||
maptext_width = 480
|
||||
|
||||
/obj/screen/swap_hand
|
||||
layer = 19
|
||||
name = "swap hand"
|
||||
|
||||
/obj/screen/swap_hand/Click()
|
||||
@@ -51,7 +50,6 @@
|
||||
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
|
||||
var/icon_empty // Icon when empty. For now used only by humans.
|
||||
var/icon_full // Icon when contains an item. For now used only by humans.
|
||||
layer = 19
|
||||
|
||||
/obj/screen/inventory/Click()
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
@@ -86,9 +84,11 @@
|
||||
..()
|
||||
if(!active_overlay)
|
||||
active_overlay = image("icon"=icon, "icon_state"="hand_active")
|
||||
active_overlay.plane = PLANE_UI_BASE
|
||||
if(!handcuff_overlay)
|
||||
var/state = (slot_id == slot_r_hand) ? "markus" : "gabrielle"
|
||||
handcuff_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"=state)
|
||||
handcuff_overlay.plane = PLANE_UI_OBJECTS
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
@@ -136,7 +136,6 @@
|
||||
name = "drop"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_drop"
|
||||
layer = 19
|
||||
|
||||
/obj/screen/drop/Click()
|
||||
usr.drop_item_v()
|
||||
@@ -285,7 +284,6 @@
|
||||
name = "resist"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = 19
|
||||
|
||||
/obj/screen/resist/Click()
|
||||
if(isliving(usr))
|
||||
@@ -379,7 +377,9 @@
|
||||
|
||||
/obj/screen/zone_sel/update_icon(mob/user)
|
||||
overlays.Cut()
|
||||
overlays += image('icons/mob/screen_gen.dmi', "[selecting]")
|
||||
var/image/overlay = image('icons/mob/screen_gen.dmi', "[selecting]")
|
||||
overlay.plane = PLANE_UI_BASE
|
||||
overlays += overlay
|
||||
user.zone_selected = selecting
|
||||
|
||||
/obj/screen/zone_sel/alien
|
||||
@@ -393,23 +393,6 @@
|
||||
/obj/screen/zone_sel/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
|
||||
/obj/screen/flash
|
||||
name = "flash"
|
||||
icon_state = "blank"
|
||||
blend_mode = BLEND_ADD
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
layer = 17
|
||||
|
||||
/obj/screen/damageoverlay
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
icon_state = "oxydamageoverlay0"
|
||||
name = "dmg"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
mouse_opacity = 0
|
||||
layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
|
||||
|
||||
/obj/screen/healths
|
||||
name = "health"
|
||||
icon_state = "health0"
|
||||
|
||||
@@ -71,7 +71,7 @@ var/const/tk_maxrange = 15
|
||||
flags = NOBLUDGEON | ABSTRACT
|
||||
//item_state = null
|
||||
w_class = 10
|
||||
layer = 20
|
||||
plane = PLANE_UI_OBJECTS
|
||||
|
||||
var/last_throw = 0
|
||||
var/atom/movable/focus = null
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button)
|
||||
current_button.overlays.Cut()
|
||||
if(button_icon && button_icon_state)
|
||||
var/image/img
|
||||
img = image(button_icon, current_button, button_icon_state)
|
||||
var/image/img = image(button_icon, current_button, button_icon_state)
|
||||
img.plane = current_button.plane
|
||||
img.pixel_x = 0
|
||||
img.pixel_y = 0
|
||||
current_button.overlays += img
|
||||
@@ -131,10 +131,10 @@
|
||||
..(current_button)
|
||||
else if(target)
|
||||
var/obj/item/I = target
|
||||
var/old = I.layer
|
||||
I.layer = FLOAT_LAYER //AAAH
|
||||
var/old = I.plane
|
||||
I.plane = current_button.plane
|
||||
current_button.overlays += I
|
||||
I.layer = old
|
||||
I.plane = old
|
||||
|
||||
/datum/action/item_action/toggle_light
|
||||
name = "Toggle Light"
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
if(istype(W, /obj/item/weapon/implant))
|
||||
qdel(W)
|
||||
continue
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = affected_mob.loc
|
||||
W.dropped(affected_mob)
|
||||
var/mob/living/new_mob = new new_form(affected_mob.loc)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/atom
|
||||
layer = 2
|
||||
plane = PLANE_GAME
|
||||
var/level = 2
|
||||
var/flags = 0
|
||||
var/list/fingerprints
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "pointer"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = 16
|
||||
plane = PLANE_EFFECTS_UNLIT
|
||||
duration = 25
|
||||
|
||||
/obj/effect/overlay/temp/point/New(loc, set_invis = 0)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
icon_state = "blank"
|
||||
anchored = 1
|
||||
layer = 99
|
||||
plane = PLANE_EFFECTS_UNLIT
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//Just to be sure.
|
||||
|
||||
|
||||
@@ -367,22 +367,21 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
return
|
||||
|
||||
/obj/item/proc/dropped(mob/user)
|
||||
plane = initial(plane)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(user)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
return
|
||||
|
||||
|
||||
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
||||
/obj/item/proc/on_exit_storage(obj/item/weapon/storage/S)
|
||||
return
|
||||
plane = initial(plane)
|
||||
|
||||
// called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
|
||||
/obj/item/proc/on_enter_storage(obj/item/weapon/storage/S)
|
||||
return
|
||||
plane = PLANE_UI_OBJECTS
|
||||
|
||||
// called when "found" in pockets and storage items. Returns 1 if the search should end.
|
||||
/obj/item/proc/on_found(mob/finder)
|
||||
@@ -392,8 +391,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
// user is mob that equipped it
|
||||
// slot uses the slot_X defines found in setup.dm
|
||||
// for items that can be placed in multiple slots
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(mob/user, slot)
|
||||
plane = PLANE_UI_OBJECTS
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot.
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
user << "<span class='notice'>Scanned [target].</span>"
|
||||
var/obj/temp = new/obj()
|
||||
temp.appearance = target.appearance
|
||||
temp.layer = initial(target.layer) // scanning things in your inventory
|
||||
temp.plane = initial(target.plane) // scanning things in your inventory
|
||||
saved_appearance = temp.appearance
|
||||
|
||||
/obj/item/device/chameleon/proc/toggle()
|
||||
|
||||
@@ -157,7 +157,6 @@
|
||||
boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
|
||||
for(var/obj/O in contents)
|
||||
O.screen_loc = "[cx],[cy]"
|
||||
O.layer = 20
|
||||
cx++
|
||||
if(cx > mx)
|
||||
cx = tx
|
||||
@@ -176,7 +175,7 @@
|
||||
ND.sample_object.mouse_opacity = 2
|
||||
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
|
||||
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
|
||||
ND.sample_object.layer = 20
|
||||
ND.sample_object.plane = PLANE_UI_OBJECTS
|
||||
cx++
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
@@ -186,7 +185,7 @@
|
||||
O.mouse_opacity = 2 //This is here so storage items that spawn with contents correctly have the "click around item to equip"
|
||||
O.screen_loc = "[cx]:16,[cy]:16"
|
||||
O.maptext = ""
|
||||
O.layer = 20
|
||||
O.plane = PLANE_UI_OBJECTS
|
||||
cx++
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
@@ -342,7 +341,6 @@
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
W.dropped(M)
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = new_location
|
||||
|
||||
if(usr)
|
||||
@@ -463,11 +461,11 @@
|
||||
boxes.master = src
|
||||
boxes.icon_state = "block"
|
||||
boxes.screen_loc = "7,7 to 10,8"
|
||||
boxes.layer = 19
|
||||
boxes.plane = PLANE_UI_BASE
|
||||
closer = new /obj/screen/close()
|
||||
closer.master = src
|
||||
closer.icon_state = "backpack_close"
|
||||
closer.layer = 20
|
||||
closer.plane = PLANE_UI_BASE
|
||||
orient2hud()
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -262,7 +262,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 ..()
|
||||
@@ -285,7 +287,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
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
@@ -326,7 +328,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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -252,7 +252,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()
|
||||
..()
|
||||
@@ -962,7 +961,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)
|
||||
@@ -980,7 +980,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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -841,6 +841,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/allow_upgrade = 1
|
||||
var/last_upgrade = 0
|
||||
|
||||
layer = 21
|
||||
plane = PLANE_UI_OBJECTS
|
||||
item_state = "nothing"
|
||||
w_class = 5
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -120,7 +120,6 @@ var/global/list/rad_collectors = list()
|
||||
if (!Z)
|
||||
return
|
||||
Z.loc = get_turf(src)
|
||||
Z.layer = initial(Z.layer)
|
||||
src.P = null
|
||||
if(active)
|
||||
toggle_power()
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "code\__DEFINES\genetics.dm"
|
||||
#include "code\__DEFINES\hud.dm"
|
||||
#include "code\__DEFINES\is_helpers.dm"
|
||||
#include "code\__DEFINES\layers_planes.dm"
|
||||
#include "code\__DEFINES\machines.dm"
|
||||
#include "code\__DEFINES\math.dm"
|
||||
#include "code\__DEFINES\misc.dm"
|
||||
@@ -84,7 +85,6 @@
|
||||
#include "code\_globalvars\lists\mobs.dm"
|
||||
#include "code\_globalvars\lists\names.dm"
|
||||
#include "code\_globalvars\lists\objects.dm"
|
||||
#include "code\_onclick\_defines.dm"
|
||||
#include "code\_onclick\adjacent.dm"
|
||||
#include "code\_onclick\ai.dm"
|
||||
#include "code\_onclick\autoclick.dm"
|
||||
|
||||
Reference in New Issue
Block a user