Skip to content

Commit

Permalink
Merge pull request #3563 from edwardspec/gps-show-exact-planet-tier
Browse files Browse the repository at this point in the history
GPS: show exact planet tier
  • Loading branch information
sayterdarkwynd authored May 14, 2024
2 parents 3f9d6d3 + 2b0fbc3 commit 3300897
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
23 changes: 2 additions & 21 deletions interface/kukagps/kukagps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ function populateMaterialsList()
addText("^green;Width:^reset; "..worldSize[1].." ^green;Height:^reset; "..worldSize[2])

-- print planet threat and gravity
addText("^green;Threat:^reset; "..ThreatToString(parameters.threatLevel).." ^green;Gravity:^reset; "..parameters.gravity or 0)
addText(string.format("^green;Planet tier / Threat:^reset; %.2f", parameters.threatLevel))
addText("^green;Gravity:^reset; "..(parameters.gravity or 0))

-- print planet ores names
addText("^green;Ores:^reset; ")
Expand Down Expand Up @@ -338,26 +339,6 @@ function populateMaterialsList()
end

-- contribution of zimberzimber
strs = {
"Harmless (I)",
"Low (II)",
"Moderate (III)",
"Risky (IV)",
"Dangerous (V)",
"Extreme (VI)",
"Lethal (VII)",
"Impossible (VIII)",
"Immeasurable (IX)",
"Just No (X)",
"No (XI)",
}

function ThreatToString(threat)
local floored = math.max(math.floor(threat) + 1, 1)
return strs[floored] or strs[#strs]
end
-- contribution of zimberzimber

function string_split(str, pat)
local t = {} -- NOTE: use {n = 0} in Lua-5.0
local fpat = "(.-)" .. pat
Expand Down
2 changes: 1 addition & 1 deletion items/active/weapons/ranged/unique/gravgun.activeitem
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

"scripts" : ["/items/active/weapons/ranged/gun.lua"],

"elementalType" : "physical",
"elementalType" : "cosmic",

"primaryAbility" : {
"scripts" : ["/items/active/weapons/ranged/gunfire.lua"],
Expand Down

0 comments on commit 3300897

Please sign in to comment.