Commit Graph

172 Commits

Author SHA1 Message Date
Jude Melton-Houghton
b38ffdec27 Implement vector and node conversion in Lua ()
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-18 18:01:44 -04:00
Jude Melton-Houghton
7632af3c73 Consolidate API object code ()
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-04 08:31:36 -04:00
sfan5
525fc3833c Implement tool use sounds 2022-09-30 14:02:14 +02:00
Wuzzy
1d04903c19 Add paramtype2s for 4 horizontal rotations and 64 colors ()
4dir is like facedir, but only for 4 horizontal directions: NESW. It is identical in behavior to facedir otherwise. The reason why game makers would want to use this over facedir is 1) simplicity and 2) you get 6 free bits.
It can be used for things like chests and furnaces and you don't need or want them to "flip them on the side" (like you could with facedir).

color4dir is like colorfacedir, but you get 64 colors instead of only 8.
2022-09-16 13:18:55 +02:00
Herman Semenov
038da00e79 Code optimizations / refactor ()
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-06 11:21:09 +01:00
Lars Müller
0e439b2fa3 Check hp_max > 0 for entities () 2022-08-13 15:35:41 +01:00
rubenwardy
9f41b4f72d Add check_mod_configuration to main menu 2022-07-14 22:12:54 +01:00
Lexi Hale
20bd6bdb68 Animated particlespawners and more ()
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
2022-07-13 11:57:12 +02:00
SmallJoker
e51f474613 Sounds: Various little improvements ()
Use SimpleSoundSpec where reasonable (OpenAL)
Ensure the sound IDs do not underflow or get overwritten -> loop in u16
Proper use of an enum.
2022-07-09 22:32:24 +02:00
Zughy
18fbc0394b Remove tile_images and special_materials obsolete code ()
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2022-06-28 00:55:01 +01:00
SmallJoker
a463620edb Re-order sound-related code ()
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated
'fade' and 'pitch' values on server-side where only one was used anyway.
SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included.

Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the
future. Per-type version numbers are kept for now as a safety rope in a special case.
2022-06-20 21:56:12 +02:00
Lars Müller
f4a53f7ee6 No damage effects on hp_max change () 2022-06-11 20:00:40 +02:00
sfan5
8b74257bf3 Reduce size of ContentFeatures structure
On my system this is a reduction from 4664 to 3704 bytes.
This is not for the sake of saving RAM but ensuring
commonly used structures fit into caches better.
2022-05-26 15:49:12 +02:00
Lars Müller
89c82035d8 hud_get: Return precision field for waypoints () 2022-05-04 20:55:20 +02:00
sfan5
56a558baf8 Refactor some Lua API functions in preparation for async env 2022-05-02 20:54:55 +02:00
DS
8d387433b1 Fix the documentation of InvRef:get_lists() and clean up code () 2022-03-29 18:06:16 +02:00
Lars Müller
1ee37148a8 Fix types of get_mapgen_setting_noiseparams () 2022-02-04 20:28:43 +01:00
Wuzzy
21113ad410 Split liquid_viscosity to liquid_viscosity and move_resistance () 2021-10-01 16:21:24 +02:00
savilli
3f1adb49ae Remove redundant on_dieplayer calls 2021-08-28 12:14:16 +02:00
SmallJoker
0c1e9603db HUD: Reject and warn on invalid stat types ()
This comes into play on older servers which do not know the "stat" type.
Warnings are only logged once to avoid spam within globalstep callbacks
2021-08-21 20:04:04 +02:00
sfan5
6e8aebf432 Add bold, italic and monospace font styling for HUD text elements ()
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2021-07-27 19:11:46 +02:00
SmallJoker
f2fd443262 Inventory: Make addList() consistent ()
Fixes list clearing for inv:set_list() using same size, since 2db6b07.
addList() now clears the list in all cases. Use setSize() to resize without clearing.
2021-06-30 20:39:38 +02:00
SmallJoker
2db6b07de1 Inventory: show error on invalid list names () 2021-06-20 17:21:50 +02:00
Vitaliy
3b78a22371 Degrotate support for mesh nodes () 2021-03-30 00:25:11 +02:00
sfan5
bf8fb2672e Use place_param2 client-side for item appearance & prediction () 2021-03-09 00:56:53 +01:00
rubenwardy
f85e9ab925 Add nametag background setting and object property () 2021-02-17 19:51:28 +00:00
rubenwardy
a8f6befd39 Fix short_description fallback order () 2021-02-17 18:53:44 +00:00
sfan5
83229921e5 Rework use_texture_alpha to provide three opaque/clip/blend modes
The change that turns nodeboxes and meshes opaque when possible is kept,
as is the compatibility code that warns modders to adjust their nodedefs.
2021-01-29 17:34:41 +01:00
sfan5
edd8c3c664 Drop never documented 'alpha' property from nodedef
Includes minimal support code for practical reasons.
We'll need it for a slightly different purpose next commit.
2021-01-29 17:34:41 +01:00
Zughy
45ccfe26fb Removed some obsolete code ()
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2021-01-21 18:17:09 +00:00
sfan5
660115c1ab Decouple entity minimap markers from nametags replacing with show_on_minimap property () 2020-10-19 20:38:15 +02:00
JosiahWI
11f3deb9c4 Pass ContentFeatures as reference to read_content_features () 2020-10-13 16:36:01 +01:00
DS
f3ae45b2b2 Add a short_description to be used by mods () 2020-10-09 19:11:21 +01:00
Lars Müller
1c38027c3a Fix precision not working in hud_change () 2020-08-12 11:51:50 +02:00
Danila Shutov
3a6dfda358 Make shading of CAOs optional () 2020-06-16 20:48:31 +01:00
sfan5
732c8008f4 CSM: Fix crashing minetest.get_item_def()
fixes 
2020-05-20 20:15:09 +02:00
Wuzzy
c94d37827d Rework functionality of leveled nodes ()
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-19 21:08:37 +02:00
Lars Müller
9ba24f89f5 Damage texture modifier ()
Adds a new object property "damage_texture_modifier"
2020-05-11 21:41:36 +02:00
Wuzzy
6e1372bd89 Add support for statbar “off state” icons ()
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-11 21:40:45 +02:00
sfan5
b6b80f55c8 Expose collided objects in moveresult
closes 
2020-05-06 14:03:52 +02:00
SmallJoker
1b6f40c356 Rename moveresult speed to velocity 2020-05-05 08:37:04 +02:00
sfan5
3475759d1a Expose collision information to LuaEntity on_step 2020-04-27 20:45:46 +02:00
SmallJoker
be71e70a91 Script: Enforce type checks if not nil ()
* Script: Enforce type checks if not nil
2020-04-27 07:02:39 +02:00
sfan5
8ae8c1600a Fix parsing JSON with large integers () 2020-04-15 08:01:28 +02:00
sfan5
2d5bd3bf79 scriptapi: Some small optimizations to value pushing () 2020-04-14 20:44:18 +02:00
Lars Müller
af2e6a6a10 Improve waypoints and add image variant () 2020-04-11 22:09:46 +01:00
Loic Blot
894a34aef4 Move PlayerSAO to dedicated files 2020-04-11 16:07:17 +02:00
Loic Blot
6d43736172 Move serveractiveobject & unitsao
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h}
Move UnitSAO class to dedicated files
2020-04-11 16:07:17 +02:00
sfan5
ace3c76112 Improve core.sound_play with ephemeral sounds and player exclusion 2020-02-01 20:31:41 +01:00
Wuzzy
e05b7dbb3c Remove unused weight property from objects () 2020-01-22 10:19:27 +01:00