Skip to content

Standalone KOS interpreter #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
656bc3d
Change ProcessOneInputChar to 3 signatures
Dunbaratu Jan 26, 2021
8b45291
better explanation in the comments
Dunbaratu Jan 27, 2021
966a587
made it match exactly to the old signature including void return.
Dunbaratu Jan 27, 2021
bdb7b79
Some debug tracing stuff. This is a mess.
Dunbaratu Feb 4, 2021
458795a
This seems to finally fix it.
Dunbaratu Feb 6, 2021
f88aedc
Fixes #2884 Fixes #2885
Dunbaratu Mar 5, 2021
077b8f3
Add TICKSLEFT binding
thexa4 Mar 9, 2021
506d1b6
Fix caching and off by one in instructions left
thexa4 Mar 9, 2021
c695214
Fix ambiguity in ticksleft documentation
thexa4 Mar 9, 2021
33dd3a5
Rename to OpcodesLeft
thexa4 Mar 9, 2021
4b5ff82
Merge remote-tracking branch 'thexa4/feature/ticksleft' into merging_…
Dunbaratu Mar 9, 2021
81e0d93
Merge branch 'fixes_2861_kOSPropMonitor_backporting' into develop
Dunbaratu Mar 10, 2021
d7e35a9
Merge branch 'fixes_2868_too_much_onconfirm' into develop
Dunbaratu Mar 10, 2021
69c8425
edited the parts config
Dunbaratu Mar 10, 2021
0ce51b7
Fixes #2899 terrain raycast now ingores parts.
Dunbaratu Mar 16, 2021
cbff572
Fix buggy math that only appears off equator.
Dunbaratu Mar 17, 2021
f3a7892
fixes #2875 minor doc issue
Dunbaratu Mar 20, 2021
4c35c0d
first attempt at some values for inventory volume
Dunbaratu Feb 5, 2021
f9a8dba
bad indent made me put cargo module outside part.
Dunbaratu Feb 5, 2021
b828220
Culls out thruster transforms for other part variants
Dunbaratu Apr 12, 2021
00c0907
Add standalone kos interpreter
thexa4 Apr 16, 2021
89807ce
Fix pageup/down support
thexa4 Apr 16, 2021
c200aa4
Add more keys
thexa4 Dec 30, 2021
011d3c4
Fix special key handling
thexa4 Jan 9, 2022
c364a71
Don't crash after too much output
thexa4 Jan 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Resources/GameData/kOS/Parts/KOSCherryLight/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,10 @@ PART
resourceAmount = 0.02
animationName = Rotation
}
MODULE
{
name = ModuleCargoPart
packedVolume = 100
}

}
125 changes: 65 additions & 60 deletions Resources/GameData/kOS/Parts/kOSMachine0m/part.cfg
Original file line number Diff line number Diff line change
@@ -1,76 +1,81 @@
PART
{
// --- general parameters ---
name = KR-2042
module = Part
author = SMA and Peter Goddard
// --- general parameters ---
name = KR-2042
module = Part
author = SMA and Peter Goddard

// --- asset parameters ---
mesh = model/model.mu
scale = 1
rescaleFactor = 1
// --- asset parameters ---
mesh = model/model.mu
scale = 1
rescaleFactor = 1

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z, connector node size
node_stack_bottom = 0.0, -0.081, 0.0, 0.0, -1.0, 0.0, 0
node_stack_top = 0.0, -0.003, 0.0, 0.0, 1.0, 0.0, 0
// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z, connector node size
node_stack_bottom = 0.0, -0.081, 0.0, 0.0, -1.0, 0.0, 0
node_stack_top = 0.0, -0.003, 0.0, 0.0, 1.0, 0.0, 0


// --- Tech tree ---
TechRequired = precisionEngineering
// --- Tech tree ---
TechRequired = precisionEngineering

// --- editor parameters ---
cost = 1200
entryCost = 6800
category = Control
subcategory = 0
title = KR-2042 b Scriptable Control System
manufacturer = Compotronix
description = Would you trust life and limb to a mindless autopilot, powered by untested software you hastily wrote yourself? Spacefaring kerbals would!
bulkheadProfiles = size0
// --- editor parameters ---
cost = 1200
entryCost = 6800
category = Control
subcategory = 0
title = KR-2042 b Scriptable Control System
manufacturer = Compotronix
description = Would you trust life and limb to a mindless autopilot, powered by untested software you hastily wrote yourself? Spacefaring kerbals would!
bulkheadProfiles = size0

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,0,0
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,0,0

// --- standard part parameters ---
mass = 0.08
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 9
maxTemp = 1500
// --- standard part parameters ---
mass = 0.08
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 9
maxTemp = 1500

MODULE
{
name = kOSProcessor
diskSpace = 5000
ECPerBytePerSecond = 0
ECPerInstruction = 0.000004
}
MODULE
{
name = kOSProcessor
diskSpace = 5000
ECPerBytePerSecond = 0
ECPerInstruction = 0.000004
}

RESOURCE
{
name = ElectricCharge
amount = 5
maxAmount = 5
}
RESOURCE
{
name = ElectricCharge
amount = 5
maxAmount = 5
}

MODULE
{
name = ModuleLight
lightName = PowerLight
lightR = 0
lightG = 0.1
lightB = 0
}
MODULE
{
name = ModuleLight
lightName = PowerLight
lightR = 0
lightG = 0.1
lightB = 0
}

MODULE
{
name = kOSLightModule
resourceAmount = 0.02
animationName = flickerStart
}
MODULE
{
name = kOSLightModule
resourceAmount = 0.02
animationName = flickerStart
}

MODULE
{
name = ModuleCargoPart
packedVolume = 60
}

}
1 change: 1 addition & 0 deletions Resources/GameData/kOS/Parts/kOSMachine0mLegacy/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ PART

// --- Tech tree ---
TechRequired = precisionEngineering
TechHidden = true

// --- editor parameters ---
cost = 1200
Expand Down
114 changes: 60 additions & 54 deletions Resources/GameData/kOS/Parts/kOSMachine1m/part.cfg
Original file line number Diff line number Diff line change
@@ -1,58 +1,64 @@
PART
{
// --- general parameters --- V2~ fixed collision mesh
name = kOSMachine1m
module = Part
author = KevinLaity / Peter Goddard

// --- asset parameters ---
mesh = model/model.mu
scale = 1
rescaleFactor = 0.99999999999
iconCenter = 0, 3, 0

// --- node definitions ---
node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0
node_stack_bottom = 0.0, -0.173, 0.0, 0.0, -1.0, 0.0
node_stack_top = 0.0, 0.173, 0.0, 0.0, 1.0, 0.0

// --- Tech tree ---
TechRequired = flightControl

// --- editor parameters ---
cost = 1200
entryCost = 4200
category = Control
subcategory = 0
title = CX-4181 Scriptable Control System
manufacturer = Compotronix
description = Would you trust life and limb to a mindless autopilot, powered by untested software you hastily wrote yourself? Spacefaring kerbals would!
bulkheadProfiles = size1

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,0

// --- standard part parameters ---
mass = 0.12
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 9
maxTemp = 2000

MODULE
{
name = kOSProcessor
diskSpace = 10000
ECPerBytePerSecond = 0
ECPerInstruction = 0.000004
}
// --- general parameters --- V2~ fixed collision mesh
name = kOSMachine1m
module = Part
author = KevinLaity / Peter Goddard

RESOURCE
{
name = ElectricCharge
amount = 5
maxAmount = 5
}
// --- asset parameters ---
mesh = model/model.mu
scale = 1
rescaleFactor = 0.99999999999
iconCenter = 0, 3, 0

// --- node definitions ---
node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0
node_stack_bottom = 0.0, -0.173, 0.0, 0.0, -1.0, 0.0
node_stack_top = 0.0, 0.173, 0.0, 0.0, 1.0, 0.0

// --- Tech tree ---
TechRequired = flightControl

// --- editor parameters ---
cost = 1200
entryCost = 4200
category = Control
subcategory = 0
title = CX-4181 Scriptable Control System
manufacturer = Compotronix
description = Would you trust life and limb to a mindless autopilot, powered by untested software you hastily wrote yourself? Spacefaring kerbals would!
bulkheadProfiles = size1

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,0

// --- standard part parameters ---
mass = 0.12
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 9
maxTemp = 2000

MODULE
{
name = kOSProcessor
diskSpace = 10000
ECPerBytePerSecond = 0
ECPerInstruction = 0.000004
}

RESOURCE
{
name = ElectricCharge
amount = 5
maxAmount = 5
}

MODULE
{
name = ModuleCargoPart
packedVolume = 650
}
}
Loading