placeable objects + small tweaks
skills booboo. This should do it (working properly now) utility shortnames used for command buttons getter en.json added placeable tags (was missing 1) NEEDS OTHER CONVERSIONS Placer: Lots of stuff. Pass model and settings. Refer to .lua for setting params
This commit is contained in:
1 parent
5dc2321d67
commit
725a86ed8d
4 files changed
+720
-528
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -481,7 +481,7 @@ end
|
||||
---@param value T The value to match against the cases
|
||||
---@param cases table<T|false, fun(): any> Table with case functions and an optional default (false key)
|
||||
---@return any|false result The return value of the matched case function, or false if none matched
|
||||
function Utility.Switch(value, cases)
|
||||
function Utility.Switch(value, cases)
|
||||
local caseFunc = cases[value] or cases[false]
|
||||
|
||||
if caseFunc and type(caseFunc) == "function" then
|
||||
@@ -542,19 +542,19 @@ function Utility.GetZoneName(coords)
|
||||
end
|
||||
|
||||
local SpecialKeyCodes = {
|
||||
['b_116'] = 'WheelMouseMove.Up',
|
||||
['b_115'] = 'WheelMouseMove.Up',
|
||||
['b_100'] = 'MouseClick.LeftClick',
|
||||
['b_101'] = 'MouseClick.RightClick',
|
||||
['b_102'] = 'MouseClick.MiddleClick',
|
||||
['b_103'] = 'MouseClick.ExtraBtn1',
|
||||
['b_104'] = 'MouseClick.ExtraBtn2',
|
||||
['b_105'] = 'MouseClick.ExtraBtn3',
|
||||
['b_106'] = 'MouseClick.ExtraBtn4',
|
||||
['b_107'] = 'MouseClick.ExtraBtn5',
|
||||
['b_108'] = 'MouseClick.ExtraBtn6',
|
||||
['b_109'] = 'MouseClick.ExtraBtn7',
|
||||
['b_110'] = 'MouseClick.ExtraBtn8',
|
||||
['b_116'] = 'Scroll Up',
|
||||
['b_115'] = 'Scroll Down',
|
||||
['b_100'] = 'LMB',
|
||||
['b_101'] = 'RMB',
|
||||
['b_102'] = 'MMB',
|
||||
['b_103'] = 'Extra 1',
|
||||
['b_104'] = 'Extra 2',
|
||||
['b_105'] = 'Extra 3',
|
||||
['b_106'] = 'Extra 4',
|
||||
['b_107'] = 'Extra 5',
|
||||
['b_108'] = 'Extra 6',
|
||||
['b_109'] = 'Extra 7',
|
||||
['b_110'] = 'Extra 8',
|
||||
['b_1015'] = 'AltLeft',
|
||||
['b_1000'] = 'ShiftLeft',
|
||||
['b_2000'] = 'Space',
|
||||
|
||||
+5
-4
@@ -20,9 +20,10 @@
|
||||
"placeable_object": {
|
||||
"no_prop_defined": "You didnt define any object to place",
|
||||
"cant_place_here": "You can't place this object here",
|
||||
"place_object_place": "[E] Place \n",
|
||||
"place_object_cancel": "[X] Cancel \n",
|
||||
"place_object_scroll_up": "[SCROLL UP] Turn right \n",
|
||||
"place_object_scroll_down": "[SCROLL DOWN] Turn left"
|
||||
"place_object_place": "[%s] Place \n",
|
||||
"place_object_cancel": "[%s] Cancel \n",
|
||||
"place_object_scroll_up": "[%s] Turn right \n",
|
||||
"place_object_scroll_down": "[%s] Turn left \n",
|
||||
"depth_modifier": "[%s] Depth Control Modifier \n"
|
||||
}
|
||||
}
|
||||
@@ -98,20 +98,10 @@ Skills.AddXP = function(src, skillName, xp)
|
||||
|
||||
local xpNeeded = Skills.GetXPRequiredForLevel(oldLevel + 1)
|
||||
if currentXP >= xpNeeded then
|
||||
currentXP = currentXP - xpNeeded -- Subtract the XP used for this level
|
||||
currentXP = currentXP - xpNeeded
|
||||
oldLevel = oldLevel + 1
|
||||
end
|
||||
|
||||
|
||||
-- -- If we leveled up, ensure currentXP doesn't exceed the new level's requirement
|
||||
-- if newLevel > oldLevel then
|
||||
-- local newLevelRequirement = Skills.GetXPRequiredForLevel(newLevel)
|
||||
-- if currentXP >= newLevelRequirement then
|
||||
-- currentXP = newLevelRequirement - 1 -- Cap at requirement - 1
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- Update skill
|
||||
skill.level = oldLevel
|
||||
skill.currentXP = currentXP
|
||||
playerSkills[skillName] = skill
|
||||
|
||||
Reference in new issue
Block a user