Fail on unsupported asset template trigger objects
When the bool after USE_TRIGGER / LOOT_TRIGGER is set, the client (sb.exe 0xC46DE0) instantiates a trigger object by name and loads extra data from the stream. The parser silently ignored the branch, which would desync the rest of the template. Raise instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7da18716a8
commit
2008697d6c
1 file changed
+5
-2
@@ -130,14 +130,17 @@ class ArcCityAssetTemplate():
|
||||
self.template_energy_set = stream.read_dword()
|
||||
self.template_use_trigger = stream.read_string()
|
||||
|
||||
# When set, the client builds a trigger object named by the
|
||||
# preceding string and loads its data from the stream. The
|
||||
# trigger formats are not implemented; fail rather than desync.
|
||||
self.template_unknown_check1 = stream.read_bool()
|
||||
if self.template_unknown_check1:
|
||||
pass
|
||||
raise NotImplementedError('use trigger object data is not supported')
|
||||
self.template_loot_trigger = stream.read_string()
|
||||
|
||||
self.template_unknown_check2 = stream.read_bool()
|
||||
if self.template_unknown_check2:
|
||||
pass
|
||||
raise NotImplementedError('loot trigger object data is not supported')
|
||||
|
||||
self.has_embedded_template = stream.read_bool()
|
||||
if self.has_embedded_template:
|
||||
|
||||
Reference in new issue
Block a user