Giter Club home page Giter Club logo

hosesystem's People

Contributors

anonymous-any avatar gonimy-vetrom avatar kikislany avatar kitt3000 avatar n0tr3ady avatar stijnwop avatar turbostar190 avatar vanquish081 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hosesystem's Issues

Refactor class loading

Setup a bootstrap script to source everything.

  • Preload sourced classes to handle overwritten/appended/prependend functions
  • Use our own global table for other mods to access
  • Get rid of chain sourcing scripts.. class -> sourced file -> class -> sourced file etc.
  • Control debug rendering by farmsim tool

Real dirt shader

Only the side that's dropped into the pit will be affected on the dirtmask.

  • Lookup if possible with second UV set. (Current implementation won't allow two sides being affected)

Hardcoded texts

The function MouseHelper.getButtonName(Input.MOUSE_BUTTON_RIGHT) and MouseHelper.getButtonName(Input.MOUSE_BUTTON_LEFT) return only english words "right" and "left".
Should be checked and translated depending the language?

fsscreen_2017_10_28_21_13_07_li

Lots of warnings in my log

I have used the Master file here 1.2.
I seem to be getting a lot of warnings in my log.
Example:
HoseSystem [Warning] : The hoseSystemVehicle specialization in: FS17_Guellepack is outdated! Latest version is v1.2

My Slurry pack is the latest from Modhub 7.0.0.2
Everything seems to be working alright just warnings in my log.
Thanks!!

Attached log

log.txt

Hose holder

A holder where you can attach the tanker side of the hose to while not pumping, so it don't falls into the pit.

May as a prefab and as a placeable object. A buyable dynamic object would also be interesting, but sure it would fall to the side every time, you attach or detach the hose.

support FillTriggers at MCompanyFactory

Hi,
it would be great MCompany running factories could be accepted by the hose system, e.g. mappers have to add a special trigger to their factory to be supported by the hosesystem.

Set park offset threshold

Allow option to set a threshold in meters for the parking offset taking affect.

So, for example when the hose >= 4 m enable offset.

Docking support

Write functionality to support manure docking.

FillArm

  • Create factory for creating strategies based on fillArm type (docking for example)
    for being more future proof.

DockingArm

  • Search for dockingReferences (done by trigger)
  • Use in combination with the pump motor script
  • Support deformation on the docking reference (Funnel)
  • Forward manure to tanker when we have a frontdock. (#20)

Connector

  • Create factory for creating connector strategies
  • Add docking reference support on the hoseSystem reference entries.
  • Move all coupling based logic in the base connector script to the coupling strategy

LUA-Callstack when connecting hoses to the tanking point (slurry pit)

Is there a possibility for the system to be throw a callstack error on maps which have the HoseSystem built in?
Because I get the following Callstack-Error when connecting a hose to the slurry pit:

Error: Running LUA method 'update'.
C:/Users/Administrator/Documents/My Games/FarmingSimulator2017/mods/FS17_hoseSystem/specializations/objects/HoseSystemLiquidManureFillTrigger.lua:523: attempt to index field 'animatedObjects' (a nil value)

My entries in map01.xml are as follows:

<hoseSystemFillTriggers>
  <hoseSystemFillTrigger identifier="cowLiquidManure">
    <pit planeNode="0>0" planeMinY="-0.402" planeMaxY="0.482" />
     <hoseSystemReferences>
	<hoseSystemReference node="0>2" /> 
     </hoseSystemReferences>
  </hoseSystemFillTrigger>
		
  <hoseSystemFillTrigger identifier="pigLiquidManure"  >
   <pit planeNode="0>0" planeMinY="-0.477" planeMaxY="0.5" />
    <hoseSystemReferences>
     <hoseSystemReference node="0>2|0" /> 
    </hoseSystemReferences>
  </hoseSystemFillTrigger>
</hoseSystemFillTriggers>

I have found a solution to the error, but I am at a loss of finding out the reason for the error to occur in the first place.

Original Entry:

local animatedObject = g_currentMission.animatedObjects[reference.lockAnimatedObjectSaveId]

Fixed Entry:

local animatedObject = nil;

if g_currentMission.animatedObjects ~= nil then
animatedObject = g_currentMission.animatedObjects[reference.lockAnimatedObjectSaveId]
end

These are the changes I have made in Lines 523 and 556.
It solves the problem, but I would be happy to know if you have a more elegant solution for it :-)

Thank you for looking into this!

Kind regards,

Farmer_Andy of www.modding-welt.com

Release notes v1.2

W.I.P.

New:

  • HoseSystemHolder (see #11)
  • HoseSystemFillTrigger

Fixes:

  • Updated translations

Improvements:

  • Moved the whole mod to it's own global environment.
  • Added proper class loading
  • Proper logging and validations on map and mod implementations
  • Network owner priority sync for smoother hose handling in MP

dynamic parkreferences

when parking a hose it should be possible to store it in another way than just straight.

Maybe defining 5 Points in the vehicle xml to adjust the hoses to.

Workaround: Adding a hose-mesh to your vehicle and toggle visibility when adding the hose

Question and suggestion regarding translation

  1. Question:
    Could you describe more accurately when a warning appears, or is it related to the same condition (pump source is empty)?
    pumpMotor_warningUnitEmpty
    pumpMotor_warningObjectEmpty
  2. Suggestion:
    If you add a new translation you could do it this way for each XML file?
    <text name="input_mouseInteractMouseLeft" text="left"/> <!-- TODO TRANSLATION: description-->
    (text in English to be translated + description for better understanding of the translated text)

Pump water from water source

Would it be possible to add support where we can run a hose to a water source like a lake/river and the other end to the trailer?

FS17_hoseSystem Script error .lua

Hi, I have the following problem with this mod.
After downloading these modifications:
Fliegl STF 25000 VC
Zunhammer SKE 18.5 PUD
Kotte FRC
for the Hosesystem.
When trying to connect a Hose to a barrel, I can not do anything, no description and also can not move.
Log in error such error:
Error: Running LUA method 'update'.
C:/Users/Piotr/Documents/My Games/FarmingSimulator2017/mods/FS17_hoseSystem/specializations/HoseSystemPlayerInteractiveHandling.lua:64: invalid option '' to 'format'

Someone will help. Because the mod is cool, I'm also waiting for help :)

Courseplay

do you know any way to make it compatible with courseplay? So maybe refill the normal giants way when courseplay is active?

Release notes version 1.1

Features:

  • Fixed double insertion of specializations (double input bug)
  • Big script optimization and performance improvements
  • Docking support
  • Fillarm support
  • Empty object slowly when manure flow is open
  • Parkoffset threshold

Translation to ES

<?xml version="1.0" encoding="utf-8" standalone="no" `?>
<l10n>
    <texts>
        <text name="typeDesc_liquidManureHose" text="Manguera purín"/>

        <text name="function_liquidManureHose"
              text="Con una manguera de purín, puede bombear líquido de la fuente al objetivo. Si es aplicable, podría extender la manguera de purín para alcanzar rangos más grandes."/>

        <text name="configuration_ext_liquidManureHose" text="Extensible"/>
        <text name="configuration_nor_liquidManureHose" text="Normal"/>

        <text name="action_grabHose" text="Agarrar %s"/>
        <text name="action_dropHose" text="Soltar %s"/>
        <text name="action_attachHose" text="Enganchar %s"/>
        <text name="action_detachHose" text="Soltar %s"/>

        <text name="info_hoseRangeRestriction" text="El alcance de la manguera llego a su límite!"/>
        <text name="info_hoseRangeRestrictionChainToLong" text="No eres un super humano!"/>
        <text name="info_hoseParkingPlaceToShort" text="El %sm estacionamiento es demasiado pequeño para la manguera %sm !"/>

        <!-- Input -->
        <text name="input_mouseInteract" text="Presiona el botón del ratón %s a"/>
        <text name="input_mouseInteractMouseLeft" text="izquierda"/>
        <text name="input_mouseInteractMouseRight" text="derecha"/>
        <text name="input_attachHose" text="Enganchar sistema de manguera"/>
        <text name="input_detachHose" text="Soltar sistema de manguera"/>

        <!-- Hose system pump motor -->
        <text name="pumpMotor_changeDirection" text="Cambiar la dirección de la bomba a: %s"/>
        <text name="pumpMotor_directionOut" text="vaciar"/>
        <text name="pumpMotor_directionIn" text="llenar"/>

        <text name="pumpMotor_activatePump" text="Activar bomba"/>
        <text name="pumpMotor_deactivatePump" text="Desactivar bomba"/>

        <text name="pumpMotor_warningTurnOffFirst" text="Primero apague la bomba!"/>
        <text name="pumpMotor_warningUnitEmpty" text="La fuente de la unidad de la bomba esta vacía!"/>
        <text name="pumpMotor_warningObjectEmpty" text="La bomba esta vacía!"/>
        <text name="pumpMotor_warningInvalidFilltype" text="Esta carga no esta soportada!"/>

        <!-- Hose system connector references -->
        <text name="input_toggleManureFlow" text="Alternar flujo de purín"/>
        <text name="input_toggleLock" text="Alternancia bloqueada"/>

        <text name="action_toggleLockStateLock" text="Bloquear %s"/>
        <text name="action_toggleLockStateUnlock" text="Desbloquear %s"/>

        <text name="action_toggleManureFlow" text="%s flujo purín"/>
        <text name="action_toggleManureFlowStateOpen" text="Abrir"/>
        <text name="action_toggleManureFlowStateClose" text="Cerrar"/>
    </texts>
</l10n>

Error: Running LUA method 'update'.

This issue occurs when this mod is added , and the cause is a script Xentro has made for updating specifications on a upcomming mod.
Error: Running LUA method 'update'.
H:/Dropbox/FarmingSimulator/Dedi17/FS17_hoseSystem/specializations/HoseSystemRegister.lua:212: attempt to index local 'specializationNames' (a nil value)
His answer was to add a check after line 211
if specializationNames ~= nil then
but I can obviously not do that for every user that gets the conflict. Is this something you can add for the next update?

Empty object slowly when manure flow is open

When the flow isn't closed you will lose slurry, because there is still pressure on the connector.

  • Add to the coupling strategy a check to lookup if we don't have anything connected on the other end of the hose.
  • Empty object based on static liters per second value.
  • Show effects?

Refactor coupling strategy

Lookup the impact.

  • Cleanup and search for some better approaches, current is a bit of a mess.
  • Use the handlePump on the actual pump.
  • Do a priority search of the current reference.. or pump with multiple hoses but spread pump efficiency based on the number of target objects.
  • Change hose registration logic

suggestion

I have a suggestion to change the script HoseSystemRegister.lua:


function HoseSystemRegistrationHelper.loadVehicle(super, vehicleData, asyncCallbackFunction, asyncCallbackObject, asyncCallbackArguments)
    local customEnvironment, _ = Utils.getModNameAndBaseDirectory(vehicleData.filename)

    --if customEnvironment ~= nil then
        local typeDef = VehicleTypeUtil.vehicleTypes[vehicleData.typeName]
        local specializations = typeDef.specializations
        local specializationNames = typeDef.specializationNames

        for i = 1, #specializations do
            local specializationName = specializationNames[i]

            --if specializationName ~= nil and specializationName:lower() == string.format('%s.%s', customEnvironment, HoseSystemRegistrationHelper.HOSE_SYSTEM_SPEC_KEY):lower() then
                local specialization = specializations[i]

                if specialization.preLoadHoseSystem ~= nil then
                    super.xmlFile = loadXMLFile('TempConfig', vehicleData.filename)

                    local vehicleLoadState = specializations[i].preLoadHoseSystem(super, vehicleData.savegame)

                    if vehicleLoadState ~= nil and vehicleLoadState ~= BaseMission.VEHICLE_LOAD_OK then
                        HoseSystemUtil:log(HoseSystemUtil.ERROR, specializationName .. "-specialization 'preLoadHoseSystem' failed!")

                        if asyncCallbackFunction ~= nil then
                            asyncCallbackFunction(asyncCallbackObject, nil, vehicleLoadState, asyncCallbackArguments)
                        end

                        return vehicleLoadState
                    end

                    if not super.hoseSystemLoaded then
                        HoseSystemRegistrationHelper:register(super, typeDef.specializations, vehicleData.filename)
                    end

                    delete(super.xmlFile)
                    super.xmlFile = nil
                end
            --end
        end
    --end
end

To support Mods / Scripts like this:
zzz_ExtendStdVeh_HoseSystem.zip

  • This mod adds to the Kotte TSA Hose System Connectors and Park positions by script.
  • do not need to create an extra zip file with i3d, xml and other files
  • ingame do not need to sell the std vehicle and buy the std mod vehicle

Fillarm support

  • Suction arm to suck from the manure pit
  • Add suction fillType categories

Conflict with mod FS17_Ground_Modification

Hallo.
This mod does not work for your mod [(http://www.farming-simulator.com/mod.php?lang=en&country=ru&mod_id=75812&title=fs2017)]
If I add it to an existing game, I get an error FS17_hoseSystem/specializations/HoseSystemRegister.lua:125: attempt to index field 'hoseSystemReferences' (a nil value).
And if I add these two mods at the same time, then hoses are not connected.

Frozen Slurry with Seasons

Freeze the slurry shader plane.

Lookup temp:

g_seasons.weatherManager:isGroundFrozen() or g_seasons.weatherManager:currentTemperature()

  • When frozen the hose cannot be put into the pit. (set collision?)
  • Change pit shader to add an ice reflection effect.

Support for seperate pump

Good afternoon,
would be possible to add a feature, for supporting seperate pumps like this: https://bilder.landwirt.com/0714/7d06ca5a4f35262f246d55c8135841ab.jpg
With them, you can fill barrels which haven't got a pump itself.
I thought about an tag like hoseSystem isPump="true"
at the moment you can only fill the pump (if it got capacity), but not empty it at the same time.
Also, if the barrel is already filled up, the pump doesn't fill up from the pit, but from the barrel.
Best regards

Support on all fillTriggers and placeables.

Add support for placeables and all fillTriggers.

Request count is high.. so high prio.

Two strategies:

  • Expenses (costs money)
  • Capacity (for storage)

Detailed features will follow.

Network optimizations

  • Set object owner connection on hose to get an update priority in MP
  • Cleanup some unnecessary events.
  • Only write source object when it's not the tanker himself. See write/read stream pumpmotor (in case of front dock etc)
  • Check if setIsUsed really needs to have it's own event
  • Check if loading fillable object can be moved to update stream
    g_server:broadcastEvent(HoseSystemLoadFillableObjectAndReferenceEvent:new(self.object, self.object.vehicleToMountHoseSystem, self.object.referenceIdToMountHoseSystem, self.object.referenceIsExtendable))

Manure thickness

  • Increase thickness overtime
  • Add pump friction.. thicker manure means less pump capacity
  • Manure mixing?
  • Decrease movement

Analysis:

  • Separate animal manure production to dry and wet fraction
  • Include water to make manure suckable again

Extendable hoses

Extend your hoses to reach a larger range.

  • Delay pump efficiency
  • Slower player walking speed
  • When the "chain" is to long stop player movement

Never Ending Synchronisation on Dedicated Server

If i try to join my server, i get this error

Error: Running LUA method 'update'.
C:/Users/Jannis/Documents/My Games/FarmingSimulator2017/mods/FS17_hoseSystem_DEV/specializations/HoseSystemPlayerInteractiveHandling.lua:44: attempt to index field 'player' (a nil value)

and the synchronisation is never ending.

Hope you´ve got a solution ;)

incompatible with realistic beacon lights

D:/Farming Simulator 2017/Mods/FS17_hoseSystem/liquidManureHoses/3m/liquidManureHose3m.i3d (74.51) ms
Error: Running LUA method 'update'.
Mods/FS17_RealisticBeaconLights/VariableBeaconLights.lua:18: bad argument #1 to 'pairs' (table expected, got nil)

Double input bug.

Im using this hose system mod and i found a problem here. when im using the STF 25000 VC and at the controls the game is showing 2 Y and 2 R button. now, the problem is: this is double input bug. I don't know why, but that won't work. I can't play without this mod because it makes the game more realistic.. please help me to solve it. That new update won't helped with it

Remove magic grabPoint index logic

There are checks all over the place checking if the current index > 1 or the inverted checks.

Fix this by setting the first and last index in the xml. This will also allows it to add more grabPoints.

e.g:

table.insert(grabPoints, index > 1 and self.object.grabPoints[1] or self.object.grabPoints[#self.object.grabPoints])

local moveDir = grabPoint.id > 1 and -1 or 1

Nasty stuff.

Hose system trouble

I have this trouble in my map

HoseSystem [Warning] : HoseSystem is trying to load the fillTrigger XML file, but the file could not be found! Loading default fillTriggers..
HoseSystem [Warning] : HoseSystem is trying to load the fillTrigger XML file, but the file could not be found! Loading default fillTriggers..
HoseSystem [Warning] : HoseSystem is trying to load the fillTrigger XML file, but the file could not be found! Loading default fillTriggers..

hoseSystem

Some chance is on hoseSystem to Farming Simulator 19

Completely detached hose keeps leaking slurry

The hose in the screenshot was connected to both the FRC and the slurry tank. I first disconnected the slurry tank side by driving away, hose started leaking as expected. I then drove the FRC away, the hose disconnected from it as well, but it kept the slurry leaking animation active indefinitely.

This test was done on the current ModHub version 1.1.0.0, on Goldcrest Valley.

fsscreen_2018_03_14_10_32_11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.