Skip to content

Commit

Permalink
meaty
Browse files Browse the repository at this point in the history
  • Loading branch information
patmanf committed May 14, 2022
0 parents commit 23e4871
Show file tree
Hide file tree
Showing 16 changed files with 379 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version" : "1.0",
"author" : "pat man",
"description" : "adds \"the meatvent\" from the hit game DOOM 3\nit is a vent, that dispenses raw meat\nfind it in the outpost\n\nmeat\n\n\n[url=https://discord.gg/GdsQSgV][img]https://i.imgur.com/wXjYMqP.gif[/img][/url]\n[url=https://www.patreon.com/pathiccstar][img]https://i.imgur.com/uyG8oTa.gif[/img][/url]\n[url=https://link.clashofclans.com/en?action=OpenClanProfile&tag=2QCU2R9GP][img]https://i.imgur.com/xVfcRRH.gif[/img][/url]",
"name" : "pat_meatvent",
"friendlyName" : "the meatvent",
"steamContentId" : "2808191078",
"link" : "steam://url/CommunityFilePage/2808191078",
"includes" : ["AnomsOutpostOverhual"]
}
Binary file added _previewimage
Binary file not shown.
8 changes: 8 additions & 0 deletions objects/outpost/techlab/pat_meatventflag.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
local oi = init
function init()
if oi then oi() end

if world.type() == "outpost" then
world.setUniverseFlag("pat_meatvent")
end
end
5 changes: 5 additions & 0 deletions objects/outpost/techlab/techlabscientist.object.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[{
"op" : "add",
"path" : "/scripts/-",
"value" : "pat_meatventflag.lua"
}]
22 changes: 22 additions & 0 deletions pat/meatvent/meatvent.dungeon
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"metadata" : {
"name" : "pat_meatvent",
"species" : "generic",
"rules" : [],

"anchor" : [ "pat_meatvent" ],

"maxRadius" : 1000000,
"maxParts" : 1
},

"parts" : [
{
"name" : "pat_meatvent",
"rules" : [
[ "maxSpawnCount", [1] ]
],
"def" : [ "tmx", "meatvent.json" ]
}
]
}
61 changes: 61 additions & 0 deletions pat/meatvent/meatvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{ "compressionlevel":-1,
"height":3,
"infinite":false,
"layers":[
{
"draworder":"topdown",
"id":2,
"name":"objects",
"objects":[
{
"gid":130,
"height":24,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":24,
"x":0,
"y":24
},
{
"gid":130,
"height":24,
"id":2,
"name":"",
"properties":[
{
"name":"object",
"type":"string",
"value":"pat_meatvent"
}],
"rotation":0,
"type":"",
"visible":true,
"width":24,
"x":0,
"y":24
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}],
"nextlayerid":3,
"nextobjectid":3,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.7.2",
"tileheight":8,
"tilesets":[
{
"firstgid":1,
"source":"..\/..\/..\/..\/unpacked\/tilesets\/packed\/objects-by-race\/human.json"
}],
"tilewidth":8,
"type":"map",
"version":"1.6",
"width":3
}
12 changes: 12 additions & 0 deletions pat/meatvent/projectiles/meat.frames
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"frameGrid" : {
"size" : [14, 16],
"dimensions" : [10, 1],
"names" : [
[ "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10" ]
]
},
"aliases" : {
"0" : "0.1"
}
}
26 changes: 26 additions & 0 deletions pat/meatvent/projectiles/meat.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require "/scripts/vec2.lua"

function init()
rotationSpeed = config.getParameter("rotationSpeed", 20)
mcontroller.setRotation(math.random() * math.pi * 2)

bounces = config.getParameter("maxBounces")
stickSettings = config.getParameter("stickSettings")
end

function update(dt)
local vel = mcontroller.velocity()
local dir = vel[1] > 0 and 1 or -1

local rot = (vec2.mag(vel) / 180 * math.pi) * -dir * dt * rotationSpeed
mcontroller.setRotation(mcontroller.rotation() + rot)
end

function bounce()
if bounces > 0 then
bounces = bounces - 1
if bounces == 0 then
mcontroller.applyParameters(stickSettings)
end
end
end
Binary file added pat/meatvent/projectiles/meat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions pat/meatvent/projectiles/meat.projectile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"projectileName" : "pat_meatvent",
"image" : "meat.png",
"speed" : 25,
"timeToLive" : 10,
"bounces" : -1,
"flippable" : false,
"orientationLocked" : false,
"onlyHitTerrain" : true,
"damageType" : "NoDamage",

"periodicActions" : [
{
"action" : "loop",
"time" : 0,
"count" : 2,
"repeat" : true,
"body" : [{
"action" : "particle",
"specification" : {
"type" : "ember",
"layer" : "front",
"size" : 1,
"color" : [150, 0, 0],
"initialVelocity" : [0, 0],
"finalVelocity" : [0, -50],
"approach" : [10, 35],
"timeToLive" : 8,
"collidesForeground" : true,
"destructionTime" : 10,
"destructionAction" : "shrink",
"variance" : {
"size" : 0.375,
"initialVelocity" : [10, 10],
"timeToLive" : 4
}
}
}]
}
],

"movementSettings" : {
"mass" : 1,
"gravityMultiplier" : 1,
"bounceFactor" : 0.65,
"stopOnFirstBounce" : true
},

"rotationSpeed" : 50,
"maxBounces" : 15,
"stickSettings" : {
"stickyCollision" : true,
"stickyForce" : 1,
"enableSurfaceSlopeCorrection" : true
},
"scripts" : ["meat.lua"]
}
57 changes: 57 additions & 0 deletions pat/meatvent/vent.animation
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"particleEmitters" : {
"blood" : {
"burstCount" : 16,
"offsetRegion" : [2.5, -0.5, -0.5, 1],
"particles" : [
{"particle" : {
"type" : "ember",
"layer" : "front",
"size" : 1.25,
"color" : [150, 0, 0],
"initialVelocity" : [0, 0],
"finalVelocity" : [0, -50],
"approach" : [10, 35],
"timeToLive" : 5,
"collidesForeground" : true,
"destructionTime" : 10,
"destructionAction" : "shrink",
"variance" : {
"size" : 0.25,
"initialVelocity" : [25, 25],
"timeToLive" : 2.5
}
}}
]
},
"drip" : {
"active" : true,
"emissionRate" : 20,
"emissionRateVariance" : 5,
"offsetRegion" : [-0.375, -0.5, 1.375, -0.5],
"particles" : [
{"particle" : {
"type" : "ember",
"layer" : "front",
"size" : 1,
"color" : [150, 0, 0],
"initialVelocity" : [0, -10],
"finalVelocity" : [0, -50],
"approach" : [0, 35],
"timeToLive" : 1,
"collidesForeground" : true,
"destructionTime" : 2,
"destructionAction" : "shrink",
"variance" : {
"size" : 0.25,
"initialVelocity" : [0, 10],
"timeToLive" : 0.5
}
}}
]
}
},
"sounds" : {
"meat" : ["/sfx/melee/sawblade_kill_organic.ogg"]
}
}
9 changes: 9 additions & 0 deletions pat/meatvent/vent.frames
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"frameGrid" : {
"size" : [24, 24],
"dimensions" : [4, 1]
},
"aliases" : {
"default" : "0"
}
}
34 changes: 34 additions & 0 deletions pat/meatvent/vent.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require "/scripts/util.lua"
require "/scripts/vec2.lua"
require "/scripts/rect.lua"

function init()
meat = config.getParameter("meat")
timer = 0.1
parameters = {}
center = rect.center(object.boundBox())
end

function update(dt)
timer = math.max(0, timer - dt)
if timer == 0 then
timer = util.randomInRange(meat.time)

parameters.speed = util.randomInRange(meat.speed)
parameters.processing = "."..math.random(1, meat.variants)

local flips = math.random(0, 3)
if flips ~= 0 then
local f = "?flip"
if flips >= 1 then f = f.."x" end
if flips <= 3 then f = f.."y" end
parameters.processing = parameters.processing..f
end

world.spawnProjectile(meat.projectile, center, nil, vec2.rotate({-1, 0}, math.random() * math.pi), nil, parameters)

animator.setSoundPitch("meat", util.randomInRange(meat.soundPitch))
animator.playSound("meat")
animator.burstParticleEmitter("blood")
end
end
41 changes: 41 additions & 0 deletions pat/meatvent/vent.object
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"objectName" : "pat_meatvent",
"rarity" : "Rare",
"category" : "decorative",
"printable" : false,

"description" : "A vent that dispenses a delicious raw meat!",
"shortdescription" : "Meat vent",

"apexDescription" : "A rusted old fan.. is that meat?",
"avianDescription" : "A whistle of air still slips through with the meat.",
"floranDescription" : "Floran can sssmell raw meat coming through here.",
"glitchDescription" : "Observant. This vent is releasing meat.",
"hylotlDescription" : "This fan circulates raw meat.",
"novakidDescription" : "It's a vent. There's raw meat comin' from it.",

"inventoryIcon" : "vent.png:0",
"orientations" : [
{
"image" : "vent.png:<frame>",
"direction" : "right",
"imagePosition" : [-8, -8],
"frames" : 4,
"animationCycle" : 0.2,
"spaceScan" : 0.1,
"anchors" : [ "background" ]
}
],

"animation" : "vent.animation",
"soundEffect" : "/sfx/objects/bunkervent.ogg",

"scripts" : ["vent.lua"],
"meat" : {
"projectile" : "pat_meatvent",
"variants" : 10,
"speed" : [15, 25],
"time" : [0.3, 6],
"soundPitch" : [0.92, 1.24]
}
}
Binary file added pat/meatvent/vent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions universeflags.config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
[
{
"op" : "add",
"path" : "/_meatvent",
"value" : {
"type" : "placeDungeon",
"dungeonId" : "pat_meatvent",
"targetInstance" : "outpost",
"targetPosition" : [433, 585]
}
}
],
[
{
"op" : "test",
"path" : "/anomsOutpostOverhaul"
},
{
"op" : "replace",
"path" : "/_meatvent/targetPosition",
"value" : [409, 589]
}
],
[
{
"op" : "add",
"path" : "/pat_meatvent",
"value" : { "actions" : [] }
},
{
"op" : "move",
"from" : "/_meatvent",
"path" : "/pat_meatvent/actions/-"
}
]
]

0 comments on commit 23e4871

Please sign in to comment.