Added command line command for character cloning.

This commit is contained in:
Chris Davoren 2023-06-30 17:07:33 +10:00
parent 7e32d849e5
commit 5655685a0b
1 changed files with 4 additions and 0 deletions

View File

@ -541,6 +541,7 @@ def main():
parser.add_argument('--money', required=False, type=int, nargs=1, help="Give the player credits of the specified amount") parser.add_argument('--money', required=False, type=int, nargs=1, help="Give the player credits of the specified amount")
parser.add_argument('--list_ships', required=False, action='store_true', help="List all ships with names and their respective owners") parser.add_argument('--list_ships', required=False, action='store_true', help="List all ships with names and their respective owners")
parser.add_argument('--test_gamedata', required=False, action='store_true', help="Test of new class-based system of storing game information") parser.add_argument('--test_gamedata', required=False, action='store_true', help="Test of new class-based system of storing game information")
parser.add_argument('--clone_character', required=False, type=str, nargs=2, help="Clones a character of one name into another")
args = parser.parse_args() args = parser.parse_args()
# print(args) # print(args)
@ -578,6 +579,9 @@ def main():
if args.list_ships: if args.list_ships:
game_data.print_summary() game_data.print_summary()
if args.clone_character:
game_data.clone_character(args.clone_character[0], args.clone_character[1])
game_data.writeback() game_data.writeback()
""" """