Skip to content

Commit

Permalink
Merge branch 'wasteland-map-wip' into feature/docker-wasteland-map-wip
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsndk committed Oct 15, 2024
2 parents 5658a91 + 478ab9d commit 8b20778
Show file tree
Hide file tree
Showing 13 changed files with 35,847 additions and 13 deletions.
18 changes: 17 additions & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,23 @@ def create_server_api(**args):
for name in maps:
key=maps[name]["key"]
if maps[name].get("ignore"): continue
geometry[name]=get_by_iid("map|%s"%key).info.data
dbmap=get_by_iid("map|%s"%key)
if dbmap:
geometry[name]=dbmap.info.data
else:
# Load design/maps/%key json if it exists
logging.warning("%s in maps.%s was not found. Trying to import from design/maps/%s.json"%(key,name, key))
filename = "design/maps/%s.json"%key
if os.path.exists(filename):
with open("design/maps/%s.json"%key) as json_file:
logging.info("%s.json was found in design/maps saving to db"%key)
# Create map
map=Map(key=ndb.Key(Map,key),info=GG())
map.info.data=json.load(json_file)
process_map(map)
map.updated=datetime.now()
map.put()

jhtml(self,{
"id":server.k(),
"auth":server.info.auth,
Expand Down
8 changes: 8 additions & 0 deletions design/conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,14 @@
"debuff":True,
"defense":"firesistance",
},
"wasteland":{
"name":"Wasteland Toxicity",
"skin":"placeholder", # TODO: find a better skin for the debuff
"interval":210, # how often should it tick / trigger
"ui":True,
"debuff":True,
# "defense":"firesistance",
},
"shocked":{
"name":"Shocked",
"skin":"essenceofthunder",
Expand Down
Loading

0 comments on commit 8b20778

Please sign in to comment.