mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Merge branch 'master' into client-hud-consistency
This commit is contained in:
+11
-10
@@ -19,9 +19,8 @@
|
||||
if(!category)
|
||||
return
|
||||
|
||||
var/obj/screen/alert/alert
|
||||
if(alerts[category])
|
||||
alert = alerts[category]
|
||||
var/obj/screen/alert/alert = LAZYACCESS(alerts, category)
|
||||
if(alert)
|
||||
if(alert.override_alerts)
|
||||
return 0
|
||||
if(new_master && new_master != alert.master)
|
||||
@@ -57,7 +56,7 @@
|
||||
alert.icon_state = "[initial(alert.icon_state)][severity]"
|
||||
alert.severity = severity
|
||||
|
||||
alerts[category] = alert
|
||||
LAZYSET(alerts, category, alert) // This also creates the list if it doesn't exist
|
||||
if(client && hud_used)
|
||||
hud_used.reorganize_alerts()
|
||||
alert.transform = matrix(32, 6, MATRIX_TRANSLATE)
|
||||
@@ -72,7 +71,7 @@
|
||||
|
||||
// Proc to clear an existing alert.
|
||||
/mob/proc/clear_alert(category, clear_override = FALSE)
|
||||
var/obj/screen/alert/alert = alerts[category]
|
||||
var/obj/screen/alert/alert = LAZYACCESS(alerts, category)
|
||||
if(!alert)
|
||||
return 0
|
||||
if(alert.override_alerts && !clear_override)
|
||||
@@ -585,12 +584,14 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
// Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there
|
||||
/datum/hud/proc/reorganize_alerts()
|
||||
var/list/alerts = mymob.alerts
|
||||
if(!alerts)
|
||||
return FALSE
|
||||
var/icon_pref
|
||||
if(!hud_shown)
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
for(var/i in 1 to alerts.len)
|
||||
mymob.client.screen -= alerts[alerts[i]]
|
||||
return 1
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
return TRUE
|
||||
for(var/i in 1 to alerts.len)
|
||||
var/obj/screen/alert/alert = alerts[alerts[i]]
|
||||
if(alert.icon_state == "template")
|
||||
if(!icon_pref)
|
||||
@@ -611,10 +612,10 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
. = ""
|
||||
alert.screen_loc = .
|
||||
mymob.client.screen |= alert
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob
|
||||
var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly
|
||||
var/list/alerts // lazy list. contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly
|
||||
|
||||
/obj/screen/alert/Click(location, control, params)
|
||||
if(!usr || !usr.client)
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
if(!view)
|
||||
view = world.view
|
||||
var/list/new_overlays = list()
|
||||
var/count = Ceiling(view/(480/world.icon_size))+1
|
||||
var/count = CEILING(view/(480/world.icon_size), 1)+1
|
||||
for(var/x in -count to count)
|
||||
for(var/y in -count to count)
|
||||
if(x == 0 && y == 0)
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
overlays += standard_background
|
||||
|
||||
/obj/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
|
||||
width = Clamp(width, 0, max_dimensions)
|
||||
height = Clamp(height, 0, max_dimensions)
|
||||
width = clamp(width, 0, max_dimensions)
|
||||
height = clamp(height, 0, max_dimensions)
|
||||
src.width = width
|
||||
src.height = height
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
if(!R.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = Ceiling(R.module.modules.len / 8)
|
||||
var/display_rows = CEILING(R.module.modules.len / 8, 1)
|
||||
R.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
R.client.screen += R.robot_modules_background
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
if(hitsound)
|
||||
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
|
||||
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
M.lastattacker = user.real_name
|
||||
M.lastattackerckey = user.ckey
|
||||
|
||||
user.do_attack_animation(M)
|
||||
. = M.attacked_by(src, user, def_zone)
|
||||
@@ -135,9 +135,9 @@
|
||||
/obj/item/proc/get_clamped_volume()
|
||||
if(w_class)
|
||||
if(force)
|
||||
return Clamp((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
|
||||
return clamp((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
|
||||
else
|
||||
return Clamp(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
|
||||
return clamp(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
|
||||
|
||||
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
|
||||
if(I.discrete)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
// Otherwise jump
|
||||
else
|
||||
following = null
|
||||
forceMove(get_turf(A))
|
||||
update_parallax_contents()
|
||||
|
||||
@@ -64,7 +63,7 @@
|
||||
if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the health_scan var.
|
||||
return
|
||||
if(user.client && user.health_scan)
|
||||
if(issilicon(src) || ismachine(src))
|
||||
if(issilicon(src) || ismachineperson(src))
|
||||
robot_healthscan(user, src)
|
||||
else if(ishuman(src))
|
||||
healthscan(user, src, 1, TRUE)
|
||||
|
||||
Reference in New Issue
Block a user