Implemented equipping items found on the map...
This commit is contained in:
parent
beb1e138fb
commit
2228636d65
@ -1354,6 +1354,7 @@ package body world is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_equipments (offset, view_from, view_to : in core.vector) is
|
||||
swap : equipment.enumeration;
|
||||
begin
|
||||
for index in 1 .. map.equipment_count.limit loop
|
||||
if map.views (map.equipments (index).x, map.equipments (index).y)
|
||||
@ -1364,15 +1365,18 @@ package body world is
|
||||
y => offset.y + (map.equipments (index).y - core.camera.y) * core.base * core.zoom,
|
||||
factor => core.zoom);
|
||||
--
|
||||
--~if map.equipments (index).x = core.camera.x and map.equipments (index).y = core.camera.y then
|
||||
--~if map.chads (1).item_count < chad.item_limit and equipment_valid (map.equipments (index).index) then
|
||||
--~map.chads (1).items (map.chads (1).item_count) := map.equipments (index).index;
|
||||
--~--
|
||||
--~core.increment (map.chads (1).item_count);
|
||||
--~--
|
||||
--~map.equipments (index).index := equipment.none;
|
||||
--~end if;
|
||||
--~end if;
|
||||
if map.equipments (index).x = core.camera.x and map.equipments (index).y = core.camera.y then
|
||||
if core.signal_mode = core.signal_e and equipment_valid (map.equipments (index).index) then
|
||||
if equipment_valid (map.chads (1).equipments (equipment.description (map.equipments (index).index).slot)) then
|
||||
swap := map.chads (1).equipments (equipment.description (map.equipments (index).index).slot);
|
||||
map.chads (1).equipments (equipment.description (map.equipments (index).index).slot) := map.equipments (index).index;
|
||||
map.equipments (index).index := swap;
|
||||
else
|
||||
map.chads (1).equipments (equipment.description (map.equipments (index).index).slot) := map.equipments (index).index;
|
||||
map.equipments (index).index := equipment.none;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end loop;
|
||||
end draw_equipments;
|
||||
|
Loading…
Reference in New Issue
Block a user