Skip to content

Commit 6cc57f7

Browse files
committed
stub fix for section 1105.
1 parent d38ff99 commit 6cc57f7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
setup(
2424
name="sourcehold",
2525
cmdclass={"build_ext": build_ext},
26-
version="0.0.2",
26+
version="0.0.3",
2727
author="The developers",
2828
author_email="gynt@users.noreply.github.com",
2929
description="A package to interact with stronghold (crusader) files and the process",

sourcehold/maps/sections/section1105.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from .types import TileMapSection
22
from .types import ArrayMapCompressedSection
33
from .objects import ChildStructure
4+
import struct
5+
from sourcehold.world import TileLocationTranslator
6+
world = TileLocationTranslator()
47

58

69
class TileMap(ChildStructure, TileMapSection):
@@ -9,7 +12,6 @@ class TileMap(ChildStructure, TileMapSection):
912

1013
def __init__(self, parent, offset):
1114
super().__init__(parent, offset)
12-
# TODO: stubbing! This is a read only section for now
1315

1416
def from_buffer(self, buf, **kwargs):
1517
return super().from_buffer(buf, length=80400)
@@ -18,6 +20,10 @@ def from_buffer(self, buf, **kwargs):
1820
def size_of(cls):
1921
return 80400
2022

23+
def get_data(self):
24+
# TODO: stubbing! This is a read only section for now
25+
return super().get_data()[self._offset:self._offset + 80400]
26+
2127

2228
class Section1105(ArrayMapCompressedSection):
2329
_TYPE_ = TileMap

0 commit comments

Comments
 (0)