Skip to content
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

Landing pads #428

Merged
merged 6 commits into from
Aug 21, 2016
Merged

Landing pads #428

merged 6 commits into from
Aug 21, 2016

Conversation

sboigelot
Copy link
Collaborator

@sboigelot sboigelot commented Aug 20, 2016

A small landing pad for trading.

The landing pad currently allow to trade steel for steel, with a small profit, at the cost of work time.

The behaviour is a temporary behaviour to be expanded with futher trade system.

image

@sboigelot
Copy link
Collaborator Author

If someone know how to debug the lua code or have more info about the exception, I'm searching for info :D

I'll investigate more tonigth

if(furniture.GetParameter("smelttime") >= furniture.GetParameter("smelttime_required")) then
furniture.SetParameter("smelttime", 0)

--[[ outputSpot = World.current.GetTileAt(spawnSpot.X+2, spawnSpot.y)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this commented code?

Can't we delete it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and shouldnt it be "tradetime" and "tradetime_required"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's WIP code, I'm trying to figure out where the nil exception comes from by commenting code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@relinu yes that must be my nil exception, I was watching the rest! That's why I shared it, a second eye is priceless! Thanks a lot, I'll try to fix it now

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no :( I still get the issue, even while commenting more lua code

ScriptRuntimeException: attempt to index a nil value
MoonSharp.Interpreter.Execution.VM.Processor.ExecIndex (MoonSharp.Interpreter.Execution.VM.Instruction i, Int32 instructionPtr)
MoonSharp.Interpreter.Execution.VM.Processor.Processing_Loop (Int32 instructionPtr)

I'll add a check in the parameter get/change in c# to throw a proper log in that case, but I may have to pause a few hours first

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sboigelot can you update the code here to the "newest" version?

Copy link
Collaborator Author

@sboigelot sboigelot Aug 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem seems to be on this line:

function LandingPad_Temp_JobComplete(j)
spawnSpot = j.tile.furniture.GetSpawnSpotTile()

no idea why for now

edit
hem of course, there is no furniture at the spawnSpotTile as I modify it earlier in the code

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sboigelot I suggest avoiding in progress PRs. People will test out your code when you're not finished yet, losing time.

Great work though!

Copy link
Contributor

@relinu relinu Aug 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's th next line: World.current.GetTileAt(jobSpot.X, jobSpot.y (! needs to be Y) -1)
and in the commented sections you have several other GetParameter calls that have wrong parameters

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sboigelot I suggest avoiding in progress PRs. People will test out your code when you're not finished yet, losing time.

I tend to agree, but here the help was really great. I would have lot much more time without all the other coders.

@sboigelot sboigelot changed the title [WIP] Landing pads Landing pads Aug 20, 2016
@sboigelot
Copy link
Collaborator Author

The feature is ready!

@bjubes
Copy link
Collaborator

bjubes commented Aug 20, 2016

Is that s in comic sans?😂

@sboigelot
Copy link
Collaborator Author

@bjubes indeed :D you have the eye!

@vogonistic vogonistic merged commit c9e5e16 into TeamPorcupine:master Aug 21, 2016
@vogonistic
Copy link
Collaborator

Awesome!

NogginBops pushed a commit to NogginBops/ProjectPorcupineOld that referenced this pull request Aug 21, 2016
* Auto font license edition

* Small landing pad - lua crash

* Fixing lua code
NogginBops pushed a commit to NogginBops/ProjectPorcupineOld that referenced this pull request Aug 21, 2016
* Auto font license edition

* Small landing pad - lua crash

* Fixing lua code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants