Refuel - Make destruction effects longer, Rework terrain init#11416
Refuel - Make destruction effects longer, Rework terrain init#11416Dystopian wants to merge 8 commits into
Conversation
johnb432
left a comment
There was a problem hiding this comment.
On Cam Lao Nam from SOG, I'm getting the following:
nearObjects:
[
["Land_vn_b_prop_fueldrum_01",78],
["Land_vn_fuel_tank_stairs",20],
["Land_vn_b_prop_fueldrum_03",32],
["Land_vn_b_prop_fueldrum_02",32],
["Land_vn_fuelstation_02_pump_f",11],
["Land_vn_fuelstation_feed_f",21]
]
allObjects 0:
[
["Land_vn_b_prop_fueldrum_01",14],
["Land_vn_b_prop_fueldrum_03",32],
["Land_vn_b_prop_fueldrum_02",32],
["Land_vn_fuelstation_02_pump_f",11],
["Land_vn_fuelstation_feed_f",21]
]
Land_vn_b_prop_fueldrum_02 and Land_vn_b_prop_fueldrum_03 inherit from Land_vn_b_prop_fueldrum_01, which means the you have to remove those counts from the 78 found, making it 78 - (32 + 32) = 14, which is correct. (It's just a weakness in the old code.)
However, what's not ok is that Land_vn_fuel_tank_stairs is completely ignored. It's in the QGVAR(cacheRefuelClassesStatic) hashmap and I've checked that allObjects can't find it, even if you run -1 allObjects 0. getObjectType on an objects of Land_vn_fuel_tank_stairs returns 1.
|
I added a warning for such cases. Static objects with
We could just add I ran into the same warning when I tried to make the CUP |
|
@johnb432 I checked, and it isn't important for I can't test |
When merged this pull request will:
When a fuel source (either a pump or a vehicle) is destroyed, the vanilla fuel cargo is restored. This makes the destruction effects last much longer. Uses a more reliable approach than the one used in #7613 (comment).
The
allObjectscommand is very fast. Pump location configs for worlds are no longer needed and slownearObjects-based init has been removed.