Skip to content

Commit

Permalink
make energy drinks work again
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Nov 21, 2023
1 parent 44b3576 commit 2c8288e
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 42 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Date: ???
- moved the arqad used comb recycling recipe from arqad stage 2 to arqad stage 1
- added new recipes for creating wax from sugar and honey
- updated the locale for caravan gui to better explain what the actions do
- added a very nice, very safe, very healthy effect when drinking an energy drink
Bhoddos:
- bhoddos chain was completely reworked. previously this fungus suffered from 'lack of identity'. its changed to be a biological version of a fission reactor
- added nuclear reactor to bhoddos culture building recipe
Expand Down
13 changes: 13 additions & 0 deletions data-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -538,3 +538,16 @@ if register_cache_file ~= nil then
register_cache_file({"pycoalprocessing","pyfusionenergy","pyindustry","pyrawores","pypetroleumhandling","pyalienlife"}, "__pyalienlife__/cached-configs/pyalienlife+pycoalprocessing+pyfusionenergy+pyindustry+pypetroleumhandling+pyrawores")
register_cache_file({"pycoalprocessing","pyfusionenergy","pyindustry","pyrawores","pyhightech","pypetroleumhandling","pyalienlife"}, "__pyalienlife__/cached-configs/pyalienlife+pycoalprocessing+pyfusionenergy+pyhightech+pyindustry+pypetroleumhandling+pyrawores")
end

-- make players flammable
for _, character in pairs(data.raw.character) do
if character.flags then
local new_flags = {}
for _, flag in pairs(character.flags) do
if flag ~= 'not-flammable' then
table.insert(new_flags, flag)
end
end
character.flags = new_flags
end
end
1 change: 1 addition & 0 deletions data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ end
--(( ITEMS ))--
require('prototypes/items/items')
require('prototypes/items/items2')
require('prototypes/items/energy-drink')
require('prototypes/biofluid/guano')

if mods['pyhightech'] then
Expand Down
1 change: 1 addition & 0 deletions locale/en/entity.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[entity-name]
speedup-sticker=Speedup sticker
seaweed=Seaweed
moss-farm-mk01=Moss farm MK 01
moss-farm-mk02=Moss farm MK 02
Expand Down
2 changes: 1 addition & 1 deletion locale/en/techs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ mega-farm-yotoi=Unlock the yotoi range of automated seedling recipes.
mega-farm-kicalk=Unlock the kicalk range of automated seedling recipes.
mega-farm-cadaveric-arum=Unlock the cadaveric arum range of automated seedling recipes.
mega-farm-bioreserve=Unlock the Bioreserve range of automated seedling recipes.
energy-drink=Unlocks the energy drink chain.
energy-drink=Burden breaker.
chitin=Unlocks chitin processing into chitosan and all its variants.
phytomining=Develop your plants' and natural fungi capabilities to allow growth in water with very high concentrations of metals, absorbing these metals through their roots, and concentrating extremely high levels of metals in their tissues.
phytomining-mk02=Adding chelators to the crops will increase the output of rich biomass.
Expand Down
79 changes: 79 additions & 0 deletions prototypes/items/energy-drink.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
ITEM {
type = 'capsule',
name = 'energy-drink',
icon = '__pyalienlifegraphics__/graphics/icons/energy-drink.png',
icon_size = 64,
flags = {},
subgroup = 'py-alienlife-items',
order = 'f',
stack_size = 100,
capsule_action = {
attack_parameters = {
activation_type = 'consume',
ammo_category = 'capsule',
ammo_type = {
action = {
action_delivery = {
target_effects = {
{
sticker = 'speedup-sticker',
type = 'create-sticker'
},
{
entity_name = 'slowdown-capsule-explosion',
type = 'create-entity'
},
{
sound = {
{
filename = '__base__/sound/eat.ogg',
volume = 0.6
},
{
filename = '__base__/sound/eat-1.ogg',
volume = 0.6
},
{
filename = '__base__/sound/eat-2.ogg',
volume = 0.6
},
{
filename = '__base__/sound/eat-3.ogg',
volume = 0.6
},
{
filename = '__base__/sound/eat-4.ogg',
volume = 0.6
}
},
type = 'play-sound'
}
},
type = 'instant'
},
type = 'direct'
},
category = 'capsule',
target_type = 'position'
},
cooldown = 30,
range = 0,
type = 'projectile'
},
type = 'use-on-self'
}
}

local speedup_sticker = table.deepcopy(data.raw['sticker']['slowdown-sticker'])
speedup_sticker.name = 'speedup-sticker'
speedup_sticker.spread_fire_entity = 'fire-flame-on-tree'
speedup_sticker.fire_spread_radius = 3
speedup_sticker.duration_in_ticks = 60 * 60
speedup_sticker.damage_interval = 70
speedup_sticker.damage_per_tick = {
amount = 8,
type = 'fire'
}
speedup_sticker.target_movement_modifier_from = 1
speedup_sticker.target_movement_modifier_to = 40
data:extend{speedup_sticker}
41 changes: 0 additions & 41 deletions prototypes/items/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4665,47 +4665,6 @@ ITEM {
stack_size = 100
}

ITEM {
type = "capsule",
name = "energy-drink",
icon = "__pyalienlifegraphics__/graphics/icons/energy-drink.png",
icon_size = 64,
flags = {},
subgroup = "py-alienlife-items",
order = "f",
stack_size = 100,
capsule_action =
{
type = "use-on-self",
attack_parameters =
{
type = "projectile",
ammo_category = "capsule",
cooldown = 30,
range = 0,

ammo_type =
{
category = "capsule",
target_type = "position",
action =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
damage = {type = "physical", amount = 0}
}
}
}
}
}
},
}

ITEM {
type = "capsule",
name = "dried-meat",
Expand Down

0 comments on commit 2c8288e

Please sign in to comment.