Skip to content

Commit fb5f51e

Browse files
committed
Terraria 1.3.4.3 compatibility
1 parent c40c3b5 commit fb5f51e

File tree

4 files changed

+69
-4
lines changed

4 files changed

+69
-4
lines changed

omnitool/shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
__all__ = ("__version__", "appdata", "cachepath", "cache", "lang", "theme")
1010

11-
__version__ = Version(180500)
11+
__version__ = Version(180501)
1212
appdata = user_config_dir('omnitool', "", roaming=True)
1313
cachepath = os.path.join(appdata, "cache.dill")
1414
##filled in by omnitool\__init__.py:

omnitool/tlib.py

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def get_header(f):
534534
"fastforward" : get_gbyte(f),
535535
"extra_flags" : get_byte(f, 18)
536536
}
537-
else:#version 175 (1.3.3) and 176 (1.3.3.1)
537+
elif version < 179:#version 175 (1.3.3) and 176 (1.3.3.1)
538538
d = {"name": get_string(f),
539539
"ID": get_gint(f),
540540
"worldrect": get_uint(f, 4),
@@ -593,6 +593,71 @@ def get_header(f):
593593

594594
}
595595

596+
else:
597+
name = get_string(f)
598+
if version == 179:
599+
seed = get_gint(f)
600+
else:
601+
seed = get_string(f)
602+
worldgenversion = get_glong(f)
603+
guid = get_glong(f)+get_glong(f)
604+
d = {"name": name,
605+
"ID": get_gint(f),
606+
"worldrect": get_uint(f, 4),
607+
"height": get_gint(f),
608+
"width": get_gint(f),
609+
"expert" : get_gbyte(f),
610+
"creationtime" : get_glong(f),
611+
"moontype": get_gbyte(f),
612+
"treedata": get_uint(f, 7),
613+
"cavedata": get_uint(f, 10),
614+
"spawn": get_uint(f, 2),
615+
"groundlevel": get_gdouble(f),
616+
"rocklevel": get_gdouble(f),
617+
"time": get_gdouble(f),
618+
"is_day": get_gbyte(f),
619+
"moonphase": get_gint(f),
620+
"is_bloodmoon": get_gbyte(f),
621+
"is_eclipse": get_gbyte(f),
622+
"dungeon_xy": get_uint(f, 2),
623+
"is_crimson": get_gbyte(f),
624+
"bosses_slain": get_byte(f, 11),
625+
"npcs_saved": get_byte(f, 3),
626+
"special_slain": get_byte(f, 4),
627+
"is_a_shadow_orb_broken": get_gbyte(f),
628+
"is_meteor_spawned": get_gbyte(f),
629+
"shadow_orbs_broken": get_gbyte(f),
630+
"altars_broken": get_gint(f),
631+
"hardmode": get_gbyte(f),
632+
"gob_inv_time": get_gint(f),
633+
"gob_inv_size": get_gint(f),
634+
"gob_inv_type": get_gint(f),
635+
"gob_inv_x": get_gdouble(f),
636+
"slime_rain_time" : get_gdouble(f),
637+
"sundial_cooldown" : get_gbyte(f),
638+
"raining": get_gbyte(f),
639+
"raintime": get_gint(f),
640+
"maxrain": get_float(f),
641+
"oretiers": get_int(f, 3),
642+
"background_styles": get_byte(f, 8),
643+
"clouds": get_uint(f),
644+
"cloudcount": get_gushort(f),
645+
"windspeed": get_float(f),
646+
"anglerstrings" : [get_string(f) for _ in range(get_gint(f))],
647+
"angler_saved" : get_gbyte(f),
648+
"angler_quest" : get_gint(f),
649+
"saved_stylist" : get_gbyte(f),
650+
"saved_collector" : get_gbyte(f),
651+
"invasionsize" : get_gint(f),
652+
"cultist_delay" : get_gint(f),
653+
"mobkills" : get_uint(f, get_ushort(f)),
654+
"fastforward" : get_gbyte(f),
655+
"extra_flags" : get_byte(f, 19),
656+
"sandstorm_timeleft" : get_guint(f),
657+
"sandstorm_severity" : get_gbyte(f),
658+
"sandstorm_target_severity" : get_gbyte(f),
659+
660+
}
596661
d["version"] = version
597662

598663
return d, multitiles_, sectiondata

setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "Omnitool"
5-
#define MyAppVersion "18.5.0"
5+
#define MyAppVersion "18.5.1"
66
#define MyAppPublisher "Fabian Dill"
77
#define MyAppURL "http://forums.terraria.org/index.php?threads/omnitool-world-creation-mapping-backups-and-more.14664/"
88
#define MyAppExeName "omnitool.exe"

setup64.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "Omnitool"
5-
#define MyAppVersion "18.5.0"
5+
#define MyAppVersion "18.5.1"
66
#define MyAppPublisher "Fabian Dill"
77
#define MyAppURL "http://forums.terraria.org/index.php?threads/omnitool-world-creation-mapping-backups-and-more.14664/"
88
#define MyAppExeName "omnitool.exe"

0 commit comments

Comments
 (0)