diff --git a/scripts/growcrops.rb b/scripts/growcrops.rb index e3abe54ac..c591dff87 100644 --- a/scripts/growcrops.rb +++ b/scripts/growcrops.rb @@ -17,7 +17,7 @@ end inventory = Hash.new(0) df.world.items.other[:SEEDS].each { |seed| next if not seed.flags.in_building - next if not seed.itemrefs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } + next if not seed.general_refs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } next if seed.grow_counter >= @raws_plant_growdur[seed.mat_index] inventory[seed.mat_index] += 1 } @@ -40,7 +40,7 @@ else df.world.items.other[:SEEDS].each { |seed| next if seed.mat_index != wantmat next if not seed.flags.in_building - next if not seed.itemrefs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } + next if not seed.general_refs.find { |ref| ref._rtti_classname == :general_ref_building_holderst } next if seed.grow_counter >= @raws_plant_growdur[seed.mat_index] seed.grow_counter = @raws_plant_growdur[seed.mat_index] count += 1 diff --git a/scripts/gui/companion-order.lua b/scripts/gui/companion-order.lua index b9e3b8300..68bc7ab39 100644 --- a/scripts/gui/companion-order.lua +++ b/scripts/gui/companion-order.lua @@ -359,7 +359,7 @@ end}, v.riding_item_id=item.id local ref=df.general_ref_unit_riderst:new() ref.unit_id=v.id - item.itemrefs:insert("#",ref) + item.general_refs:insert("#",ref) end return true end},