aboutsummaryrefslogtreecommitdiff
path: root/srb_lib.py
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-04-04 21:30:43 -0400
committerB. Stack <bgstack15@gmail.com>2024-04-04 21:30:43 -0400
commiteabb9cd4c47c9e28e870ce7be0df851ea1f22d49 (patch)
tree7eb0e740a44a903814b0cf900c9cb10cd2dbfbd1 /srb_lib.py
parenttk: add equipped weapon image (diff)
downloadsrb_lib-eabb9cd4c47c9e28e870ce7be0df851ea1f22d49.tar.gz
srb_lib-eabb9cd4c47c9e28e870ce7be0df851ea1f22d49.tar.bz2
srb_lib-eabb9cd4c47c9e28e870ce7be0df851ea1f22d49.zip
add set-profile-in-use
Diffstat (limited to 'srb_lib.py')
-rw-r--r--srb_lib.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/srb_lib.py b/srb_lib.py
index 3bc803b..7acda8b 100644
--- a/srb_lib.py
+++ b/srb_lib.py
@@ -22,7 +22,6 @@
# Improve:
# Rewrite as a class so we do not have to pass data around everywhere?
# Write: set level breakables
-# Write: set profile-in-use
# Documentation:
# winetricks vd=1024x768
# winetricks vd=off
@@ -736,6 +735,12 @@ def get_profile_in_use(data_object,profile_id):
#print(f"debug: in_use: {in_use}, type {type(in_use)}")
return in_use
+def set_profile_in_use(data_object,profile_id,in_use = True):
+ """ Set profile_id in-use. Be careful when disabling a profile! """
+ data = _get_data_from_data_object(data_object)
+ data = srb_pack("<1?",data,PROFILE_START_POSITION[profile_id]+POS_PROFILE_IN_USE,in_use)
+ return data, get_profile_in_use(data,profile_id)
+
def get_tutorial_completed(data_object,profile_id):
""" Print if the profile has completed the tutorial. """
data = _get_data_from_data_object(data_object)
bgstack15