add set_internal

and the set_slot with register
very much like the get_slot for get_internal
This commit is contained in:
Torsten Ruger
2015-11-08 17:10:36 +02:00
parent ede7639861
commit c38775e933
5 changed files with 32 additions and 5 deletions

View File

@ -130,7 +130,11 @@ module Interpreter
def execute_SetSlot
value = get_register( @instruction.register )
object = get_register( @instruction.array )
object.set_internal( @instruction.index , value )
if( @instruction.index.is_a?(Numeric) )
object.set_internal( @instruction.index , value )
else
object.set_internal( get_register(@instruction.index) , value )
end
trigger(:object_changed, @instruction.array , @instruction.index)
true
end