Commit Graph

130 Commits

Author SHA1 Message Date
oiad
06c8fef001 Various changes (snappoints, dooraccess and fn_selfactions) (#1706)
* Changes to snappoints.hpp fixes issues with metal floors snapping to a cinder wall. Cinder to cinder will create small gaps and then metal floors won't properly line up unless you start with a metal floor then snap cinders. By making both the same snap size, this fixes this issue.

Changes to doorAccess.hpp makes it possible to unlock doors and downgrade them again. It was setting dze_lock_door to the players UID instead of the door code as it should so the conditions would not be met in fn_selfActions to give you additional access.

Changes to fn_selfActions refine access to certain points more accurately (the way they should be IMO)

1) Adds a check to see if the building item can be upgraded anymore before presenting the menu, this stops you receiving the "upgrade item" action even when the item is fully upgraded
2) Adds access checks to the maintain individual item menu action so only item owner, plot owner and plot friends will see it, same with the above upgrade item menu action, this will also stop you receiving this when you are on someone elses plot that you may not have access to (I.e it's useless)
3) Changes modular building access to be item owner, plot owner and plot friend to remove modular items.
4) Changes plot managment action menu so item owner, plot owner and plot friend can access it. I thought there could be a situation where item owner != plot owner. This can be reverted if that is never possible.
5) Changes downgrading so only item owner, plot owner and plot friends can access it. If someone has the door code that doesn't mean they should be able to remove the combo (IMO)

* typo.
2016-07-09 12:28:39 -04:00
oiad
e30f18190f This will fix an obvious typo for the variable s_player_upgradeStorage (#1705)
* Advanced trading fixes/modifcations

This adds combine currency option to the Advanced trading screen since
@Airwaves man noticed it didn't have a way of doing it.

Updated stringtables with correct "paid" spelling and differing text for
buying/selling.

This also addds proper currency checking/reporting for the log system
that has been introduced, it's untidy but it works, instead of getting
"user bought x for 1000 currency" in a non coins server, it will convert
it to the proper 1 brief 5 10oz gold etc system (uses a new function
z_calcDefaultCurrencyNoImg)

This also adds a check to see if the buy list is empty (as per the
selling list) and returns text to the user informing them.

Re-arranged buy and sell so buy is on top of sell, it's a bit easier to
read then.

* Advanced trading logging change

This was missing from my previous commit, this changes the
server_tradeobject to check if it's being passed a number (single
currency) or text (my logging currency changes)

* Advanced trading fixes (again)

* Advanced trading rework

Fixes all problems @ebaydayz

* Rename typo'd variable "s_player_upgradestorage"

This renames an obviously typo'd variable to what it should be.

* fixes derp string.

* asdf (#3)

asdf
2016-07-05 21:40:31 -04:00
ebaydayz
d74130b477 Rename _playerUID to _id in fn_selfActions
Since this variable can also equal dayz_characterID if DZE_permanentPlot
= false; it makes more sense to name it _id.
2016-06-16 17:01:16 -04:00
ebaydayz
01d8197d12 Remove redundant function fn_check_owner_friends
Fn_check_access provides the same functionality and more.

Removed folders that only contained a single file to clean things up.

Also added epoch tag friendly code to vanilla player_updateGui for now.
2016-06-15 20:09:04 -04:00
Bruce-LXXVI
5e53a71e88 Pullrequest/door management (#1694)
* Added doorManagement

* Rename FNC_check_owner --> FNC_check_owner_friends

* Fixed typo

* Fixed bug in FNC_check_owner_friends which allowed every user to manage
every plot and door.

* Removed unused DZE_doorManagementHarderPenalty from configVariables.sqf

* Now checking if _playerUID is in _friendlies for both cases.

* DZE_plotforLife should be DZE_permanentPlot

* Fixed case where DZE_permanentPlot is false.

* Forgot to add STR_EPOCH_CANCEL

* Changed translations to suggested string by ebaydayz.

* Renamed EyeScanner to DoorAccess.

* Reworked access rights for door management.

* DZE_doorManagementMustBeClose = true; //Players must be within 10m of
door to be added as a door friend.

* Fixed copy-paste error.

* Replace count with if

* Remove redundant test.

* Also replaced count in door management admins check.

* Change plotManagement and doorManagement to be consistent to
DayZ_UseSteamID (get UID from FNC_GetPlayerUID).

* Use _playerUID and _characterID more consistent.

* Added german translation to
STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHELIST.
2016-06-15 18:22:01 -04:00
ebaydayz
20066de673 Rename FNC_check_owner --> FNC_check_owner_friends
Use a more descriptive name for what it actually does now.
2016-06-12 13:30:49 -04:00
ebaydayz
835d750c0c Use single config variable for Plot for Life and Plot Management
Plot for Life and Plot Management work best together. They essentially
provide the same functionality. Both let you keep your plot after death
by using UID instead of CharacterID. Plot Management doesn't even have
an option to save characterID, so by default it is always keeping all
friends and the owner permanently until they are removed. The only major
difference between them is Plot For Life also adds permanent ownership
of built items on the plot, which is behavior most people expect. It
doesn't make sense to keep ownership of the plot after death but not the
other objects built on it. The other functionality it adds (take
ownership) can be toggled with a config variable.

It is rare that someone would want Plot For Life enabled, but Plot
Management disabled or vice versa. If they really want that they can
still do it manually, but consolidating them to a single config option
greatly simplifies things for everyone else.

I removed links to mod githubs because many changes have been made to
the 1.0.6 versions, so outdated information there will likely confuse
people. Authors are already credited in the README and change log.

In variables.sqf "DZ_storage_base" is now the parent class which
includes all tents and stashes. DZE_checkNearbyRadius variable is not
used (identical to DZE_PlotPole select 0).
2016-06-12 12:54:46 -04:00
ebaydayz
ec27cfd29c Update dog actions in fn_selfActions
When PlotForLife was added these were not updated to reflect the
_ownerID change:

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/fn_selfActions.sqf#L253
2016-05-20 13:45:52 -04:00
ebaydayz
edd53597b0 Don't pass DZE_plotManagement to fn_check_owner
The whole point of a global variable is you do not need to pass it.
DZE_plotManagement and DZE_plotmanagementAdmins are always defined and
do not change, so there is no need to pass them as parameters.
2016-05-20 12:14:48 -04:00
ebaydayz
1a5d26f26d Remove unnecessary else in fn_selfActions
FNC_check_owner returns true for (_isowner select 0) if characterID
matches and plotforLife is disabled. So there is no need for the else
here.
2016-05-20 11:55:52 -04:00
ebaydayz
8beb6e9666 Allow filling generator and destroying tent with barrel and 5L 2016-05-19 20:44:34 -04:00
ebaydayz
301c4348e9 Remove vanilla generator fill actions 2016-05-19 18:35:11 -04:00
ebaydayz
914b37a413 Pass cursorTarget to maintain_area.sqf
CursorTarget should always be passed from fn_selfActions, not reacquired
in action scripts. This is to ensure the same object is referenced. Plot
Management maintain_area is called from the dialog button, not
fn_selfactions.
2016-05-19 13:10:20 -04:00
ebaydayz
dbe7bf0a17 Localize plot management dialog text 2016-05-17 19:14:05 -04:00
icomrade
d442592e55 Fix #1691 2016-05-13 17:40:34 -04:00
ebaydayz
8b0e03545f Remove legacy config trader menu
Advanced trading now does everything the legacy config menu did and
more.
2016-05-12 16:41:40 -04:00
icomrade
8a361a1b44 Wrong order 2016-05-03 23:28:32 -04:00
icomrade
e8abd8f403 Add percent damaged display for maintenance #1583 2016-05-03 23:25:25 -04:00
icomrade
fcb6d1ab26 Fix some items missing removal option #1135 2016-05-03 15:41:33 -04:00
icomrade
b0df4c7f51 Fix unlocking vehicles after adding plot for life 2016-05-03 13:50:59 -04:00
icomrade
ea8c14c5fb Fix #1187
keypadCancel returns false when a combo/keypad dialog is not open and
when reset by calling the code keyPadReset = {uiSleep 2; keypadCancel =
false;};

There is a 2 second delay which makes brute forcing very very time
consuming. Note there must be a delay when resetting the variable since
fn_selfactions will update so quickly it will display the
unlock/lock/remove option before onUnload is executed.
2016-05-03 01:19:36 -04:00
icomrade
3c27f76c7c use self actions to spawn plot radius, fixes #1566 2016-05-02 23:06:50 -04:00
icomrade
5f054393e5 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	SQF/dayz_code/compile/fn_damageActions.sqf
#	SQF/dayz_code/compile/fn_selfActions.sqf
2016-05-02 20:44:50 -04:00
icomrade
575682b7c8 Add A Plot For Life modification by RimBlock
A Plot For Life also includes Precise Base Building by Mikeeeyy. Precise
base building has no variable to switch it on or off, I don't think it
should.

Seems to work well enough, this may conflict with the duplicate object
uid fix, it appears to spam my server rpt.
2016-05-02 20:42:37 -04:00
ebaydayz
adff6440ed Fix errors from #1689 localization
@Adaptivity
- STR_EPOCH_WALLWITHDOORLOCKED_DESC string was missing
- I see no reason STR_EPOCH_PLOTDEED_ACTION was renamed to a less
descriptive name, and it was missing the German translation from the old
one, so I changed it back
- These build actions in fn_selfActions are for vanilla building. They
shouldn't be in the Epoch package. I renamed them and submitted them to
vanilla too.
2016-05-02 14:03:41 -04:00
Anton
2a99cf8a63 more localization work (#1689) 2016-05-02 13:31:13 -04:00
ebaydayz
db62ed2019 Only check isPlayer if isMan in fn_selfActions
Better method than:

66408ded24
2016-05-01 17:24:21 -04:00
ebaydayz
66408ded24 Prevent trader menu action showing on players
Fixes bug where player wearing a skin in serverTraders would show trader
menu action on him.
2016-05-01 17:08:55 -04:00
ebaydayz
2806d6a00d Localize some Advanced Trading strings 2016-05-01 15:45:07 -04:00
icomrade
1e65f7a959 Plot Management cleanup + improvement
New compile DZE_GetPlotFriends

DZE_PlotManagementAdmins allows admin management of plot poles and
buildables near poles

DZE_MaxPlotFriends allows servers to allow more than 6 friends on a pole
at once
2016-05-01 13:20:21 -04:00
icomrade
9e2728af07 Merge pull request #1686 from Bruce-LXXVI/pullrequest/plotManagement
Pullrequest/plot management
2016-05-01 11:05:54 -04:00
icomrade
b5c2c6c7bd Fix remove object option 2016-04-29 20:48:16 -04:00
Bruce
59c731ba70 Added ZSCdefines. Checking plotfriends against dayz_playerUID. 2016-04-30 02:01:27 +02:00
Bruce
98bfee8bdf added plotManagement by DevZupa 2016-04-30 02:01:15 +02:00
ebaydayz
2b61ce850a Allow sleeping at all tents
Vanilla development commit:

e647be13c1
2016-04-28 20:30:18 -04:00
icomrade
b0afc402e2 Require Config Traders for Advanced Trading
Since advanced trading can now handle vehicles I don't think there's any
point to have the old dialog if using advanced trading.
2016-04-28 18:59:50 -04:00
icomrade
1585765ca6 Advanced trading by Zupa @Windmolders
Stock configuration and basic integration. WE still need config based
trader setups.
2016-04-27 18:23:55 -04:00
Adaptivity
4dc46705f9 More progress on localization support 2016-04-25 15:47:09 +03:00
ebaydayz
1879fb8707 Fix siphon fuel
ItemJerrycanEmpty no longer inherits from ItemJerrycan
2016-04-22 17:39:52 -04:00
ebaydayz
14dacf269c Add back player zombie faces
Also moved player zombie attack from 'v' key to an addaction with
localized string.
2016-04-20 14:50:12 -04:00
ebaydayz
4d5dc060d2 Fix tame_dog errors
Tame_dog_old and player_tameDog are not used.
2016-04-18 21:49:27 -04:00
ebaydayz
27d57283a0 Fix server position sync after knockout
All DayZ Mod Development commits since 1.8.7 release (Jan. 24) have now
been applied.
2016-04-12 14:51:22 -04:00
ebaydayz
666ace6d54 Cleanup duplicate and unused strings
Cargo count is shown at the top of the gear menu now
2016-04-04 16:58:59 -04:00
ebaydayz
77e760fe73 Update private tags
From
e69f8d5306

Moved dog files to the \dog\ folder and pzombie files to the \pzombie\
folder. Also removed some legacy files that are no longer used.

The actions\ and compile\ folders are fully up to date now
2016-03-30 14:55:45 -04:00
ebaydayz
e1a0bfebc1 Update inits 2016-03-27 23:47:30 -04:00
ebaydayz
ee13f4caf7 Remove friendlySaving for now
Achievements are saved in the state field, so we don't have room to save
friendlies there anymore. DZE_FriendlySaving is removed for now. I will
add it back later with a save to player profile instead.

The dayz_players variable is not used for anything. There were several
other unused variables in server_playerLogin.sqf.
2016-03-24 17:04:17 -04:00
ebaydayz
3113889a98 Update fn_selfActions
See also:
https://github.com/DayZMod/DayZ/pull/645
2016-03-15 22:15:38 -04:00
ebaydayz
17134170ea Remove empty optional parameters
AFAIK there is no benefit to including the optional shortcut and
condition parameters as empty strings:
https://community.bistudio.com/wiki/addAction

All the addActions in fn_damageActions do not include them either. I've
run these changes on a live server for a while and never saw a
difference.
2016-03-13 20:15:50 -04:00
ebaydayz
479097e7a8 1.8.7 player_switchWeapon updates 2016-03-03 21:31:32 -05:00
ebaydayz
03353b9483 Add lock and unlock vehicle from inside
See: #1103
Made vehicle gear always accessible from inside.

Also added optional variable to prevent stealing from backpacks by
non-friendlies at traders.  Thanks to @maca134 for the method.
2016-02-24 20:56:13 -05:00