world
proc/worldticker()
//Do what the genes do
for(var/obj/particles/Gene/g in world)
g.Transcribe()
//Set every client's window right
for(var/mob/observer/o in world)
winset(o.client,"default.worldstats","text='FPS: [world.fps] Lag: [world.tick_lag] Tick: [20*tick_lag]'")
if(o.observedcell)
o.RefreshCell()
o.RefreshCompartments()
if(o.observedgene) o.RefreshGenes()
//Retrigger the loop
spawn(20*tick_lag) worldticker()
mob/observer
proc
RefreshGenes()
var/seq=observedgene.sequence
seq=replacetextEx(seq,"A","<div style='color:#0000FF'>A</div>")
seq=replacetextEx(seq,"T","<div style='color:#DDDD00'>T</div>")
seq=replacetextEx(seq,"C","<div style='color:#FF0000'>C</div>")
seq=replacetextEx(seq,"G","<div style='color:#00DD00'>G</div>")
winset(src,null,"genemodder.genename.text='[observedgene.name]';genemodder.protname.text='[observedgene.protname]';genemodder.outputseq.text='AAAAA'")
winset(src,"genemodder","outputseq.text='WORK ALREADY'")
src << output("3'-[seq]-5'","genemodder.outputseq")
Problem description:
I am trying to get the output to refresh via a proc linked to a loop that actualizes all the stuff ingame without adding the new text to the old one, in case a mutation of a gene suddenly occurs on a tick. However, the old text is never deleted and the new one is placed right below it. Any way to clear an output?
mob << output(null,"id")
where id is the output element's id in the skin. There is no way to clear a specific line or character in an output.