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

Fix item names in rust (related to #45) #47

Merged
merged 8 commits into from
Jan 17, 2025
Merged

Conversation

lollek
Copy link
Owner

@lollek lollek commented Nov 1, 2022

Item names in rust are broken. Go through them all, fix them and create tests.
Note that this is not necessarily the same name as objdes has.

  • MiscObject(MiscObjectSubType),
  • Chest(ChestSubType),
  • MiscUsable(MiscUsableSubType),
  • Jewelry(JewelrySubType),
  • Gem(GemSubType),
  • Bag(BagSubType),
  • WearableGem(WearableGemSubType),
  • SlingAmmo(SlingAmmoSubType),
  • Bolt(BoltSubType),
  • Arrow(ArrowSubType),
  • Spike(SpikeSubType),
  • LightSource(LightSourceSubType),
  • RangedWeapon(RangedWeaponSubType),
  • HaftedWeapon(HaftedWeaponSubType),
  • PoleArm(PoleArmSubType),
  • Dagger(DaggerSubType),
  • Sword(SwordSubType),
  • Pick(PickSubType),
  • Maul(MaulSubType),
  • GemHelm(GemHelmSubType),
  • Boots(BootsSubType),
  • Gloves(GlovesSubType),
  • Cloak(CloakSubType),
  • Helm(HelmSubType),
  • Shield(ShieldSubType),
  • HardArmor(HardArmorSubType),
  • SoftArmor(SoftArmorSubType),
  • Bracers(BracersSubType),
  • Belt(BeltSubType),
  • Amulet(AmuletSubType),
  • Ring(RingSubType),
  • Staff(StaffSubType),
  • Rod(RodSubType),
  • Wand(WandSubType),
  • Scroll1(Scroll1SubType),
  • Scroll2(Scroll2SubType),
  • Potion1(Potion1SubType),
  • Potion2(Potion2SubType),
  • FlaskOfOil(FlaskOfOilSubType),
  • Food(FoodSubType),
  • JunkFood(JunkFoodSubType),
  • Chime(ChimeSubType),
  • Horn(HornSubType),
  • MagicBook(MagicBookSubType),
  • PrayerBook(PrayerBookSubType),
  • Instrument(InstrumentSubType),
  • SongBook(SongBookSubType),
  • LodgingAtInn(LodgingAtInnSubType),
  • Changelog
  • Version number

@lollek lollek changed the title Fix item names in rust Fix item names in rust (related to #45) Nov 1, 2022

#[no_mangle]
pub extern "C" fn identification_set_identified(item_ptr: *const Item) {
let item = unsafe { *item_ptr };

Check failure

Code scanning / clippy

this public function might dereference a raw pointer but is not marked `unsafe`

this public function might dereference a raw pointer but is not marked `unsafe`
@lollek lollek merged commit 3bd9fd7 into master Jan 17, 2025
@lollek lollek deleted the names-for-subtypes branch January 17, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant