mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-22 21:17:33 +00:00
Initial commit
This commit is contained in:
commit
5af54b9289
BIN
data/items_gfx/handgun.png
Normal file
BIN
data/items_gfx/handgun.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
17
files/actions.lua
Normal file
17
files/actions.lua
Normal file
@ -0,0 +1,17 @@
|
||||
table.insert( actions,
|
||||
{
|
||||
id = "SEA_OF_SWAMP",
|
||||
name = "Sea of swamp",
|
||||
description = "How useful",
|
||||
sprite = "mods/example/files/actions/sea_swamp.png",
|
||||
type = ACTION_TYPE_MATERIAL,
|
||||
spawn_level = "0,4,5,6", -- BERSERK_FIELD
|
||||
spawn_probability = "1,1,1,1", -- BERSERK_FIELD
|
||||
price = 350,
|
||||
mana = 140,
|
||||
max_uses = 3,
|
||||
action = function()
|
||||
add_projectile("mods/example/files/actions/sea_swamp.xml")
|
||||
c.fire_rate_wait = c.fire_rate_wait + 15
|
||||
end,
|
||||
} )
|
BIN
files/actions/sea_swamp.png
Normal file
BIN
files/actions/sea_swamp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
56
files/actions/sea_swamp.xml
Normal file
56
files/actions/sea_swamp.xml
Normal file
@ -0,0 +1,56 @@
|
||||
<Entity name="$projectile_default">
|
||||
|
||||
<MaterialSeaSpawnerComponent
|
||||
size.x="300"
|
||||
size.y="256"
|
||||
offset.x="0"
|
||||
offset.y="158"
|
||||
speed="10"
|
||||
noise_threshold="0.0"
|
||||
material="water_swamp" >
|
||||
</MaterialSeaSpawnerComponent>
|
||||
|
||||
<LifetimeComponent
|
||||
lifetime="300">
|
||||
</LifetimeComponent>
|
||||
|
||||
<ParticleEmitterComponent
|
||||
emitted_material_name="water_swamp"
|
||||
gravity.y="0.0"
|
||||
lifetime_min="6"
|
||||
lifetime_max="8"
|
||||
count_min="8"
|
||||
count_max="8"
|
||||
render_on_grid="1"
|
||||
fade_based_on_lifetime="1"
|
||||
area_circle_radius.min="0"
|
||||
area_circle_radius.max="0"
|
||||
cosmetic_force_create="0"
|
||||
airflow_force="0.51"
|
||||
airflow_time="1.01"
|
||||
airflow_scale="0.05"
|
||||
x_pos_offset_min="0"
|
||||
x_pos_offset_max="0"
|
||||
y_pos_offset_min="0"
|
||||
y_pos_offset_max="0"
|
||||
emission_interval_min_frames="1"
|
||||
emission_interval_max_frames="1"
|
||||
emit_cosmetic_particles="1"
|
||||
image_animation_file="data/particles/image_emitters/sea_oil.png"
|
||||
image_animation_speed="5"
|
||||
image_animation_loop="0"
|
||||
is_emitting="1" >
|
||||
</ParticleEmitterComponent>
|
||||
|
||||
<MusicEnergyAffectorComponent
|
||||
energy_target="1">
|
||||
</MusicEnergyAffectorComponent>
|
||||
|
||||
<AudioComponent
|
||||
file="data/audio/Desktop/projectiles.snd"
|
||||
event_root="player_projectiles/sea_of_oil"
|
||||
set_latest_event_position="1" >
|
||||
</AudioComponent>
|
||||
|
||||
</Entity>
|
||||
|
5
files/magic_numbers.xml
Normal file
5
files/magic_numbers.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<MagicNumbers
|
||||
VIRTUAL_RESOLUTION_X="427"
|
||||
VIRTUAL_RESOLUTION_Y="242"
|
||||
> <!-- some magic number defaults could be overridden here -->
|
||||
</MagicNumbers>
|
21
init.lua
Normal file
21
init.lua
Normal file
@ -0,0 +1,21 @@
|
||||
function OnModPreInit()
|
||||
print("Mod - OnModPreInit()") -- first this is called for all mods
|
||||
end
|
||||
|
||||
function OnModInit()
|
||||
print("Mod - OnModInit()") -- after that this is called for all mods
|
||||
end
|
||||
|
||||
function OnModPostInit()
|
||||
print("Mod - OnModPostInit()") -- then this is called for all mods
|
||||
end
|
||||
|
||||
function OnPlayerSpawned( player_entity ) -- this
|
||||
GamePrint( "Mods says: Player entity id: " .. tostring(player_entity) )
|
||||
end
|
||||
|
||||
|
||||
-- this code runs when all mods' filesystems are registered
|
||||
ModLuaFileAppend( "data/scripts/gun/gun_actions.lua", "mods/example/files/actions.lua" ) -- basically dofile("mods/example/files/actions.lua") will appear at the end of gun_actions.lua
|
||||
ModMagicNumbersFileAdd( "mods/example/files/magic_numbers.xml" ) -- will override some magic numbers using the specified file
|
||||
print("Example mod init done")
|
Loading…
Reference in New Issue
Block a user