Commit Graph

667 Commits

Author SHA1 Message Date
oiad 1c7e96a0ff Advanced trading modifications, maintain_area modifications (#1780)
* Advanced trading modifications, maintain_area modifications

This lot of changes brings forth the following:

Sets up a "default" set of compiles that are the minimum needed for
maintain_area.sqf and custom scripts to utilize the gem based currency
that @icomrade added.

maintain_area.sqf: This will now utilize the gem based currency system.

Removed the redundant Z_Vehicle and replaced it with the Epoch built in
DZE_myVehicle

z_at_buyItems: Code tidying and optimization

z_at_checkCloseVehicle: Tidied up the code since removing Z_Vehicle
allowed us to remove some now useless code.

z_at_getVehicleItems: Removed the nearestObjects check for your vehicle
since we now do z_checkCloseVehicle on Advanced trading start up.

* Advanced trading missed redundant variables

As per description

* Advanced trading rework

We don't need to check for close vehicle anymore now for backpack money
since we've made z_vehicle redundant.

* Revert "Advanced trading rework"

This reverts commit a589bd19b9.

* Advanced trading rework

We don't need to check for close vehicle anymore now for backpack money
since we've made z_vehicle redundant.

* Advanced trading rework

More rework

* Remove single currency add/remove coins functions

at request of @ebaydayz.
2016-10-28 19:29:04 -04:00
ebaydayz f770b0a85d Add group system
Initial commit, not tested in multiplayer yet. Some revisions still left
to do.
2016-10-27 16:06:49 -04:00
ebaydayz 84d549d0a1 Revisions for #1777 (#1778)
* Update z_at_buyItems.sqf

* Update z_at_buyItems.sqf

* Update z_at_canAfford.sqf

* Update z_at_fillBuyableList.sqf

All of this is already checked in z_checkCloseVehicle at startup. If Z_VehicleChanges between the time the menu is started and the buyable list is filled it's not a big deal, since it only affects the highlighted color.

* Update server_handleSafeGear.sqf

* Update snappoints.hpp

* Update z_at_buyItems.sqf
2016-10-25 13:59:56 -04:00
oiad bef2506653 Advanced trading fixes, server_handleSafeGear human readibility (#1777)
* Advanced trading fixes

Fixes a few issues and a dupe with advanced trading as well as some
localization of where a vehicle key is going.

Z_at_buyItems: Now adds localization for the key getting added to your
toolbelt, backpack and vehicle, this stops players thinking they didn't
get a key when infact it was added to their backpack/vehicle.

Z_at_canAfford.sqf: This fixes a dupe from a bad copy paste for whomever
wrote this script, it was using _backpackMoney in the
z_allowTakingMoneyFromVehicle part, changed to the proper variable
_vehicleMoney.

z_at_fillBuyableList.sqf: this fixes a bug where a vehicle would show
green even when it isn't local, just basically added more checking to
make sure the vehicle it's making green in the list is a) local, b)
alive and that the typeOf == _name.

z_at_logTrade.sqf: fixes some tidyness.

advancedTrading/init.sqf: adds a z_checkCloseVehicle call otherwise even
with Z_AllowTakingMoneyFromVehicle = true it will not get currency from
your vehicle until you clicked on the "Vehicle" tab.

dayz_server/server_tradeObject.sqf: More tidying as per the
z_at_logTrade and removes the useless Player:, as it is obvious a player
has bought something not an AI.

dayz_server/server_handleSafeGear.sqf: Makes the diag_log at the end
more human readable with GPS coordinates as well as the lock code for
the safe or the lockbox.

* advanced trading fixes. I hate you github

WHY U GET MISSED?? STUPID GITHUB.

* snappoints changes

Fixes the issue @SmokeyBR reported
https://github.com/EpochModTeam/DayZ-Epoch/issues/1766#issuecomment-253864795
Adds all floor types to snap list for all barriers so you can snap a
sandbag etc to a floor instead of manually lining it up
2016-10-25 13:10:48 -04:00
ebaydayz 6713c1cf70 Lower nutrition values for push plane
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/81297c8e26ff24bd7094d722a4edfdbf0efaceec

Now using the same as refuel.

It takes a lot of pushes to move the plane any significant distance
(usually 10-20).
2016-10-20 15:28:23 -04:00
ebaydayz 869e95eb2c Fix wrong variable name in z_at_calcFreeSpace
I didn't catch this mistake before because _backpack was not in the private array, so it was still defined from the script that called this function. Thanks @oiad
2016-10-18 15:56:45 -04:00
ebaydayz 228ac99eb1 Set body studied status globally so confirmed kill is only added once
https://github.com/DayZMod/DayZ/commit/7402b240df8dadd0e11f95885721cd0e7de87599
ensures _source will always be a player, so it's no longer necessary to
check that.

Vanilla commit:

https://github.com/DayZMod/DayZ/commit/a8c9eaebe0fed9d88c30d9e8a16bce8272df1624
2016-10-17 16:11:54 -04:00
ebaydayz 84d58a5932 Update vanilla chop wood and mine stone tool break chance
Vanilla commits applied:

https://github.com/DayZMod/DayZ/commit/50107678494d481d1944a465faa0eeb9f7325936

https://github.com/DayZMod/DayZ/commit/ac39f46a8c5bd0c3eeb908e4ac147f7762027a47
2016-10-15 17:15:31 -04:00
ebaydayz 7ddee142b0 Update confirmed kills system
Vanilla commits applied:

https://github.com/DayZMod/DayZ/commit/347105c036c56a8cac9bb2382aa11b4999b39063

https://github.com/DayZMod/DayZ/commit/e6b6814f51a34d84ccf47cb5551727a2c29dc75d

https://github.com/DayZMod/DayZ/commit/1009828d8e9998ab06c2da5c3fe3a0c917abde66
2016-10-15 15:08:48 -04:00
ebaydayz 81aed28f87 Update vanilla break in chance for tool damage
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/9de0fbd15f0cd16cc2fa831acfa8361ff1d7dfe7
2016-10-15 14:29:30 -04:00
ebaydayz 2ee3d44b87 Fix blood regen with classic nutrition system
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/d1542874b130398995dc21f47a540ff94873349f
2016-10-15 14:05:15 -04:00
ebaydayz a6cb29aa7e Prevent spamming sleep on tent
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/e9df65bc56eff371a2f40209ee7b5c339a6c05f3
2016-10-15 12:04:44 -04:00
ebaydayz 916f1733eb Add back melee ammo after removal for BIS_fnc_inv
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/516d1d538c99becacda91c16e617d3df0a8ffc71
2016-10-13 20:26:07 -04:00
icomrade aac372d320 Remove animation for switching clothes
If the gear sync script is called during the animation, the player will
fail the gear sync and not change clothes. After removing the anim this
no longer happens. Also I think this is a BS change that only
inconveniences the player and makes something that is already cumbersome
even more so
2016-10-13 11:40:54 -04:00
ebaydayz f8f9fbc57a Play medic animation when changing clothes
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/b91c850f5f8d54135d66d767d52f95f0759f0635
2016-10-10 16:45:57 -04:00
icomrade 920c359e46 Adjust nutrition values and exclude chainsaw
Everytime a piece of wood was spawned resulting from a chainsaw the
player would become more hungry and thirsty. Obviously in less than 10
seconds this would kill the player if they chopped multiple trees down.
2016-10-10 16:40:01 -04:00
icomrade 0c1e9205ab Remove fuel tank and engine salvage 2016-10-10 16:25:25 -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 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 8c237492b9 Update vanilla player_build
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/fd8e1e2baaf2dc99d8a1ee4e550d7fade22e1ed9
2016-10-05 13:01:40 -04:00
ebaydayz 2109fdba03 Prevent sell from vehicle dupe
Prevents dupe described here:

https://epochmod.com/forum/topic/41891-resource-a-collection-of-anti-dupes/#comment-281324
2016-10-05 12:17:17 -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 de219116a8 Optimize save after trade
See my comment on b806043

Veh_setFixServer only runs on the server, so the client does not need to
compile it.

The PVDZ_veh_Save PVEH is only added on the server, so it should never
be sent with regular publicVariable anymore.
2016-10-02 15:44:51 -04:00
ebaydayz 91f168011c Remove unused variable from #1770
_inventoryMoney was unused @oiad
2016-10-02 14:11:20 -04:00
oiad 9fd2f2270b Advance trading gem fixes/localizations (#1771)
* Advanced trading combine/return change

Fixes combining/returnChange to squash gems into usable currency so they
can properly be used in the economy
Stringtable fixes for duplicates

* Localization additions

More localizations
2016-10-02 13:06:31 -04:00
ebaydayz 15b05dc84b Fix return change free space check when buying into vehicle
This fixes incorrect return of "not enough space to accept change" when
purchasing large quantities of magazines into a vehicle.

Thanks @oiad for noticing this.
2016-09-27 19:09:54 -04:00
ebaydayz f15db73072 Update vanilla player_build
Vanilla commits:

https://github.com/DayZMod/DayZ/commit/f1e12509e13904a6253c3cd3a5b6b0d1ee01d0d1

https://github.com/DayZMod/DayZ/commit/ce98e0b1d5f78d871a3c7f4feecdfbcd85381f9d
2016-09-27 17:15:43 -04:00
oiad c02053176d Advanced trading bugfix, Snap building typo and snap point fixes
Fixes a bug with advanced trading green "you have this item" text in
buyables list, this was showing you had the item when you didn't.
Snap building typo
Snap building snap points for large cinder walls as reported by
@SmokeyBR
https://github.com/EpochModTeam/DayZ-Epoch/issues/1766#issuecomment-248021073
2016-09-24 18:53:02 +12:00
ebaydayz cc03256475 Update purchased vehicle spawn location
If there was no helipad available findSafePos was called. If that failed
it spawned the vehicle in the debug zone.

Calling findSafePos is no longer necessary since we are now using
createVehicle "NONE".
2016-09-22 18:12:52 -04:00
ebaydayz b315c15cb0 Update vanilla chop wood
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/1bca53125459c2769af7bd6b583c8b8d9bbc16d9
2016-09-21 18:43:23 -04:00
ebaydayz 5e71793c17 Update vanilla building
Vanilla commits applied:

https://github.com/DayZMod/DayZ/commit/44f2552ff2b4baf9dd9391f7705bd05647c02267

https://github.com/DayZMod/DayZ/commit/213a333ce505b7e5e60bd1f5f0c2721f06a52267

https://github.com/DayZMod/DayZ/commit/423d53299dbddf37174133f3795b7050ab715df4

https://github.com/DayZMod/DayZ/commit/43bce6554f747e1831a13338523f6e2964236acb

https://github.com/DayZMod/DayZ/commit/f551cdac6e449d25ad30e373af30abb16fa98df0
2016-09-21 17:14:13 -04:00
ebaydayz ef065aeb35 Fix plot management buildables in range display count
See #1735
2016-09-21 15:52:14 -04:00
ebaydayz ac95c6b0df Make plot and door friends lists backwards compatible
This prevents errors when upgrading 1051 databases that had plot or door
management installed.

See comments at:

https://github.com/EpochModTeam/DayZ-Epoch/commit/fe9b8fdcb4b5cf069e0cc287b97785a3448817c8
2016-09-19 20:21:27 -04:00
icomrade c97015fb9a Re-add removal of fuel tanks and engine
Thanks for the tip on fuel tanks @SmokeyBR
2016-09-19 14:11:45 -04:00
icomrade 91e5e875c2 Force save after building and maintain 2016-09-19 13:48:27 -04:00
ebaydayz 7415c21c2b Small update to object_build
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/a10173443b4d47d4f9739a50759d68c27b6340df
2016-09-15 12:48:31 -04:00
ebaydayz 815b54ec44 Fix gut dog
Body was disappearing because it had no meat on it (yield = 0). Thanks
@AirwavesMan
2016-09-14 16:42:25 -04:00
ebaydayz 29c16dc59f Consolidate duplicate sell distance variables 2016-09-12 14:14:38 -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
oiad fed89a0ed2 Advanced trading and safe GUI changes (#1762)
* Advanced trading and safe GUI changes

This adds displaying of item/backpack/weapon/vehicle descriptions
Moves Weapons display on vehicles to a modular type, so if the vehicle
has no weapons it wont display, same with Description

Fixes an issue with safes not sounding keyclicks, at present they are
only active if you have music turned on, since I don't play with music
on (and many others) you will never hear them and when you do, the DTMF
signals they use are really obnoxious.

Replaced the sound with the one from the lockboxes, it's still audible
but very reasonable.

* Advanced trading fixes

Rework for my previous commit @ebaydayz

* Localization additions

Missing from previous commit
2016-09-10 12:09:27 -04:00
ebaydayz f57e303355 Update vanilla fence building
Vanilla commits applied:

https://github.com/DayZMod/DayZ/commit/e88a5c42bc86f91d254104b13064f83a2dd23a76

https://github.com/DayZMod/DayZ/commit/fe9564351108ae72496592b3bd741a5064b84ccd

https://github.com/DayZMod/DayZ/commit/9a82b8307c523046773b9cd3440c387c7155d70e

https://github.com/DayZMod/DayZ/commit/5a305198c70b1c3bdf7fbf055f550cf3a2d14001

https://github.com/DayZMod/DayZ/commit/be872601c96e526cb443b6ad47eb71fdf6618775

https://github.com/DayZMod/DayZ/commit/44a25b1b4a86d17ecf0780ba322513d756d1cbb1

https://github.com/DayZMod/DayZ/commit/7bfeab3c13b3835c5f134b39a15c8eae948a21b7

https://github.com/DayZMod/DayZ/commit/cc5f02a41ae7cba9d0312463caf48f46eed9cdad
2016-09-10 11:25:10 -04:00
ebaydayz 8f25cc70db Localize sell and buy only messages
PrimaryWeapon always returns "", never nil unless the player object
isNull (in which case this script would not be running).

Fixed cases where a nil variable would throw an error when checking the
next condition.
2016-09-09 13:53:20 -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
https://github.com/EpochModTeam/DayZ-Epoch/commit/3292d84b857f307571af9233dcfffe9d59a0b5e9
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
ebaydayz 530ed4b3b4 Only exit for playerNear if supply crate wreck or mine wreck 2016-09-03 20:16:21 -04:00
icomrade ffef031863 Allow disabling of buying or selling
Set price of the item to -1 in the Cfg traders files to disallow buying
or selling
2016-09-03 14:26:43 -04:00
ebaydayz 7be75c4674 Remove random unused faco code 2016-09-02 13:25:51 -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
https://github.com/EpochModTeam/DayZ-Epoch/commit/8f58baf3f286454a9f398517dc4f1980bd4d5c8e
2016-08-28 20:13:25 +12:00
ebaydayz 755adc7798 Initialize CurrencyName in configVariables.sqf
https://github.com/EpochModTeam/DayZ-Epoch/issues/1712#issuecomment-242927452
2016-08-27 15:09:49 -04:00
ebaydayz 04b6711822 Round humanity in journal
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/145ec00b76914597f4d7454ba09de83f44887ec9
2016-08-27 10:11:49 -04:00