Skip to content

Commit 9448b8d

Browse files
committed
Add safezone building toggle (spawns as sz# instead of tb#)
1 parent 0379e1d commit 9448b8d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

toontown/leveleditor/LevelEditor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,8 +1557,12 @@ def addLandmark(self, landmarkType, specialType, title = ''):
15571557
self.setCurrent('toon_landmark_texture', landmarkType)
15581558
block = self.getNextLandmarkBlock()
15591559
print(landmarkType)
1560+
if self.panel.bldgIsSafeZone.get() and specialType == '':
1561+
prefix = 'sz'
1562+
else:
1563+
prefix = 'tb'
15601564
newDNALandmarkBuilding = DNALandmarkBuilding(
1561-
f"tb{block}:{landmarkType}_DNARoot")
1565+
f"{prefix}{block}:{landmarkType}_DNARoot")
15621566
newDNALandmarkBuilding.setCode(landmarkType)
15631567
newDNALandmarkBuilding.setTitle(title)
15641568
newDNALandmarkBuilding.setBuildingType(specialType)

toontown/leveleditor/LevelEditorPanel.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,14 @@ def __init__(self, levelEditor, parent = None, **kw):
437437
command = self.toggleBldgLabels)
438438
self.bldgLabelsButton.pack(side = LEFT, expand = 1, fill = X)
439439

440+
self.bldgIsSafeZone = IntVar()
441+
self.bldgIsSafeZone.set(0)
442+
self.bldgIsSafeZoneButton = ttk.Checkbutton(
443+
landmarkBuildingsPage,
444+
text = 'Safe Zone Building', width = 20,
445+
variable = self.bldgIsSafeZone)
446+
self.bldgIsSafeZoneButton.pack(side = LEFT, expand = 1, fill = X)
447+
440448
# ANIMATED BUILDINGS
441449
Label(animBuildingsPage, text = 'Animated Buildings',
442450
font = ('Calibri', 14, 'bold')).pack(expand = 0)

0 commit comments

Comments
 (0)