diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm
index 9b071d0143..0af8b8ae1a 100644
--- a/code/__HELPERS/maths.dm
+++ b/code/__HELPERS/maths.dm
@@ -198,7 +198,7 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
var/x = (text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32)
var/y = (text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32)
- var/list/screenview = getviewsize(client)
+ var/list/screenview = getviewsize(client.view)
var/screenviewX = screenview[1] * world.icon_size
var/screenviewY = screenview[2] * world.icon_size
var/ox = round(screenviewX/2) - client.pixel_x //"origin" x
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 0cc24607f4..ce9e1ead82 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -285,7 +285,7 @@
if(!stat && mind && iscarbon(A) && A != src)
var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling)
if(C && C.chosen_sting)
- C.chosen_sting.try_to_sting(src,A)
+ C.chosen_sting.try_to_sting(src,A)
next_click = world.time + 5
return
swap_hand()
@@ -349,7 +349,7 @@
if(!stat && mind && iscarbon(A) && A != src)
var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling)
if(C && C.chosen_sting)
- C.chosen_sting.try_to_sting(src,A)
+ C.chosen_sting.try_to_sting(src,A)
next_click = world.time + 5
return
..()
@@ -433,28 +433,38 @@
else
setDir(WEST)
+//debug
+/obj/screen/proc/scale_to(x1,y1)
+ if(!y1)
+ y1 = x1
+ var/matrix/M = new
+ M.Scale(x1,y1)
+ transform = M
+
/obj/screen/click_catcher
icon = 'icons/mob/screen_gen.dmi'
- icon_state = "flash"
+ icon_state = "catcher"
plane = CLICKCATCHER_PLANE
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER"
+#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
+#define MAX_SAFE_BYOND_ICON_SCALE_PX 33 * 32 //Not using world.icon_size on purpose.
+
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
- var/icon/newicon = icon('icons/mob/screen_gen.dmi', "flash")
- if(view_size_x > 32 || view_size_y > 32)
- newicon.Scale(16 * world.icon_size,16 * world.icon_size)
- icon = newicon
- var/tx = ((view_size_x - 1)*0.5)/16
- var/ty = ((view_size_y - 1)*0.5)/16
- var/matrix/M = new
- M.Scale(tx, ty)
- transform = M
- screen_loc = "CENTER-16,CENTER-16"
- else
- screen_loc = "CENTER-[(view_size_x-1)*0.5],CENTER-[(view_size_y-1)*0.5]"
- newicon.Scale(view_size_x * world.icon_size,view_size_y * world.icon_size)
- icon = newicon
+ var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
+ var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
+ var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
+ var/px = view_size_x * world.icon_size
+ var/py = view_size_y * world.icon_size
+ var/sx = min(MAX_SAFE_BYOND_ICON_SCALE_PX, px)
+ var/sy = min(MAX_SAFE_BYOND_ICON_SCALE_PX, py)
+ newicon.Scale(sx, sy)
+ icon = newicon
+ screen_loc = "CENTER-[(ox-1)*0.5],CENTER-[(oy-1)*0.5]"
+ var/matrix/M = new
+ M.Scale(px/sx, py/sy)
+ transform = M
/obj/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm
index d7e13a1fd5..7e4b0bad89 100644
--- a/code/modules/clothing/spacesuits/flightsuit.dm
+++ b/code/modules/clothing/spacesuits/flightsuit.dm
@@ -856,21 +856,22 @@
return TRUE
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/unlock_suit(mob/wearer)
- if(suittoggled)
- usermessage("You must retract the helmet before unlocking your suit!", "boldwarning")
- return FALSE
- if(pack && pack.flight)
- usermessage("You must shut off the flight-pack before unlocking your suit!", "boldwarning")
- return FALSE
- if(deployedpack)
- usermessage("Your flightpack must be fully retracted first!", "boldwarning")
- return FALSE
- if(deployedshoes)
- usermessage("Your flight shoes must be fully retracted first!", "boldwarning")
- return FALSE
- if(wearer)
- user.visible_message("[wearer]'s flight suit detaches from their body, becoming nothing more then a bulky metal skeleton.")
- playsound(src.loc, 'sound/items/rped.ogg', 65, 1)
+ if(user)
+ if(suittoggled)
+ usermessage("You must retract the helmet before unlocking your suit!", "boldwarning")
+ return FALSE
+ if(pack && pack.flight)
+ usermessage("You must shut off the flight-pack before unlocking your suit!", "boldwarning")
+ return FALSE
+ if(deployedpack)
+ usermessage("Your flightpack must be fully retracted first!", "boldwarning")
+ return FALSE
+ if(deployedshoes)
+ usermessage("Your flight shoes must be fully retracted first!", "boldwarning")
+ return FALSE
+ if(wearer)
+ user.visible_message("[wearer]'s flight suit detaches from their body, becoming nothing more then a bulky metal skeleton.")
+ playsound(src, 'sound/items/rped.ogg', 65, 1)
resync()
strip_delay = initial(strip_delay)
locked = FALSE
@@ -911,7 +912,7 @@
user.update_inv_wear_suit()
user.visible_message("[user]'s [pack.name] detaches from their back and retracts into their [src]!")
pack.forceMove(src)
- playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
+ playsound(src, 'sound/mecha/mechmove03.ogg', 50, 1)
deployedpack = FALSE
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/extend_flightshoes(forced = FALSE)
@@ -936,7 +937,7 @@
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/retract_flightshoes(forced = FALSE)
shoes.flags_1 &= ~NODROP_1
- playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
+ playsound(src, 'sound/mecha/mechmove03.ogg', 50, 1)
if(user)
user.transferItemToLoc(shoes, src, TRUE)
user.update_inv_wear_suit()
@@ -1092,11 +1093,12 @@
/obj/item/clothing/head/helmet/space/hardsuit/flightsuit/dropped(mob/living/carbon/human/wearer)
..()
- for(var/hudtype in datahuds)
- var/datum/atom_hud/H = GLOB.huds[hudtype]
- H.remove_hud_from(wearer)
- if(zoom)
- toggle_zoom(wearer, TRUE)
+ if(wearer)
+ for(var/hudtype in datahuds)
+ var/datum/atom_hud/H = GLOB.huds[hudtype]
+ H.remove_hud_from(wearer)
+ if(zoom)
+ toggle_zoom(wearer, TRUE)
/obj/item/clothing/head/helmet/space/hardsuit/flightsuit/proc/toggle_zoom(mob/living/user, force_off = FALSE)
if(zoom || force_off)
diff --git a/code/modules/projectiles/guns/beam_rifle.dm b/code/modules/projectiles/guns/beam_rifle.dm
index 77e9ddeeb8..9b34d9ce0f 100644
--- a/code/modules/projectiles/guns/beam_rifle.dm
+++ b/code/modules/projectiles/guns/beam_rifle.dm
@@ -358,8 +358,8 @@
if(lastfire > world.time + delay)
return
lastfire = world.time
+ . = ..()
stop_aiming()
- return ..()
/obj/item/gun/energy/beam_rifle/proc/sync_ammo()
for(var/obj/item/ammo_casing/energy/beam_rifle/AC in contents)
diff --git a/icons/mob/screen_gen.dmi b/icons/mob/screen_gen.dmi
index 40500e84a8..5a088e451f 100644
Binary files a/icons/mob/screen_gen.dmi and b/icons/mob/screen_gen.dmi differ