refactor: pass creature to weapon use function, as opposed to just id

This commit is contained in:
2021-05-23 22:07:46 +02:00
parent 3ae454acf4
commit cda035b1d1
11 changed files with 235 additions and 219 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ handlePressedKeyInGame scode w
| scode == pauseKey (_keyConfig w) = Just $ pauseGame $ escapeMap w
| scode == dropItemKey (_keyConfig w) = Just $ youDropItem w
| scode == toggleMapKey (_keyConfig w) = Just $ toggleMap w
| scode == reloadKey (_keyConfig w) = Just $ fromMaybe w $ startReloadingWeapon (_yourID w) w
| scode == reloadKey (_keyConfig w) = Just $ fromMaybe w $ startReloadingWeapon (you w) w
| scode == testEventKey (_keyConfig w) = Just $ testEvent w
| scode == spaceActionKey (_keyConfig w) = Just $ spaceAction w
| scode == rotateCameraPlusKey (_keyConfig w) = Just $ w & cameraRot +~ 0.01