Skip to content

Commit

Permalink
Backport CleverRaven#71595 to the 0.H branch (CleverRaven#75321)
Browse files Browse the repository at this point in the history
* Backport changes

* Bugfix 1
  • Loading branch information
MNG-cataclysm authored Aug 13, 2024
1 parent c06f12d commit 08738f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 84 deletions.
75 changes: 4 additions & 71 deletions data/json/effects_on_condition/mapgen_eocs/godco_mapgen_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,23 @@
{
"type": "effect_on_condition",
"id": "godco_place_coop",
"recurrence": 100,
"global": false,
"condition": {
"and": [
{ "math": [ "darryl_building_coop", "==", "1" ] },
{
"npc_compare_time_since_var": "coop_in_progress",
"type": "timer",
"context": "trade",
"op": ">=",
"time": "7 d"
},
{ "npc_near_om_location": "godco_7", "range": 12 }
]
},
"deactivate_condition": { "math": [ "darryl_building_coop", "==", "2" ] },
"effect": [
{ "mapgen_update": "darryl_place_coop", "om_terrain": "godco_7" },
{ "math": [ "darryl_building_coop", "=", "2" ] },
{ "npc_lose_var": "coop_in_progress", "type": "timer", "context": "trade" }
]
"effect": [ { "mapgen_update": "darryl_place_coop", "om_terrain": "godco_7" }, { "math": [ "darryl_building_coop", "=", "2" ] } ]
},
{
"type": "effect_on_condition",
"id": "godco_place_herb_garden",
"recurrence": 100,
"global": false,
"condition": {
"and": [
{ "math": [ "kostas_building_garden", "==", "1" ] },
{
"npc_compare_time_since_var": "herb_garden_in_progress",
"type": "timer",
"context": "trade",
"op": ">=",
"time": "3 d"
},
{ "npc_near_om_location": "godco_1_2", "range": 12 }
]
},
"deactivate_condition": { "math": [ "kostas_building_garden", "==", "2" ] },
"effect": [
{ "mapgen_update": "place_herb_garden", "om_terrain": "godco_1_2" },
{ "math": [ "kostas_building_garden", "=", "2" ] },
{ "npc_lose_var": "herb_garden_in_progress", "type": "timer", "context": "trade" }
{ "math": [ "kostas_building_garden", "=", "2" ] }
]
},
{
"type": "effect_on_condition",
"id": "godco_place_wall",
"recurrence": 100,
"global": false,
"//": "4 hours 20 minutes per wall (from regular ground to full palisade) * 373 walls = ~1,567 hours. Divided into 8-hour work shifts, thats ~196 days, or six and a half months for one person. Presuming we have ~11 people working in a single shift, each building 1 wall, that should be ~18 days to build. Please correct me if I messed up the math.",
"condition": {
"and": [
{ "math": [ "wall_in_progress", "==", "1" ] },
{
"npc_compare_time_since_var": "wall_started_building",
"type": "timer",
"context": "trade",
"op": ">=",
"time": "18 d"
},
{ "npc_near_om_location": "godco_5", "range": 12 }
]
},
"deactivate_condition": { "math": [ "wall_in_progress", "==", "2" ] },
"effect": [
{ "mapgen_update": "place_right_corner_wall", "om_terrain": "godco_1" },
{ "mapgen_update": "place_gate_wall", "om_terrain": "godco_2" },
Expand All @@ -78,35 +28,18 @@
{ "mapgen_update": "place_right_corner_wall_bottom", "om_terrain": "godco_7" },
{ "mapgen_update": "place_straight_bottom_wall", "om_terrain": "godco_8" },
{ "mapgen_update": "place_left_corner_wall_bottom", "om_terrain": "godco_9" },
{ "math": [ "wall_in_progress", "=", "2" ] },
{ "npc_lose_var": "wall_started_building", "type": "timer", "context": "trade" }
{ "math": [ "wall_in_progress", "=", "2" ] }
]
},
{
"type": "effect_on_condition",
"id": "godco_place_warehouse",
"recurrence": 100,
"global": false,
"//": "1 hour 30 minutes per wood wall * 50 walls = 75 hours for walls. 132 wood floors * 1 hour 40 minutes a floor = 220 hours. 1 hour 30 minutes per shelf * 68 shelves = 102 hours. (397 so far) 2 hours per roof * 132 roof tiles (assume same as floors) = 264 hours.",
"//2": "In total, this takes 661 labor hours to build. Assuming work is in 8-hour shifts, that's 83 days, or 2 months and 22 days for a single worker. Assume we have ~6 people on the job (isn't as urgent as a wall), this takes us ~14 days to build, or two weeks.",
"condition": {
"and": [
{ "math": [ "godco_warehouse_in_progress", "==", "1" ] },
{
"u_compare_time_since_var": "warehouse_started_building",
"type": "timer",
"context": "trade",
"op": ">=",
"time": "14 d"
},
{ "u_near_om_location": "godco_1_1", "range": 1 }
]
},
"deactivate_condition": { "math": [ "godco_warehouse_in_progress", "==", "2" ] },
"effect": [
{ "mapgen_update": "place_food_warehouse", "om_terrain": "forest_thick" },
{ "math": [ "godco_warehouse_in_progress", "=", "2" ] },
{ "u_lose_var": "warehouse_started_building", "type": "timer", "context": "trade" }
{ "math": [ "godco_warehouse_in_progress", "=", "2" ] }
]
}
]
17 changes: 4 additions & 13 deletions data/json/npcs/godco/godco_missions.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,7 @@
"failure": "Sorry, I had to find someone else since you didn't come through."
},
"end": {
"effect": [
{ "math": [ "godco_warehouse_in_progress", "=", "1" ] },
{ "npc_add_var": "warehouse_started_building", "type": "timer", "context": "trade", "time": true },
{ "u_spawn_item": "icon", "count": 137 }
],
"effect": [ { "queue_eocs": "godco_place_warehouse", "time_in_future": "336 hours" }, { "u_spawn_item": "icon", "count": 137 } ],
"opinion": { "trust": 7, "value": 6, "anger": -3 }
}
},
Expand Down Expand Up @@ -307,7 +303,7 @@
"end": {
"effect": [
{ "math": [ "darryl_building_coop", "=", "1" ] },
{ "npc_add_var": "coop_in_progress", "type": "timer", "context": "trade", "time": true },
{ "queue_eocs": "godco_place_coop", "time_in_future": "168 hours" },
{ "u_spawn_item": "icon", "count": 6 }
]
}
Expand Down Expand Up @@ -937,11 +933,7 @@
"difficulty": 5,
"value": 0,
"end": {
"effect": [
{ "u_spawn_item": "icon", "count": 90 },
{ "math": [ "kostas_building_garden", "=", "1" ] },
{ "npc_add_var": "herb_garden_in_progress", "type": "timer", "context": "trade", "time": true }
]
"effect": [ { "u_spawn_item": "icon", "count": 90 }, { "queue_eocs": "godco_place_herb_garden", "time_in_future": "72 hours" } ]
},
"origins": [ "ORIGIN_SECONDARY" ],
"followup": "MISSION_GODCO_KOSTAS_3",
Expand Down Expand Up @@ -1202,8 +1194,7 @@
"end": {
"effect": [
{ "mapgen_update": "helena_planer", "om_terrain": "godco_8" },
{ "math": [ "wall_in_progress", "=", "1" ] },
{ "npc_add_var": "wall_started_building", "type": "timer", "context": "trade", "time": true },
{ "queue_eocs": "godco_place_wall", "time_in_future": "432 hours" },
{ "u_spawn_item": "icon", "count": 40 }
]
},
Expand Down

0 comments on commit 08738f9

Please sign in to comment.