mass ports like 15 tg prs + counting (#13386)

* changes

* ok

* changes

* sigh

* fixes

* changes

* fix

* fix

* alright

* fixes
git pus

* fix

* fix

* fix

* test

* ok

* Update code/modules/paperwork/ticketmachine.dm

Co-authored-by: Letter N <24603524+LetterN@users.noreply.github.com>

* ok

* compile and other stuff

* ok

* fix

* fix

* Fix

* Update menu.dm

* Update view.dm

* Update preferences.dm

Co-authored-by: Letter N <24603524+LetterN@users.noreply.github.com>
Co-authored-by: Putnam3145 <putnam3145@gmail.com>
This commit is contained in:
silicons
2020-10-10 03:20:33 -07:00
committed by GitHub
parent 69ef1ed0e0
commit 19f1e99a8c
96 changed files with 5755 additions and 1267 deletions

View File

@@ -134,7 +134,7 @@
/obj/item/gun/equipped(mob/living/user, slot)
. = ..()
if(zoomed && user.get_active_held_item() != src)
zoom(user, FALSE) //we can only stay zoomed in if it's in our hands //yeah and we only unzoom if we're actually zoomed using the gun!!
zoom(user, user.dir, FALSE) //we can only stay zoomed in if it's in our hands //yeah and we only unzoom if we're actually zoomed using the gun!!
//called after the gun has successfully fired its chambered ammo.
/obj/item/gun/proc/process_chamber(mob/living/user)
@@ -439,7 +439,7 @@
/obj/item/gun/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_scope_zoom))
zoom(user)
zoom(user, user.dir)
else if(istype(action, alight))
toggle_gunlight()
@@ -554,14 +554,19 @@
. = ..()
if(!.)
var/obj/item/gun/G = target
G.zoom(owner, FALSE)
G.zoom(owner, owner.dir)
/datum/action/item_action/toggle_scope_zoom/Remove(mob/living/L)
var/obj/item/gun/G = target
G.zoom(L, FALSE)
G.zoom(L, L.dir)
return ..()
/obj/item/gun/proc/zoom(mob/living/user, forced_zoom)
/obj/item/gun/proc/rotate(atom/thing, old_dir, new_dir)
if(ismob(thing))
var/mob/lad = thing
lad.client.view_size.zoomOut(zoom_out_amt, zoom_amt, new_dir)
/obj/item/gun/proc/zoom(mob/living/user, direct, forced_zoom)
if(!(user?.client))
return
@@ -573,25 +578,11 @@
zoomed = !zoomed
if(zoomed)
var/_x = 0
var/_y = 0
switch(user.dir)
if(NORTH)
_y = zoom_amt
if(EAST)
_x = zoom_amt
if(SOUTH)
_y = -zoom_amt
if(WEST)
_x = -zoom_amt
user.client.change_view(zoom_out_amt)
user.client.pixel_x = world.icon_size*_x
user.client.pixel_y = world.icon_size*_y
RegisterSignal(user, COMSIG_ATOM_DIR_CHANGE, .proc/rotate)
user.client.view_size.zoomOut(zoom_out_amt, zoom_amt, direct)
else
user.client.change_view(CONFIG_GET(string/default_view))
user.client.pixel_x = 0
user.client.pixel_y = 0
UnregisterSignal(user, COMSIG_ATOM_DIR_CHANGE)
user.client.view_size.zoomIn()
/obj/item/gun/handle_atom_del(atom/A)
if(A == chambered)

View File

@@ -374,7 +374,7 @@
inaccuracy_modifier = 0.5
zoomable = TRUE
zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
zoom_out_amt = 13
zoom_out_amt = 5
slot_flags = ITEM_SLOT_BACK
automatic_burst_overlay = FALSE
actions_types = list()

View File

@@ -69,7 +69,8 @@
//ZOOMING
var/zoom_current_view_increase = 0
var/zoom_target_view_increase = 10
///The radius you want to zoom by
var/zoom_target_view_increase = 9.5
var/zooming = FALSE
var/zoom_lock = ZOOM_LOCK_OFF
var/zooming_angle
@@ -133,7 +134,7 @@
if(zoom_lock == ZOOM_LOCK_OFF)
return
zooming = TRUE
current_user.client.change_view(world.view + zoom_target_view_increase)
current_user.client.view_size.setTo(zoom_target_view_increase)
zoom_current_view_increase = zoom_target_view_increase
/obj/item/gun/energy/beam_rifle/proc/stop_zooming(mob/user)
@@ -146,9 +147,8 @@
user = current_user
if(!user || !user.client)
return FALSE
animate(user.client, pixel_x = 0, pixel_y = 0, 0, FALSE, LINEAR_EASING, ANIMATION_END_NOW)
user.client.view_size.zoomIn()
zoom_current_view_increase = 0
user.client.change_view(CONFIG_GET(string/default_view))
zooming_angle = 0
current_zoom_x = 0
current_zoom_y = 0

View File

@@ -73,4 +73,4 @@
explosion(target, 0, 1, 1, 2)
return BULLET_ACT_HIT
//if(istype(target, /turf/closed) || ismecha(target))
new /obj/item/broken_missile(get_turf(src), 1)
new /obj/item/broken_missile(get_turf(src), 1)