Optimized Body Archive (#31173)

* Optimized Body Archive

* weird stuff
This commit is contained in:
DeityLink
2021-11-03 14:06:05 +01:00
committed by GitHub
parent 144b1764db
commit 854a9c26f6
2 changed files with 13 additions and 8 deletions

View File

@@ -25,8 +25,9 @@ var/list/body_archives = list()
source.archive_body(src) source.archive_body(src)
/datum/body_archive/proc/spawn_copy(var/turf/T)//admin toy /datum/body_archive/proc/spawn_copy(var/turf/T)//admin toy
var/mob/M = new mob_type(T) var/mob/temp_mob = new mob_type(T)
M.reset_body(src) temp_mob.actually_reset_body(src, FALSE, null, null)
qdel(temp_mob)
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// // // //
@@ -43,11 +44,16 @@ var/list/body_archives = list()
else else
return return
var/mob/temp_mob = new archive.mob_type(loc) var/mob/new_mob
var/mob/new_mob = temp_mob.actually_reset_body(archive, keep_clothes, src, mind)
if (type == archive.mob_type)
new_mob = actually_reset_body(archive, keep_clothes, src, mind)
else
var/mob/temp_mob = new archive.mob_type(loc)
new_mob = temp_mob.actually_reset_body(archive, keep_clothes, src, mind)
qdel(temp_mob)
drop_all() drop_all()
qdel(temp_mob)
qdel(src) qdel(src)
return new_mob return new_mob
@@ -108,7 +114,7 @@ var/list/body_archives = list()
if (our_mind) if (our_mind)
has_been_shade -= our_mind has_been_shade -= our_mind
our_mind.transfer_to(H) our_mind.transfer_to(H)
//H.ckey = R.ckey H.ckey = R.ckey // Maybe needed to put things like ghosts back in bodies
if (H.mind && H.mind.miming) if (H.mind && H.mind.miming)
H.add_spell(new /spell/aoe_turf/conjure/forcewall/mime, "grey_spell_ready") H.add_spell(new /spell/aoe_turf/conjure/forcewall/mime, "grey_spell_ready")
if (H.mind.miming == MIMING_OUT_OF_CHOICE) if (H.mind.miming == MIMING_OUT_OF_CHOICE)

View File

@@ -44,5 +44,4 @@
</html> </html>
"} "}
usr << browse(dat, "window=bodyarchivepanel;size=705x450") usr << browse(dat, "window=bodyarchivepanel;size=860x500")