Skip to content

Commit

Permalink
continue food fixes + misc
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverSokolova committed Oct 20, 2023
1 parent e8a59bb commit 0b27648
Show file tree
Hide file tree
Showing 84 changed files with 504 additions and 269 deletions.
3 changes: 3 additions & 0 deletions IFD_statuseffects.config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@

,[{"op":"add","path":"/effectNames/sb_maxenergyboost5","value":{"path":"/stats/effects/maxenergyboost/sb_maxenergyboost5.statuseffect","customLabels":["^#0f0;+ 5 Max Energy^reset;"]}}]
,[{"op":"add","path":"/effectNames/sb_maxenergyboost10","value":{"path":"/stats/effects/maxenergyboost/sb_maxenergyboost10.statuseffect","customLabels":["^#0f0;+ 10 Max Energy^reset;"]}}]
,[{"op":"add","path":"/effectNames/sb_maxenergyboost15","value":{"path":"/stats/effects/maxenergyboost/sb_maxenergyboost15.statuseffect","customLabels":["^#0f0;+ 15 Max Energy^reset;"]}}]
,[{"op":"add","path":"/effectNames/sb_maxenergyboost20","value":{"path":"/stats/effects/maxenergyboost/sb_maxenergyboost20.statuseffect","customLabels":["^#0f0;+ 20 Max Energy^reset;"]}}]
,[{"op":"add","path":"/effectNames/sb_maxenergyboost30","value":{"path":"/stats/effects/maxenergyboost/sb_maxenergyboost30.statuseffect","customLabels":["^#0f0;+ 30 Max Energy^reset;"]}}]
,[{"op":"add","path":"/effectNames/sb_maxenergyboost40","value":{"path":"/stats/effects/maxenergyboost/sb_maxenergyboost40.statuseffect","customLabels":["^#0f0;+ 40 Max Energy^reset;"]}}]

,[{"op":"add","path":"/effectNames/sb_berserk","value":{"path":"/tech/starbound/unscripted/berserk.statuseffect","customLabels":["^#0f0;+ Berserk^reset;"]}}]

Expand Down
5 changes: 4 additions & 1 deletion betabound.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
[3, 57], //manipulator
[3, 39], //paint
[21, 57], //wire
[21, 39] //scan
[21, 39]//scan
],

//the one in player.config isn't read by the game
"defaultItems": ["sb_inspect", "sb_survivalguide-codex", "sb_gunguide-codex"],

"rotFood": true,
"hungerPopups": true,

Expand Down
1 change: 1 addition & 0 deletions betabound.macros
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
for n=1,#i do world.spawnItem(i[n]..'dye',entity.position(),30,{sb_reusable=false,rarity='rare'}) end"
],
"sb_beamaxe": ["/spawnitem sb_beamaxe2 1 '{\"upgrades\":[\"size1\",\"size2\",\"size3\",\"range1\",\"range2\",\"range3\",\"power1\",\"power2\",\"power3\",\"liquidcollection\",\"paintmode\",\"wiremode\"],\"canCollectLiquid\":true,\"blockRadius\":5,\"tileDamage\":4.8,\"minBeamWidth\":8,\"minBeamJitter\":0.2}"],
"sb_repeatversioning": ["/run status.setStatusProperty('xrc_0018z',status.statusProperty('xrc_0018z')-1)"],

//Completion
"sb_tech": ["/entityeval if not world then return end local t=root.assetJson('/tech/starbound/tech.config') for i=1,#t do world.spawnItem('sb_tech',entity.position(),1,{techModule=t[i]}) end"],
Expand Down
75 changes: 58 additions & 17 deletions biomes/surface/forest.biome.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,64 @@
[
[
{"op":"test","path":"/undergroundPlaceables/items"},
{"op":"add","path":"/undergroundPlaceables/items/-","value":{"mode":"floor","priority":0,"variants":1,"distribution":"/biomes/distributions.config:undergroundweaponChests","type":"treasureBox","treasureBoxSets":["sb_gunChest"]}}
[{
"op": "test",
"path": "/undergroundPlaceables/items"
}, {
"op": "add",
"path": "/undergroundPlaceables/items/-",
"value": {
"mode": "floor",
"priority": 0,
"variants": 1,
"distribution": "/biomes/distributions.config:undergroundweaponChests",
"type": "treasureBox",
"treasureBoxSets": ["sb_gunChest"]
}
}
],

[
{"op":"add","path":"/musicTrack/night/tracks/-","value":"/music/sb_forest-exploration1.ogg"},
{"op":"add","path":"/musicTrack/night/tracks/-","value":"/music/sb_forest-exploration2.ogg"},
{"op":"add","path":"/musicTrack/day/tracks/-","value":"/music/forest-loop.ogg"}
[{
"op": "add",
"path": "/musicTrack/night/tracks/-",
"value": "/music/sb_forest-exploration1.ogg"
}, {
"op": "add",
"path": "/musicTrack/night/tracks/-",
"value": "/music/sb_forest-exploration2.ogg"
}, {
"op": "add",
"path": "/musicTrack/day/tracks/-",
"value": "/music/forest-loop.ogg"
}
],

[
{"op":"add","path":"/surfacePlaceables/items/-","value":{
"mode":"floor",
"priority":1,
"variants":1,
"distribution":"/biomes/distributions.config:mainBiomeEncounterDungeon",
"type":"microdungeon",
"microdungeons":["sb_glitchencounter","sb_randomencounter","sb_miniboss"]}
}
[{
"op": "add",
"path": "/surfacePlaceables/items/-",
"value": {
"mode": "floor",
"priority": 1,
"variants": 1,
"distribution": "/biomes/distributions.config:mainBiomeEncounterDungeon",
"type": "microdungeon",
"microdungeons": ["sb_glitchencounter", "sb_randomencounter", "sb_miniboss"]
}
}
],

[{
"op": "add",
"path": "/surfacePlaceables/items/-",
"value": {
"mode": "floor",
"priority": 1,
"variants": 1,
"distribution": "/biomes/distributions.config:denseLarge",
"type": "tree",
"treeFoliageHueShiftMax" : 180,
"treeStemHueShiftMax" : 15,
"treeStemList": ["wood"],
"treeFoliageList": ["greenleaves"]
}
}
]
]
]
Binary file added codex/sb_gun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions codex/sb_gunguide.codex
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"id": "sb_gunguide",
"title": "All About Ammo",
"description": "An informational leaflet about ammunition for guns.",
"icon": "sb_gun.png",
"contentPages": [
"While most guns solely use energy reserves, certain firearms can still use traditional ammunition. They will plainly state 'This weapon can use ammo'.
* 20% damage boost when using any ammo
* Uses energy when ammo is depleted or when ^#71f2f6;SHIFT^reset; is held
* Ammo is automatically used when in the inventory
* Craft ammo at an anvil
* All types of ammo are universally accepted"
],
"itemConfig": {
"rarity": "common",
"tooltipKind": "sb_object",
"price": 25
}
}
23 changes: 23 additions & 0 deletions effects/eating.effectsource.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
[{
"op": "test",
"path": "/definition/start/sounds/0"
}, {
"op": "add",
"path": "/definition/start/sounds/-",
"value": "/sfx/humanoid/eat1.ogg"
}, {
"op": "add",
"path": "/definition/start/sounds/-",
"value": [
"/sfx/humanoid/eat2.ogg"
]
}, {
"op": "add",
"path": "/definition/start/sounds/-",
"value": [
"/sfx/humanoid/eat4.ogg"
]
}
]
]
7 changes: 7 additions & 0 deletions interface/itemdescriptions/sb_gun4.itemdescription
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
"centered": true,
"wrapWidth": 126
},
"ammoLabel": {
"type": "label",
"position": [16, 51],
"hAnchor": "left",
"wrapWidth": 126,
"value": "^green;This weapon can use ammo"
},
"altAbilityLabel": {
"type": "label",
"position": [13.4, 142],
Expand Down
2 changes: 1 addition & 1 deletion interface/tooltips/sb_gun4.tooltip
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"hAnchor": "left",
"vAnchor": "top",
"wrapWidth": 126,
"value": "^gray;Craft ammo at an anvil!"
"value": "^green;This weapon can use ammo"
},
"altAbilityTitleLabel": {
"type": "label",
Expand Down
25 changes: 13 additions & 12 deletions items/active/starbound/feed/electric.activeitem
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"itemName" : "sb_electricfluffalofeed",
"rarity" : "uncommon",
"category" : "farmBeastFeed",
"price" : 250,
"inventoryIcon" : "electric.png",
"description" : "Feed this to a fluffalo calf to raise an Electric Fluffalo - a good source of static cells.",
"tooltipKind" : "sb_object",
"shortdescription" : "Electric Eggplant",
"feedType" : "electric",
"radioMessagesOnPickup" : ["sb_pickupfarmbeastfeed"],
"scripts" : ["feed.lua"]
}
"itemName": "sb_electricfluffalofeed",
"rarity": "uncommon",
"category": "farmBeastFeed",
"price": 250,
"inventoryIcon": "electric.png",
"description": "Feed this to an electric fluffalo calf to accelerate its growth, or to any other calf to change its element.",
"tooltipKind": "sb_object4",
"shortdescription": "Electric Eggplant",
"feedType": "electric",
"radioMessagesOnPickup": ["sb_pickupfarmbeastfeed"],
"animation": "feed.animation",
"scripts": ["feed.lua"]
}
Binary file modified items/active/starbound/feed/electric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 12 additions & 11 deletions items/active/starbound/feed/feed.activeitem
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"itemName" : "sb_fluffalofeed",
"rarity" : "uncommon",
"category" : "farmBeastFeed",
"price" : 250,
"inventoryIcon" : "feed.png",
"description" : "Feed this to a fluffalo calf to raise a common Fluffalo - a good source of plant fibre.", //"Feed this to a fluffalo calf to help it mature.",
"tooltipKind" : "sb_object",
"shortdescription" : "Ordinary Acorn",
"radioMessagesOnPickup" : ["sb_pickupfarmbeastfeed"],
"scripts" : ["feed.lua"]
}
"itemName": "sb_fluffalofeed",
"rarity": "uncommon",
"category": "farmBeastFeed",
"price": 250,
"inventoryIcon": "feed.png",
"description": "Feed this to an unattuned fluffalo calf to accelerate its growth, or to any other calf to remove its element.",
"tooltipKind": "sb_object4",
"shortdescription": "Ordinary Acorn",
"radioMessagesOnPickup": ["sb_pickupfarmbeastfeed"],
"animation": "feed.animation",
"scripts": ["feed.lua"]
}
1 change: 1 addition & 0 deletions items/active/starbound/feed/feed.animation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sounds":{"eat":["/sfx/humanoid/eat1.ogg","/sfx/humanoid/eat2.ogg","/sfx/humanoid/eat3.ogg","/sfx/humanoid/eat4.ogg"]}}
25 changes: 17 additions & 8 deletions items/active/starbound/feed/feed.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
function init()
feed = config.getParameter("feedType","")
require "/scripts/activeitem/sb_swing.lua"
local updat = update
function init() swingInit()
feed = config.getParameter("feedType", "")
range = config.getParameter("interactRadius", root.assetJson("/player.config:interactRadius"))
promised = false
end

function activate()
function swingAction()
local target = world.monsterQuery(activeItem.ownerAimPosition(), 0)[1]
if checkTargetRadius(target) then
i = world.sendEntityMessage(target,"sb_feedFluffalo",feed)
if checkTargetRadius(target) and not promised then
i = world.sendEntityMessage(target, "sb_feedFluffalo", feed)
promised = true
end
end

function update() if promised then if i:finished() and i:result() == true then item.consume(1) promised = false end end end
function update(dt, fireMode, shiftHeld) updat(dt, fireMode, shiftHeld)
if promised then
if i:finished() and i:result() == true then
item.consume(1)
animator.playSound("eat")
promised = nil
end
end
end

function checkTargetRadius(target)
if target and world.entityExists(target) then
local pos = mcontroller.position()
local targetPosition = world.entityPosition(target)
return (world.magnitude(pos, targetPosition) <= range and not world.lineCollision(pos, targetPosition))
return player.isAdmin() or (world.magnitude(pos, targetPosition) <= range and not world.lineCollision(pos, targetPosition))
end
end
Binary file modified items/active/starbound/feed/feed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions items/active/starbound/feed/fire.activeitem
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"itemName" : "sb_firefluffalofeed",
"rarity" : "uncommon",
"category" : "farmBeastFeed",
"price" : 250,
"inventoryIcon" : "fire.png",
"description" : "Feed this to a fluffalo calf to raise a Fire Fluffalo - a good source of scorched cores.",
"tooltipKind" : "sb_object",
"shortdescription" : "Blazing Berry",
"feedType" : "fire",
"radioMessagesOnPickup" : ["sb_pickupfarmbeastfeed"],
"scripts" : ["feed.lua"]
}
"itemName": "sb_firefluffalofeed",
"rarity": "uncommon",
"category": "farmBeastFeed",
"price": 250,
"inventoryIcon": "fire.png",
"description": "Feed this to a fire fluffalo calf to accelerate its growth, or to any other calf to change its element.",
"tooltipKind": "sb_object4",
"shortdescription": "Blazing Berry",
"feedType": "fire",
"radioMessagesOnPickup": ["sb_pickupfarmbeastfeed"],
"animation": "feed.animation",
"scripts": ["feed.lua"]
}
Binary file modified items/active/starbound/feed/fire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions items/active/starbound/feed/ice.activeitem
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"itemName" : "sb_icefluffalofeed",
"rarity" : "uncommon",
"category" : "farmBeastFeed",
"price" : 250,
"inventoryIcon" : "ice.png",
"description" : "Feed this to a fluffalo calf to raise an Ice Fluffalo - a good source of cryonic extract.",
"tooltipKind" : "sb_object",
"shortdescription" : "Frosty Fig",
"feedType" : "ice",
"radioMessagesOnPickup" : ["sb_pickupfarmbeastfeed"],
"scripts" : ["feed.lua"]
}
"itemName": "sb_icefluffalofeed",
"rarity": "uncommon",
"category": "farmBeastFeed",
"price": 250,
"inventoryIcon": "ice.png",
"description": "Feed this to an ice fluffalo calf to accelerate its growth, or to any other calf to change its element.",
"tooltipKind": "sb_object4",
"shortdescription": "Frosty Fig",
"feedType": "ice",
"radioMessagesOnPickup": ["sb_pickupfarmbeastfeed"],
"animation": "feed.animation",
"scripts": ["feed.lua"]
}
Binary file modified items/active/starbound/feed/ice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions items/active/starbound/feed/poison.activeitem
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"itemName" : "sb_poisonfluffalofeed",
"rarity" : "uncommon",
"category" : "farmBeastFeed",
"price" : 250,
"inventoryIcon" : "poison.png",
"description" : "Feed this to a fluffalo calf to raise a Poison Fluffalo - a source of venom samples.",
"tooltipKind" : "sb_object",
"shortdescription" : "Poison Pear",
"feedType" : "poison",
"radioMessagesOnPickup" : ["sb_pickupfarmbeastfeed"],
"scripts" : ["feed.lua"]
}
"itemName": "sb_poisonfluffalofeed",
"rarity": "uncommon",
"category": "farmBeastFeed",
"price": 250,
"inventoryIcon": "poison.png",
"description": "Feed this to a poison fluffalo calf to accelerate its growth, or to any other calf to change its element.",
"tooltipKind": "sb_object4",
"shortdescription": "Poison Pear",
"feedType": "poison",
"radioMessagesOnPickup": ["sb_pickupfarmbeastfeed"],
"animation": "feed.animation",
"scripts": ["feed.lua"]
}
Binary file modified items/active/starbound/feed/poison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion items/buildscripts/starbound/randomdrop.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function build(_, config, parameters, level)
config.itemName = root.createTreasure(parameters.pool or config.pool, level or 0, math.random(1, 4294967295))[1].name
config.itemName = root.createTreasure(parameters.pool or config.pool, level or 0)[1].name
return config, {}
end
Loading

0 comments on commit 0b27648

Please sign in to comment.