Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typified stuff #78793

Merged
merged 2 commits into from
Dec 28, 2024
Merged

typified stuff #78793

merged 2 commits into from
Dec 28, 2024

Conversation

PatrikLundell
Copy link
Contributor

Summary

None

Purpose of change

Change usages of untyped coordinated into typed ones.
This time some "random" header files and dependents including:

  • weather.h
  • weather_gen.h
  • trap.h
  • sound.h
  • messages.h

Describe the solution

Changed usages of untyped operation to typed ones and deleting the untyped ones when no dependents remain.
Discovered a bugged usage of get_weather_temperature, with one feeding in an untyped abs coordinate and the other an untyped bubble coordinate. item.cpp operation item::process_temperature_rot was changed to get the abs coordinate for the bubble coordinate it previously used. This ought to cause the rot processing to differ in different locations, rather than always get processing for (0, 0) (there's a division by 2000 of the coordinates to create some sort of grid).

Describe alternatives you've considered

Testing

Loaded save, walked up ramp, hopped into car, drove through hay stacks, over zombie corpse with inventory, and ran over a turkey, smashed into stationary vehicle. Nothing odd seen.
The bug wasn't tested, as I don't know how to do it. The effect should be subtle, as the rot would be affected by the temperature in a different location, and the weather is, over all, similar everywhere (we don't have a "world" spanning from the poles to the tropics) at any given time of the year.

Additional context

cata_tiles is going to require a bit of work to entangle, but may be the focus for the next PR. The current code happily is used both by bubble coordinates and by omt coordinates. I'm considering hiding the current operations as private and use typed "skins" to separate the two use cases, but would be grateful for advice.

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership Info / User Interface Game - player communication, menus, etc. Bionics CBM (Compact Bionic Modules) Map / Mapgen Overmap, Mapgen, Map extras, Map display Vehicles Vehicles, parts, mechanics & interactions Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Melee Melee weapons, tactics, techniques, reach attack Mechanics: Weather Rain, snow, portal storms and non-temperature environment Items: Containers Things that hold other things Mechanics: Enchantments / Spells Enchantments and spells labels Dec 27, 2024
@github-actions github-actions bot requested a review from KorGgenT December 27, 2024 14:32
@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Dec 27, 2024
@Maleclypse Maleclypse merged commit a078529 into CleverRaven:master Dec 28, 2024
25 checks passed
@PatrikLundell PatrikLundell deleted the typify branch December 28, 2024 08:07
@Procyonae Procyonae mentioned this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Info / User Interface Game - player communication, menus, etc. Items: Containers Things that hold other things json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Enchantments / Spells Enchantments and spells Mechanics: Weather Rain, snow, portal storms and non-temperature environment Melee Melee weapons, tactics, techniques, reach attack Monsters Monsters both friendly and unfriendly. NPC / Factions NPCs, AI, Speech, Factions, Ownership Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants