Merge pull request #7204 from VOREStation/Arokha/performance

Performance improvements
This commit is contained in:
Atermonera
2020-05-28 12:47:08 -07:00
committed by GitHub
33 changed files with 220 additions and 212 deletions
+1 -14
View File
@@ -443,7 +443,6 @@
var/health = 100
var/status = BURST //can be GROWING, GROWN or BURST; all mutually exclusive
flags = PROXMOVE
/obj/effect/alien/egg/New()
/*
@@ -547,16 +546,4 @@
/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500 + T0C)
health -= 5
healthcheck()
/*
/obj/effect/alien/egg/HasProximity(atom/movable/AM as mob|obj)
if(status == GROWN)
if(!CanHug(AM))
return
var/mob/living/carbon/C = AM
if(C.stat == CONSCIOUS && C.status_flags & XENO_HOST)
return
Burst(0)
*/
healthcheck()
+2 -5
View File
@@ -643,11 +643,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
//Looking through a scope or binoculars should /not/ improve your periphereal vision. Still, increase viewsize a tiny bit so that sniping isn't as restricted to NSEW
/obj/item/var/ignore_visor_zoom_restriction = FALSE
/obj/item/on_loc_moved(var/oldloc)
. = ..()
if(zoom)
zoom() // aka unzoom
/obj/item/proc/zoom(var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
var/devicename
@@ -677,6 +672,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
H.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
H.set_viewsize(viewsize)
zoom = 1
GLOB.moved_event.register(H, src, .proc/zoom)
var/tilesize = 32
var/viewoffset = tilesize * tileoffset
@@ -705,6 +701,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
if(!H.hud_used.hud_shown)
H.toggle_zoom_hud()
zoom = 0
GLOB.moved_event.unregister(H, src, .proc/zoom)
H.client.pixel_x = 0
H.client.pixel_y = 0
@@ -9,7 +9,6 @@
var/mob/attacher = null
var/valve_open = 0
var/toggle = 1
flags = PROXMOVE
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user)
var/turf/location = get_turf(src) // For admin logs
@@ -57,11 +56,15 @@
return
/obj/item/device/transfer_valve/HasProximity(atom/movable/AM as mob|obj)
if(!attached_device) return
attached_device.HasProximity(AM)
return
/obj/item/device/transfer_valve/HasProximity(turf/T, atom/movable/AM, old_loc)
attached_device?.HasProximity(T, AM, old_loc)
/obj/item/device/transfer_valve/Moved(old_loc, direction, forced)
. = ..()
if(isturf(old_loc))
unsense_proximity(callback = .HasProximity, center = old_loc)
if(isturf(loc))
sense_proximity(callback = .HasProximity)
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
@@ -678,6 +678,11 @@ var/list/global/tank_gauge_cache = list()
tank.update_icon()
tank.overlays -= "bomb_assembly"
/obj/item/device/tankassemblyproxy/HasProximity(atom/movable/AM as mob|obj)
if(src.assembly)
src.assembly.HasProximity(AM)
/obj/item/device/tankassemblyproxy/HasProximity(turf/T, atom/movable/AM, old_loc)
assembly?.HasProximity(T, AM, old_loc)
/obj/item/device/tankassemblyproxy/Moved(old_loc, direction, forced)
if(isturf(old_loc))
unsense_proximity(callback = .HasProximity, center = old_loc)
if(isturf(loc))
sense_proximity(callback = .HasProximity)