Commit Graph

232 Commits

Author SHA1 Message Date
the-real-herowl
93a6ce6824 Renamed mcl_fireworks to vl_fireworks 2024-12-29 08:08:52 +01:00
the-real-herowl
3291786c1f Moved particle explosion to mcl_fireworks API
- crossbow rockets use the API
- fireworks use it obviously
- fireworks fly a bit faster too
2024-12-29 08:08:52 +01:00
teknomunk
0d82c8f725 Replace magic numbers with named constants, add missing 'local' 2024-12-25 11:52:24 +01:00
teknomunk
bb934d09ee Break long lines, add space between functions in vl_projectile/init.lua 2024-12-25 11:52:24 +01:00
teknomunk
bc321ccae4 Add _vl_projectile.can_punch() to mob API and move hard-coded entity behavior from arrow to rover code 2024-12-25 11:52:24 +01:00
teknomunk
5db55dde3c Update { ... } to {...} 2024-12-25 11:52:24 +01:00
teknomunk
0d8f7515c6 Update minetest->Luanti in affected documentation, update minetest. -> core. in affected code, factor out common subexpressions in mods/ITEMS/vl_projectile/init.lua 2024-12-25 11:52:24 +01:00
teknomunk
5f0244ebb1 Use creative arrow collection behavior from master (except they make pickup noises in creative), make all creative arrows infinity 2024-12-25 11:52:24 +01:00
teknomunk
73c66dc888 Sound fix, preserve _itemstring as well 2024-12-25 11:52:24 +01:00
teknomunk
1e165155d8 Add _arrow_item to list of perserved fields 2024-12-25 11:52:24 +01:00
teknomunk
f426d96ef5 Make arrows (and all their derivatives) preserve collectable and entity properties across world unload/load 2024-12-25 11:52:24 +01:00
teknomunk
d1fe8de1b6 Fix crash when respawning 2024-12-25 11:52:24 +01:00
teknomunk
174cb5fe1c Let arrows stick in players 2024-12-25 11:52:24 +01:00
teknomunk
aa8cec9911 Implement mcl_util.remove_entity() and convert projectile code to use it 2024-12-25 11:52:24 +01:00
teknomunk
efa6e7d2d0 Move arrow self-collision grace logic to vl_projectile then apply to mob projectiles and splash and linger potions, allow entity luaentity to be passed to mcl_util.get_entity_id() 2024-12-25 11:52:24 +01:00
teknomunk
cf71d2981a Fix crash when firing rocket arrows 2024-12-25 11:52:24 +01:00
teknomunk
2d56deacf6 Replace _puncher with _owner, rework projectile code to make _owner a string, copy mcl_util.gen_uuid() from minecart branch, add mcl_util.get_entity_id(), fix crash 2024-12-25 11:52:24 +01:00
teknomunk
96abcd2bcc Remove debug dump, move maximum time to live to vl_projectile 2024-12-25 11:52:24 +01:00
teknomunk
c857d66f5d Move projectile stick logic into vl_projectile 2024-12-25 11:52:24 +01:00
teknomunk
32d37b30bf Move tracer to vl_projectile 2024-12-25 11:52:24 +01:00
teknomunk
f265f5b52d Change mcl_bows to use standard vl_projectile on_step handler, move burning behavior to vl_projectile 2024-12-25 11:52:24 +01:00
teknomunk
8e4f870a46 Move arrow-node logic out of mcl_bows/arrow.lua and into the node definitions under _vl_projectile.on_collide 2024-12-25 11:52:24 +01:00
teknomunk
ba244fa930 Remove secondary collision check in mcl_bows/arrow.lua (it was just hitting grass) 2024-12-25 11:52:24 +01:00
teknomunk
d284df907e Remove code with no effect other than emitting a warning 2024-12-25 11:52:24 +01:00
teknomunk
c3275eb0b7 Resolve luacheck findings 2024-12-25 11:52:24 +01:00
teknomunk
dc312ee012 Fix crash when hit with an arrow that is not piercing 2024-12-25 11:52:24 +01:00
the-real-herowl
a1c7bb55a1 Rockets and piercing arrows fixed
They both work properly now.
2024-12-25 11:52:24 +01:00
teknomunk
db8bceebf3 Fix dispenser arrows so they hit players and entities, minetest.register_entity -> vl_projectile.register for mcl_throwing:egg 2024-12-25 11:52:24 +01:00
teknomunk
b821f3d72f Fix luacheck findings for this PR: remove unused variables, remove overwritten value, add missing dependencies, fix undefined variable usage 2024-12-25 11:52:24 +01:00
teknomunk
2cc648fd2e Undo conversions to use mcl_bows:arrow_entity and use arrow_item.."_entity" like master 2024-12-25 11:52:24 +01:00
teknomunk
4c36870776 Small optimization for calculating _allow_punch 2024-12-25 11:52:24 +01:00
teknomunk
dbbc53173c Stop minimum draw arrows from hitting player that shot them 2024-12-25 11:52:24 +01:00
teknomunk
3b7fb6613e Prevent collisions with entities until projectile is at least one node from where it started (to prevent always hitting yourself), modify mcl_bows.shoot_arrow() and mcl_bows_s.shoot_arrow_crossbow() to use vl_projectile.create(), fix projectiles damaging players 2024-12-25 11:52:24 +01:00
teknomunk
4e3e8aafc8 Address most of kno10's comments about mcl_utils/node.lua and a couple others, fix lingering potion sound 2024-12-25 11:52:24 +01:00
teknomunk
d71d9f5bf2 Address more review comments 2024-12-25 11:52:24 +01:00
teknomunk
c4df080af5 Make arrows damage players, update API documentation, fix several crashes that occurred when arrows hit a player 2024-12-25 11:52:24 +01:00
teknomunk
d18cc8ff52 Fix picking up tipped arrows 2024-12-25 11:52:24 +01:00
teknomunk
dd2c6638f6 Fix crash related to nil _time_in_air 2024-12-25 11:52:24 +01:00
teknomunk
6893a4e8b6 Fix typo in api.md, add TODO, change entity -> object 2024-12-25 11:52:24 +01:00
teknomunk
5ced87dc26 Fix typos documentation, add ignore_gravity and liquid_drag options, use vl_projectile.register() for enter pearl, move projectile physics to vl_projectile add hook for future vl_physics support 2024-12-25 11:52:24 +01:00
teknomunk
fdfefd2af8 Resolve more review comments, fix crash 2024-12-25 11:52:24 +01:00
teknomunk
17a25a39ef Resolve review comments 2024-12-25 11:52:24 +01:00
teknomunk
b4b83782e8 Remove debug print 2024-12-25 11:52:24 +01:00
teknomunk
4dec7e1ce5 Give arrows a maximum lifetime to prevent them from getting stuck in mid-air forever 2024-12-25 11:52:24 +01:00
teknomunk
def9d26ca3 Add API documentation, minor API cleanup 2024-12-25 11:52:24 +01:00
teknomunk
7317981134 Convert rocket to use vl_projectile API using mcl_bows:arrow as a template, remove some dead code 2024-12-25 11:52:24 +01:00
teknomunk
0516b69f68 Fold tipped arrows into standard arrows and handle effects via item definition callback, remove arrows when they collide with entities, update handling of removing projectiles 2024-12-25 11:52:24 +01:00
teknomunk
caf09cc7d3 More refactoring to generalize arrow code into projectile 2024-12-25 11:52:24 +01:00
teknomunk
34b9fe88e5 Start mcl_bows:arrow_entity refactor 2024-12-25 11:52:24 +01:00
kno10
c73baa3886 German translation updates 2024-12-18 18:42:25 +01:00