719 Commits

Author SHA1 Message Date
Elias Åström
26ea3ee398 Check _on_walk_through every globalstep 2024-12-09 12:57:28 +00:00
Elias Åström
cb890afba5 Remove the large item image for offhand 2024-11-23 03:38:31 +00:00
Elias Åström
46a0150c2d Fix zh_hant/zh_TW translation files
zh_hant is moved to zh_TW if it has more translations or zh_TW does not
exist. All other zh_hant files are deleted.
2024-11-21 20:51:31 +01:00
Jürgen Rühle
af380a97b4 mcl_player has no translatable strings 2024-11-21 08:56:59 +01:00
Elias Åström
dbabb00f02 Run new update-tr.sh script 2024-11-18 21:52:22 +01:00
Elias Åström
4556f70546 Update translations 2024-10-19 17:27:47 +02:00
ryvnf
60a1b1661e weblate (#2205)
Co-authored-by: Sotis <Sotis@users.noreply.translate.codeberg.org>
Co-authored-by: Sencyy <Sencyy@users.noreply.translate.codeberg.org>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: Enlive <Enlive@users.noreply.translate.codeberg.org>
Co-authored-by: Cwpute <Cwpute@users.noreply.translate.codeberg.org>
Co-authored-by: 3raven <3raven@users.noreply.translate.codeberg.org>
Co-authored-by: Benny <Benny@users.noreply.translate.codeberg.org>
Co-authored-by: phileas <phileas@users.noreply.translate.codeberg.org>
Co-authored-by: liulitchi <liulitchi@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/mineclonia/mineclonia/pulls/2205
2024-10-19 15:25:58 +00:00
goblin_mode
5b4e38a624 remove damage modifier since its obsolete 2024-10-06 14:42:21 +00:00
goblin_mode
32c6c6c794 make dripstone deal extra fall damage 2024-10-06 14:42:21 +00:00
Elias Åström
a7c10019dc Update translations 2024-09-21 18:45:59 +02:00
ryvnf
7d1260f1a8 Update translations from weblate
Co-authored-by: liulitchi <liulitchi@users.noreply.translate.codeberg.org>
Co-authored-by: Gaemy <Gaemy@users.noreply.translate.codeberg.org>
Co-authored-by: phileas <phileas@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/mineclonia/mineclonia/pulls/2121
2024-09-21 16:32:04 +00:00
goblin_mode
51be809174 fix inventory player model being able to "die" 2024-09-17 15:41:37 +00:00
goblin_mode
288d3a30ff make falling on powder snow cancel out fall damage 2024-09-15 15:59:07 +00:00
cora
78692181c0 Remove mcl_util.mcl_log, excessive logging from mcl_beds and mcl_spawn 2024-09-14 18:41:19 +00:00
cora
bddb57ed12 Use mcl_util.connected_players iterator throughout codebase 2024-09-14 20:14:14 +02:00
cora
9dfa5dc8ff Use objects_inside_area iterator everywhere 2024-09-14 20:14:14 +02:00
cora
8402ed22ac Use mcl_util.connected_players iterator in mcl_player 2024-09-14 20:14:14 +02:00
Jürgen Rühle
9cb892852a Make mcl_spawn.spawn overridable
Change the respawn callback to evaluate mcl_spawn.spawn during each call
instead of once at load time.
2024-09-11 18:31:27 +02:00
cora
a2db232d2f
Remove superfluous check for "mcl_potions" globabl 2024-09-02 15:09:18 +02:00
cora
06d47d7372
Remove unused var in mcl_hunger 2024-09-02 14:37:03 +02:00
Po Lu
3d62781658
; Further remove mcl_luck 2024-09-02 14:36:08 +02:00
Po Lu
cfacca730b
; Delete mcl_luck 2024-09-02 14:36:08 +02:00
Po Lu
0d37b177c0
Remove luck and further adapt to mcla and Minecraft
* mods/CORE/mcl_damage/API.md: Fix errors in description of
modifier prioritization.

* mods/ENTITIES/mcl_mobs/breeding.lua (feed_tame)
(check_breathing):

* mods/ENTITIES/mcl_mobs/mod.conf: Delete references to luck.

* mods/ENTITIES/mcl_mobs/physics.lua (reset_breath): New
function.

* mods/ENTITIES/mobs_mc/shulker.lua (hit_mob): Fix typo.

* mods/HELP/mcl_tt/snippets_mcl.lua: Remove references to
stackable effects, which don't exist in Minecraft.

* mods/HELP/tt/init.lua (apply_snippets): Delete unused local
variable.
(reload_itemstack_description): Filter original description
through `def._mcl_filter_description' if it exists.  Delete
special case for potions.

* mods/HUD/mcl_experience/bottle.lua (bottle, throw_xp_bottle):

* mods/HUD/mcl_experience/mod.conf: Delete references to luck.

* mods/HUD/mcl_inventory/creative.lua (set_inv_search):
Guarantee that potent and extended variants of potions appear in
search list.

* mods/HUD/mcl_inventory/mod.conf: Render tt a mandatory
dependency.

* mods/ITEMS/mcl_bows/bow.lua:

* mods/ITEMS/mcl_bows/crossbow.lua:

* mods/ITEMS/mcl_bows/mod.conf:

* mods/ITEMS/mcl_end/eye_of_ender.lua (ender_eye):

* mods/ITEMS/mcl_end/mod.conf (depends):

* mods/ITEMS/mcl_fishing/init.lua (mcl_fishing):

* mods/ITEMS/mcl_fishing/mod.conf (description): Delete
references to mcl_luck.

* mods/ITEMS/mcl_potions/API.md: Document on_reject.

* mods/ITEMS/mcl_potions/functions.lua (register_effect): Save
`on_reject' in registered definitions.
(absorption): Enable for mobs as well; implement on_reject to
set a lower bound on absorption health when an inferior effect
is discarded for a better one, but without affecting the
duration of the latter.
(fire_resistance, resistance): Enable for mobs.
(luck, bad_luck): Extricate from mcl_luck.
(level_from_details, duration_from_details): Extract some
copypasta here.
(give_effect): Call on_reject in the abovementioned scenario.
(_extinguish_nearby_fire): Rename to `_water_effect'.
Extinguish nearby burning entities and replenish breath counter
of axolotls.

* mods/ITEMS/mcl_potions/init.lua (water_splash): Delete
function.
(water): Call _water_effect on splash.

* mods/ITEMS/mcl_potions/lingering.lua (lingering_effect_at):
Rename to `lingering_effects_at'.
(potency_to_level): New function.
(add_lingering_effects): New function.  Record a list of active
effects at any position to enable applying multiple effects to
one position.
(def_to_effect_list, particle_texture): New function.
(register_globalstep): Enable overriding the total lifespan of
an area effect cloud.  Restore ability to extinguish nearby
fires and mobs, and adapt to the new area effect representation.
(register_lingering): Set _mcl_filter_description.  Correct
invocation of obsolete function and adapt to the foregoing
changes.

* mods/ITEMS/mcl_potions/potions.lua (generate_on_use)
(register_potion): Effects do not stack in Minecraft, so remove
them from Mineclonia also.  Register implementation of
_mcl_filter_description.
(filter_potion_description): New function.

* mods/ITEMS/mcl_potions/splash.lua (register_splash): Extract
some widely reused code into a common function, and register
implementation of _mcl_filter_description.

* mods/ITEMS/mcl_potions/tipped_arrow.lua (register_arrow):
Likewise.

* mods/ITEMS/mcl_totems/init.lua: Grant user Regeneration, Fire
Resistance and Absorption upon resurrection.

* mods/ITEMS/mcl_totems/mod.conf (depends): Depend on
mcl_potions.

* mods/PLAYER/mcl_criticals/init.lua:

* mods/PLAYER/mcl_criticals/mod.conf: Revert mcl_luck changes.
2024-09-02 14:36:08 +02:00
Po Lu
7dc36f02ba
Conclude merge
* mods/CORE/mcl_util/init.lua (converter): New variable.
(mcl_util.to_roman): Move roman numeral conversion routine
to mcl_util.

* mods/ENTITIES/mcl_mobs/combat.lua (mob_class:on_punch):
Restore code overwritten during merge.

* mods/ENTITIES/mobs_mc/guardian_elder.lua: Remove redundant
statements.

* mods/ENVIRONMENT/mcl_raids/init.lua (mcl_raids): Remove
references to fireworks.

* mods/ITEMS/mcl_beacons/init.lua (effect_player): Port to new
effect framework.
(apply_effects_to_all_players): Establish that a secondary
effect exists before providing it to effect_player.
(apply_beacon_formspec): Delete redundant statement.

* mods/ITEMS/mcl_enchanting/groupcaps.lua (update_groupcaps):
New parameter IGNORE_HASH; used by Haste and Mining Fatigue
implementations.  All callers changed.

* mods/ITEMS/mcl_enchanting/init.lua (mcl_enchanting): Remove
roman numeral converter.

* mods/ITEMS/mcl_fishing/items.lua (eat_pufferfish): Adapt to
names of parameters renamed in Mineclonia.

* mods/ITEMS/mcl_mobitems/init.lua (drink_milk): Call
_reset_effects, not _reset_player_effects.

* mods/ITEMS/mcl_potions/commands.lua (get_chat_function): Delete
unused variable.
(effect): Delete redundant initializer.

* mods/ITEMS/mcl_potions/functions.lua
(generate_rational_lvl_to_frac): Fix math.
(regeneration, strength, weakness, swiftness, slowness)
(fire_resistance): Explicitly specify icons whose names cannot
be derived from those of the effects.
(blindness, nausea): Disable FOV modification for the time
being.
(hf_update_internal, update_haste_and_fatigue)
(_reset_haste_fatigue_item_meta): Guarantee that tool
capabilities are reset properly to their standard values.
(_load_player_effects): Correct typos.
(clear_effect, _reset_effects): Remove effects from
item_speed_effects also.
(give_effect): Fix typo.

* mods/ITEMS/mcl_potions/init.lua (awkward_table, thick_table)
(inversion_table): Delete numerous recipes absent from
Minecraft.

* mods/ITEMS/mcl_potions/lingering.lua (register_lingering): Typos.

* mods/ITEMS/mcl_potions/potions.lua (time_string, perc_string)
(return_on_use): Delete obsolete functions.
(generate_on_use): Provide itemstack to _use_potion.
(trolling, levitation, darkness, glowing, health_boost)
(absorption, resistance, blindness, nausea, food_poisoning)
(saturation, haste, fatigue): Delete numerous potions absent
from Minecraft.
(turtle_master, withering): Rename descriptions to agree with
Minecraft.

* mods/ITEMS/mcl_potions/splash.lua (register_splash): Delete
redundant statement.

* mods/ITEMS/mcl_potions/tipped_arrow.lua (arrow_image): Restore
ommitted function.
(register_arrow): Remove redundant statements; return to
deriving bespoke ARROW_ENTITIES from the original.  Set potency
and plus to 0.

* mods/ITEMS/mcl_sus_stew/init.lua (mcl_sus_stew)
(registered_stews, item_effects, register_stew): Delete unused
variables and functions.
(get_random_effect, eat_stew): Port properly from VL.

* mods/PLAYER/mcl_hunger/init.lua (mcl_hunger): Use hunger in
place of food_poisoning.

* mods/PLAYER/mcl_hunger/hunger.lua (mcl_hunger): Remove
reference to variable and option absent from Mineclonia.
2024-09-02 14:36:07 +02:00
the-real-herowl
dab4c63071
Remove unused function in mcl_hunger 2024-09-02 14:36:06 +02:00
the-real-herowl
0bc01dbb16
Further (mcl_)luck functionality
* XP from mob breeding impacted by luck
* eye of ender explosion chance impacted by luck
* fishing loot impacted by luck
* melee critical damage impacted by luck
* also fixed 2 scripts marked as "executable"
2024-09-02 14:36:06 +02:00
the-real-herowl
b326a25002
Added mcl_luck API
Luck and Bad Luck effects use the mcl_luck API now
The API is unused for now
2024-09-02 14:36:06 +02:00
the-real-herowl
142f00b35e
Haste and fatigue expanded and improved
* abstracted and refactored some parts of haste and fatigue
* added and exposed new mcl_potions API functions
* fixed haste and fatigue not altering the hand
* mcl_meshhand now calls into mcl_potions when resetting the hand
2024-09-02 14:36:05 +02:00
the-real-herowl
c52a552749
Renamed some functions and variables
* changed names referring to player where it does support mobs
* also added an is_player() check in one function
2024-09-02 14:36:05 +02:00
the-real-herowl
cbcb984777
Added food poisoning and saturation effects 2024-09-02 14:36:05 +02:00
the-real-herowl
f3b6603888
Added some missing effects and improved API
* added a way to have a damage modifier relying on type instead of flag
* added Slow Falling
* added Levitation
* added Health Boost
* added Absorption
2024-09-02 14:36:05 +02:00
Elias Åström
4afd4f85d0 mtt_convert.py --po2tr 2024-08-31 17:33:38 +02:00
ryvnf
0a4bc82130 Translations from weblate (#1987)
Co-authored-by: Gaemy <Gaemy@users.noreply.translate.codeberg.org>
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: liulitchi <liulitchi@users.noreply.translate.codeberg.org>
2024-08-31 15:28:30 +00:00
Po Lu
4b96fd9b4b Record floating-point damage
* mods/CORE/mcl_damage/init.lua (damage_player, heal_player)
(get_hp): New functions.
(register_on_hpchange): Do not apply modifiers to damage
inflicted by damage_player and heal_player.  Otherwise, first
apply the difference to internal damage and compute the engine
hp difference from thence.
(register_on_punchplayer): Inflict punch damage by means of
damage_player.
(register_on_joinplayer): Synchronize player engine health with
internal health counter if nonexistent.
(register_on_dieplayer): Reset internal health counter.

* mods/CORE/mcl_util/init.lua (deal_damage): If dealing damage
to player, invoke mcl_damage.damage_player.
(get_hp): Return fractional health gauge if player.

* mods/ITEMS/mcl_totems/init.lua (register_modifier):

* mods/HUD/mcl_death_messages/init.lua (register_on_damage):
Derive whether damage is lethal from the fractional health gauge
rather than `obj:get_hp'.

* mods/ITEMS/mcl_armor/damage.lua (register_modifier): Do not
compute ceiling of modified damage; return the floating point
value as-is.

* mods/ITEMS/mcl_potions/functions.lua (healing_func)
(register_globalstep): Use heal_player rather than set_hp.

* mods/ITEMS/mcl_throwing/register.lua (pearl_tp):

* mods/MISC/mcl_commands/kill.lua (damage_player):

* mods/PLAYER/mcl_hunger/hunger.lua:

* mods/PLAYER/mcl_hunger/init.lua: As above.
2024-08-31 12:27:17 +00:00
cora
4465ed15c4 Allow _mcl_baseitem to be a function returning the stack 2024-08-27 12:14:56 +00:00
cora
2b802bd628 Use node def drop if _mcl_baseitem not present 2024-08-27 12:14:56 +00:00
cora
ef55292f8b rename _mcl_basenode to _mcl_baseitem 2024-08-27 12:14:56 +00:00
cora
d13036ab33 Creative bickblock: return itemstack instead of directly modifying it 2024-08-27 12:14:56 +00:00
cora
5e84c43962 Refuse pickblock for items not in creative inventory
unless _mcl_basenode is in their definition and then pick the basenode
item
2024-08-27 12:14:56 +00:00
cora
ee22e8501f Creative Pickblock: If item already in inv move to wield idx 2024-08-27 12:14:56 +00:00
cora
f096dfb6a8 Add creative pick-block behavior when rightclicking blocks with empty hand 2024-08-27 12:14:56 +00:00
cora
113d9abbb5
Make occurences in code that obv want floating p results use mcl_util.float_random 2024-08-27 14:06:40 +02:00
Elias Åström
153f0b1d20 mtt_convert --tr2po 2024-08-17 19:15:07 +02:00
Elias Åström
b302797ff8 mtt_convert.py --po2tr 2024-08-17 18:57:18 +02:00
Elias Åström
fb8dc794fe Revert translation updating commits
A bugged version of mtt_convert was used.
2024-08-17 18:48:32 +02:00
Elias Åström
c929ead447 Add previously uncommitted tr-files 2024-08-17 17:52:16 +02:00
Elias Åström
d5445ebbdf mtt_convert.py --tr2po 2024-08-17 17:06:58 +02:00
Elias Åström
4934054af8 mtt_convert.py --po2tr 2024-08-17 17:03:15 +02:00
ryvnf
98ce8b1c82 Translations from weblate
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: Gaemy <Gaemy@users.noreply.translate.codeberg.org>
Co-authored-by: phileas <phileas@users.noreply.translate.codeberg.org>
2024-08-17 15:02:39 +00:00
cora
9d80ad7e56
Optipng all textures with optimized difference >50 bytes 2024-08-16 08:18:07 +02:00