mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Merge pull request #1887 from Markolie/performance
sortAtom removal, performance fixes
This commit is contained in:
@@ -131,7 +131,7 @@
|
||||
usr.loc = M.loc
|
||||
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/sendmob(var/mob/M in sortmobs())
|
||||
/client/proc/sendmob(var/mob/M in mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
if(!P.owner || P.toff || P.hidden) continue
|
||||
sendPDAs += P
|
||||
if(PDAs && PDAs.len > 0)
|
||||
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs)
|
||||
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sendPDAs
|
||||
else
|
||||
customrecepient = null
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// /obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
|
||||
var/obj/item/device/pda/P
|
||||
var/list/viables = list()
|
||||
for(var/obj/item/device/pda/check_pda in sortAtom(PDAs))
|
||||
for(var/obj/item/device/pda/check_pda in PDAs)
|
||||
if (!check_pda.owner||check_pda.toff||check_pda == src||check_pda.hidden)
|
||||
continue
|
||||
viables.Add(check_pda)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
var/pdas[0]
|
||||
if(!user.pda.toff)
|
||||
for(var/obj/item/device/pda/P in sortAtom(PDAs))
|
||||
for(var/obj/item/device/pda/P in PDAs)
|
||||
if(!P.owner || P.toff || P == user.pda || P.hidden) continue
|
||||
var/pda[0]
|
||||
pda["name"] = "[P]"
|
||||
|
||||
@@ -62,40 +62,6 @@
|
||||
usr << msg
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/construct/Bump(atom/movable/AM as mob|obj, yes)
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(5))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(!(tmob.status_flags & CANPUSH))
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window/full))
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/construct/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/construct/builder))
|
||||
health += 5
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
|
||||
/obj/machinery/power/apc/New(turf/loc, var/ndir, var/building=0)
|
||||
..()
|
||||
apcs += src
|
||||
apcs = sortAtom(apcs)
|
||||
wires = new(src)
|
||||
var/tmp/obj/item/weapon/stock_parts/cell/tmp_cell = new
|
||||
standard_max_charge = tmp_cell.maxcharge
|
||||
@@ -143,6 +145,7 @@
|
||||
src.update()
|
||||
|
||||
/obj/machinery/power/apc/Destroy()
|
||||
apcs -= src
|
||||
if(malfai && operating)
|
||||
if (ticker.mode.config_tag == "malfunction")
|
||||
if (src.z == ZLEVEL_STATION)
|
||||
|
||||
Reference in New Issue
Block a user