Skip to content

Commit

Permalink
Make solar car more rare (#75617)
Browse files Browse the repository at this point in the history
* 'obsolete' solar car

* unobsolete, spawn car on a speedway with small chance

* delete missed file, update information about veh migration
  • Loading branch information
GuardianDll authored Aug 12, 2024
1 parent bf3c881 commit 12bb7da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions data/json/mapgen/speedway.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@
],
"palettes": [ "speedway_palette" ],
"items": { "R": { "item": "mechanics", "chance": 40, "repeat": [ 1, 6 ] }, "n": { "item": "SUS_welding_gear", "chance": 50 } },
"place_vehicles": [ { "vehicle": "rara_x", "x": 36, "y": 55, "rotation": 90, "chance": 30 } ],
"place_loot": [
{ "item": "tire_medium_slick", "x": [ 36, 38 ], "y": 50, "repeat": [ 6, 9 ] },
{ "item": "tire_medium_slick", "x": [ 41, 43 ], "y": 74, "repeat": [ 6, 9 ] },
Expand Down
3 changes: 0 additions & 3 deletions data/json/vehicle_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@
[ "van_full-size", 600 ],
[ "van_cargo", 400 ],
[ "van_camper", 200 ],
[ "rara_x", 800 ],
[ "apc", 300 ],
[ "apc-gl", 100 ],
[ "aapc-mg", 100 ],
Expand Down Expand Up @@ -577,7 +576,6 @@
[ "golf_cart", 300 ],
[ "scooter", 300 ],
[ "bicycle", 1000 ],
[ "rara_x", 300 ],
[ "unicycle", 100 ],
[ "bicycle_electric", 200 ],
[ "motorcycle", 500 ],
Expand Down Expand Up @@ -1251,7 +1249,6 @@
"vehicles": [
[ "electric_car", 100 ],
[ "suv_electric", 70 ],
[ "rara_x", 40 ],
[ "car_luxury", 40 ],
[ "car_micro", 40 ],
[ "car_micro_hybrid", 40 ],
Expand Down
1 change: 0 additions & 1 deletion data/mods/No_Hope/vehicle_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
[ "car_fbi", 300 ],
[ "truck_swat", 200 ],
[ "hippie_van", 1000 ],
[ "rara_x", 800 ],
[ "apc", 300 ],
[ "apc-gl", 100 ],
[ "aapc-mg", 100 ],
Expand Down
4 changes: 4 additions & 0 deletions doc/OBSOLETION_AND_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Additionally, `COMESTIBLE` items have temperature and rot processing, and are th
* In most cases, the item has no other features that require it to remain activated, in which case it can be simply added to `temperature_removal_blacklist`. Items in this list will be deactivated and have temperature-related data cleared *without any further checks performed*.
* In case of an item that may be active for additional reasons other than temperature/rot tracking, an instance of the item loaded from existing save file cannot be blindly deactivated -- additional checks are required to see if it should remain active. Instead of adding to the above list, a separate special case should be added in `src/savegame_json.cpp` to implement the necessary item-specific deactivation logic.

# Vehicle migration

Vehicles do not need any migration, simple deletion is enough

# Vehicle part migration
Migrating vehicle parts is done using `vehicle_part_migration` type, in the example below - when loading the vehicle any part with id `from` will have it's id switched to `to`.
For `VEH_TOOLS` parts only - `add_veh_tools` is a list of itype_ids to add to the vehicle tools after migrating the part.
Expand Down

0 comments on commit 12bb7da

Please sign in to comment.