Skip to content

Commit

Permalink
mounts part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Jan 14, 2024
1 parent 3b9f20c commit 3863a2e
Show file tree
Hide file tree
Showing 14 changed files with 8,331 additions and 8,578 deletions.
9 changes: 9 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ require 'scripts/turd/turd'
require 'scripts/vatbrain/vatbrain'
require 'scripts/ulric/ulric'
require 'scripts/biofluid/biofluid'
require 'scripts/mounts/mounts'

local function discoscience()
if remote.interfaces['DiscoScience'] and remote.interfaces['DiscoScience']['setIngredientColor'] then
Expand Down Expand Up @@ -122,6 +123,7 @@ local function init()
Vatbrain.events.on_init()
Ulric.events.on_init()
Biofluid.events.on_init()
Mounts.events.on_init()
end

script.on_init(function()
Expand Down Expand Up @@ -149,6 +151,7 @@ script.on_event(on_built, function(event)
Turd.events.on_built(event)
Vatbrain.events.on_built(event)
Biofluid.events.on_built(event)
Mounts.events.on_built(event)
end)

script.on_event(defines.events.on_ai_command_completed, function(event)
Expand All @@ -166,6 +169,11 @@ script.on_event(on_destroyed, function(event)
Turd.events.on_destroyed(event)
Vatbrain.events.on_destroyed(event)
Biofluid.events.on_destroyed(event)
Mounts.events.on_destroyed(event)
end)

script.on_event(defines.events.on_player_removed_equipment, function(event)
Mounts.events.on_player_removed_equipment(event)
end)

script.on_event(defines.events.on_gui_opened, function(event)
Expand Down Expand Up @@ -204,6 +212,7 @@ script.on_nth_tick(61, Digosaurus.events[61])
script.on_nth_tick(121, Farming.events[121])
script.on_nth_tick(143, Biofluid.events[143])
script.on_nth_tick(221, Oculua.events[221])
script.on_nth_tick(239, Mounts.events[239])
script.on_nth_tick(397, Ulric.events[397])
script.on_nth_tick(432000, Turd.events[432000])

Expand Down
3 changes: 2 additions & 1 deletion data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,9 @@ require 'prototypes/buildings/outpost-aerial'
require 'prototypes/creatures/digosaurus'
require 'prototypes/creatures/thikats'
require 'prototypes/creatures/work-o-dile'
require 'prototypes/creatures/dingrido'
require 'prototypes/creatures/crawdad'
require 'prototypes/creatures/dingrido'
require 'prototypes/creatures/mecha-zungror'
require 'prototypes/creatures/phadaisus'
require 'prototypes/creatures/ocula'
require 'prototypes/creatures/ulric-man'
Expand Down
8 changes: 7 additions & 1 deletion locale/en/extras.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ rc-mk04=Select a creature for reproduction
select-recipe=Select recipe

[oculua]
wandering=An ocula was stranded! [gps=__1__, __2__]
wandering=An ocula was stranded! [gps=__1__, __2__]

[equipment-name]
py-mount-generator=Biological engine

[equipment-description]
py-mount-generator=This creature is able to generate energy from its own body. It can be used as a power source for equipment grid modules.
11 changes: 7 additions & 4 deletions locale/en/groups.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ py-alienlife=Py Alien Life

[fuel-category-name]
bio-container=Bio containers
food=Food
auog=Auog
simik=Simik
dingrits=Dingrit
auog=Auogs
simik=Simiks
dingrits=Dingrits

fish=Fish
dingrit-food=Dingrit food
gastrocapacitor=Gastrocapacitor
phadai-food=Phadai food
3 changes: 1 addition & 2 deletions locale/en/recipes.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,4 @@ yotoi-fruit-gmo-mk02=Genetically engineer a more juicy fruit
yotoi-seeds-mk02=Need to keep the fruit frozen to keep them from ripping and ruining the seeds during the harvesting process
yotoi-mk02=Breed more improved yotoi
yotoi-fruit-mk02=Chill the yotoi to force them to open there leaves to harvest the fruit
heating-system-cheap=After years of research, it turns out that you actually don't need to make simple components out of the absolute most expensive materials.
spidertron=What the fuck is a spidertron.
heating-system-cheap=After years of research, it turns out that you actually don't need to make simple components out of the absolute most expensive materials.
80 changes: 60 additions & 20 deletions prototypes/creatures/crawdad.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
local util = require('util')

local categories = table.deepcopy(data.raw['equipment-grid']['spidertron-equipment-grid']['equipment_categories'])
categories[#categories + 1] = 'py-mount-generator'
for i = 4, 10, 2 do
data:extend{{
name = 'mount-grid-10x' .. i,
type = 'equipment-grid',
width = 10,
height = i,
equipment_categories = categories
}}
end

data:extend{
{
name = 'py-mount-generator',
type = 'generator-equipment',
power = '1W',
categories = {'py-mount-generator'},
shape = {
type = 'full',
width = 4,
height = 4,
},
energy_source = {
usage_priority = 'secondary-input',
type = 'electric',
},
sprite = {
filename = '__pyalienlifegraphics__/graphics/heart.png',
size = {256, 256},
},
},
{
name = 'py-mount-generator',
type = 'equipment-category',
},
{
type = 'item',
name = 'py-mount-generator',
icon = '__core__/graphics/empty.png',
icon_size = 1,
stack_size = 1,
subgroup = 'py-alienlife-buildings-others',
flags = {'hidden', 'not-stackable', 'only-in-cursor'},
}
}

RECIPE {
type = 'recipe',
name = 'crawdad',
Expand All @@ -25,11 +72,13 @@ ITEM {
type = 'item-with-entity-data',
name = 'crawdad',
icon = '__pyalienlifegraphics__/graphics/icons/crawdad.png',
icon_tintable = '__pyalienlifegraphics__/graphics/icons/crawdad.png',
icon_size = 64,
subgroup = 'py-alienlife-special-creatures',
order = 'x',
place_result = 'crawdad',
stack_size = 10
stack_size = 10,
icon_tintable_mask = '__pyalienlifegraphics__/graphics/icons/mount-mask.png',
}

data:extend{{
Expand All @@ -40,7 +89,8 @@ data:extend{{
flags = {'placeable-neutral', 'player-creation', 'placeable-off-grid', 'not-flammable'},
minable = {mining_time = 0.5, result = 'crawdad'},
mined_sound = {filename = '__core__/sound/deconstruct-medium.ogg'},
max_health = 10000,
max_health = 2000,
healing_per_tick = 0.02,
corpse = 'medium-biter-corpse',
dying_explosion = 'blood-explosion-huge',
alert_icon_shift = util.by_pixel(-4, -13),
Expand Down Expand Up @@ -79,13 +129,13 @@ data:extend{{
selection_box = {{-0.9, -1.3}, {0.9, 1.3}},
drawing_box = {{-1.8, -1.8}, {1.8, 1.8}},
effectivity = 1,
braking_power = '200kW',
braking_power = '2MW',
burner = {
fuel_category = 'food',
fuel_category = 'fish',
effectivity = 1,
fuel_inventory_size = 1
fuel_inventory_size = 2
},
consumption = '150kW',
consumption = '800kW',
--terrain_friction_modifier = 0.01,
friction = 2e-3,
light = {
Expand Down Expand Up @@ -237,23 +287,13 @@ data:extend{{
filename = '__pyalienlifegraphics3__/sounds/crawdad-breath.ogg',
volume = 0.6
},
--activate_sound =
--{
-- filename = '__base__/sound/fight/tank-engine-start.ogg',
-- volume = 0.6
--},
--deactivate_sound =
--{
-- filename = '__base__/sound/fight/tank-engine-stop.ogg',
-- volume = 0.6
--},
match_speed_to_activity = false
},
open_sound = {filename = '__pyalienlifegraphics3__/sounds/crawdad-in.ogg', volume = 0.5},
close_sound = {filename = '__pyalienlifegraphics3__/sounds/crawdad-out.ogg', volume = 0.5},
rotation_speed = 0.015,
--tank_driving = true,
weight = 1000,
inventory_size = 120,
guns = {}
weight = 10000,
inventory_size = 80,
guns = {},
equipment_grid = 'mount-grid-10x4',
}}
51 changes: 14 additions & 37 deletions prototypes/creatures/dingrido.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ ITEM {
type = 'item-with-entity-data',
name = 'dingrido',
icon = '__pyalienlifegraphics__/graphics/icons/dingrido.png',
icon_tintable = '__pyalienlifegraphics__/graphics/icons/dingrido.png',
icon_size = 64,
subgroup = 'py-alienlife-special-creatures',
order = 'x',
place_result = 'dingrido',
stack_size = 10
stack_size = 10,
icon_tintable_mask = '__pyalienlifegraphics__/graphics/icons/mount-mask.png',
}

data:extend{{
Expand All @@ -43,7 +45,8 @@ data:extend{{
flags = {'placeable-neutral', 'player-creation', 'placeable-off-grid', 'not-flammable'},
minable = {mining_time = 0.5, result = 'dingrido'},
mined_sound = {filename = '__core__/sound/deconstruct-medium.ogg'},
max_health = 10000,
max_health = 2500,
healing_per_tick = 0.03,
corpse = 'medium-biter-corpse',
dying_explosion = 'blood-explosion-huge',
alert_icon_shift = util.by_pixel(-4, -13),
Expand Down Expand Up @@ -82,13 +85,13 @@ data:extend{{
selection_box = {{-0.9, -1.3}, {0.9, 1.3}},
drawing_box = {{-1.8, -1.8}, {1.8, 1.8}},
effectivity = 0.98,
braking_power = '10000kW',
braking_power = '3MW',
burner = {
fuel_category = 'food',
fuel_category = 'dingrit-food',
effectivity = 1,
fuel_inventory_size = 1
fuel_inventory_size = 3
},
consumption = '250kW',
consumption = '800kW',
terrain_friction_modifier = 0.001,
friction = 0.0002,
light = {
Expand Down Expand Up @@ -261,23 +264,6 @@ data:extend{{
}
}
},
turret_animation = {
layers = {
{
filename = '__pyalienlifegraphics2__/graphics/entity/mega-farm/filler.png',
priority = 'low',
--line_length = 8,
width = 32,
height = 32,
frame_count = 1,
direction_count = 1,
shift = util.by_pixel(-0.0, -0.0)
--animation_speed = 8,
}
}
},
turret_rotation_speed = 0.35 / 60,
turret_return_timeout = 300,
sound_no_fuel = {
{
filename = '__base__/sound/fight/tank-no-fuel-1.ogg',
Expand All @@ -291,23 +277,14 @@ data:extend{{
filename = '__pyalienlifegraphics__/sounds/dingrit-breath.ogg',
volume = 0.7
},
--activate_sound =
--{
-- filename = '__base__/sound/fight/tank-engine-start.ogg',
-- volume = 0.6
--},
--deactivate_sound =
--{
-- filename = '__base__/sound/fight/tank-engine-stop.ogg',
-- volume = 0.6
--},
match_speed_to_activity = false
},
open_sound = {filename = '__pyalienlifegraphics3__/sounds/dingrito-in.ogg', volume = 0.9},
close_sound = {filename = '__pyalienlifegraphics3__/sounds/dingrito-out.ogg', volume = 0.9},
rotation_speed = 0.0095,
tank_driving = true,
weight = 7000,
inventory_size = 250,
guns = {}
weight = 8000,
inventory_size = 120,
guns = {},
automatic_weapon_cycling = false,
equipment_grid = 'mount-grid-10x6',
}}
61 changes: 61 additions & 0 deletions prototypes/creatures/mecha-zungror.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
local zungror = data.raw['item-with-entity-data'].spidertron
zungror.icon = '__pyalienlifegraphics__/graphics/icons/spidertron.png'
zungror.icon_size = 64
zungror.icon_mipmaps = nil
zungror.icon_tintable = zungror.icon
zungror.icon_tintables = nil
zungror.icon_tintable_masks = nil
zungror.icon_tintable_mask = '__pyalienlifegraphics__/graphics/icons/mount-mask.png'
data.raw['spidertron-remote']['spidertron-remote'].subgroup = 'py-alienlife-special-creatures'
data.raw['spidertron-remote']['spidertron-remote'].order = 'z-c'

RECIPE('spidertron'):add_unlock('spidertron')
RECIPE('spidertron-remote'):add_unlock('mounts-mk01')

RECIPE('spidertron-remote').ingredients = {
{mods.pyalternativeenergy and 'electronics-mk01' or 'copper-plate', 5},
{'electronic-circuit', 5}
}

RECIPE {
name = 'spidertron',
type = 'recipe',
category = 'creature-chamber',
enabled = false,
energy_required = 60,
ingredients = {
{type = 'item', name = 'py-shed-basic', amount = 1},
{mods.pyalternativeenergy and 'zungror' or 'auog', 1},
{'power-armor', 1},
{mods.pyalternativeenergy and 'hydraulic-system-mk01' or 'copper-plate', 8},
{'energy-shield-mk2-equipment', 2},
{'processing-unit', 8},
{'alien-sample-03', 10},
{mods.pyalternativeenergy and 'mechanical-parts-03' or 'gastrocapacitor', 8},
{mods.pyalternativeenergy and 'earth-spider-sample' or 'strorix-unknown-sample', 8},
{type = 'fluid', name = 'molten-nexelit', amount = 800},
{type = 'fluid', name = 'artificial-blood', amount = 300},
{'small-parts-03', 80},
{'neuromorphic-chip', 4},
{'nanofibrils', 8},
{mods.pyalternativeenergy and 'dieletric-layer' or 'iron-plate', 8},
{'high-grade-lead', 8},
{mods.pyalternativeenergy and 'zungror-codex' or 'electronic-circuit', 1}
},
results = {
{type = 'item', name = 'spidertron', amount = 1},
},
main_product = 'spidertron',
}

local zungror = data.raw['spider-vehicle'].spidertron
zungror.inventory_size = 160
zungror.energy_source = nil
zungror.burner = {
fuel_category = 'gastrocapacitor',
effectivity = 1,
fuel_inventory_size = 4
}
zungror.movement_energy_consumption = '8MW'
zungror.equipment_grid = 'mount-grid-10x8'
zungror.healing_per_tick = 0.08
Loading

0 comments on commit 3863a2e

Please sign in to comment.