Skip to content

Commit

Permalink
add lights to dome
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Sep 1, 2024
1 parent 494e13d commit 9d1fe92
Show file tree
Hide file tree
Showing 5 changed files with 287 additions and 41 deletions.
1 change: 1 addition & 0 deletions locale/en/locale.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ trunk=Storage
trench-entrance=Trench entrance
underwater=Maraxsis.
lava=Lava
h2o-pressure-dome-tile=Pressure dome
[recipe-category-name]
h2o-hydro-plant=Hydro plant
Expand Down
1 change: 1 addition & 0 deletions prototypes/collision-mask.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ local special_exceptions = {
'ee-infinity-accumulator-secondary-input',
'ee-infinity-accumulator-tertiary-input',
'ee-infinity-accumulator-tertiary-buffer',
'h2o-pressure-dome-collision'
}
do
local temp = {}
Expand Down
2 changes: 1 addition & 1 deletion prototypes/fish.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ for i, v in pairs(fish) do
attack_parameters = {
type = 'projectile',
ammo_category = 'melee',
cooldown = 35,
cooldown = 60,
range = 0,
ammo_type = {
category = 'melee',
Expand Down
81 changes: 73 additions & 8 deletions prototypes/pressure-dome.lua
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
local dome = {
type = 'sprite',
name = 'h2o-pressure-dome',
filename = '__maraxsis__/graphics/entity/pressure-dome/pressure-dome.png',
width = 1344,
height = 1344,
scale = 1.06,
scale = 1.05,
shift = {0, 0.3}
}

local light = {
filename = '__maraxsis__/graphics/entity/pressure-dome/pressure-dome.png',
width = 1344,
height = 1344,
scale = 1.05,
shift = {0, 0.3},
draw_as_light = true,
}

local light_2 = {
filename = '__core__/graphics/light-medium.png',
width = 300,
height = 300,
scale = 7,
shift = {0, 0.3},
draw_as_light = true,
}

local shadow = {
type = 'sprite',
name = 'h2o-pressure-dome-shadow',
filename = '__maraxsis__/graphics/entity/pressure-dome/shadow.png',
width = 1344,
height = 1344,
scale = 1.06,
scale = 1.05,
shift = {0, 0.3}
}

Expand Down Expand Up @@ -54,16 +68,17 @@ data:extend{{
icon = '__maraxsis__/graphics/icons/pressure-dome.png',
icon_size = 64,
flags = {'placeable-neutral', 'player-creation', 'not-on-map'},
minable = {mining_time = 1, result = 'h2o-pressure-dome'},
max_health = 1000,
collision_box = {{-size, -size}, {size, size}},
minable = {mining_time = 1, result = 'h2o-pressure-dome'},
selection_box = {{-size, -size}, {size, size}},
drawing_box = {{-size, -size}, {size, size}},
collision_mask = {h2o.maraxsis_collision_mask},
render_layer = 'higher-object-under',
selectable_in_game = false,
selection_priority = 40,
picture = {
layers = table.deepcopy {shadow, dome},
layers = {shadow, dome, light, light_2},
},
}}

Expand All @@ -77,4 +92,54 @@ data:extend{{
flow_color = {r = 0.5, g = 0.5, b = 1},
icon = '__maraxsis__/graphics/icons/atmosphere.png',
icon_size = 64,
gas_temperature = 25,
}}

data:extend{h2o.merge(data.raw.tile['refined-concrete'], {
name = 'h2o-pressure-dome-tile',
minable = 'nil'
})}

local blank_animation = {
filename = '__core__/graphics/empty.png',
line_length = 1,
width = 1,
height = 1,
frame_count = 1,
direction_count = 1,
}

data:extend{{
type = 'car',
name = 'h2o-pressure-dome-collision',
localised_name = {'entity-name.h2o-pressure-dome'},
localised_description = {'entity-description.h2o-pressure-dome'},
icon = '__maraxsis__/graphics/icons/pressure-dome.png',
icon_size = 64,
flags = {'placeable-player', 'player-creation', 'placeable-off-grid', 'not-on-map'},
max_health = 1000,
collision_box = {{-7, -0.4}, {7, 0.4}},
selection_box = {{-7, -0.5}, {7, 0.5}},
collision_mask = {'object-layer'},
weight = 1,
braking_force = 1,
friction_force = 1,
energy_per_hit_point = 1,
effectivity = 1,
rotation_speed = 0,
energy_source = {
type = 'void'
},
squeak_behaviour = false,
inventory_size = 0,
consumption = '0W',
minable = {mining_time = 1, result = 'h2o-pressure-dome'},
animation = blank_animation,
movement_speed = 0,
distance_per_frame = 1,
pollution_to_join_attack = 0,
distraction_cooldown = 0,
vision_distance = 0,
has_belt_immunity = true,
placeable_by = {{item = 'h2o-pressure-dome', count = 1}},
}}
Loading

0 comments on commit 9d1fe92

Please sign in to comment.