Merge pull request #33414 from kevinz000/DAMNIT_DEATHRIDE_WHY_WHY_WHY_IM_SALTY_REEEEEEEEEEEEE

[READY]Fixes beam rifles and flightsuits
This commit is contained in:
oranges
2017-12-11 10:18:45 +13:00
committed by CitadelStationBot
parent d82698d106
commit 30143ee601
5 changed files with 53 additions and 41 deletions
+1 -1
View File
@@ -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
+27 -17
View File
@@ -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)
+24 -22
View File
@@ -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("<span class='notice'>[wearer]'s flight suit detaches from their body, becoming nothing more then a bulky metal skeleton.</span>")
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("<span class='notice'>[wearer]'s flight suit detaches from their body, becoming nothing more then a bulky metal skeleton.</span>")
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("<span class='notice'>[user]'s [pack.name] detaches from their back and retracts into their [src]!</span>")
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)
+1 -1
View File
@@ -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)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 116 KiB