mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Plane master handling + new chemical Rotatium (#20707)
* Plane master handling + new chemical Rotatium A whole system to create, store, and access screen master objects from the hud. In case anybody actually wants to do anything relevant with them. Which will probably be me but whatever. Moves things out to some planes that make sense. click catcher -99 game 0 lighting 15 fullscreen 18 HUD 19 above HUD 20 Rotatium is more of a demonstration than something I really really love, but it is kinda neat so here you go. It rocks the game plane and lighting planes back and forth and also does light toxin damage. The longer it effects you, the stronger the rocking gets. No pictures right now, I'll get some later. Sorry. * Pay no attention to the commit behind the curtain * Updates travis to 1346, the stable version for 510 for linux
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
//Defines for atom layers
|
||||
//Defines for atom layers and planes
|
||||
//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE
|
||||
|
||||
#define CLICKCATCHER_PLANE -99
|
||||
|
||||
#define GAME_PLANE 0
|
||||
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
|
||||
#define MID_TURF_LAYER 2.02
|
||||
#define HIGH_TURF_LAYER 2.03
|
||||
@@ -47,14 +50,20 @@
|
||||
#define AREA_LAYER 10
|
||||
#define MASSIVE_OBJ_LAYER 11
|
||||
#define POINT_LAYER 12
|
||||
|
||||
#define LIGHTING_PLANE 15
|
||||
#define LIGHTING_LAYER 15
|
||||
|
||||
//HUD layer defines
|
||||
#define COLORED_VISION_LAYER 17.8
|
||||
#define FLASH_LAYER 17.9
|
||||
#define FULLSCREEN_LAYER 18
|
||||
#define UI_DAMAGE_LAYER 18.1
|
||||
#define BLIND_LAYER 18.2
|
||||
#define CRIT_LAYER 18.3
|
||||
|
||||
#define FULLSCREEN_PLANE 18
|
||||
#define FLASH_LAYER 18
|
||||
#define FULLSCREEN_LAYER 18.1
|
||||
#define UI_DAMAGE_LAYER 18.2
|
||||
#define BLIND_LAYER 18.3
|
||||
#define CRIT_LAYER 18.4
|
||||
|
||||
#define HUD_PLANE 19
|
||||
#define HUD_LAYER 19
|
||||
#define ABOVE_HUD_LAYER 19.1
|
||||
#define ABOVE_HUD_PLANE 20
|
||||
#define ABOVE_HUD_LAYER 20
|
||||
|
||||
@@ -926,25 +926,29 @@ var/list/WALLITEMS_INVERSE = list(
|
||||
return "white"
|
||||
|
||||
/proc/params2turf(scr_loc, turf/origin)
|
||||
if(!scr_loc)
|
||||
return null
|
||||
var/tX = splittext(scr_loc, ",")
|
||||
var/tY = splittext(tX[2], ":")
|
||||
var/tZ = origin.z
|
||||
tY = tY[1]
|
||||
tX = splittext(tX[1], ":")
|
||||
tX = tX[1]
|
||||
tX = max(1, min(world.maxx, origin.x + (text2num(tX) - (world.view + 1))))
|
||||
tY = max(1, min(world.maxy, origin.y + (text2num(tY) - (world.view + 1))))
|
||||
tX = Clamp(origin.x + text2num(tX) - world.view + 1, 1, world.maxx)
|
||||
tY = Clamp(origin.y + text2num(tY) - world.view + 1, 1, world.maxy)
|
||||
return locate(tX, tY, tZ)
|
||||
|
||||
/proc/screen_loc2turf(text, turf/origin)
|
||||
if(!text)
|
||||
return null
|
||||
var/tZ = splittext(text, ",")
|
||||
var/tX = splittext(tZ[1], "-")
|
||||
var/tY = text2num(tX[2])
|
||||
tX = splittext(tZ[2], "-")
|
||||
tX = text2num(tX[2])
|
||||
tZ = origin.z
|
||||
tX = max(1, min(origin.x + 7 - tX, world.maxx))
|
||||
tY = max(1, min(origin.y + 7 - tY, world.maxy))
|
||||
tX = Clamp(origin.x + 7 - tX, 1, world.maxx)
|
||||
tY = Clamp(origin.y + 7 - tY, 1, world.maxy)
|
||||
return locate(tX, tY, tZ)
|
||||
|
||||
/proc/IsValidSrc(datum/D)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#define CLICKCATCHER_PLANE -99
|
||||
@@ -346,15 +346,11 @@
|
||||
icon_state = "click_catcher"
|
||||
plane = CLICKCATCHER_PLANE
|
||||
mouse_opacity = 2
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
screen_loc = "CENTER"
|
||||
|
||||
/obj/screen/click_catcher/proc/MakeGreed()
|
||||
. = list()
|
||||
for(var/i = 0, i<15, i++)
|
||||
for(var/j = 0, j<15, j++)
|
||||
var/obj/screen/click_catcher/CC = new()
|
||||
CC.screen_loc = "NORTH-[i],EAST-[j]"
|
||||
. += CC
|
||||
/obj/screen/click_catcher/New()
|
||||
..()
|
||||
transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
|
||||
/obj/screen/click_catcher/Click(location, control, params)
|
||||
var/list/modifiers = params2list(params)
|
||||
@@ -362,7 +358,7 @@
|
||||
var/mob/living/carbon/C = usr
|
||||
C.swap_hand()
|
||||
else
|
||||
var/turf/T = screen_loc2turf(screen_loc, get_turf(usr))
|
||||
var/turf/T = params2turf(modifiers["screen-loc"], get_turf(usr))
|
||||
if(T)
|
||||
T.Click(location, control, params)
|
||||
. = 1
|
||||
@@ -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 = FLOAT_PLANE
|
||||
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
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
blobpwrdisplay.screen_loc = ui_health
|
||||
blobpwrdisplay.mouse_opacity = 0
|
||||
blobpwrdisplay.layer = ABOVE_HUD_LAYER
|
||||
blobpwrdisplay.plane = ABOVE_HUD_PLANE
|
||||
infodisplay += blobpwrdisplay
|
||||
|
||||
healths = new /obj/screen/healths/blob()
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
using.icon_state = "swap_1_m"
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
using.layer = HUD_LAYER
|
||||
using.plane = HUD_PLANE
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
@@ -33,6 +34,7 @@
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
using.layer = HUD_LAYER
|
||||
using.plane = HUD_PLANE
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
icon_state = "default"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
layer = FULLSCREEN_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
mouse_opacity = 0
|
||||
var/severity = 0
|
||||
|
||||
@@ -71,18 +72,22 @@
|
||||
/obj/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/oxy
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/crit
|
||||
icon_state = "passage"
|
||||
layer = CRIT_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/blind
|
||||
icon_state = "blackimageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
|
||||
var/list/inv_slots[slots_amt] // /obj/screen/inventory objects, ordered by their slot ID.
|
||||
var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object
|
||||
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
@@ -55,6 +56,9 @@
|
||||
hide_actions_toggle = new
|
||||
hide_actions_toggle.InitialiseIcon(mymob)
|
||||
hand_slots = list()
|
||||
for(var/mytype in subtypesof(/obj/screen/plane_master))
|
||||
var/obj/screen/plane_master/instance = new mytype()
|
||||
plane_masters["[instance.plane]"] = instance
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
@@ -108,6 +112,11 @@
|
||||
deity_follower_display = null
|
||||
nightvisionicon = null
|
||||
|
||||
if(plane_masters.len)
|
||||
for(var/thing in plane_masters)
|
||||
qdel(plane_masters[thing])
|
||||
plane_masters.Cut()
|
||||
|
||||
if(screenoverlays.len)
|
||||
for(var/thing in screenoverlays)
|
||||
qdel(thing)
|
||||
@@ -184,6 +193,9 @@
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen -= infodisplay
|
||||
|
||||
if(plane_masters.len)
|
||||
for(var/thing in plane_masters)
|
||||
screenmob.client.screen += plane_masters[thing]
|
||||
hud_version = display_hud_version
|
||||
persistant_inventory_update(screenmob)
|
||||
mymob.update_action_buttons(1)
|
||||
|
||||
28
code/_onclick/hud/plane_master.dm
Normal file
28
code/_onclick/hud/plane_master.dm
Normal file
@@ -0,0 +1,28 @@
|
||||
/obj/screen/plane_master
|
||||
screen_loc = "CENTER"
|
||||
icon_state = "blank"
|
||||
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/New()
|
||||
if(blend_mode == BLEND_MULTIPLY)
|
||||
//What is this? Read http://www.byond.com/forum/?post=2141928
|
||||
var/image/backdrop = image('icons/mob/screen_gen.dmi', "black")
|
||||
backdrop.transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
backdrop.layer = BACKGROUND_LAYER
|
||||
backdrop.blend_mode = BLEND_OVERLAY
|
||||
overlays += backdrop
|
||||
..()
|
||||
|
||||
/obj/screen/plane_master/game_world
|
||||
name = "game world plane master"
|
||||
plane = GAME_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/lighting
|
||||
name = "lighting plane master"
|
||||
plane = LIGHTING_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
// blend_mode = BLEND_MULTIPLY
|
||||
// color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0.1,0.1,0.1,0)
|
||||
mouse_opacity = 0
|
||||
@@ -222,6 +222,7 @@
|
||||
else
|
||||
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
|
||||
A.layer = ABOVE_HUD_LAYER
|
||||
A.plane = ABOVE_HUD_PLANE
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
name = ""
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
appearance_flags = APPEARANCE_UI
|
||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||
@@ -33,6 +34,7 @@
|
||||
|
||||
/obj/screen/swap_hand
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
name = "swap hand"
|
||||
|
||||
/obj/screen/swap_hand/Click()
|
||||
@@ -81,6 +83,7 @@
|
||||
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 = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/inventory/Click()
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
@@ -169,6 +172,7 @@
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_drop"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/drop/Click()
|
||||
usr.drop_item_v()
|
||||
@@ -306,6 +310,7 @@
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/resist/Click()
|
||||
if(isliving(usr))
|
||||
@@ -422,6 +427,7 @@
|
||||
blend_mode = BLEND_ADD
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
layer = FLASH_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/damageoverlay
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
@@ -431,6 +437,7 @@
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
mouse_opacity = 0
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/healths
|
||||
name = "health"
|
||||
@@ -489,6 +496,7 @@
|
||||
/obj/screen/wheel
|
||||
name = "wheel"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
icon_state = ""
|
||||
screen_loc = null //if you make a new wheel, remember to give it a screen_loc
|
||||
var/list/buttons_names = list() //list of the names for each button, its length is the amount of buttons.
|
||||
@@ -585,6 +593,7 @@
|
||||
name = "default wheel button"
|
||||
screen_loc = "8,8"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
mouse_opacity = 2
|
||||
var/obj/screen/wheel/wheel
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ var/const/tk_maxrange = 15
|
||||
//item_state = null
|
||||
w_class = 10
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
|
||||
var/last_throw = 0
|
||||
var/atom/movable/focus = null
|
||||
|
||||
@@ -138,10 +138,13 @@
|
||||
..(current_button)
|
||||
else if(target)
|
||||
var/obj/item/I = target
|
||||
var/old = I.layer
|
||||
var/old_layer = I.layer
|
||||
var/old_plane = I.plane
|
||||
I.layer = FLOAT_LAYER //AAAH
|
||||
I.plane = FLOAT_PLANE //^ what that guy said
|
||||
current_button.add_overlay(I)
|
||||
I.layer = old
|
||||
I.layer = old_layer
|
||||
I.plane = old_plane
|
||||
|
||||
/datum/action/item_action/toggle_light
|
||||
name = "Toggle Light"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/atom
|
||||
layer = TURF_LAYER
|
||||
plane = GAME_PLANE
|
||||
var/level = 2
|
||||
var/flags = 0
|
||||
var/list/fingerprints
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
r_hand.layer = ABOVE_HUD_LAYER
|
||||
r_hand.plane = ABOVE_HUD_PLANE
|
||||
r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand))
|
||||
client.screen |= r_hand
|
||||
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
l_hand.layer = ABOVE_HUD_LAYER
|
||||
l_hand.plane = ABOVE_HUD_PLANE
|
||||
l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand))
|
||||
client.screen |= l_hand
|
||||
if(hands_overlays.len)
|
||||
|
||||
@@ -143,30 +143,38 @@ var/hsboxspawn = 1
|
||||
if(P.wear_suit)
|
||||
P.wear_suit.loc = P.loc
|
||||
P.wear_suit.layer = initial(P.wear_suit.layer)
|
||||
P.wear_suit.plane = initial(P.wear_suit.plane)
|
||||
P.wear_suit = null
|
||||
P.wear_suit = new/obj/item/clothing/suit/space(P)
|
||||
P.wear_suit.layer = ABOVE_HUD_LAYER
|
||||
P.wear_suit.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_wear_suit()
|
||||
if(P.head)
|
||||
P.head.loc = P.loc
|
||||
P.head.layer = initial(P.head.layer)
|
||||
P.head.plane = initial(P.head.plane)
|
||||
P.head = null
|
||||
P.head = new/obj/item/clothing/head/helmet/space(P)
|
||||
P.head.layer = ABOVE_HUD_LAYER
|
||||
P.head.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_head()
|
||||
if(P.wear_mask)
|
||||
P.wear_mask.loc = P.loc
|
||||
P.wear_mask.layer = initial(P.wear_mask.layer)
|
||||
P.wear_mask.plane = initial(P.wear_mask.plane)
|
||||
P.wear_mask = null
|
||||
P.wear_mask = new/obj/item/clothing/mask/gas(P)
|
||||
P.wear_mask.layer = ABOVE_HUD_LAYER
|
||||
P.wear_mask.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_wear_mask()
|
||||
if(P.back)
|
||||
P.back.loc = P.loc
|
||||
P.back.layer = initial(P.back.layer)
|
||||
P.back.plane = initial(P.back.plane)
|
||||
P.back = null
|
||||
P.back = new/obj/item/weapon/tank/jetpack/oxygen(P)
|
||||
P.back.layer = ABOVE_HUD_LAYER
|
||||
P.back.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_back()
|
||||
P.internal = P.back
|
||||
P.update_internals_hud_icon(1)
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
qdel(J)
|
||||
H.icon = HI
|
||||
H.layer = ABOVE_HUD_LAYER
|
||||
H.plane = ABOVE_HUD_PLANE
|
||||
usr.mapobjs += H
|
||||
#else
|
||||
|
||||
@@ -297,6 +298,7 @@
|
||||
H.icon = I
|
||||
qdel(I)
|
||||
H.layer = ABOVE_HUD_LAYER
|
||||
H.plane = ABOVE_HUD_PLANE
|
||||
usr.mapobjs += H
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
var/obj/temp = new/obj()
|
||||
temp.appearance = target.appearance
|
||||
temp.layer = initial(target.layer) // scanning things in your inventory
|
||||
temp.plane = initial(target.plane)
|
||||
saved_appearance = temp.appearance
|
||||
|
||||
/obj/item/device/chameleon/proc/toggle()
|
||||
|
||||
@@ -34,9 +34,12 @@
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/soda_cans/can = locate() in contents
|
||||
if(can)
|
||||
var/muh_layer = can.layer
|
||||
var/muh_plane = can.plane
|
||||
can.layer = FLOAT_LAYER
|
||||
can.plane = FLOAT_PLANE
|
||||
underlays += can
|
||||
can.layer = muh_layer
|
||||
can.plane = muh_plane
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
for(var/obj/O in contents)
|
||||
O.screen_loc = "[cx],[cy]"
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > mx)
|
||||
cx = tx
|
||||
@@ -185,6 +186,7 @@
|
||||
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 = ABOVE_HUD_LAYER
|
||||
ND.sample_object.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
@@ -195,6 +197,7 @@
|
||||
O.screen_loc = "[cx]:16,[cy]:16"
|
||||
O.maptext = ""
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
@@ -358,6 +361,7 @@
|
||||
var/mob/M = loc
|
||||
W.dropped(M)
|
||||
W.layer = initial(W.layer)
|
||||
W.plane = initial(W.plane)
|
||||
W.loc = new_location
|
||||
|
||||
if(usr)
|
||||
@@ -483,10 +487,12 @@
|
||||
boxes.icon_state = "block"
|
||||
boxes.screen_loc = "7,7 to 10,8"
|
||||
boxes.layer = HUD_LAYER
|
||||
boxes.plane = HUD_PLANE
|
||||
closer = new /obj/screen/close()
|
||||
closer.master = src
|
||||
closer.icon_state = "backpack_close"
|
||||
closer.layer = ABOVE_HUD_LAYER
|
||||
closer.plane = ABOVE_HUD_PLANE
|
||||
orient2hud()
|
||||
|
||||
|
||||
|
||||
@@ -1345,6 +1345,7 @@
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(M)
|
||||
|
||||
M.Paralyse(5)
|
||||
@@ -1375,6 +1376,7 @@
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(M)
|
||||
|
||||
M.Paralyse(5)
|
||||
@@ -1428,6 +1430,7 @@
|
||||
if(I)
|
||||
I.loc = M.loc
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(M)
|
||||
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -260,6 +260,7 @@
|
||||
welded = 0
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
@@ -290,6 +291,7 @@
|
||||
welded = 0
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
|
||||
|
||||
|
||||
|
||||
@@ -353,6 +353,7 @@
|
||||
welded = 0
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
@@ -374,6 +375,7 @@
|
||||
welded = 0
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, 1)
|
||||
|
||||
|
||||
|
||||
@@ -220,7 +220,6 @@ var/next_external_rsc = 0
|
||||
|
||||
if(!void)
|
||||
void = new()
|
||||
void = void.MakeGreed()
|
||||
|
||||
screen += void
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
U.hastie = src
|
||||
loc = U
|
||||
layer = FLOAT_LAYER
|
||||
plane = FLOAT_PLANE
|
||||
if(minimize_when_attached)
|
||||
transform *= 0.5 //halve the size so it doesn't overpower the under
|
||||
pixel_x += 8
|
||||
@@ -45,6 +46,7 @@
|
||||
pixel_x -= 8
|
||||
pixel_y += 8
|
||||
layer = initial(layer)
|
||||
plane = initial(plane)
|
||||
U.cut_overlays()
|
||||
U.hastie = null
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
blueeffect.icon = 'icons/effects/effects.dmi'
|
||||
blueeffect.icon_state = "shieldsparkles"
|
||||
blueeffect.layer = FLASH_LAYER
|
||||
blueeffect.plane = FULLSCREEN_PLANE
|
||||
blueeffect.mouse_opacity = 0
|
||||
M.client.screen += blueeffect
|
||||
sleep(20)
|
||||
|
||||
@@ -630,6 +630,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
|
||||
if(slots_free.len)
|
||||
halitem.screen_loc = pick(slots_free)
|
||||
halitem.layer = ABOVE_HUD_LAYER
|
||||
halitem.plane = ABOVE_HUD_PLANE
|
||||
switch(rand(1,6))
|
||||
if(1) //revolver
|
||||
halitem.icon = 'icons/obj/guns/projectile.dmi'
|
||||
|
||||
@@ -237,6 +237,7 @@
|
||||
icon = LIGHTING_ICON
|
||||
icon_state = LIGHTING_ICON_STATE
|
||||
layer = LIGHTING_LAYER
|
||||
plane = LIGHTING_PLANE
|
||||
mouse_opacity = 0
|
||||
blend_mode = BLEND_OVERLAY
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
|
||||
@@ -417,6 +417,7 @@
|
||||
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 = FLASH_LAYER)
|
||||
I.plane = FULLSCREEN_PLANE
|
||||
C.images += I
|
||||
spawn(30)
|
||||
if(C)
|
||||
|
||||
@@ -268,6 +268,7 @@
|
||||
s.use(s.max_amount)
|
||||
s.loc = loc
|
||||
s.layer = initial(s.layer)
|
||||
s.plane = initial(s.plane)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/power_change()
|
||||
..()
|
||||
|
||||
@@ -334,9 +334,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
A.icon = ui_style2icon(client.prefs.UI_style)
|
||||
A.desc = message
|
||||
var/old_layer = source.layer
|
||||
var/old_plane = source.plane
|
||||
source.layer = FLOAT_LAYER
|
||||
source.plane = FLOAT_PLANE
|
||||
A.add_overlay(source)
|
||||
source.layer = old_layer
|
||||
source.plane = old_plane
|
||||
src << "<span class='ghostalert'><a href=?src=\ref[src];reenter=1>(Click to re-enter)</a></span>"
|
||||
if(sound)
|
||||
src << sound(sound)
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
I.loc = src
|
||||
held_items[hand_index] = I
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
I.equipped(src, slot_hands)
|
||||
if(I.pulledby)
|
||||
I.pulledby.stop_pulling()
|
||||
@@ -216,6 +217,7 @@
|
||||
return FALSE
|
||||
I.forceMove(get_turf(src))
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.dropped(src)
|
||||
return FALSE
|
||||
|
||||
@@ -268,6 +270,7 @@
|
||||
if(client)
|
||||
client.screen -= I
|
||||
I.layer = initial(I.layer)
|
||||
I.plane = initial(I.plane)
|
||||
I.appearance_flags &= ~NO_CLIENT_COLOR
|
||||
I.forceMove(loc)
|
||||
I.dropped(src)
|
||||
|
||||
@@ -323,6 +323,7 @@
|
||||
W.dropped(src)
|
||||
if (W)
|
||||
W.layer = initial(W.layer)
|
||||
W.plane = initial(W.plane)
|
||||
if (legcuffed)
|
||||
var/obj/item/weapon/W = legcuffed
|
||||
legcuffed = null
|
||||
@@ -334,6 +335,7 @@
|
||||
W.dropped(src)
|
||||
if (W)
|
||||
W.layer = initial(W.layer)
|
||||
W.plane = initial(W.plane)
|
||||
|
||||
/mob/living/carbon/proc/clear_cuffs(obj/item/I, cuff_break)
|
||||
if(!I.loc || buckled)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
observe.client.screen -= I
|
||||
I.loc = src
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
I.appearance_flags |= NO_CLIENT_COLOR
|
||||
var/not_handled = FALSE
|
||||
switch(slot)
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_1 = O
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
O.screen_loc = inv1.screen_loc
|
||||
observer_screen_update(O,TRUE)
|
||||
contents += O
|
||||
@@ -61,6 +62,7 @@
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_2 = O
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
O.screen_loc = inv2.screen_loc
|
||||
observer_screen_update(O,TRUE)
|
||||
contents += O
|
||||
@@ -72,6 +74,7 @@
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_3 = O
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
O.screen_loc = inv3.screen_loc
|
||||
observer_screen_update(O,TRUE)
|
||||
contents += O
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
robot_modules_background.layer = HUD_LAYER //Objects that appear on screen are on layer ABOVE_HUD_LAYER, UI should be just below it.
|
||||
robot_modules_background.plane = HUD_PLANE
|
||||
|
||||
ident = rand(1, 999)
|
||||
update_icons()
|
||||
|
||||
@@ -408,6 +408,7 @@ var/global/mulebot_count = 0
|
||||
load.loc = loc
|
||||
load.pixel_y = initial(load.pixel_y)
|
||||
load.layer = initial(load.layer)
|
||||
load.plane = initial(load.plane)
|
||||
if(dirn)
|
||||
var/turf/T = loc
|
||||
var/turf/newT = get_step(T,dirn)
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
I.screen_loc = null // will get moved if inventory is visible
|
||||
I.loc = src
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
|
||||
switch(slot)
|
||||
if(slot_head)
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
r_hand.layer = ABOVE_HUD_LAYER
|
||||
r_hand.plane = ABOVE_HUD_PLANE
|
||||
r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand))
|
||||
client.screen |= r_hand
|
||||
|
||||
@@ -58,6 +59,7 @@
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
l_hand.layer = ABOVE_HUD_LAYER
|
||||
l_hand.plane = ABOVE_HUD_PLANE
|
||||
l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand))
|
||||
client.screen |= l_hand
|
||||
|
||||
|
||||
@@ -255,6 +255,7 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
I.loc = src
|
||||
I.equipped(src, slot)
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/proc/apply_overlay(cache_index)
|
||||
var/image/I = guardian_overlays[cache_index]
|
||||
@@ -283,6 +284,7 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
r_hand.layer = ABOVE_HUD_LAYER
|
||||
r_hand.plane = ABOVE_HUD_PLANE
|
||||
r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand))
|
||||
client.screen |= r_hand
|
||||
|
||||
@@ -297,6 +299,7 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
l_hand.layer = ABOVE_HUD_LAYER
|
||||
l_hand.plane = ABOVE_HUD_PLANE
|
||||
l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand))
|
||||
client.screen |= l_hand
|
||||
|
||||
|
||||
@@ -515,10 +515,12 @@
|
||||
var/obj/item/r_hand = get_item_for_held_index(2)
|
||||
if(r_hand)
|
||||
r_hand.layer = ABOVE_HUD_LAYER
|
||||
r_hand.plane = ABOVE_HUD_PLANE
|
||||
r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand))
|
||||
client.screen |= r_hand
|
||||
if(l_hand)
|
||||
l_hand.layer = ABOVE_HUD_LAYER
|
||||
l_hand.plane = ABOVE_HUD_PLANE
|
||||
l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand))
|
||||
client.screen |= l_hand
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
|
||||
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 = ABOVE_HUD_LAYER, dir = A.dir)
|
||||
//20 for being above darkness
|
||||
A.pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
pipes_shown += A.pipe_vision_img
|
||||
if(client)
|
||||
client.images += A.pipe_vision_img
|
||||
|
||||
@@ -406,11 +406,15 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
A.target = source
|
||||
if(!alert_overlay)
|
||||
var/old_layer = source.layer
|
||||
var/old_plane = source.plane
|
||||
source.layer = FLOAT_LAYER
|
||||
source.plane = FLOAT_PLANE
|
||||
A.add_overlay(source)
|
||||
source.layer = old_layer
|
||||
source.plane = old_plane
|
||||
else
|
||||
alert_overlay.layer = FLOAT_LAYER
|
||||
alert_overlay.plane = FLOAT_PLANE
|
||||
A.add_overlay(alert_overlay)
|
||||
|
||||
/proc/item_heal_robotic(mob/living/carbon/human/H, mob/user, brute_heal, burn_heal)
|
||||
|
||||
@@ -178,6 +178,7 @@
|
||||
W.loc = loc
|
||||
W.dropped(src)
|
||||
W.layer = initial(W.layer)
|
||||
W.plane = initial(W.plane)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ var/global/list/rad_collectors = list()
|
||||
return
|
||||
Z.loc = get_turf(src)
|
||||
Z.layer = initial(Z.layer)
|
||||
Z.plane = initial(Z.plane)
|
||||
src.loaded_tank = null
|
||||
if(active)
|
||||
toggle_power()
|
||||
|
||||
@@ -658,6 +658,33 @@
|
||||
return ..() || .
|
||||
|
||||
|
||||
/datum/reagent/toxin/rotatium //Rotatium. Fucks up your rotation and is hilarious
|
||||
name = "Rotatium"
|
||||
id = "rotatium"
|
||||
description = "A constantly swirling, oddly colourful fluid. Causes the consumer's sense of direction and hand-eye coordination to become wild."
|
||||
reagent_state = LIQUID
|
||||
color = "#AC88CA" //RGB: 172, 136, 202
|
||||
metabolization_rate = 0.6 * REAGENTS_METABOLISM
|
||||
toxpwr = 0.5
|
||||
|
||||
/datum/reagent/toxin/rotatium/on_mob_life(mob/living/M)
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 20 && current_cycle%20 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/rotation = min(round(current_cycle/20), 89) // By this point the player is probably puking and quitting anyway
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
|
||||
animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/rotatium/on_mob_delete(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
|
||||
..()
|
||||
|
||||
|
||||
//ACID
|
||||
|
||||
|
||||
|
||||
@@ -87,3 +87,10 @@
|
||||
results = list("heparin" = 4)
|
||||
required_reagents = list("formaldehyde" = 1, "sodium" = 1, "chlorine" = 1, "lithium" = 1)
|
||||
mix_message = "<span class='danger'>The mixture thins and loses all color.</span>"
|
||||
|
||||
/datum/chemical_reaction/rotatium
|
||||
name = "Rotatium"
|
||||
id = "Rotatium"
|
||||
results = list("rotatium" = 3)
|
||||
required_reagents = list("mindbreaker" = 1, "teslium" = 1, "neurotoxin2" = 1)
|
||||
mix_message = "<span class='danger'>After sparks, fire, and the smell of mindbreaker, the mix is constantly spinning with no stop in sight.</span>"
|
||||
@@ -93,7 +93,6 @@
|
||||
#include "code\_globalvars\lists\names.dm"
|
||||
#include "code\_globalvars\lists\objects.dm"
|
||||
#include "code\_globalvars\lists\poll_ignore.dm"
|
||||
#include "code\_onclick\_defines.dm"
|
||||
#include "code\_onclick\adjacent.dm"
|
||||
#include "code\_onclick\ai.dm"
|
||||
#include "code\_onclick\autoclick.dm"
|
||||
@@ -125,6 +124,7 @@
|
||||
#include "code\_onclick\hud\monkey.dm"
|
||||
#include "code\_onclick\hud\movable_screen_objects.dm"
|
||||
#include "code\_onclick\hud\other_mobs.dm"
|
||||
#include "code\_onclick\hud\plane_master.dm"
|
||||
#include "code\_onclick\hud\revenanthud.dm"
|
||||
#include "code\_onclick\hud\robot.dm"
|
||||
#include "code\_onclick\hud\screen_objects.dm"
|
||||
|
||||
Reference in New Issue
Block a user