Implemented equipping items found on the map...

This commit is contained in:
Ognjen Milan Robovic 2024-06-17 10:10:33 -04:00
parent beb1e138fb
commit 2228636d65

View File

@ -1354,6 +1354,7 @@ package body world is
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------
procedure draw_equipments (offset, view_from, view_to : in core.vector) is procedure draw_equipments (offset, view_from, view_to : in core.vector) is
swap : equipment.enumeration;
begin begin
for index in 1 .. map.equipment_count.limit loop for index in 1 .. map.equipment_count.limit loop
if map.views (map.equipments (index).x, map.equipments (index).y) 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, y => offset.y + (map.equipments (index).y - core.camera.y) * core.base * core.zoom,
factor => core.zoom); factor => core.zoom);
-- --
--~if map.equipments (index).x = core.camera.x and map.equipments (index).y = core.camera.y then 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 if core.signal_mode = core.signal_e and equipment_valid (map.equipments (index).index) then
--~map.chads (1).items (map.chads (1).item_count) := map.equipments (index).index; 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);
--~core.increment (map.chads (1).item_count); map.chads (1).equipments (equipment.description (map.equipments (index).index).slot) := map.equipments (index).index;
--~-- map.equipments (index).index := swap;
--~map.equipments (index).index := equipment.none; else
--~end if; map.chads (1).equipments (equipment.description (map.equipments (index).index).slot) := map.equipments (index).index;
--~end if; map.equipments (index).index := equipment.none;
end if;
end if;
end if;
end if; end if;
end loop; end loop;
end draw_equipments; end draw_equipments;