Commit Graph

165 Commits

Author SHA1 Message Date
ebaydayz
ec6b5eb679 Move Repair and Salvage back to fn_selfActions
Partial revert of: 3aad4b6

Unfortunately this will not support loading external vehicle addons
(with custom UserActions) which we can not include in Epoch. Child
UserActions overwrite inherited UserActions.
2016-11-23 13:34:22 -05:00
ebaydayz
3aad4b61e9 Move some addActions to config UserActions
Should improve client FPS while still allowing conditions and scripts to
be customized.

Some special vehicles like MV22, UH1Y, etc. have UserActions overwritten
in their configs, so please let me know if you find any others that do
not get the option to repair or salvage because UserActions is
overwritten in their config. I think I got them all.

Vanilla commits:

a8c4238c0c

350d73abe1
2016-11-20 19:47:21 -05:00
ebaydayz
de44b32c83 Remove unneeded isBicycle check in fn_selfActions
Bicycles always have characterID=0, so there is no need to check.
2016-11-14 14:38:45 -05:00
ebaydayz
abeb5f9383 Remove vehicle actions when unconscious 2016-11-12 17:54:27 -05:00
icomrade
fb734e30c7 allow removal of generator 2016-11-07 17:24:54 -05:00
ebaydayz
e1bf11c4bb Remove empty folder 2016-11-06 13:15:18 -05:00
oiad
b1171c5f9b player_wearclothes changes, string changes and maintain area moving (#1783)
* player_wearclothes changes, string changes and maintain area moving

Adds 2 toggles for admins to modify:

DZE_backpackRemove forces the player to drop his/her backpack when they
change gear.
DZE_maintainCurrencyRate modifies the amount of worth each item is worth
to maintain.

Changes the error message in player_wearClothes to tell the player why
they can't change gear yet
Remove some debug lines that spam RPT

* Rework

Rework as per @ebaydayz

* Rework

Rework
2016-10-30 14:11:54 -04:00
ebaydayz
c4ef6e3115 Hide showOnScreen for lock and unlock inside vehicle action 2016-10-29 17:06:47 -04:00
ebaydayz
fda831bf4f Consolidate redundant getPlayerUID in selfActions
Vanilla commit:

8c51a24956
2016-10-29 15:25:36 -04:00
ebaydayz
9689301b07 Hide show on screen text for Vehicle Locked and Destroy %1 2016-10-20 14:46:08 -04:00
ebaydayz
5e170029d0 Fix dayz_playerUID undefined in selfActions when target is not null at login
Selfactions can run before dayz_playerUID is defined in
player_monitor.fsm.
2016-10-20 14:34:48 -04:00
ebaydayz
4670f16e89 Rename _isOwner variable to _hasAccess
This is a more logical name in these cases, since friendlies and admins
are not the owner.
2016-10-08 15:57:51 -04:00
ebaydayz
e6d1e0050d Remove redundant _canDo and cursorTarget checks in selfActions
Vanilla commit:

dfb199fbc3
2016-10-08 15:36:38 -04:00
ebaydayz
534abdbdf0 Remove excessive door management config variables
Too many config variables made this unnecessarily complicated. Most
servers will want the defaults. For those that want to customize further
they can easily overwrite these files.

These seem like the most logical defaults to me. Allow all of these
people to manage and unlock by default:
- door owner
- plot owner
- plot friend
- plot admin
- door friend
- door admin

Door friends should be able to manage by default so they don't have to
wait for the owner to come back online to add someone as a door friend.

Plot friends and plot admins can get around the door by removing it and
building another one anyway, so locking them out is pointless. It is
still useful to have these as separate variables for servers that do not
require plot poles though.

Regular friendlies should not be included by default, since we have the
more fine grained plot friends and door friends lists for that. Regular
friendlies will probably be replaced by groups in the near future
anyway.

Please post a comment if there are any issues with these defaults I'm
forgetting. Thanks.
2016-10-08 14:49:59 -04:00
ebaydayz
8a2d95295b Restrict access to show plot boundary action
Only the owner, plot owner, plot friends and plot admins should be able
to see the plot boundary. Randoms just use it for griefing.

Also renamed the targetX variables to the more appropriate doorX in
fn_check_access since they are only used if the target is a door.
2016-10-07 17:39:06 -04:00
ebaydayz
4faa1cbaab Set third parameter after findSafePos
All other scripts using findSafePos either set the third parameter or
use a getPosATL/etc. instead before the position is saved to database.

Also partially reverted d6e78b2 since it is not needed.
2016-10-02 18:51:46 -04:00
ebaydayz
33cf7611ed Don't allow jerry fill from destroyed fuel source
Vanilla commit:

90251abab3

9204c15d3f
2016-09-21 16:53:29 -04:00
ebaydayz
c7a6c71330 Disable vanilla base building actions for now
Since we are not going to use vanilla base building.
2016-09-12 16:11:29 -04:00
ebaydayz
2bb5c5942c Retire cone and pole plot previews in favor of dome
Thanks @oiad for pointing this out.

Poles are not used for previewing anymore. Cones do not give as much
information as the dome.

The dome is visible at night and under night vision too.
2016-09-12 13:39:00 -04:00
ebaydayz
e5e212bbc2 Add comment about salvage vehicle work around 2016-09-09 12:58:41 -04:00
oiad
51f85acb9e Toggle for salvaging from locked vehicles (#1757)
* Toggle for salvaging from locked vehicles

This adds the ability to remove salvaging from locked vehicles which
helps avoid griefing
Fixes a spelling mistake for a localization string
Makes it possible to salvage 0% damaged items again, this was disabled
as per
3292d84b85
I've had this running on my server for a year or so with no issues (not
that it doesn't affect it, i've just never seen it)

* Toggle salvagable locked vehicles changers

@ebaydayz fixed
2016-09-08 17:32:27 -04:00
oiad
d6324723e9 Plot management force maintain option
This replaces the "refresh" menu option with a "force maintain" option.
Allows you to maintain the base even if it doesn't need it to either get
all your items in sync or if you are going away or similar.

Tested with:
dze_permanent plot true/false
z_singlecurrency true/false

Also fixes an undefined variable error in system_monitor that was
introduced
8f58baf3f2
2016-08-28 20:13:25 +12:00
ebaydayz
c2b16f0828 Consolidate DZE_ActionInProgress and r_action_count to one variable
There is no point in having two variables for the same purpose.

It is also pointless to keep an action count tally like r_action_count
was doing, since it is only ever checked for being 0 or 1. Any count
higher or lower than that is irrelevant.

I will make this change in vanilla too.
2016-08-25 15:38:27 -04:00
ebaydayz
134a614255 Remove FNC_getPlayerUID
It's been over two years since it was added. All servers should be
updated to steam ID by now.
2016-08-23 15:40:26 -04:00
ebaydayz
7d27b5c0b1 Remove DZE_advancedTrading config variable
The legacy config trader menu was removed, so this variable is redundant
now.
2016-08-23 14:26:17 -04:00
ebaydayz
8ef349e2bb Make minor adjustment to push stuck plane action 2016-08-21 17:03:47 -04:00
ebaydayz
745e287202 Add option to push stuck planes
Also changed flip vehicle back to 1051 default which allowed players to
flip non-ATVs with help.
2016-08-21 16:45:32 -04:00
ebaydayz
38e30d2565 Remove duplicate drink string
Vanilla development commit:

c25213fbb4
2016-08-19 15:41:50 -04:00
ebaydayz
b37445a4d5 Fix mistake from 15763f4
#1735

15763f4f2a
2016-08-15 17:21:13 -04:00
ebaydayz
15763f4f2a Consolidate maintain scripts
Thanks to @oiad for making this easy #1735
2016-08-15 16:33:00 -04:00
ebaydayz
74579bcf2f Allow remove with Crowbar in hands or onBack
Now crowbar can be in your toolbelt, hands or onBack when removing
modular items, mining ore, opening supply crates, etc.
2016-08-12 19:38:23 -04:00
ebaydayz
9aab4ddd03 Added WIP Limited fuel in Refuel points.
Vanilla development commits:

707a591765

c453cdedd2

Set to double vanilla default value since Epoch has a lot more large
vehicles with 1000+ fuel capacity.
2016-08-11 18:08:21 -04:00
ebaydayz
7a4775beea Fix needing to click lock/unlock twice from inside vehicle to take effect
No reason to use spawn here. Spawn can have a delay. Since
fn_selfActions runs faster it can register the vehicle as still locked
or unlocked after you clicked the action.
2016-08-05 14:38:12 -04:00
ebaydayz
c51fd11511 Use better method to find player's vehicle in Advanced Trading #1725 2016-08-05 13:43:58 -04:00
ebaydayz
4ff088c80c Remove redundant access checks for upgrade and downgrade
Access control for upgrade and downgrade is now included in
fn_selfActions as per #1706

I moved _upgrade down in fn_selfActions so it is only checked it if the
right conditions are met.
2016-07-09 14:34:38 -04:00
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