mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Merge remote-tracking branch 'origin/master' into rustsql
This commit is contained in:
@@ -149,6 +149,15 @@
|
||||
/obj/screen/fullscreen/color_vision/blue
|
||||
color = "#0000ff"
|
||||
|
||||
/obj/screen/fullscreen/cinematic_backdrop
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
plane = SPLASHSCREEN_PLANE
|
||||
layer = SPLASHSCREEN_LAYER - 1
|
||||
color = "#000000"
|
||||
show_when_dead = TRUE
|
||||
|
||||
/obj/screen/fullscreen/lighting_backdrop
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "flash"
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(null, C.view)
|
||||
if(SSparallax.random_layer)
|
||||
C.parallax_layers_cached += new SSparallax.random_layer
|
||||
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
|
||||
|
||||
C.parallax_layers = C.parallax_layers_cached.Copy()
|
||||
@@ -52,12 +54,12 @@
|
||||
switch(C.prefs.parallax)
|
||||
if (PARALLAX_INSANE)
|
||||
C.parallax_throttle = FALSE
|
||||
C.parallax_layers_max = 4
|
||||
C.parallax_layers_max = 5
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_MED)
|
||||
C.parallax_throttle = PARALLAX_DELAY_MED
|
||||
C.parallax_layers_max = 2
|
||||
C.parallax_layers_max = 3
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_LOW)
|
||||
@@ -68,8 +70,9 @@
|
||||
if (PARALLAX_DISABLE)
|
||||
return FALSE
|
||||
|
||||
//This is high parallax.
|
||||
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
|
||||
C.parallax_layers_max = 3
|
||||
C.parallax_layers_max = 4
|
||||
return TRUE
|
||||
|
||||
/datum/hud/proc/update_parallax_pref(mob/viewmob)
|
||||
@@ -219,15 +222,14 @@
|
||||
L.screen_loc = "CENTER-7:[round(L.offset_x,1)],CENTER-7:[round(L.offset_y,1)]"
|
||||
|
||||
/atom/movable/proc/update_parallax_contents()
|
||||
set waitfor = FALSE
|
||||
if(length(client_mobs_in_contents))
|
||||
for(var/thing in client_mobs_in_contents)
|
||||
var/mob/M = thing
|
||||
if(M && M.client && M.hud_used && length(M.client.parallax_layers))
|
||||
if(M?.client && M.hud_used && length(M.client.parallax_layers))
|
||||
M.hud_used.update_parallax()
|
||||
|
||||
/mob/proc/update_parallax_teleport() //used for arrivals shuttle
|
||||
if(client && client.eye && hud_used && length(client.parallax_layers))
|
||||
if(client?.eye && hud_used && length(client.parallax_layers))
|
||||
var/area/areaobj = get_area(client.eye)
|
||||
hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE)
|
||||
|
||||
@@ -287,6 +289,21 @@
|
||||
speed = 1.4
|
||||
layer = 3
|
||||
|
||||
/obj/screen/parallax_layer/random
|
||||
blend_mode = BLEND_OVERLAY
|
||||
speed = 3
|
||||
layer = 3
|
||||
|
||||
/obj/screen/parallax_layer/random/space_gas
|
||||
icon_state = "space_gas"
|
||||
|
||||
/obj/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
|
||||
. = ..()
|
||||
src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
|
||||
|
||||
/obj/screen/parallax_layer/random/asteroids
|
||||
icon_state = "asteroids"
|
||||
|
||||
/obj/screen/parallax_layer/planet
|
||||
icon_state = "planet"
|
||||
blend_mode = BLEND_OVERLAY
|
||||
@@ -295,11 +312,11 @@
|
||||
layer = 30
|
||||
|
||||
/obj/screen/parallax_layer/planet/update_status(mob/M)
|
||||
var/turf/T = get_turf(M)
|
||||
if(is_station_level(T.z))
|
||||
invisibility = 0
|
||||
else
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
var/client/C = M.client
|
||||
var/turf/posobj = get_turf(C.eye)
|
||||
if(!posobj)
|
||||
return
|
||||
invisibility = is_station_level(posobj.z) ? 0 : INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/screen/parallax_layer/planet/update_o()
|
||||
return //Shit wont move
|
||||
return //Shit won't move
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
. = ..()
|
||||
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
|
||||
|
||||
/obj/screen/plane_master/openspace/backdrop(mob/mymob)
|
||||
filters = list()
|
||||
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10)
|
||||
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
|
||||
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
|
||||
@@ -93,13 +91,6 @@
|
||||
else
|
||||
remove_filter("ambient_occlusion")
|
||||
|
||||
//Reserved to chat messages, so they are still displayed above the field of vision masking.
|
||||
/obj/screen/plane_master/chat_messages
|
||||
name = "chat messages plane master"
|
||||
plane = CHAT_PLANE
|
||||
appearance_flags = PLANE_MASTER
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners.
|
||||
/obj/screen/plane_master/field_of_vision
|
||||
name = "field of vision mask plane master"
|
||||
@@ -135,10 +126,14 @@
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/screen/plane_master/lighting/backdrop(mob/mymob)
|
||||
mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
|
||||
mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)
|
||||
|
||||
/obj/screen/plane_master/lighting/Initialize()
|
||||
. = ..()
|
||||
filters += filter(type="alpha", render_source=EMISSIVE_RENDER_TARGET, flags=MASK_INVERSE)
|
||||
filters += filter(type="alpha", render_source=EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags=MASK_INVERSE)
|
||||
filters += filter(type="alpha", render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE)
|
||||
filters += filter(type="alpha", render_source = EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags = MASK_INVERSE)
|
||||
|
||||
/**
|
||||
* Things placed on this mask the lighting plane. Doesn't render directly.
|
||||
@@ -186,7 +181,6 @@
|
||||
render_target = EMISSIVE_BLOCKER_RENDER_TARGET
|
||||
|
||||
///Contains space parallax
|
||||
|
||||
/obj/screen/plane_master/parallax
|
||||
name = "parallax plane master"
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
@@ -197,12 +191,16 @@
|
||||
name = "parallax whitifier plane master"
|
||||
plane = PLANE_SPACE
|
||||
|
||||
/obj/screen/plane_master/lighting/backdrop(mob/mymob)
|
||||
mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
|
||||
mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)
|
||||
|
||||
/obj/screen/plane_master/camera_static
|
||||
name = "camera static plane master"
|
||||
plane = CAMERA_STATIC_PLANE
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
|
||||
//Reserved to chat messages, so they are still displayed above the field of vision masking.
|
||||
/obj/screen/plane_master/chat_messages
|
||||
name = "runechat plane master"
|
||||
plane = CHAT_PLANE
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
@@ -12,9 +12,14 @@
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
animate_movement = SLIDE_STEPS
|
||||
speech_span = SPAN_ROBOT
|
||||
vis_flags = VIS_INHERIT_PLANE
|
||||
appearance_flags = APPEARANCE_UI
|
||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||
var/datum/hud/hud = null // A reference to the owner HUD, if any.
|
||||
/// A reference to the object in the slot. Grabs or items, generally.
|
||||
var/obj/master = null
|
||||
/// A reference to the owner HUD, if any.
|
||||
var/datum/hud/hud = null
|
||||
/**
|
||||
* Map name assigned to this object.
|
||||
* Automatically set by /client/proc/add_obj_to_map.
|
||||
@@ -60,7 +65,17 @@
|
||||
name = "swap hand"
|
||||
|
||||
/obj/screen/swap_hand/Click()
|
||||
usr.swap_hand()
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
// if(world.time <= usr.next_move)
|
||||
// return 1
|
||||
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
|
||||
if(ismob(usr))
|
||||
var/mob/M = usr
|
||||
M.swap_hand()
|
||||
return 1
|
||||
|
||||
/obj/screen/craft
|
||||
@@ -96,17 +111,27 @@
|
||||
H.open_language_menu(usr)
|
||||
|
||||
/obj/screen/inventory
|
||||
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.
|
||||
/// The identifier for the slot. It has nothing to do with ID cards.
|
||||
var/slot_id
|
||||
/// Icon when empty. For now used only by humans.
|
||||
var/icon_empty
|
||||
/// Icon when contains an item. For now used only by humans.
|
||||
var/icon_full
|
||||
/// The overlay when hovering over with an item in your hand
|
||||
var/list/object_overlays = list()
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/inventory/Click(location, control, params)
|
||||
if(hud?.mymob && (hud.mymob != usr))
|
||||
return
|
||||
// just redirect clicks
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
// if(world.time <= usr.next_move)
|
||||
// return TRUE
|
||||
|
||||
if(usr.incapacitated()) // ignore_stasis = TRUE
|
||||
return TRUE
|
||||
if(ismecha(usr.loc)) // stops inventory actions in a mech
|
||||
return TRUE
|
||||
|
||||
if(hud?.mymob && slot_id)
|
||||
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
|
||||
@@ -150,12 +175,13 @@
|
||||
var/image/item_overlay = image(holding)
|
||||
item_overlay.alpha = 92
|
||||
|
||||
if(!user.can_equip(holding, slot_id, TRUE, TRUE, TRUE))
|
||||
if(!user.can_equip(holding, slot_id, TRUE))
|
||||
item_overlay.color = "#FF0000"
|
||||
else
|
||||
item_overlay.color = "#00ff00"
|
||||
|
||||
object_overlays += item_overlay
|
||||
cut_overlay(object_overlays)
|
||||
// object_overlay = item_overlay
|
||||
add_overlay(object_overlays)
|
||||
|
||||
/obj/screen/inventory/hand
|
||||
@@ -187,10 +213,17 @@
|
||||
|
||||
|
||||
/obj/screen/inventory/hand/Click(location, control, params)
|
||||
if(hud?.mymob && (hud.mymob != usr))
|
||||
return
|
||||
var/mob/user = hud.mymob
|
||||
// just redirect clicks
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
var/mob/user = hud?.mymob
|
||||
if(usr != user)
|
||||
return TRUE
|
||||
// if(world.time <= user.next_move)
|
||||
// return TRUE
|
||||
if(user.incapacitated())
|
||||
return TRUE
|
||||
if (ismecha(user.loc)) // stops inventory actions in a mech
|
||||
return TRUE
|
||||
|
||||
if(user.active_hand_index == held_index)
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if(force && damtype != STAMINA && HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
|
||||
|
||||
if(!UseStaminaBufferStandard(user, STAM_COST_ATTACK_MOB_MULT, null, TRUE))
|
||||
return DISCARD_LAST_ACTION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user