home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Killer
/
Game_Killer.bin
/
268.EDITBASE.INC
< prev
next >
Wrap
Text File
|
1991-07-08
|
3KB
|
112 lines
procedure MakePort;
var
s : SectorIndex;
pt : integer;
begin
write('Make a port out of which ');
s := GetSector;
if s <> 0 then
if space.sectors[ s ].portType <> NotAPort then
writeln( s, ' is already a port!')
else
begin
repeat
writeln('Describe this port:');
writeln(' 0 : BBB Buy all products');
writeln(' 1 : SBB Sell Fuel Ore; buy Organics and Equipment');
writeln(' 2 : BSB Sell Organics; buy Fuel Ore and Equipment');
writeln(' 3 : SSB Sell Fuel Ore and Organics; buy Equipment');
writeln(' 4 : BBS Sell Equipment; buy Fuel Ore and Organics');
writeln(' 5 : SBS Sell Equipment and Fuel Ore; buy Organics');
writeln(' 6 : BSS Sell Equipment and Organics; buy Fuel Ore');
writeln(' 7 : SSS Sell all products');
writeln(' 8 : Sell fighter, shields, holds (Class 0)');
writeln;
write('Port description? ');
readln( pt );
until (0<=pt) and (pt <= 8);
space.sectors[s].portType := pt;
end; {if else}
end;
procedure KillPort;
var
s : SectorIndex;
p1 : portIndex;
begin
write('Remove Record for Port in which ');
s := GetSector;
if s <> 0 then
if space.sectors[s].PortType = NotAPort then
writeln( 'I have no record of ', s, ' being a port.')
else
begin
space.sectors[s].portType := NotAPort;
p1 := portNumber( s );
space.ports.data[ p1 ] := space.ports.data[ space.ports.top ];
space.ports.top := space.ports.top - 1;
end;
end;
procedure SetDock;
var
sd : SectorIndex;
begin
if space.dock = 0 then
writeln('Space Dock location is not known')
else
writeln('Current space dock in sector ', space.dock );
write('Put Space Dock in which ');
sd := GetSector;
if sd = 0 then
if not prompt('Make stardock location unknown?') then
exit;
space.dock := sd;
if sd <> 0 then
with space.sectors[ sd ] do
etc := etc or StarDock;
end;
procedure Unexplore;
var
us : sectorIndex;
begin
write('Mark as Unexplored Which ');
us := GetSector;
if us <> 0 then
if space.sectors[ us ].number = Unexplored then
writeln( 'Sector ', us, ' is already marked as unexplored.')
else
begin
writeln('Marking ', us, ' as unexplored.');
space.sectors[ us ].number := Unexplored;
end; {if else}
end; {unexplore}
procedure EditMenu;
{ choices for direct editing the data base }
var
ch : char;
begin
repeat
repeat
writeln('Declare a sector to be a <P>ort');
writeln('Declare a sector <N>OT to be a port');
writeln('Define location of Star <D>ock');
writeln('Make sector <U>nexplored');
writeln;
writeln('<Q>uit');
writeln;
write('Your choice? ');
readln( ch );
ch := upcase( ch );
until ch in ['P', 'N', 'D', 'U', 'Q'];
case ch of
'P' : Makeport;
'N' : Killport;
'D' : setDock;
'U' : unexplore;
'Q' : ;
end; {case}
until ch = 'Q';
end; {Edit Menu}