User Tools

Site Tools


4rpl:commands:setunitwantsern

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
4rpl:commands:setunitwantsern [2024/06/13 14:56] – [Workaround for SetUnitWantsErn(<-uid 0)] Kalli4rpl:commands:setunitwantsern [2024/06/13 18:32] (current) – [Workaround for SetUnitWantsErn(<-uid 0)] Kalli
Line 26: Line 26:
 # and recreate it without the ERN. That's what this function is for. # and recreate it without the ERN. That's what this function is for.
  
-<-uid GetUnitWantsErn not GetUnitErnState AND if+<-uid GetUnitWantsErn not <-uid GetUnitErnState AND if
   <-uid @freeErnFromUnit   <-uid @freeErnFromUnit
  endif  endif
Line 32: Line 32:
 :freeErnFromUnit :freeErnFromUnit
 ->UID ->UID
-  <-UID getunitconstructingdata ev2 dup -1 eq if pop 999 endif ->buildResources+  <-UID getunitconstructingdata ev2 pop dup -1 eq if pop 999 endif ->buildResources
   <-UID getunittype <-UID getunitposition <-UID getunitsettings createunit dup ->newUID <-buildResources constructunit   <-UID getunittype <-UID getunitposition <-UID getunitsettings createunit dup ->newUID <-buildResources constructunit
   # Resources that are on the way to the old unit will be lost.   # Resources that are on the way to the old unit will be lost.
4rpl/commands/setunitwantsern.txt · Last modified: 2024/06/13 18:32 by Kalli