mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
DNA2 Bug Fixes - Part 2
We discovered that most of the problems were were having was because of BYOND passing lists (e.g. SE and UI) by-ref instead of the assumed by-val. This commit adds dna.Clone() and (UI|SE).Copy() where needed. These should be used where DNA or SE/UI lists are COPIED, otherwise changes made in the reference will affect the real strand. This change also messes with the gene activation logic.
This commit is contained in:
@@ -119,6 +119,25 @@ var/global/floorIsLava = 0
|
||||
else
|
||||
body += "<A href='?src=\ref[src];makeanimal=\ref[M]'>Animalize</A> | "
|
||||
|
||||
// DNA2 - Admin Hax
|
||||
if(iscarbon(M))
|
||||
body += "<br><br>"
|
||||
body += "<b>DNA Blocks:</b><br><table border='0'><tr><th> </th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th>"
|
||||
var/bname
|
||||
for(var/block=1;block<=DNA_SE_LENGTH;block++)
|
||||
if(((block-1)%5)==0)
|
||||
body += "</tr><tr><th>[block-1]</th>"
|
||||
bname = assigned_blocks[block]
|
||||
body += "<td>"
|
||||
if(bname)
|
||||
var/bstate=M.dna.GetSEState(block)
|
||||
var/bcolor="[(bstate)?"#006600":"#ff0000"]"
|
||||
body += "<A href='?src=\ref[src];togmutate=\ref[M];block=[block]' style='color:[bcolor];'>[bname]</A><sub>[block]</sub>"
|
||||
else
|
||||
body += "[block]"
|
||||
body+="</td>"
|
||||
body += "</tr></table>"
|
||||
|
||||
body += {"<br><br>
|
||||
<b>Rudimentary transformation:</b><font size=2><br>These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.</font><br>
|
||||
<A href='?src=\ref[src];simplemake=observer;mob=\ref[M]'>Observer</A> |
|
||||
|
||||
Reference in New Issue
Block a user