27 Commits

Author SHA1 Message Date
codefairy
5c973aad3b Merge branch 'statussymbols' 2019-09-04 21:08:20 -04:00
codefairy
b1598d2ecf Fix bug where homes weren't saved after updating area bounds 2019-09-04 21:03:37 -04:00
codefairy
6747b712e4 Add diamond status symbol 2019-09-04 21:00:53 -04:00
codefairy
9322882582 Add gold status symbol 2019-09-02 21:47:28 -04:00
codefairy
2073cd0fcc Add support for various ranks of status symbols 2019-09-02 21:06:04 -04:00
codefairy
f4683f5c76 Fix formatting
Eventually, I will figure out how to configure vim again.
2019-09-02 20:42:18 -04:00
codefairy
864dc7e4db Add the first status symbol amenity that increases maximum area volume 2019-09-02 15:42:19 -04:00
codefairy
616e3b4e2d Fix off-by-one error 2019-09-02 15:24:58 -04:00
codefairy
9b52d5a182 Fix formatting 2019-09-02 14:27:20 -04:00
codefairy
d3510645ca Add in basic groundwork for home amenities
Amenities are nodes that are placed within the home's area and offer
some kind of benefit to the area or the homeowner (while within the
area). An example would be one which expands the maximum area volume,
or one which provides healing while inside the home.
2019-09-02 14:12:16 -04:00
codefairy
7410b78d4e Add textures to be used by new status symbol amenities 2019-09-02 12:32:33 -04:00
codefairy
a26bb22b5f Allow players to have 1x1x* homes if they really want 2019-09-02 11:43:23 -04:00
codefairy
49d318453e Break init.lua up into smaller files for better extensibility
All the cool mods are doing it, so why not us? We're about to add some
cool features that would be easier to maintain in separate files.
2019-09-02 10:57:33 -04:00
codefairy
f52520bb91 Fix bug where all areas were considered orphaned 2019-09-01 16:46:55 -04:00
codefairy
c3d22ea4d5 Add in orphaned-area protection 2019-09-01 16:01:47 -04:00
codefairy
feefad51e2 Allow players to change the area that their home node covers 2019-09-01 15:40:34 -04:00
codefairy
f6f45354ab Fix formatting (spaces to tabs) 2019-08-22 14:26:11 -04:00
codefairy
bea79acf10 Give home-saving function a more accurate name 2019-08-22 14:18:09 -04:00
codefairy
014ad06d9c Actually protect home areas defined by the home node
We now check against the home node associated with the area's metadata
to determine whether or not the player is permitted to build/dig in the
area.

This updates the format of the AreaStore area's data to (probably) the
final version this should be considered the format to go with going
forward. Everything going in the home node's metadata just makes things
easier.
2019-08-21 22:52:58 -04:00
codefairy
c6f46abc11 Use one AreaStore for all players' homes
I don't know what I was thinking.
2019-08-21 22:11:39 -04:00
codefairy
648cb421c0 Add long term storage of AreaStores for home nodes
This was a doozy to figure out: AreaStore's to_string method doesn't
return a valid UTF8 string, which apparently means that StorageRef's
set_string method won't save it properly.

To counteract this, the serialized AreaStore must be converted to a
valid UTF-8 string before saving. We do this by running it through
minetest.encode_base64 and minetest.decode_base64 to prevent
corruption.

This introduces a performance impact that we need to keep in mind;
thankfully, during normal gameplay it's unlikely that areas will be
updated often enough for this to be an issue.

Also, minor formatting and debugging changes.
2019-08-20 21:05:21 -04:00
codefairy
707db6419f Add in basic area storage and protection to home nodes
This is only a rough first step; later on, we will allow players to
customize the area that their home node covers (up to a point) as well
as what protections and effects are attached to this area.

For now, we only have basic protection of a 7x7x7 cube centered on the
home node.
2019-08-19 21:43:41 -04:00
Princess Pepperoni
6502ed4a86 Fix an incorrect check which resulted in names never changing 2019-08-17 17:38:09 -04:00
codefairy
cd85cb149d Preserve home names when user hits escape on form 2019-08-13 21:44:52 -04:00
codefairy
fcf0b18369 Fix bug where player's name is compared with player's object 2019-08-13 21:32:22 -04:00
codefairy
a2c34f1223 Allow players to change the name of their home nodes
This is a quick prototype; expect this to be expanded on in a later
update.
2019-08-12 20:58:47 -04:00
codefairy
06d7b809ca Initial commit 2019-08-12 19:35:56 -04:00