From 5655685a0bab048a4f629b91f1b9af9afeecd541 Mon Sep 17 00:00:00 2001 From: Chris Davoren Date: Fri, 30 Jun 2023 17:07:33 +1000 Subject: [PATCH] Added command line command for character cloning. --- sheditor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sheditor.py b/sheditor.py index 1ad2a0d..053b59e 100644 --- a/sheditor.py +++ b/sheditor.py @@ -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('--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('--clone_character', required=False, type=str, nargs=2, help="Clones a character of one name into another") args = parser.parse_args() # print(args) @@ -578,6 +579,9 @@ def main(): if args.list_ships: game_data.print_summary() + if args.clone_character: + game_data.clone_character(args.clone_character[0], args.clone_character[1]) + game_data.writeback() """