mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
removed spawn credit perk
This commit is contained in:
parent
70a5fd4db3
commit
57b08f27e4
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
RotorOpsPerks = {}
|
RotorOpsPerks = {}
|
||||||
RotorOpsPerks.version = "1.5.2"
|
RotorOpsPerks.version = "1.5.3"
|
||||||
env.warning('ROTOROPS PERKS STARTED: '..RotorOpsPerks.version)
|
env.warning('ROTOROPS PERKS STARTED: '..RotorOpsPerks.version)
|
||||||
trigger.action.outText('ROTOROPS PERKS STARTED: '..RotorOpsPerks.version, 10)
|
trigger.action.outText('ROTOROPS PERKS STARTED: '..RotorOpsPerks.version, 10)
|
||||||
RotorOpsPerks.perks = {}
|
RotorOpsPerks.perks = {}
|
||||||
@ -31,7 +31,7 @@ RotorOpsPerks.player_update_messages = true --set to false to disable messages w
|
|||||||
RotorOpsPerks.debug = false
|
RotorOpsPerks.debug = false
|
||||||
|
|
||||||
RotorOpsPerks.points = {
|
RotorOpsPerks.points = {
|
||||||
player_default=1000, --how many points each player will start with
|
player_default=0, --how many points each player will start with
|
||||||
kill=10,
|
kill=10,
|
||||||
kill_inf=5,
|
kill_inf=5,
|
||||||
kill_heli=20,
|
kill_heli=20,
|
||||||
|
|||||||
@ -28,46 +28,50 @@ function RotorOpsServer.endMission(secs)
|
|||||||
countdown()
|
countdown()
|
||||||
end
|
end
|
||||||
|
|
||||||
function RotorOpsServer.convertPointsToSpawnCredits(playerName, points)
|
|
||||||
if dcsbot then
|
|
||||||
env.info("RotorOpsServer: Converting "..points.." points to spawn credits for "..playerName)
|
|
||||||
dcsbot.addUserPoints(playerName, points)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
function RotorOpsServer.addPerks()
|
--The following code for integrating the server bot spawn credits with PERKS works fine, but it needs to
|
||||||
env.info("RotorOpsServer: Adding perks to RotorOpsPerks.")
|
-- be moved to a server script so it's not dependent on this mission script.
|
||||||
---- PERKS: Convert points to spawn credits ----
|
|
||||||
|
|
||||||
RotorOpsPerks.perks["spawnCredits"] = {
|
-- function RotorOpsServer.convertPointsToSpawnCredits(playerName, points)
|
||||||
perk_name='spawnCredits',
|
-- if dcsbot then
|
||||||
display_name='Buy 10 Spawn Credits',
|
-- env.info("RotorOpsServer: Converting "..points.." points to spawn credits for "..playerName)
|
||||||
cost=50,
|
-- dcsbot.addUserPoints(playerName, points)
|
||||||
cooldown=0,
|
-- return true
|
||||||
max_per_player=1000,
|
-- end
|
||||||
max_per_mission=1000,
|
-- return false
|
||||||
at_mark=false,
|
-- end
|
||||||
at_position=true,
|
--
|
||||||
enabled=true,
|
-- function RotorOpsServer.addPerks()
|
||||||
sides={0,1,2},
|
-- env.info("RotorOpsServer: Adding perks to RotorOpsPerks.")
|
||||||
}
|
-- ---- PERKS: Convert points to spawn credits ----
|
||||||
|
--
|
||||||
RotorOpsPerks.perks.spawnCredits["action_function"] = function(args)
|
-- RotorOpsPerks.perks["spawnCredits"] = {
|
||||||
local playerName = Unit.getByName(args.player_unit_name):getPlayerName()
|
-- perk_name='spawnCredits',
|
||||||
return RotorOpsServer.convertPointsToSpawnCredits(playerName, 10)
|
-- display_name='Buy 100 Spawn Slot Credits',
|
||||||
end
|
-- cost=100,
|
||||||
|
-- cooldown=0,
|
||||||
---- End of Spawn Credits Perk ----
|
-- max_per_player=1000000,
|
||||||
|
-- max_per_mission=1000000,
|
||||||
end
|
-- at_mark=false,
|
||||||
|
-- at_position=true,
|
||||||
if dcsbot then
|
-- enabled=true,
|
||||||
RotorOpsServer.addPerks()
|
-- sides={0,1,2},
|
||||||
else
|
-- }
|
||||||
env.warning("RotorOpsServer: DCSBot not found. Perks not added.")
|
--
|
||||||
end
|
-- RotorOpsPerks.perks.spawnCredits["action_function"] = function(args)
|
||||||
|
-- local playerName = Unit.getByName(args.player_unit_name):getPlayerName()
|
||||||
|
-- return RotorOpsServer.convertPointsToSpawnCredits(playerName, 100)
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- ---- End of Spawn Credits Perk ----
|
||||||
|
--
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- if dcsbot then
|
||||||
|
-- RotorOpsServer.addPerks()
|
||||||
|
-- else
|
||||||
|
-- env.warning("RotorOpsServer: DCSBot not found. Perks not added.")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user