tx · H8kdpwVBwfn2jzKHiGFZsUE2XvUkXix3UFxEqhQD4pHy 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm: -0.05700000 Waves 2023.05.29 02:58 [2598508] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves
{ "type": 13, "id": "H8kdpwVBwfn2jzKHiGFZsUE2XvUkXix3UFxEqhQD4pHy", "fee": 5700000, "feeAssetId": null, "timestamp": 1685318317634, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "9Mv15KFRgvembHZ3Bzyn8ZxAUwED3eejWG1y3e6hBwGxVSH1AoSkVmFBHz2zeBsXaT8LnWXriZpLt3asK7VE4RZ" ], "script": "base64:BgKUAQgCEgMKAQgSAwoBBBIAEgMKAQgSABIDCgEIEgQKAgEIEgQKAgEIEgQKAgICEgQKAgEIEgQKAgEBEgQKAggIEgASBAoCAgISAwoBCBIDCgEIEgQKAggIEgMKARgSAwoBGBIECgIICBIECgIICBIDCgEIEgUKAwgICBIECgIICBIDCgEBEgUKAwEBCBIDCgEIEgMKAQidAQAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZHRBc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwASCE2nqyCAM/TtG7yo7ui5O8yYLdC136B5ao1CP5qA//uQMJAAACAQFUBQckbWF0Y2gwASBVsdifcoeC7+XjW42sBatl3ppDoS8WuwXzGreHpfHFGAkAAgECDVVua25vd24gY2hhaW4ADWluY3ViYXRvckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNQRWt0VnV4MlJoY2hTTjYzRHNEbzRiNG16NFFxektTZUR2AwkAAAIBAVQFByRtYXRjaDAFBHRoaXMJA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SWQFCWxhbmRJbmRleAUKaW5mcmFMZXZlbAIBOgDYErdu", "height": 2598508, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: tfxocZxRdn77gxRpKvWVZqqdLnkrFztXRTF4e14eZgQ Next: FthxRrbD4mpvwvvs5X7nEGjKx6yJXT5EhN1PbvSZLWJm Diff:
Old | New | Differences | |
---|---|---|---|
290 | 290 | ||
291 | 291 | let bpIdxProd = 3 | |
292 | 292 | ||
293 | - | let | |
293 | + | let whIdxLevels = 0 | |
294 | 294 | ||
295 | 295 | let whIdxRes = 1 | |
296 | 296 | ||
298 | 298 | ||
299 | 299 | let whIdxProd = 3 | |
300 | 300 | ||
301 | - | let whIdxLockedVol = 4 | |
301 | + | let whIdxLOFT = 4 | |
302 | + | ||
303 | + | let volLocked = 0 | |
304 | + | ||
305 | + | let volOccupied = 1 | |
306 | + | ||
307 | + | let volFree = 2 | |
308 | + | ||
309 | + | let volTotal = 3 | |
302 | 310 | ||
303 | 311 | let claimModeWh = 0 | |
304 | 312 | ||
634 | 642 | } | |
635 | 643 | ||
636 | 644 | ||
637 | - | func getWarehouse (whKey,landIndex,infraLevel) = { | |
638 | - | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
639 | - | let p = split(valueOrElse(getString(whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")), ":") | |
640 | - | [p[whIdxVol], if ((size(split(p[whIdxRes], "_")) == NUMRES)) | |
641 | - | then p[whIdxRes] | |
642 | - | else "0_0_0_0_0_0", if ((size(split(p[whIdxMat], "_")) == NUMRES)) | |
643 | - | then p[whIdxMat] | |
644 | - | else "0_0_0_0_0_0", p[whIdxProd], if ((5 > size(p))) | |
645 | - | then "0" | |
646 | - | else p[whIdxLockedVol]] | |
645 | + | func getWarehouseOccupiedVol (currentWh) = { | |
646 | + | let goods = currentWh[whIdxProd] | |
647 | + | func sumResMat (acc,item) = (acc + parseIntValue(item)) | |
648 | + | ||
649 | + | func sumProd (acc,item) = { | |
650 | + | let idx = acc._1 | |
651 | + | let pkgSize = productPackages[idx] | |
652 | + | let pkgs = (((parseIntValue(item) + pkgSize) - 1) / pkgSize) | |
653 | + | $Tuple2((idx + 1), (acc._2 + (pkgs * MULT8))) | |
654 | + | } | |
655 | + | ||
656 | + | let whResVol = { | |
657 | + | let $l = split(currentWh[whIdxRes], "_") | |
658 | + | let $s = size($l) | |
659 | + | let $acc0 = 0 | |
660 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
661 | + | then $a | |
662 | + | else sumResMat($a, $l[$i]) | |
663 | + | ||
664 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
665 | + | then $a | |
666 | + | else throw("List size exceeds 6") | |
667 | + | ||
668 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
669 | + | } | |
670 | + | let whMatVol = { | |
671 | + | let $l = split(currentWh[whIdxMat], "_") | |
672 | + | let $s = size($l) | |
673 | + | let $acc0 = 0 | |
674 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
675 | + | then $a | |
676 | + | else sumResMat($a, $l[$i]) | |
677 | + | ||
678 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
679 | + | then $a | |
680 | + | else throw("List size exceeds 6") | |
681 | + | ||
682 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
683 | + | } | |
684 | + | let whGoodsVol = if ((goods == "")) | |
685 | + | then 0 | |
686 | + | else ( let $l = split_4C(goods, "_") | |
687 | + | let $s = size($l) | |
688 | + | let $acc0 = $Tuple2(0, 0) | |
689 | + | func $f2_1 ($a,$i) = if (($i >= $s)) | |
690 | + | then $a | |
691 | + | else sumProd($a, $l[$i]) | |
692 | + | ||
693 | + | func $f2_2 ($a,$i) = if (($i >= $s)) | |
694 | + | then $a | |
695 | + | else throw("List size exceeds 50") | |
696 | + | ||
697 | + | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
698 | + | ((whResVol + whMatVol) + whGoodsVol) | |
647 | 699 | } | |
648 | 700 | ||
649 | 701 | ||
650 | - | func getWarehouseCurrResVolume (currentWh) = { | |
651 | - | func sum (acc,item) = (acc + parseIntValue(item)) | |
652 | - | ||
653 | - | let $l = split(currentWh[whIdxRes], "_") | |
654 | - | let $s = size($l) | |
655 | - | let $acc0 = 0 | |
656 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
657 | - | then $a | |
658 | - | else sum($a, $l[$i]) | |
659 | - | ||
660 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
661 | - | then $a | |
662 | - | else throw("List size exceeds 6") | |
663 | - | ||
664 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
665 | - | } | |
666 | - | ||
667 | - | ||
668 | - | func getWarehouseCurrMatVolume (currentWh) = { | |
669 | - | func sum (acc,item) = (acc + parseIntValue(item)) | |
670 | - | ||
671 | - | let $l = split(currentWh[whIdxMat], "_") | |
672 | - | let $s = size($l) | |
673 | - | let $acc0 = 0 | |
674 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
675 | - | then $a | |
676 | - | else sum($a, $l[$i]) | |
677 | - | ||
678 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
679 | - | then $a | |
680 | - | else throw("List size exceeds 6") | |
681 | - | ||
682 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
683 | - | } | |
684 | - | ||
685 | - | ||
686 | - | func getWarehouseCurrGoodsVolume (currentWh) = { | |
687 | - | let goods = currentWh[whIdxProd] | |
688 | - | if ((goods == "")) | |
689 | - | then 0 | |
702 | + | func getWarehouse (whKey,landIndex,infraLevel) = { | |
703 | + | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
704 | + | let whTotal = getWarehouseTotalVolume(volPrefix) | |
705 | + | let whStr = valueOrElse(getString(whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")) | |
706 | + | let wh = split_4C(whStr, ":") | |
707 | + | let whOccupied = getWarehouseOccupiedVol(wh) | |
708 | + | let whLoft = if ((5 > size(wh))) | |
709 | + | then makeString(["0", toString(whOccupied), toString((whTotal - whOccupied)), toString(whTotal)], "_") | |
690 | 710 | else { | |
691 | - | func sum (acc,item) = { | |
692 | - | let idx = acc._1 | |
693 | - | let pkgSize = productPackages[idx] | |
694 | - | let pkgs = (((parseIntValue(item) + pkgSize) - 1) / pkgSize) | |
695 | - | $Tuple2((idx + 1), (acc._2 + (pkgs * MULT8))) | |
696 | - | } | |
697 | - | ||
698 | - | ( let $l = split_4C(goods, "_") | |
699 | - | let $s = size($l) | |
700 | - | let $acc0 = $Tuple2(0, 0) | |
701 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
702 | - | then $a | |
703 | - | else sum($a, $l[$i]) | |
704 | - | ||
705 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
706 | - | then $a | |
707 | - | else throw("List size exceeds 50") | |
708 | - | ||
709 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
711 | + | let loft = split(wh[whIdxLOFT], "_") | |
712 | + | let whLocked = parseIntValue(loft[volLocked]) | |
713 | + | let occ = if ((size(loft) > 1)) | |
714 | + | then parseIntValue(loft[volOccupied]) | |
715 | + | else whOccupied | |
716 | + | makeString([toString(whLocked), toString(occ), toString(((whTotal - whLocked) - occ)), toString(whTotal)], "_") | |
710 | 717 | } | |
718 | + | [wh[whIdxLevels], if ((size(split(wh[whIdxRes], "_")) == NUMRES)) | |
719 | + | then wh[whIdxRes] | |
720 | + | else "0_0_0_0_0_0", if ((size(split(wh[whIdxMat], "_")) == NUMRES)) | |
721 | + | then wh[whIdxMat] | |
722 | + | else "0_0_0_0_0_0", wh[whIdxProd], whLoft] | |
711 | 723 | } | |
712 | 724 | ||
713 | 725 | ||
714 | 726 | func getWarehouseSpaceLeft (currentWh) = { | |
715 | - | let currWhResVol = getWarehouseCurrResVolume(currentWh) | |
716 | - | let currWhMatVol = getWarehouseCurrMatVolume(currentWh) | |
717 | - | let currWhGoodsVol = getWarehouseCurrGoodsVolume(currentWh) | |
718 | - | let currWhLockedVol = parseIntValue(currentWh[whIdxLockedVol]) | |
719 | - | ((((getWarehouseTotalVolume(currentWh[whIdxVol]) - currWhResVol) - currWhMatVol) - currWhGoodsVol) - currWhLockedVol) | |
727 | + | let occupiedVol = getWarehouseOccupiedVol(currentWh) | |
728 | + | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
729 | + | ((getWarehouseTotalVolume(currentWh[whIdxLevels]) - occupiedVol) - currWhLockedVol) | |
730 | + | } | |
731 | + | ||
732 | + | ||
733 | + | func toVolume (amount,pkgSize) = { | |
734 | + | let pkgs = if ((amount >= 0)) | |
735 | + | then (((amount + pkgSize) - 1) / pkgSize) | |
736 | + | else -((((-(amount) + pkgSize) - 1) / pkgSize)) | |
737 | + | (pkgs * MULT8) | |
720 | 738 | } | |
721 | 739 | ||
722 | 740 | ||
806 | 824 | } | |
807 | 825 | func mvP (acc,item) = { | |
808 | 826 | let i = acc._1 | |
827 | + | let pkgSize = productPackages[i] | |
809 | 828 | let am = parseIntValue(item) | |
810 | 829 | let whp = if ((size(currWhProd) > i)) | |
811 | 830 | then parseIntValue(currWhProd[i]) | |
818 | 837 | else if ((am > 0)) | |
819 | 838 | then if ((am > bpp)) | |
820 | 839 | then throw((((("Attempt to take " + item) + " from backpack, but only ") + toString(bpp)) + " available")) | |
821 | - | else $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + am)) | |
840 | + | else { | |
841 | + | let deltaVol = (toVolume((whp + am), pkgSize) - toVolume(whp, pkgSize)) | |
842 | + | $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + deltaVol)) | |
843 | + | } | |
822 | 844 | else if ((-(am) > whp)) | |
823 | 845 | then throw((((("Attempt to take " + toString(-(am))) + " from warehouse, but only ") + toString(whp)) + " available")) | |
824 | - | else $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + am)) | |
846 | + | else { | |
847 | + | let deltaVol = (toVolume((whp + am), pkgSize) - toVolume(whp, pkgSize)) | |
848 | + | $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + deltaVol)) | |
849 | + | } | |
825 | 850 | } | |
826 | 851 | ||
827 | 852 | let p = if ((size(prodParts) != 0)) | |
843 | 868 | let volSaldo = p._4 | |
844 | 869 | if ((volSaldo > whSpaceLeft)) | |
845 | 870 | then throw((((("Attempt to put total " + toString(volSaldo)) + " stuff, but only ") + toString(whSpaceLeft)) + " warehouse space left")) | |
846 | - | else $ | |
871 | + | else $Tuple7(makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_"), makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_"), volSaldo) | |
847 | 872 | } | |
848 | 873 | } | |
849 | 874 | ||
919 | 944 | ||
920 | 945 | ||
921 | 946 | func checkClaimConditions (addr,claimMode,landAssetIdIn) = { | |
922 | - | let $ | |
947 | + | let $t02663227171 = if ((claimMode == claimModeWh)) | |
923 | 948 | then $Tuple2(landAssetIdIn, valueOrElse(getString(keyStakedDuckByOwner(addr)), "")) | |
924 | 949 | else { | |
925 | 950 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
929 | 954 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
930 | 955 | else $Tuple2(loc[locIdxId], duckAssetId) | |
931 | 956 | } | |
932 | - | let landAssetId = $ | |
933 | - | let duckId = $ | |
957 | + | let landAssetId = $t02663227171._1 | |
958 | + | let duckId = $t02663227171._2 | |
934 | 959 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
935 | 960 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
936 | 961 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("Land " + asset.name) + " is not staked")) | |
967 | 992 | let whKey = keyWarehouseByLand(c._2) | |
968 | 993 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(c._2)), 0) | |
969 | 994 | let currentWh = getWarehouse(whKey, landIndex, infraLevel) | |
970 | - | let whSpaceLeft = getWarehouseSpaceLeft(currentWh) | |
995 | + | let loft = split(currentWh[whIdxLOFT], "_") | |
996 | + | let whSpaceLeft = parseIntValue(loft[volFree]) | |
971 | 997 | if (if ((claimMode == claimModeWh)) | |
972 | 998 | then (amount > whSpaceLeft) | |
973 | 999 | else false) | |
977 | 1003 | let currentPack = getBackpack(bpKey) | |
978 | 1004 | let currentPackRes = split(currentPack[bpIdxRes], "_") | |
979 | 1005 | let currentWhRes = split(currentWh[whIdxRes], "_") | |
980 | - | let $ | |
981 | - | then $ | |
1006 | + | let $t02954530416 = if ((claimMode == claimModeWh)) | |
1007 | + | then $Tuple4(addRes(currentWhRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece), currentPack[bpIdxRes], (parseIntValue(loft[volOccupied]) + resToClaim._2), (parseIntValue(loft[volFree]) - resToClaim._2)) | |
982 | 1008 | else if ((claimMode == claimModeDuck)) | |
983 | - | then $Tuple2(currentWh[whIdxRes], addRes(currentPackRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece)) | |
984 | - | else distributeRes(currentWhRes, currentPackRes, resToClaim, whSpaceLeft) | |
985 | - | let whRes = $t02866529168._1 | |
986 | - | let bpRes = $t02866529168._2 | |
987 | - | $Tuple5([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], whKey, [currentWh[whIdxVol], whRes, currentWh[whIdxMat], currentWh[whIdxProd], currentWh[whIdxLockedVol]]) | |
1009 | + | then $Tuple4(currentWh[whIdxRes], addRes(currentPackRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece), parseIntValue(loft[volOccupied]), parseIntValue(loft[volFree])) | |
1010 | + | else { | |
1011 | + | let distr = distributeRes(currentWhRes, currentPackRes, resToClaim, whSpaceLeft) | |
1012 | + | let whAm = min([parseIntValue(loft[volFree]), resToClaim._2]) | |
1013 | + | $Tuple4(distr._1, distr._2, (parseIntValue(loft[volOccupied]) + whAm), (parseIntValue(loft[volFree]) - whAm)) | |
1014 | + | } | |
1015 | + | let whRes = $t02954530416._1 | |
1016 | + | let bpRes = $t02954530416._2 | |
1017 | + | let loftO = $t02954530416._3 | |
1018 | + | let loftF = $t02954530416._4 | |
1019 | + | $Tuple5([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], whKey, [currentWh[whIdxLevels], whRes, currentWh[whIdxMat], currentWh[whIdxProd], makeString([loft[volLocked], toString(loftO), toString(loftF), loft[volTotal]], "_")]) | |
988 | 1020 | } | |
989 | 1021 | } | |
990 | 1022 | } | |
1021 | 1053 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), SSIZE)), "_") | |
1022 | 1054 | let claimResult = claimAll(addr, c._2, pieces, claimModeWhThenDuck) | |
1023 | 1055 | let whData = claimResult._5 | |
1024 | - | let newVolData = makeString([split(whData[whIdxVol], "_")[0], toString(newLevel)], "_") | |
1025 | - | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString([newVolData, whData[whIdxRes], whData[whIdxMat], whData[whIdxProd], whData[whIdxLockedVol]], ":"))] ++ claimResult._1), newLevel) | |
1056 | + | let oldVol = getWarehouseTotalVolume(whData[whIdxLevels]) | |
1057 | + | let newVolData = makeString([split(whData[whIdxLevels], "_")[0], toString(newLevel)], "_") | |
1058 | + | let newVol = getWarehouseTotalVolume(newVolData) | |
1059 | + | let loft = split(whData[whIdxLOFT], "_") | |
1060 | + | let newLoftStr = makeString([loft[volLocked], loft[volOccupied], toString(((parseIntValue(loft[volFree]) + newVol) - oldVol)), toString(newVol)], "_") | |
1061 | + | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString([newVolData, whData[whIdxRes], whData[whIdxMat], whData[whIdxProd], newLoftStr], ":"))] ++ claimResult._1), newLevel) | |
1026 | 1062 | } | |
1027 | 1063 | } | |
1028 | 1064 | } | |
1676 | 1712 | let bpKey = keyBackpackByDuck(duckAssetId) | |
1677 | 1713 | let currentPack = getBackpack(bpKey) | |
1678 | 1714 | let result = moveStuff(cargoParts, currentWh, currentPack) | |
1679 | - | [StringEntry(bpKey, makeString([currentPack[bpIdxLevel], result._4, result._5, result._6], ":")), StringEntry(whKey, makeString([currentWh[whIdxVol], result._1, result._2, result._3, currentWh[whIdxLockedVol]], ":")), prologAction] | |
1715 | + | let loft = split(currentWh[whIdxLOFT], "_") | |
1716 | + | let loftO = (parseIntValue(loft[volOccupied]) + result._7) | |
1717 | + | let loftF = (parseIntValue(loft[volFree]) - result._7) | |
1718 | + | [StringEntry(bpKey, makeString_2C([currentPack[bpIdxLevel], result._4, result._5, result._6], ":")), StringEntry(whKey, makeString_2C([currentWh[whIdxLevels], result._1, result._2, result._3, makeString([loft[volLocked], toString(loftO), toString(loftF), loft[volTotal]], "_")], ":")), prologAction] | |
1680 | 1719 | } | |
1681 | 1720 | } | |
1682 | 1721 | } | |
1692 | 1731 | then throw("Access denied") | |
1693 | 1732 | else { | |
1694 | 1733 | let whKey = keyWarehouseByLand(landAssetId) | |
1695 | - | if ((size(split_4C(whStr, ":")) != 5)) | |
1734 | + | let wh = split_4C(whStr, ":") | |
1735 | + | if ((size(wh) != 5)) | |
1696 | 1736 | then throw("warehouse string should contain 4 ':' separators") | |
1697 | - | else $Tuple2([StringEntry(whKey, whStr), prologAction], whStr) | |
1737 | + | else { | |
1738 | + | let loftL = split(wh[whIdxLOFT], "_")[volLocked] | |
1739 | + | let loftO = getWarehouseOccupiedVol(wh) | |
1740 | + | let loftT = getWarehouseTotalVolume(wh[whIdxLevels]) | |
1741 | + | let loftF = ((loftT - parseIntValue(loftL)) - loftO) | |
1742 | + | let newWhStr = makeString_2C([wh[whIdxLevels], wh[whIdxRes], wh[whIdxMat], wh[whIdxProd], makeString([loftL, toString(loftO), toString(loftF), toString(loftT)], "_")], ":") | |
1743 | + | $Tuple2([StringEntry(whKey, newWhStr), prologAction], newWhStr) | |
1744 | + | } | |
1698 | 1745 | } | |
1699 | 1746 | } | |
1700 | 1747 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let usdtAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if ((base58'2W' == $match0)) | |
9 | 9 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
10 | 10 | else if ((base58'2T' == $match0)) | |
11 | 11 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let incubatorAddr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if ((base58'2W' == $match0)) | |
18 | 18 | then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv") | |
19 | 19 | else if ((base58'2T' == $match0)) | |
20 | 20 | then this | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let breederAddr = match chain { | |
25 | 25 | case _ => | |
26 | 26 | if ((base58'2W' == $match0)) | |
27 | 27 | then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb") | |
28 | 28 | else if ((base58'2T' == $match0)) | |
29 | 29 | then this | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let defaultRestAddressStr = match chain { | |
34 | 34 | case _ => | |
35 | 35 | if ((base58'2W' == $match0)) | |
36 | 36 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
37 | 37 | else if ((base58'2T' == $match0)) | |
38 | 38 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
39 | 39 | else throw("Unknown chain") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD' | |
43 | 43 | ||
44 | 44 | let HEALCOST = 10000 | |
45 | 45 | ||
46 | 46 | let LANDPREFIX = "LAND" | |
47 | 47 | ||
48 | 48 | let DUCKPREFIX = "DUCK" | |
49 | 49 | ||
50 | 50 | let DEFAULTLOCATION = "Africa_F_Africa" | |
51 | 51 | ||
52 | 52 | let NUMRES = 6 | |
53 | 53 | ||
54 | 54 | let SSIZE = 25 | |
55 | 55 | ||
56 | 56 | let MSIZE = 100 | |
57 | 57 | ||
58 | 58 | let LSIZE = 225 | |
59 | 59 | ||
60 | 60 | let XLSIZE = 400 | |
61 | 61 | ||
62 | 62 | let XXLSIZE = 625 | |
63 | 63 | ||
64 | 64 | let DAILYRESBYPIECE = 3456000 | |
65 | 65 | ||
66 | 66 | let DAYMILLIS = 86400000 | |
67 | 67 | ||
68 | 68 | let FIVEMINUTESMILLIS = 300000 | |
69 | 69 | ||
70 | 70 | let RESOURCEPRICEMIN = 39637 | |
71 | 71 | ||
72 | 72 | let WHMULTIPLIER = 10000000000 | |
73 | 73 | ||
74 | 74 | let RENAMINGCOST = 5000000 | |
75 | 75 | ||
76 | 76 | let MAXNAMELEN = 50 | |
77 | 77 | ||
78 | 78 | let InfraUpgradeCostS = match chain { | |
79 | 79 | case _ => | |
80 | 80 | if ((base58'2W' == $match0)) | |
81 | 81 | then 10000000000 | |
82 | 82 | else if ((base58'2T' == $match0)) | |
83 | 83 | then 100000000 | |
84 | 84 | else throw("Unknown chain") | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | let InfraUpgradeCostSUsdt = match chain { | |
88 | 88 | case _ => | |
89 | 89 | if ((base58'2W' == $match0)) | |
90 | 90 | then 10000000 | |
91 | 91 | else if ((base58'2T' == $match0)) | |
92 | 92 | then 10000000 | |
93 | 93 | else throw("Unknown chain") | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | let EXPMATERIALS = match chain { | |
97 | 97 | case _ => | |
98 | 98 | if ((base58'2W' == $match0)) | |
99 | 99 | then 252289527462 | |
100 | 100 | else if ((base58'2T' == $match0)) | |
101 | 101 | then 2522895274 | |
102 | 102 | else throw("Unknown chain") | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | let EXPUSDT = match chain { | |
106 | 106 | case _ => | |
107 | 107 | if ((base58'2W' == $match0)) | |
108 | 108 | then 250000000 | |
109 | 109 | else if ((base58'2T' == $match0)) | |
110 | 110 | then 250000000 | |
111 | 111 | else throw("Unknown chain") | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | let SEP = "__" | |
115 | 115 | ||
116 | 116 | let MULT6 = 1000000 | |
117 | 117 | ||
118 | 118 | let MULT8 = 100000000 | |
119 | 119 | ||
120 | 120 | let FIVEX = toBigInt(5) | |
121 | 121 | ||
122 | 122 | let TWENTYX = toBigInt(20) | |
123 | 123 | ||
124 | 124 | let TWENTY2X = toBigInt((20 * 20)) | |
125 | 125 | ||
126 | 126 | let TWENTY3X = toBigInt(((20 * 20) * 20)) | |
127 | 127 | ||
128 | 128 | let TWENTY4X = toBigInt((((20 * 20) * 20) * 20)) | |
129 | 129 | ||
130 | 130 | let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20)) | |
131 | 131 | ||
132 | 132 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
133 | 133 | ||
134 | 134 | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
135 | 135 | ||
136 | 136 | let ARTPRESALE = "PRESALE" | |
137 | 137 | ||
138 | 138 | let PRESALENUMLANDS = 500 | |
139 | 139 | ||
140 | 140 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | let IdxCfgStakingDapp = 1 | |
147 | 147 | ||
148 | 148 | let IdxCfgEconomyDapp = 2 | |
149 | 149 | ||
150 | 150 | let IdxCfgGovernanceDapp = 3 | |
151 | 151 | ||
152 | 152 | func keyRestCfg () = "%s__restConfig" | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func keyRestAddress () = "%s__restAddr" | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
165 | 165 | ||
166 | 166 | let restCfg = readRestCfgOrFail(restContract) | |
167 | 167 | ||
168 | 168 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
169 | 169 | ||
170 | 170 | let govContract = getContractAddressOrFail(restCfg, IdxCfgGovernanceDapp) | |
171 | 171 | ||
172 | 172 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyNextFreeLandNum () = "nextLandNum" | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyLandToAssetId (landNum) = ("landToAsset_" + landNum) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func keyLandAssetIdToCustomName (assetId) = ("landCustomNameByAssetId_" + assetId) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func keyDuckAssetIdToCustomName (assetId) = ("duckCustomNameByAssetId_" + assetId) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func keyAddressToCustomName (addr) = ("accountCustomNameByAddr_" + addr) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func keyLandCustomNameToAssetId (name) = ("landByCustomName_" + name) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func keyDuckCustomNameToAssetId (name) = ("duckByCustomName_" + name) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func keyCustomNameToAddress (name) = ("accountByCustomName_" + name) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func keyAddressRefBy (addr) = ("accRefBy_" + addr) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func keyAddressReferrals (addr) = ("accReferrals_" + addr) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func keyOldies () = "oldiesList" | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func keyInfraLevelByAssetIdAndOwner (assetId,ownerAddr) = ((("infraLevelByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func keyPresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func keyPresaleArtActivatedByAssetIdAndOwner (assetId,ownerAddr) = ((("presaleArtActivatedByAssetIdAndOwner_" + assetId) + "_") + ownerAddr) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func keyLandArtStatusByTypeAndAssetId (type,assetId) = makeString(["landArtStatus", type, assetId], "_") | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func keyLandArtStatusByTypeAssetIdAndOwner (type,assetId,ownerAddr) = makeString(["landArtStatusByTypeAssetIdAndOwner", type, assetId, ownerAddr], "_") | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | func keyLandNumToOwner (landNum) = ("landOwner_" + landNum) | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
248 | 248 | ||
249 | 249 | ||
250 | 250 | func keyWarehouseByLand (landAssetId) = ("wareHouse_" + landAssetId) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func keyResProportions () = "resTypesProportions" | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func keyBlocked () = "contractsBlocked" | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func keyUserGwlReleaseTime (userAddr) = ("%s%s__userGwlReleaseTime__" + userAddr) | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | let recLandNum = 0 | |
272 | 272 | ||
273 | 273 | let recLandSize = 1 | |
274 | 274 | ||
275 | 275 | let recTerrains = 2 | |
276 | 276 | ||
277 | 277 | let recContinent = 3 | |
278 | 278 | ||
279 | 279 | let locIdxContinent = 0 | |
280 | 280 | ||
281 | 281 | let locIdxType = 1 | |
282 | 282 | ||
283 | 283 | let locIdxId = 2 | |
284 | 284 | ||
285 | 285 | let bpIdxLevel = 0 | |
286 | 286 | ||
287 | 287 | let bpIdxRes = 1 | |
288 | 288 | ||
289 | 289 | let bpIdxMat = 2 | |
290 | 290 | ||
291 | 291 | let bpIdxProd = 3 | |
292 | 292 | ||
293 | - | let | |
293 | + | let whIdxLevels = 0 | |
294 | 294 | ||
295 | 295 | let whIdxRes = 1 | |
296 | 296 | ||
297 | 297 | let whIdxMat = 2 | |
298 | 298 | ||
299 | 299 | let whIdxProd = 3 | |
300 | 300 | ||
301 | - | let whIdxLockedVol = 4 | |
301 | + | let whIdxLOFT = 4 | |
302 | + | ||
303 | + | let volLocked = 0 | |
304 | + | ||
305 | + | let volOccupied = 1 | |
306 | + | ||
307 | + | let volFree = 2 | |
308 | + | ||
309 | + | let volTotal = 3 | |
302 | 310 | ||
303 | 311 | let claimModeWh = 0 | |
304 | 312 | ||
305 | 313 | let claimModeDuck = 1 | |
306 | 314 | ||
307 | 315 | let claimModeWhThenDuck = 2 | |
308 | 316 | ||
309 | 317 | let flHealth = 0 | |
310 | 318 | ||
311 | 319 | let flMission = 1 | |
312 | 320 | ||
313 | 321 | let flObstacles = 2 | |
314 | 322 | ||
315 | 323 | let flWinds = 3 | |
316 | 324 | ||
317 | 325 | let flPath = 4 | |
318 | 326 | ||
319 | 327 | let flTimestamp = 5 | |
320 | 328 | ||
321 | 329 | let flBonus = 6 | |
322 | 330 | ||
323 | 331 | let productPackages = [10, 10, 10, 100, 100, 100, 10, 10, 10, 100, 100, 100, 10, 10, 10] | |
324 | 332 | ||
325 | 333 | func asString (v) = match v { | |
326 | 334 | case s: String => | |
327 | 335 | s | |
328 | 336 | case _ => | |
329 | 337 | throw("fail to cast into String") | |
330 | 338 | } | |
331 | 339 | ||
332 | 340 | ||
333 | 341 | func asInt (v) = match v { | |
334 | 342 | case n: Int => | |
335 | 343 | n | |
336 | 344 | case _ => | |
337 | 345 | throw("fail to cast into Int") | |
338 | 346 | } | |
339 | 347 | ||
340 | 348 | ||
341 | 349 | func distributeByWeights (total,weights) = { | |
342 | 350 | let sum = (((((weights[0] + weights[1]) + weights[2]) + weights[3]) + weights[4]) + weights[5]) | |
343 | 351 | if ((0 >= sum)) | |
344 | 352 | then throw("Zero weights sum") | |
345 | 353 | else { | |
346 | 354 | let norm6 = fraction(total, MULT6, sum) | |
347 | 355 | func normalizer (acc,elem) = (acc :+ fraction(elem, norm6, MULT6)) | |
348 | 356 | ||
349 | 357 | let $l = weights | |
350 | 358 | let $s = size($l) | |
351 | 359 | let $acc0 = nil | |
352 | 360 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
353 | 361 | then $a | |
354 | 362 | else normalizer($a, $l[$i]) | |
355 | 363 | ||
356 | 364 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
357 | 365 | then $a | |
358 | 366 | else throw("List size exceeds 6") | |
359 | 367 | ||
360 | 368 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
361 | 369 | } | |
362 | 370 | } | |
363 | 371 | ||
364 | 372 | ||
365 | 373 | func getNeededMaterials (total) = { | |
366 | 374 | let props = split(value(getString(keyResProportions())), "_") | |
367 | 375 | if ((size(props) != NUMRES)) | |
368 | 376 | then throw("Wrong proportions data") | |
369 | 377 | else { | |
370 | 378 | let r = [parseIntValue(props[0]), parseIntValue(props[1]), parseIntValue(props[2]), parseIntValue(props[3]), parseIntValue(props[4]), parseIntValue(props[5])] | |
371 | 379 | distributeByWeights(total, r) | |
372 | 380 | } | |
373 | 381 | } | |
374 | 382 | ||
375 | 383 | ||
376 | 384 | func subtractMaterials (shouldUseMat,has,totalNeed) = { | |
377 | 385 | let need = getNeededMaterials(totalNeed) | |
378 | 386 | func subtractor (acc,idx) = { | |
379 | 387 | let result = (parseIntValue(has[idx]) - need[idx]) | |
380 | 388 | if ((0 > result)) | |
381 | 389 | then throw(((((("Not enough material idx=" + toString(idx)) + ", you have ") + has[idx]) + ", but need ") + toString(need[idx]))) | |
382 | 390 | else (acc :+ toString(result)) | |
383 | 391 | } | |
384 | 392 | ||
385 | 393 | if (shouldUseMat) | |
386 | 394 | then { | |
387 | 395 | let $l = [0, 1, 2, 3, 4, 5] | |
388 | 396 | let $s = size($l) | |
389 | 397 | let $acc0 = nil | |
390 | 398 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
391 | 399 | then $a | |
392 | 400 | else subtractor($a, $l[$i]) | |
393 | 401 | ||
394 | 402 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
395 | 403 | then $a | |
396 | 404 | else throw("List size exceeds 6") | |
397 | 405 | ||
398 | 406 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
399 | 407 | } | |
400 | 408 | else has | |
401 | 409 | } | |
402 | 410 | ||
403 | 411 | ||
404 | 412 | func updateProportionsInternal (propList,terrainCounts,landSizeIndex,sign) = if ((size(propList) != NUMRES)) | |
405 | 413 | then throw("Wrong proportions data") | |
406 | 414 | else { | |
407 | 415 | func updater (acc,i) = { | |
408 | 416 | let result = (parseIntValue(propList[i]) + ((sign * terrainCounts[i]) * landSizeIndex)) | |
409 | 417 | if ((0 > result)) | |
410 | 418 | then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex))) | |
411 | 419 | else (acc :+ toString(result)) | |
412 | 420 | } | |
413 | 421 | ||
414 | 422 | let r = { | |
415 | 423 | let $l = [0, 1, 2, 3, 4, 5] | |
416 | 424 | let $s = size($l) | |
417 | 425 | let $acc0 = nil | |
418 | 426 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
419 | 427 | then $a | |
420 | 428 | else updater($a, $l[$i]) | |
421 | 429 | ||
422 | 430 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
423 | 431 | then $a | |
424 | 432 | else throw("List size exceeds 6") | |
425 | 433 | ||
426 | 434 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
427 | 435 | } | |
428 | 436 | makeString(r, "_") | |
429 | 437 | } | |
430 | 438 | ||
431 | 439 | ||
432 | 440 | func updateProportions (terrainCounts,landSizeIndex,sign) = { | |
433 | 441 | let propList = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_") | |
434 | 442 | updateProportionsInternal(propList, terrainCounts, landSizeIndex, sign) | |
435 | 443 | } | |
436 | 444 | ||
437 | 445 | ||
438 | 446 | func countTerrains (terrains) = [(size(split(terrains, "A")) - 1), (size(split(terrains, "B")) - 1), (size(split(terrains, "C")) - 1), (size(split(terrains, "D")) - 1), (size(split(terrains, "E")) - 1), (size(split(terrains, "F")) - 1)] | |
439 | 447 | ||
440 | 448 | ||
441 | 449 | func numPiecesBySize (landSize) = match landSize { | |
442 | 450 | case _ => | |
443 | 451 | if (("S" == $match0)) | |
444 | 452 | then SSIZE | |
445 | 453 | else if (("M" == $match0)) | |
446 | 454 | then MSIZE | |
447 | 455 | else if (("L" == $match0)) | |
448 | 456 | then LSIZE | |
449 | 457 | else if (("XL" == $match0)) | |
450 | 458 | then XLSIZE | |
451 | 459 | else if (("XXL" == $match0)) | |
452 | 460 | then XXLSIZE | |
453 | 461 | else throw("Unknown land size") | |
454 | 462 | } | |
455 | 463 | ||
456 | 464 | ||
457 | 465 | func subOneInList (aList,idx,amount) = { | |
458 | 466 | func subber (acc,i) = (acc :+ (if ((i == idx)) | |
459 | 467 | then toString((parseIntValue(aList[i]) - amount)) | |
460 | 468 | else aList[i])) | |
461 | 469 | ||
462 | 470 | let r = { | |
463 | 471 | let $l = [0, 1, 2, 3, 4, 5] | |
464 | 472 | let $s = size($l) | |
465 | 473 | let $acc0 = nil | |
466 | 474 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
467 | 475 | then $a | |
468 | 476 | else subber($a, $l[$i]) | |
469 | 477 | ||
470 | 478 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
471 | 479 | then $a | |
472 | 480 | else throw("List size exceeds 6") | |
473 | 481 | ||
474 | 482 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
475 | 483 | } | |
476 | 484 | makeString(r, "_") | |
477 | 485 | } | |
478 | 486 | ||
479 | 487 | ||
480 | 488 | func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = { | |
481 | 489 | func adder (acc,i) = { | |
482 | 490 | let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
483 | 491 | (acc :+ toString((parseIntValue(currentRes[i]) + resOfType))) | |
484 | 492 | } | |
485 | 493 | ||
486 | 494 | let r = { | |
487 | 495 | let $l = [0, 1, 2, 3, 4, 5] | |
488 | 496 | let $s = size($l) | |
489 | 497 | let $acc0 = nil | |
490 | 498 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
491 | 499 | then $a | |
492 | 500 | else adder($a, $l[$i]) | |
493 | 501 | ||
494 | 502 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
495 | 503 | then $a | |
496 | 504 | else throw("List size exceeds 6") | |
497 | 505 | ||
498 | 506 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
499 | 507 | } | |
500 | 508 | makeString(r, "_") | |
501 | 509 | } | |
502 | 510 | ||
503 | 511 | ||
504 | 512 | func virtClaim (terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = { | |
505 | 513 | func adder (acc,i) = { | |
506 | 514 | let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
507 | 515 | $Tuple2((acc._1 :+ resOfType), (acc._2 + resOfType)) | |
508 | 516 | } | |
509 | 517 | ||
510 | 518 | let $l = [0, 1, 2, 3, 4, 5] | |
511 | 519 | let $s = size($l) | |
512 | 520 | let $acc0 = $Tuple2(nil, 0) | |
513 | 521 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
514 | 522 | then $a | |
515 | 523 | else adder($a, $l[$i]) | |
516 | 524 | ||
517 | 525 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
518 | 526 | then $a | |
519 | 527 | else throw("List size exceeds 6") | |
520 | 528 | ||
521 | 529 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
522 | 530 | } | |
523 | 531 | ||
524 | 532 | ||
525 | 533 | func distributeRes (currentWhRes,currentPackRes,resToClaim,whSpaceLeft) = { | |
526 | 534 | let resListToClaim = resToClaim._1 | |
527 | 535 | let resAmToClaim = resToClaim._2 | |
528 | 536 | if ((resAmToClaim == 0)) | |
529 | 537 | then $Tuple2(makeString(currentWhRes, "_"), makeString(currentPackRes, "_")) | |
530 | 538 | else if ((whSpaceLeft >= resAmToClaim)) | |
531 | 539 | then { | |
532 | 540 | func addLists (acc,i) = (acc :+ toString((parseIntValue(currentWhRes[i]) + resListToClaim[i]))) | |
533 | 541 | ||
534 | 542 | let r = { | |
535 | 543 | let $l = [0, 1, 2, 3, 4, 5] | |
536 | 544 | let $s = size($l) | |
537 | 545 | let $acc0 = nil | |
538 | 546 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
539 | 547 | then $a | |
540 | 548 | else addLists($a, $l[$i]) | |
541 | 549 | ||
542 | 550 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
543 | 551 | then $a | |
544 | 552 | else throw("List size exceeds 6") | |
545 | 553 | ||
546 | 554 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
547 | 555 | } | |
548 | 556 | $Tuple2(makeString(r, "_"), makeString(currentPackRes, "_")) | |
549 | 557 | } | |
550 | 558 | else { | |
551 | 559 | func addPartLists (acc,i) = { | |
552 | 560 | let whPart = fraction(resListToClaim[i], whSpaceLeft, resAmToClaim) | |
553 | 561 | $Tuple2((acc._1 :+ toString((parseIntValue(currentWhRes[i]) + whPart))), (acc._2 :+ toString(((parseIntValue(currentPackRes[i]) + resListToClaim[i]) - whPart)))) | |
554 | 562 | } | |
555 | 563 | ||
556 | 564 | let r = { | |
557 | 565 | let $l = [0, 1, 2, 3, 4, 5] | |
558 | 566 | let $s = size($l) | |
559 | 567 | let $acc0 = $Tuple2(nil, nil) | |
560 | 568 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
561 | 569 | then $a | |
562 | 570 | else addPartLists($a, $l[$i]) | |
563 | 571 | ||
564 | 572 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
565 | 573 | then $a | |
566 | 574 | else throw("List size exceeds 6") | |
567 | 575 | ||
568 | 576 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
569 | 577 | } | |
570 | 578 | $Tuple2(makeString(r._1, "_"), makeString(r._2, "_")) | |
571 | 579 | } | |
572 | 580 | } | |
573 | 581 | ||
574 | 582 | ||
575 | 583 | func abs (x) = if ((x >= toBigInt(0))) | |
576 | 584 | then x | |
577 | 585 | else -(x) | |
578 | 586 | ||
579 | 587 | ||
580 | 588 | let freq = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]] | |
581 | 589 | ||
582 | 590 | func genChar (n,freqs) = { | |
583 | 591 | let rem = toInt((n % TWENTYX)) | |
584 | 592 | let letter = if ((freqs[0] > rem)) | |
585 | 593 | then "A" | |
586 | 594 | else if ((freqs[1] > rem)) | |
587 | 595 | then "B" | |
588 | 596 | else if ((freqs[2] > rem)) | |
589 | 597 | then "C" | |
590 | 598 | else if ((freqs[3] > rem)) | |
591 | 599 | then "D" | |
592 | 600 | else if ((freqs[4] > rem)) | |
593 | 601 | then "E" | |
594 | 602 | else "F" | |
595 | 603 | letter | |
596 | 604 | } | |
597 | 605 | ||
598 | 606 | ||
599 | 607 | func genTerrains (seed,continentIdx) = { | |
600 | 608 | let f = freq[continentIdx] | |
601 | 609 | func terrainGenerator (acc,elem) = $Tuple2((((((acc._1 + genChar(acc._2, f)) + genChar((acc._2 / TWENTYX), f)) + genChar((acc._2 / TWENTY2X), f)) + genChar((acc._2 / TWENTY3X), f)) + genChar((acc._2 / TWENTY4X), f)), (acc._2 / TWENTY5X)) | |
602 | 610 | ||
603 | 611 | let t = { | |
604 | 612 | let $l = [1, 2, 3, 4, 5] | |
605 | 613 | let $s = size($l) | |
606 | 614 | let $acc0 = $Tuple2("", (seed / FIVEX)) | |
607 | 615 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
608 | 616 | then $a | |
609 | 617 | else terrainGenerator($a, $l[$i]) | |
610 | 618 | ||
611 | 619 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
612 | 620 | then $a | |
613 | 621 | else throw("List size exceeds 5") | |
614 | 622 | ||
615 | 623 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
616 | 624 | } | |
617 | 625 | t._1 | |
618 | 626 | } | |
619 | 627 | ||
620 | 628 | ||
621 | 629 | func getBackpack (bpKey) = { | |
622 | 630 | let p = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
623 | 631 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
624 | 632 | then p[bpIdxRes] | |
625 | 633 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
626 | 634 | then p[bpIdxMat] | |
627 | 635 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
628 | 636 | } | |
629 | 637 | ||
630 | 638 | ||
631 | 639 | func getWarehouseTotalVolume (volPrefix) = { | |
632 | 640 | let parts = split(volPrefix, "_") | |
633 | 641 | ((WHMULTIPLIER * (parseIntValue(parts[1]) + 1)) * parseIntValue(parts[0])) | |
634 | 642 | } | |
635 | 643 | ||
636 | 644 | ||
637 | - | func getWarehouse (whKey,landIndex,infraLevel) = { | |
638 | - | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
639 | - | let p = split(valueOrElse(getString(whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")), ":") | |
640 | - | [p[whIdxVol], if ((size(split(p[whIdxRes], "_")) == NUMRES)) | |
641 | - | then p[whIdxRes] | |
642 | - | else "0_0_0_0_0_0", if ((size(split(p[whIdxMat], "_")) == NUMRES)) | |
643 | - | then p[whIdxMat] | |
644 | - | else "0_0_0_0_0_0", p[whIdxProd], if ((5 > size(p))) | |
645 | - | then "0" | |
646 | - | else p[whIdxLockedVol]] | |
645 | + | func getWarehouseOccupiedVol (currentWh) = { | |
646 | + | let goods = currentWh[whIdxProd] | |
647 | + | func sumResMat (acc,item) = (acc + parseIntValue(item)) | |
648 | + | ||
649 | + | func sumProd (acc,item) = { | |
650 | + | let idx = acc._1 | |
651 | + | let pkgSize = productPackages[idx] | |
652 | + | let pkgs = (((parseIntValue(item) + pkgSize) - 1) / pkgSize) | |
653 | + | $Tuple2((idx + 1), (acc._2 + (pkgs * MULT8))) | |
654 | + | } | |
655 | + | ||
656 | + | let whResVol = { | |
657 | + | let $l = split(currentWh[whIdxRes], "_") | |
658 | + | let $s = size($l) | |
659 | + | let $acc0 = 0 | |
660 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
661 | + | then $a | |
662 | + | else sumResMat($a, $l[$i]) | |
663 | + | ||
664 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
665 | + | then $a | |
666 | + | else throw("List size exceeds 6") | |
667 | + | ||
668 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
669 | + | } | |
670 | + | let whMatVol = { | |
671 | + | let $l = split(currentWh[whIdxMat], "_") | |
672 | + | let $s = size($l) | |
673 | + | let $acc0 = 0 | |
674 | + | func $f1_1 ($a,$i) = if (($i >= $s)) | |
675 | + | then $a | |
676 | + | else sumResMat($a, $l[$i]) | |
677 | + | ||
678 | + | func $f1_2 ($a,$i) = if (($i >= $s)) | |
679 | + | then $a | |
680 | + | else throw("List size exceeds 6") | |
681 | + | ||
682 | + | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
683 | + | } | |
684 | + | let whGoodsVol = if ((goods == "")) | |
685 | + | then 0 | |
686 | + | else ( let $l = split_4C(goods, "_") | |
687 | + | let $s = size($l) | |
688 | + | let $acc0 = $Tuple2(0, 0) | |
689 | + | func $f2_1 ($a,$i) = if (($i >= $s)) | |
690 | + | then $a | |
691 | + | else sumProd($a, $l[$i]) | |
692 | + | ||
693 | + | func $f2_2 ($a,$i) = if (($i >= $s)) | |
694 | + | then $a | |
695 | + | else throw("List size exceeds 50") | |
696 | + | ||
697 | + | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
698 | + | ((whResVol + whMatVol) + whGoodsVol) | |
647 | 699 | } | |
648 | 700 | ||
649 | 701 | ||
650 | - | func getWarehouseCurrResVolume (currentWh) = { | |
651 | - | func sum (acc,item) = (acc + parseIntValue(item)) | |
652 | - | ||
653 | - | let $l = split(currentWh[whIdxRes], "_") | |
654 | - | let $s = size($l) | |
655 | - | let $acc0 = 0 | |
656 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
657 | - | then $a | |
658 | - | else sum($a, $l[$i]) | |
659 | - | ||
660 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
661 | - | then $a | |
662 | - | else throw("List size exceeds 6") | |
663 | - | ||
664 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
665 | - | } | |
666 | - | ||
667 | - | ||
668 | - | func getWarehouseCurrMatVolume (currentWh) = { | |
669 | - | func sum (acc,item) = (acc + parseIntValue(item)) | |
670 | - | ||
671 | - | let $l = split(currentWh[whIdxMat], "_") | |
672 | - | let $s = size($l) | |
673 | - | let $acc0 = 0 | |
674 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
675 | - | then $a | |
676 | - | else sum($a, $l[$i]) | |
677 | - | ||
678 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
679 | - | then $a | |
680 | - | else throw("List size exceeds 6") | |
681 | - | ||
682 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
683 | - | } | |
684 | - | ||
685 | - | ||
686 | - | func getWarehouseCurrGoodsVolume (currentWh) = { | |
687 | - | let goods = currentWh[whIdxProd] | |
688 | - | if ((goods == "")) | |
689 | - | then 0 | |
702 | + | func getWarehouse (whKey,landIndex,infraLevel) = { | |
703 | + | let volPrefix = ((toString(landIndex) + "_") + toString(infraLevel)) | |
704 | + | let whTotal = getWarehouseTotalVolume(volPrefix) | |
705 | + | let whStr = valueOrElse(getString(whKey), (volPrefix + ":0_0_0_0_0_0:0_0_0_0_0_0::0")) | |
706 | + | let wh = split_4C(whStr, ":") | |
707 | + | let whOccupied = getWarehouseOccupiedVol(wh) | |
708 | + | let whLoft = if ((5 > size(wh))) | |
709 | + | then makeString(["0", toString(whOccupied), toString((whTotal - whOccupied)), toString(whTotal)], "_") | |
690 | 710 | else { | |
691 | - | func sum (acc,item) = { | |
692 | - | let idx = acc._1 | |
693 | - | let pkgSize = productPackages[idx] | |
694 | - | let pkgs = (((parseIntValue(item) + pkgSize) - 1) / pkgSize) | |
695 | - | $Tuple2((idx + 1), (acc._2 + (pkgs * MULT8))) | |
696 | - | } | |
697 | - | ||
698 | - | ( let $l = split_4C(goods, "_") | |
699 | - | let $s = size($l) | |
700 | - | let $acc0 = $Tuple2(0, 0) | |
701 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
702 | - | then $a | |
703 | - | else sum($a, $l[$i]) | |
704 | - | ||
705 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
706 | - | then $a | |
707 | - | else throw("List size exceeds 50") | |
708 | - | ||
709 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50))._2 | |
711 | + | let loft = split(wh[whIdxLOFT], "_") | |
712 | + | let whLocked = parseIntValue(loft[volLocked]) | |
713 | + | let occ = if ((size(loft) > 1)) | |
714 | + | then parseIntValue(loft[volOccupied]) | |
715 | + | else whOccupied | |
716 | + | makeString([toString(whLocked), toString(occ), toString(((whTotal - whLocked) - occ)), toString(whTotal)], "_") | |
710 | 717 | } | |
718 | + | [wh[whIdxLevels], if ((size(split(wh[whIdxRes], "_")) == NUMRES)) | |
719 | + | then wh[whIdxRes] | |
720 | + | else "0_0_0_0_0_0", if ((size(split(wh[whIdxMat], "_")) == NUMRES)) | |
721 | + | then wh[whIdxMat] | |
722 | + | else "0_0_0_0_0_0", wh[whIdxProd], whLoft] | |
711 | 723 | } | |
712 | 724 | ||
713 | 725 | ||
714 | 726 | func getWarehouseSpaceLeft (currentWh) = { | |
715 | - | let currWhResVol = getWarehouseCurrResVolume(currentWh) | |
716 | - | let currWhMatVol = getWarehouseCurrMatVolume(currentWh) | |
717 | - | let currWhGoodsVol = getWarehouseCurrGoodsVolume(currentWh) | |
718 | - | let currWhLockedVol = parseIntValue(currentWh[whIdxLockedVol]) | |
719 | - | ((((getWarehouseTotalVolume(currentWh[whIdxVol]) - currWhResVol) - currWhMatVol) - currWhGoodsVol) - currWhLockedVol) | |
727 | + | let occupiedVol = getWarehouseOccupiedVol(currentWh) | |
728 | + | let currWhLockedVol = parseIntValue(split(currentWh[whIdxLOFT], "_")[volLocked]) | |
729 | + | ((getWarehouseTotalVolume(currentWh[whIdxLevels]) - occupiedVol) - currWhLockedVol) | |
730 | + | } | |
731 | + | ||
732 | + | ||
733 | + | func toVolume (amount,pkgSize) = { | |
734 | + | let pkgs = if ((amount >= 0)) | |
735 | + | then (((amount + pkgSize) - 1) / pkgSize) | |
736 | + | else -((((-(amount) + pkgSize) - 1) / pkgSize)) | |
737 | + | (pkgs * MULT8) | |
720 | 738 | } | |
721 | 739 | ||
722 | 740 | ||
723 | 741 | func moveStuff (cargoParts,currentWh,currentPack) = if ((size(cargoParts) != 3)) | |
724 | 742 | then throw("cargoListStr should contain exactly 2 ':' separators") | |
725 | 743 | else { | |
726 | 744 | let resParts = split(cargoParts[0], "_") | |
727 | 745 | let matParts = split(cargoParts[1], "_") | |
728 | 746 | let prodParts = if ((cargoParts[2] == "")) | |
729 | 747 | then nil | |
730 | 748 | else split(cargoParts[2], "_") | |
731 | 749 | if ((size(resParts) != NUMRES)) | |
732 | 750 | then throw("All 6 resources should be passed") | |
733 | 751 | else if ((size(matParts) != NUMRES)) | |
734 | 752 | then throw("All 6 materials should be passed") | |
735 | 753 | else { | |
736 | 754 | let whSpaceLeft = getWarehouseSpaceLeft(currentWh) | |
737 | 755 | let currWhRes = split(currentWh[whIdxRes], "_") | |
738 | 756 | let currWhMat = split(currentWh[whIdxMat], "_") | |
739 | 757 | let currWhProd = if ((currentWh[whIdxProd] == "")) | |
740 | 758 | then nil | |
741 | 759 | else split(currentWh[whIdxProd], "_") | |
742 | 760 | let currentPackRes = split(currentPack[bpIdxRes], "_") | |
743 | 761 | let currentPackMat = split(currentPack[bpIdxMat], "_") | |
744 | 762 | let currentPackProd = if ((currentPack[bpIdxProd] == "")) | |
745 | 763 | then nil | |
746 | 764 | else split(currentPack[bpIdxProd], "_") | |
747 | 765 | func mvR (acc,item) = { | |
748 | 766 | let i = acc._1 | |
749 | 767 | let am = parseIntValue(item) | |
750 | 768 | let whr = parseIntValue(currWhRes[i]) | |
751 | 769 | let bpr = parseIntValue(currentPackRes[i]) | |
752 | 770 | if ((am == 0)) | |
753 | 771 | then $Tuple4((i + 1), (acc._2 :+ currWhRes[i]), (acc._3 :+ currentPackRes[i]), acc._4) | |
754 | 772 | else if ((am > 0)) | |
755 | 773 | then if ((am > bpr)) | |
756 | 774 | then throw((((("Attempt to take " + item) + " from backpack, but only ") + toString(bpr)) + " available")) | |
757 | 775 | else $Tuple4((i + 1), (acc._2 :+ toString((whr + am))), (acc._3 :+ toString((bpr - am))), (acc._4 + am)) | |
758 | 776 | else if ((-(am) > whr)) | |
759 | 777 | then throw((((("Attempt to take " + toString(-(am))) + " from warehouse, but only ") + toString(whr)) + " available")) | |
760 | 778 | else $Tuple4((i + 1), (acc._2 :+ toString((whr + am))), (acc._3 :+ toString((bpr - am))), (acc._4 + am)) | |
761 | 779 | } | |
762 | 780 | ||
763 | 781 | let r = { | |
764 | 782 | let $l = resParts | |
765 | 783 | let $s = size($l) | |
766 | 784 | let $acc0 = $Tuple4(0, nil, nil, 0) | |
767 | 785 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
768 | 786 | then $a | |
769 | 787 | else mvR($a, $l[$i]) | |
770 | 788 | ||
771 | 789 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
772 | 790 | then $a | |
773 | 791 | else throw("List size exceeds 6") | |
774 | 792 | ||
775 | 793 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
776 | 794 | } | |
777 | 795 | func mvM (acc,item) = { | |
778 | 796 | let i = acc._1 | |
779 | 797 | let am = parseIntValue(item) | |
780 | 798 | let whm = parseIntValue(currWhMat[i]) | |
781 | 799 | let bpm = parseIntValue(currentPackMat[i]) | |
782 | 800 | if ((am == 0)) | |
783 | 801 | then $Tuple4((i + 1), (acc._2 :+ currWhMat[i]), (acc._3 :+ currentPackMat[i]), acc._4) | |
784 | 802 | else if ((am > 0)) | |
785 | 803 | then if ((am > bpm)) | |
786 | 804 | then throw((((("Attempt to take " + item) + " from backpack, but only ") + toString(bpm)) + " available")) | |
787 | 805 | else $Tuple4((i + 1), (acc._2 :+ toString((whm + am))), (acc._3 :+ toString((bpm - am))), (acc._4 + am)) | |
788 | 806 | else if ((-(am) > whm)) | |
789 | 807 | then throw((((("Attempt to take " + toString(-(am))) + " from warehouse, but only ") + toString(whm)) + " available")) | |
790 | 808 | else $Tuple4((i + 1), (acc._2 :+ toString((whm + am))), (acc._3 :+ toString((bpm - am))), (acc._4 + am)) | |
791 | 809 | } | |
792 | 810 | ||
793 | 811 | let m = { | |
794 | 812 | let $l = matParts | |
795 | 813 | let $s = size($l) | |
796 | 814 | let $acc0 = $Tuple4(0, nil, nil, r._4) | |
797 | 815 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
798 | 816 | then $a | |
799 | 817 | else mvM($a, $l[$i]) | |
800 | 818 | ||
801 | 819 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
802 | 820 | then $a | |
803 | 821 | else throw("List size exceeds 6") | |
804 | 822 | ||
805 | 823 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
806 | 824 | } | |
807 | 825 | func mvP (acc,item) = { | |
808 | 826 | let i = acc._1 | |
827 | + | let pkgSize = productPackages[i] | |
809 | 828 | let am = parseIntValue(item) | |
810 | 829 | let whp = if ((size(currWhProd) > i)) | |
811 | 830 | then parseIntValue(currWhProd[i]) | |
812 | 831 | else 0 | |
813 | 832 | let bpp = if ((size(currentPackProd) > i)) | |
814 | 833 | then parseIntValue(currentPackProd[i]) | |
815 | 834 | else 0 | |
816 | 835 | if ((am == 0)) | |
817 | 836 | then $Tuple4((i + 1), (acc._2 :+ toString(whp)), (acc._3 :+ toString(bpp)), acc._4) | |
818 | 837 | else if ((am > 0)) | |
819 | 838 | then if ((am > bpp)) | |
820 | 839 | then throw((((("Attempt to take " + item) + " from backpack, but only ") + toString(bpp)) + " available")) | |
821 | - | else $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + am)) | |
840 | + | else { | |
841 | + | let deltaVol = (toVolume((whp + am), pkgSize) - toVolume(whp, pkgSize)) | |
842 | + | $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + deltaVol)) | |
843 | + | } | |
822 | 844 | else if ((-(am) > whp)) | |
823 | 845 | then throw((((("Attempt to take " + toString(-(am))) + " from warehouse, but only ") + toString(whp)) + " available")) | |
824 | - | else $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + am)) | |
846 | + | else { | |
847 | + | let deltaVol = (toVolume((whp + am), pkgSize) - toVolume(whp, pkgSize)) | |
848 | + | $Tuple4((i + 1), (acc._2 :+ toString((whp + am))), (acc._3 :+ toString((bpp - am))), (acc._4 + deltaVol)) | |
849 | + | } | |
825 | 850 | } | |
826 | 851 | ||
827 | 852 | let p = if ((size(prodParts) != 0)) | |
828 | 853 | then { | |
829 | 854 | let $l = prodParts | |
830 | 855 | let $s = size($l) | |
831 | 856 | let $acc0 = $Tuple4(0, nil, nil, m._4) | |
832 | 857 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
833 | 858 | then $a | |
834 | 859 | else mvP($a, $l[$i]) | |
835 | 860 | ||
836 | 861 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
837 | 862 | then $a | |
838 | 863 | else throw("List size exceeds 50") | |
839 | 864 | ||
840 | 865 | $f2_2($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($f2_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
841 | 866 | } | |
842 | 867 | else $Tuple4(0, currWhProd, currentPackProd, m._4) | |
843 | 868 | let volSaldo = p._4 | |
844 | 869 | if ((volSaldo > whSpaceLeft)) | |
845 | 870 | then throw((((("Attempt to put total " + toString(volSaldo)) + " stuff, but only ") + toString(whSpaceLeft)) + " warehouse space left")) | |
846 | - | else $ | |
871 | + | else $Tuple7(makeString(r._2, "_"), makeString(m._2, "_"), makeString(p._2, "_"), makeString(r._3, "_"), makeString(m._3, "_"), makeString(p._3, "_"), volSaldo) | |
847 | 872 | } | |
848 | 873 | } | |
849 | 874 | ||
850 | 875 | ||
851 | 876 | func expeditionInternal (caller,txId) = { | |
852 | 877 | let userAddr = toString(caller) | |
853 | 878 | let bigNum = abs(toBigInt(txId)) | |
854 | 879 | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
855 | 880 | let landNum = toString(freeNum) | |
856 | 881 | let continentIdx = toInt((bigNum % FIVEX)) | |
857 | 882 | let terrains = genTerrains(bigNum, continentIdx) | |
858 | 883 | let continent = continents[continentIdx] | |
859 | 884 | let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", terrains, continent], "_"), 1, 0, false) | |
860 | 885 | let assetId = calculateAssetId(issue) | |
861 | 886 | let id = toBase58String(assetId) | |
862 | 887 | $Tuple2([IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), issue, StringEntry(keyLandToAssetId(landNum), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(landNum), userAddr), IntegerEntry(keyInfraLevelByAssetId(id), 0), IntegerEntry(keyInfraLevelByAssetIdAndOwner(id, userAddr), 0), ScriptTransfer(caller, 1, assetId)], $Tuple2(id, continent)) | |
863 | 888 | } | |
864 | 889 | ||
865 | 890 | ||
866 | 891 | func expeditionCommon (shouldUseMat,caller,txId,message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
867 | 892 | then throw("signature does not match") | |
868 | 893 | else { | |
869 | 894 | let parts = split(toUtf8String(message), ";") | |
870 | 895 | let hp = split(split(parts[0], "|")[0], "_") | |
871 | 896 | let curHP = parseIntValue(hp[0]) | |
872 | 897 | let newHP = parseIntValue(hp[1]) | |
873 | 898 | let locAndTime = split(parts[1], ":") | |
874 | 899 | let targetLocation = split(locAndTime[0], "_") | |
875 | 900 | if ((targetLocation[1] != "E")) | |
876 | 901 | then throw("expedition target location type should be E") | |
877 | 902 | else { | |
878 | 903 | let time = parseIntValue(locAndTime[1]) | |
879 | 904 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
880 | 905 | then true | |
881 | 906 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
882 | 907 | then throw("signature outdated") | |
883 | 908 | else { | |
884 | 909 | let userAddr = toString(caller) | |
885 | 910 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked") | |
886 | 911 | let keyHealth = keyDuckHealth(duckAssetId) | |
887 | 912 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
888 | 913 | if ((oldFromState != curHP)) | |
889 | 914 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
890 | 915 | else if ((0 >= curHP)) | |
891 | 916 | then throw("You can't fly with zero health") | |
892 | 917 | else if ((0 >= newHP)) | |
893 | 918 | then $Tuple2(((if (!(shouldUseMat)) | |
894 | 919 | then [ScriptTransfer(caller, EXPUSDT, usdtAssetId)] | |
895 | 920 | else nil) :+ IntegerEntry(keyHealth, 0)), "") | |
896 | 921 | else { | |
897 | 922 | let bpKey = keyBackpackByDuck(duckAssetId) | |
898 | 923 | let currentPack = getBackpack(bpKey) | |
899 | 924 | let mList = split(currentPack[bpIdxMat], "_") | |
900 | 925 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, EXPMATERIALS), "_") | |
901 | 926 | let e = expeditionInternal(caller, txId) | |
902 | 927 | let id = e._2._1 | |
903 | 928 | $Tuple2((((e._1 :+ StringEntry(keyDuckLocation(duckAssetId), makeString([e._2._2, "L", id], "_"))) :+ IntegerEntry(keyHealth, newHP)) :+ StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))), id) | |
904 | 929 | } | |
905 | 930 | } | |
906 | 931 | } | |
907 | 932 | } | |
908 | 933 | ||
909 | 934 | ||
910 | 935 | func applyBonuses (landAssetId,pieces) = { | |
911 | 936 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
912 | 937 | let artPieces = valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
913 | 938 | then pieces | |
914 | 939 | else 0) | |
915 | 940 | let add6 = (infraLevel / 6) | |
916 | 941 | let add7 = (infraLevel / 7) | |
917 | 942 | ((DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, ((infraLevel + add6) + (2 * add7)), 5)) + fraction(DAILYRESBYPIECE, artPieces, (pieces * 5))) | |
918 | 943 | } | |
919 | 944 | ||
920 | 945 | ||
921 | 946 | func checkClaimConditions (addr,claimMode,landAssetIdIn) = { | |
922 | - | let $ | |
947 | + | let $t02663227171 = if ((claimMode == claimModeWh)) | |
923 | 948 | then $Tuple2(landAssetIdIn, valueOrElse(getString(keyStakedDuckByOwner(addr)), "")) | |
924 | 949 | else { | |
925 | 950 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
926 | 951 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
927 | 952 | let loc = split(value(curLocation), "_") | |
928 | 953 | if ((loc[locIdxType] != "L")) | |
929 | 954 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
930 | 955 | else $Tuple2(loc[locIdxId], duckAssetId) | |
931 | 956 | } | |
932 | - | let landAssetId = $ | |
933 | - | let duckId = $ | |
957 | + | let landAssetId = $t02663227171._1 | |
958 | + | let duckId = $t02663227171._2 | |
934 | 959 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
935 | 960 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
936 | 961 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("Land " + asset.name) + " is not staked")) | |
937 | 962 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
938 | 963 | if ((owner != addr)) | |
939 | 964 | then throw((LANDPREFIX + " is not yours")) | |
940 | 965 | else { | |
941 | 966 | let d = split(asset.description, "_") | |
942 | 967 | $Tuple4(duckId, landAssetId, d, savedTime) | |
943 | 968 | } | |
944 | 969 | } | |
945 | 970 | ||
946 | 971 | ||
947 | 972 | func claimResInternal (addr,amount,claimMode,landAssetIdIn) = if ((0 > amount)) | |
948 | 973 | then throw("Negative amount") | |
949 | 974 | else { | |
950 | 975 | let c = checkClaimConditions(addr, claimMode, landAssetIdIn) | |
951 | 976 | let landSize = c._3[recLandSize] | |
952 | 977 | let terrainCounts = countTerrains(c._3[recTerrains]) | |
953 | 978 | let deltaTime = (lastBlock.timestamp - c._4) | |
954 | 979 | if ((0 > deltaTime)) | |
955 | 980 | then throw(((("Saved timestamp is in future, saved = " + toString(c._4)) + ", current = ") + toString(lastBlock.timestamp))) | |
956 | 981 | else { | |
957 | 982 | let pieces = numPiecesBySize(landSize) | |
958 | 983 | let dailyProductionByPiece = applyBonuses(c._2, pieces) | |
959 | 984 | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
960 | 985 | if ((amount > availRes)) | |
961 | 986 | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
962 | 987 | else { | |
963 | 988 | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
964 | 989 | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
965 | 990 | let landIndex = (pieces / SSIZE) | |
966 | 991 | let resToClaim = virtClaim(terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece) | |
967 | 992 | let whKey = keyWarehouseByLand(c._2) | |
968 | 993 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(c._2)), 0) | |
969 | 994 | let currentWh = getWarehouse(whKey, landIndex, infraLevel) | |
970 | - | let whSpaceLeft = getWarehouseSpaceLeft(currentWh) | |
995 | + | let loft = split(currentWh[whIdxLOFT], "_") | |
996 | + | let whSpaceLeft = parseIntValue(loft[volFree]) | |
971 | 997 | if (if ((claimMode == claimModeWh)) | |
972 | 998 | then (amount > whSpaceLeft) | |
973 | 999 | else false) | |
974 | 1000 | then throw((("Only " + toString(whSpaceLeft)) + " space left in warehouse")) | |
975 | 1001 | else { | |
976 | 1002 | let bpKey = keyBackpackByDuck(c._1) | |
977 | 1003 | let currentPack = getBackpack(bpKey) | |
978 | 1004 | let currentPackRes = split(currentPack[bpIdxRes], "_") | |
979 | 1005 | let currentWhRes = split(currentWh[whIdxRes], "_") | |
980 | - | let $ | |
981 | - | then $ | |
1006 | + | let $t02954530416 = if ((claimMode == claimModeWh)) | |
1007 | + | then $Tuple4(addRes(currentWhRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece), currentPack[bpIdxRes], (parseIntValue(loft[volOccupied]) + resToClaim._2), (parseIntValue(loft[volFree]) - resToClaim._2)) | |
982 | 1008 | else if ((claimMode == claimModeDuck)) | |
983 | - | then $Tuple2(currentWh[whIdxRes], addRes(currentPackRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece)) | |
984 | - | else distributeRes(currentWhRes, currentPackRes, resToClaim, whSpaceLeft) | |
985 | - | let whRes = $t02866529168._1 | |
986 | - | let bpRes = $t02866529168._2 | |
987 | - | $Tuple5([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], whKey, [currentWh[whIdxVol], whRes, currentWh[whIdxMat], currentWh[whIdxProd], currentWh[whIdxLockedVol]]) | |
1009 | + | then $Tuple4(currentWh[whIdxRes], addRes(currentPackRes, terrainCounts, (deltaTime - newDeltaTime), landIndex, dailyProductionByPiece), parseIntValue(loft[volOccupied]), parseIntValue(loft[volFree])) | |
1010 | + | else { | |
1011 | + | let distr = distributeRes(currentWhRes, currentPackRes, resToClaim, whSpaceLeft) | |
1012 | + | let whAm = min([parseIntValue(loft[volFree]), resToClaim._2]) | |
1013 | + | $Tuple4(distr._1, distr._2, (parseIntValue(loft[volOccupied]) + whAm), (parseIntValue(loft[volFree]) - whAm)) | |
1014 | + | } | |
1015 | + | let whRes = $t02954530416._1 | |
1016 | + | let bpRes = $t02954530416._2 | |
1017 | + | let loftO = $t02954530416._3 | |
1018 | + | let loftF = $t02954530416._4 | |
1019 | + | $Tuple5([IntegerEntry(keyStakedTimeByAssetId(c._2), newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, c._2, addr), newTimestamp)], bpKey, [currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], whKey, [currentWh[whIdxLevels], whRes, currentWh[whIdxMat], currentWh[whIdxProd], makeString([loft[volLocked], toString(loftO), toString(loftF), loft[volTotal]], "_")]) | |
988 | 1020 | } | |
989 | 1021 | } | |
990 | 1022 | } | |
991 | 1023 | } | |
992 | 1024 | ||
993 | 1025 | ||
994 | 1026 | func claimAll (addr,landAssetId,pieces,claimMode) = { | |
995 | 1027 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
996 | 1028 | let savedTime = value(getInteger(timeKey)) | |
997 | 1029 | let availRes = (fraction((lastBlock.timestamp - savedTime), applyBonuses(landAssetId, pieces), DAYMILLIS) * pieces) | |
998 | 1030 | claimResInternal(addr, availRes, claimMode, landAssetId) | |
999 | 1031 | } | |
1000 | 1032 | ||
1001 | 1033 | ||
1002 | 1034 | func upInfraCommon (shouldUseMat,caller,paymentAmount,landAssetId) = { | |
1003 | 1035 | let addr = toString(caller) | |
1004 | 1036 | let c = checkClaimConditions(addr, claimModeWhThenDuck, landAssetId) | |
1005 | 1037 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
1006 | 1038 | let infraKey = keyInfraLevelByAssetId(c._2) | |
1007 | 1039 | let curLevel = valueOrElse(getInteger(infraKey), 0) | |
1008 | 1040 | if ((curLevel >= 3)) | |
1009 | 1041 | then throw("Currently max infrastructure level = 3") | |
1010 | 1042 | else { | |
1011 | 1043 | let newLevel = (curLevel + 1) | |
1012 | 1044 | let cost = fraction(InfraUpgradeCostSUsdt, (pieces * newLevel), SSIZE) | |
1013 | 1045 | if (if (!(shouldUseMat)) | |
1014 | 1046 | then (paymentAmount != cost) | |
1015 | 1047 | else false) | |
1016 | 1048 | then throw(("Payment attached should be " + toString(cost))) | |
1017 | 1049 | else { | |
1018 | 1050 | let bpKey = keyBackpackByDuck(c._1) | |
1019 | 1051 | let currentPack = getBackpack(bpKey) | |
1020 | 1052 | let mList = split(currentPack[bpIdxMat], "_") | |
1021 | 1053 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), SSIZE)), "_") | |
1022 | 1054 | let claimResult = claimAll(addr, c._2, pieces, claimModeWhThenDuck) | |
1023 | 1055 | let whData = claimResult._5 | |
1024 | - | let newVolData = makeString([split(whData[whIdxVol], "_")[0], toString(newLevel)], "_") | |
1025 | - | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString([newVolData, whData[whIdxRes], whData[whIdxMat], whData[whIdxProd], whData[whIdxLockedVol]], ":"))] ++ claimResult._1), newLevel) | |
1056 | + | let oldVol = getWarehouseTotalVolume(whData[whIdxLevels]) | |
1057 | + | let newVolData = makeString([split(whData[whIdxLevels], "_")[0], toString(newLevel)], "_") | |
1058 | + | let newVol = getWarehouseTotalVolume(newVolData) | |
1059 | + | let loft = split(whData[whIdxLOFT], "_") | |
1060 | + | let newLoftStr = makeString([loft[volLocked], loft[volOccupied], toString(((parseIntValue(loft[volFree]) + newVol) - oldVol)), toString(newVol)], "_") | |
1061 | + | $Tuple2(([IntegerEntry(infraKey, newLevel), IntegerEntry(keyInfraLevelByAssetIdAndOwner(c._2, addr), newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], claimResult._3[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), StringEntry(claimResult._4, makeString([newVolData, whData[whIdxRes], whData[whIdxMat], whData[whIdxProd], newLoftStr], ":"))] ++ claimResult._1), newLevel) | |
1026 | 1062 | } | |
1027 | 1063 | } | |
1028 | 1064 | } | |
1029 | 1065 | ||
1030 | 1066 | ||
1031 | 1067 | func activateOnboardArt (addr) = 0 | |
1032 | 1068 | ||
1033 | 1069 | ||
1034 | 1070 | func activatePresaleArt (addr,landAssetIdIn) = { | |
1035 | 1071 | let c = checkClaimConditions(addr, claimModeWhThenDuck, landAssetIdIn) | |
1036 | 1072 | let landAssetId = c._2 | |
1037 | 1073 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
1038 | 1074 | let activationKey = keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId) | |
1039 | 1075 | if ((valueOrElse(getInteger(activationKey), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
1040 | 1076 | then pieces | |
1041 | 1077 | else 0) > 0)) | |
1042 | 1078 | then throw("Presale artifact is already activated") | |
1043 | 1079 | else if ((parseIntValue(c._3[recLandNum]) > PRESALENUMLANDS)) | |
1044 | 1080 | then throw((((LANDPREFIX + " ") + landAssetId) + " is not eligible for presale artifact")) | |
1045 | 1081 | else { | |
1046 | 1082 | let claimResult = claimAll(addr, landAssetId, pieces, claimModeWhThenDuck) | |
1047 | 1083 | ((((claimResult._1 :+ IntegerEntry(activationKey, pieces)) :+ IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr), pieces)) :+ StringEntry(claimResult._2, makeString(claimResult._3, ":"))) :+ StringEntry(claimResult._4, makeString(claimResult._5, ":"))) | |
1048 | 1084 | } | |
1049 | 1085 | } | |
1050 | 1086 | ||
1051 | 1087 | ||
1052 | 1088 | func mergeInternal (newLandSize,newLevel,formula,addr,landAssetIds,txId,needMat) = { | |
1053 | 1089 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
1054 | 1090 | func checkMerge (acc,landAssetId) = { | |
1055 | 1091 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
1056 | 1092 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
1057 | 1093 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked")) | |
1058 | 1094 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
1059 | 1095 | if ((owner != addr)) | |
1060 | 1096 | then throw((LANDPREFIX + " is not yours")) | |
1061 | 1097 | else { | |
1062 | 1098 | let d = split(asset.description, "_") | |
1063 | 1099 | let continent = d[recContinent] | |
1064 | 1100 | if (if ((acc._3 != "")) | |
1065 | 1101 | then (acc._3 != continent) | |
1066 | 1102 | else false) | |
1067 | 1103 | then throw("Lands should be on the same continent to merge") | |
1068 | 1104 | else { | |
1069 | 1105 | let landSize = d[recLandSize] | |
1070 | 1106 | let sizesIn = acc._1 | |
1071 | 1107 | let i = valueOrErrorMessage(indexOf(sizesIn, landSize), "You haven't passed all the lands needed") | |
1072 | 1108 | let sizesOut = (take(sizesIn, i) + drop(sizesIn, (i + 1))) | |
1073 | 1109 | let pieces = numPiecesBySize(landSize) | |
1074 | 1110 | let arts = (acc._2 + valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
1075 | 1111 | then pieces | |
1076 | 1112 | else 0)) | |
1077 | 1113 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
1078 | 1114 | let reqLevel = match landSize { | |
1079 | 1115 | case _ => | |
1080 | 1116 | if (("S" == $match0)) | |
1081 | 1117 | then 3 | |
1082 | 1118 | else if (("M" == $match0)) | |
1083 | 1119 | then 4 | |
1084 | 1120 | else if (("L" == $match0)) | |
1085 | 1121 | then 5 | |
1086 | 1122 | else if (("XL" == $match0)) | |
1087 | 1123 | then 6 | |
1088 | 1124 | else throw("Only S, M, L, XL can merge") | |
1089 | 1125 | } | |
1090 | 1126 | if ((infraLevel != reqLevel)) | |
1091 | 1127 | then throw("All lands should be maxed to merge") | |
1092 | 1128 | else { | |
1093 | 1129 | let landNum = d[recLandNum] | |
1094 | 1130 | let terrainCounts = countTerrains(d[recTerrains]) | |
1095 | 1131 | let deltaTime = (lastBlock.timestamp - savedTime) | |
1096 | 1132 | if ((0 > deltaTime)) | |
1097 | 1133 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
1098 | 1134 | else { | |
1099 | 1135 | let dailyProductionByPiece = applyBonuses(landAssetId, pieces) | |
1100 | 1136 | let landIndex = (pieces / SSIZE) | |
1101 | 1137 | let bpRes = addRes(split(acc._4, "_"), terrainCounts, deltaTime, landIndex, dailyProductionByPiece) | |
1102 | 1138 | let props = updateProportionsInternal(split(acc._6, "_"), terrainCounts, landIndex, -1) | |
1103 | 1139 | let lands = acc._7 | |
1104 | 1140 | let idx = indexOf(lands, landAssetId) | |
1105 | 1141 | if (!(isDefined(idx))) | |
1106 | 1142 | then throw(("Your staked lands don't contain " + landAssetId)) | |
1107 | 1143 | else { | |
1108 | 1144 | let customKey = keyLandAssetIdToCustomName(landAssetId) | |
1109 | 1145 | let customName = valueOrElse(getString(customKey), "") | |
1110 | 1146 | $Tuple7(sizesOut, arts, continent, bpRes, ((((((((((((((acc._5 :+ DeleteEntry(keyStakedTimeByAssetId(landAssetId))) :+ DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr))) :+ DeleteEntry(keyLandToAssetId(landNum))) :+ DeleteEntry(keyNftName(landNum, landSize))) :+ DeleteEntry(keyLandAssetIdToOwner(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetId(landAssetId))) :+ DeleteEntry(keyInfraLevelByAssetIdAndOwner(landAssetId, addr))) :+ DeleteEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId))) :+ DeleteEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, addr))) :+ DeleteEntry(keyLandNumToOwner(landNum))) :+ DeleteEntry(keyWarehouseByLand(landAssetId))) :+ DeleteEntry(customKey)) :+ DeleteEntry(keyLandCustomNameToAssetId(customName))) :+ Burn(fromBase58String(landAssetId), 1)), props, removeByIndex(lands, value(idx))) | |
1111 | 1147 | } | |
1112 | 1148 | } | |
1113 | 1149 | } | |
1114 | 1150 | } | |
1115 | 1151 | } | |
1116 | 1152 | } | |
1117 | 1153 | ||
1118 | 1154 | let bpKey = keyBackpackByDuck(duckAssetId) | |
1119 | 1155 | let currentPack = getBackpack(bpKey) | |
1120 | 1156 | let propStr = valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0") | |
1121 | 1157 | let landsKey = keyStakedLandsByOwner(addr) | |
1122 | 1158 | let landsStr = getString(landsKey) | |
1123 | 1159 | let landsIn = if (isDefined(landsStr)) | |
1124 | 1160 | then split_51C(value(landsStr), "_") | |
1125 | 1161 | else nil | |
1126 | 1162 | let r = { | |
1127 | 1163 | let $l = landAssetIds | |
1128 | 1164 | let $s = size($l) | |
1129 | 1165 | let $acc0 = $Tuple7(formula, 0, "", currentPack[bpIdxRes], nil, propStr, landsIn) | |
1130 | 1166 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1131 | 1167 | then $a | |
1132 | 1168 | else checkMerge($a, $l[$i]) | |
1133 | 1169 | ||
1134 | 1170 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1135 | 1171 | then $a | |
1136 | 1172 | else throw("List size exceeds 5") | |
1137 | 1173 | ||
1138 | 1174 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
1139 | 1175 | } | |
1140 | 1176 | let continent = r._3 | |
1141 | 1177 | let continentIdx = valueOrErrorMessage(indexOf(continents, continent), ("Unknown continent: " + continent)) | |
1142 | 1178 | let terrains = genTerrains(abs(toBigInt(txId)), continentIdx) | |
1143 | 1179 | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), (PRESALENUMLANDS + 1)) | |
1144 | 1180 | let newLandNum = toString(freeNum) | |
1145 | 1181 | let issue = Issue(keyNftName(newLandNum, newLandSize), makeString([newLandNum, newLandSize, terrains, continent], "_"), 1, 0, false) | |
1146 | 1182 | let assetId = calculateAssetId(issue) | |
1147 | 1183 | let newLandAssetId = toBase58String(assetId) | |
1148 | 1184 | let newMat = makeString(subtractMaterials((needMat > 0), split(currentPack[bpIdxMat], "_"), needMat), "_") | |
1149 | 1185 | $Tuple2(((((((((((((((r._5 :+ (if ((size(r._7) > 0)) | |
1150 | 1186 | then StringEntry(landsKey, makeString_11C(r._7, "_")) | |
1151 | 1187 | else DeleteEntry(landsKey))) :+ IntegerEntry(keyNextFreeLandNum(), (freeNum + 1))) :+ issue) :+ StringEntry(keyLandToAssetId(newLandNum), newLandAssetId)) :+ StringEntry(keyLandAssetIdToOwner(newLandAssetId), addr)) :+ StringEntry(keyLandNumToOwner(newLandNum), addr)) :+ IntegerEntry(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, newLandAssetId), r._2)) :+ IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, newLandAssetId, addr), r._2)) :+ IntegerEntry(keyInfraLevelByAssetId(newLandAssetId), newLevel)) :+ IntegerEntry(keyInfraLevelByAssetIdAndOwner(newLandAssetId, addr), newLevel)) :+ StringEntry(bpKey, makeString([currentPack[bpIdxLevel], r._4, newMat, currentPack[bpIdxProd]], ":"))) :+ StringEntry(keyResProportions(), r._6)) :+ StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", newLandAssetId], "_"))) :+ ScriptTransfer(addressFromStringValue(addr), 1, assetId)), newLandAssetId) | |
1152 | 1188 | } | |
1153 | 1189 | ||
1154 | 1190 | ||
1155 | 1191 | func s2m (addr,landAssetIds,txId) = mergeInternal("M", 3, "SSSS", addr, landAssetIds, txId, 0) | |
1156 | 1192 | ||
1157 | 1193 | ||
1158 | 1194 | func m2l (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
1159 | 1195 | let cost = (InfraUpgradeCostSUsdt * 4) | |
1160 | 1196 | if (if (!(shouldUseMat)) | |
1161 | 1197 | then (paymentAmount != cost) | |
1162 | 1198 | else false) | |
1163 | 1199 | then throw(("Payment attached should be " + toString(cost))) | |
1164 | 1200 | else mergeInternal("L", 4, "SMM", addr, landAssetIds, txId, (InfraUpgradeCostS * 4)) | |
1165 | 1201 | } | |
1166 | 1202 | ||
1167 | 1203 | ||
1168 | 1204 | func l2xl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
1169 | 1205 | let cost = (InfraUpgradeCostSUsdt * 47) | |
1170 | 1206 | if (if (!(shouldUseMat)) | |
1171 | 1207 | then (paymentAmount != cost) | |
1172 | 1208 | else false) | |
1173 | 1209 | then throw(("Payment attached should be " + toString(cost))) | |
1174 | 1210 | else mergeInternal("XL", 5, "SSSML", addr, landAssetIds, txId, (InfraUpgradeCostS * 47)) | |
1175 | 1211 | } | |
1176 | 1212 | ||
1177 | 1213 | ||
1178 | 1214 | func xl2xxl (addr,landAssetIds,txId,shouldUseMat,paymentAmount) = { | |
1179 | 1215 | let cost = (InfraUpgradeCostSUsdt * 54) | |
1180 | 1216 | if (if (!(shouldUseMat)) | |
1181 | 1217 | then (paymentAmount != cost) | |
1182 | 1218 | else false) | |
1183 | 1219 | then throw(("Payment attached should be " + toString(cost))) | |
1184 | 1220 | else mergeInternal("XXL", 6, "LXL", addr, landAssetIds, txId, (InfraUpgradeCostS * 54)) | |
1185 | 1221 | } | |
1186 | 1222 | ||
1187 | 1223 | ||
1188 | 1224 | func mergeCommon (shouldUseMat,addr,paymentAmount,landAssetIds,txId) = { | |
1189 | 1225 | let mergeResult = match size(landAssetIds) { | |
1190 | 1226 | case _ => | |
1191 | 1227 | if ((4 == $match0)) | |
1192 | 1228 | then s2m(addr, landAssetIds, txId) | |
1193 | 1229 | else if ((3 == $match0)) | |
1194 | 1230 | then m2l(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
1195 | 1231 | else if ((5 == $match0)) | |
1196 | 1232 | then l2xl(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
1197 | 1233 | else if ((2 == $match0)) | |
1198 | 1234 | then xl2xxl(addr, landAssetIds, txId, shouldUseMat, paymentAmount) | |
1199 | 1235 | else throw("Unknown merge") | |
1200 | 1236 | } | |
1201 | 1237 | mergeResult | |
1202 | 1238 | } | |
1203 | 1239 | ||
1204 | 1240 | ||
1205 | 1241 | func prolog (i) = if (if ((i.originCaller != restContract)) | |
1206 | 1242 | then valueOrElse(getBoolean(keyBlocked()), false) | |
1207 | 1243 | else false) | |
1208 | 1244 | then throw("Contracts are under maintenance") | |
1209 | 1245 | else StringEntry(keyLastTxIdByUser(toString(i.originCaller)), toBase58String(i.transactionId)) | |
1210 | 1246 | ||
1211 | 1247 | ||
1212 | 1248 | @Callable(i) | |
1213 | 1249 | func constructorV1 (restAddr) = if ((i.caller != this)) | |
1214 | 1250 | then throw("Permission denied") | |
1215 | 1251 | else [StringEntry(keyRestAddress(), restAddr)] | |
1216 | 1252 | ||
1217 | 1253 | ||
1218 | 1254 | ||
1219 | 1255 | @Callable(i) | |
1220 | 1256 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
1221 | 1257 | then throw("permission denied") | |
1222 | 1258 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
1223 | 1259 | ||
1224 | 1260 | ||
1225 | 1261 | ||
1226 | 1262 | @Callable(i) | |
1227 | 1263 | func stakeLand () = { | |
1228 | 1264 | let prologAction = prolog(i) | |
1229 | 1265 | if ((size(i.payments) != 1)) | |
1230 | 1266 | then throw("Exactly one payment required") | |
1231 | 1267 | else { | |
1232 | 1268 | let pmt = value(i.payments[0]) | |
1233 | 1269 | let assetId = value(pmt.assetId) | |
1234 | 1270 | let address = toString(i.caller) | |
1235 | 1271 | if ((pmt.amount != 1)) | |
1236 | 1272 | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
1237 | 1273 | else { | |
1238 | 1274 | let asset = value(assetInfo(assetId)) | |
1239 | 1275 | if ((asset.issuer != this)) | |
1240 | 1276 | then throw("Unknown issuer of token") | |
1241 | 1277 | else if (!(contains(asset.name, LANDPREFIX))) | |
1242 | 1278 | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
1243 | 1279 | else { | |
1244 | 1280 | let landNumSize = drop(asset.name, 4) | |
1245 | 1281 | let landNum = if (contains(landNumSize, "XXL")) | |
1246 | 1282 | then dropRight(landNumSize, 3) | |
1247 | 1283 | else if (contains(landNumSize, "XL")) | |
1248 | 1284 | then dropRight(landNumSize, 2) | |
1249 | 1285 | else dropRight(landNumSize, 1) | |
1250 | 1286 | if (!(isDefined(parseInt(landNum)))) | |
1251 | 1287 | then throw(("Cannot parse land number from " + asset.name)) | |
1252 | 1288 | else { | |
1253 | 1289 | let landAssetId = toBase58String(assetId) | |
1254 | 1290 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
1255 | 1291 | if (isDefined(getInteger(timeKey))) | |
1256 | 1292 | then throw((("NFT " + asset.name) + " is already staked")) | |
1257 | 1293 | else { | |
1258 | 1294 | let d = split(asset.description, "_") | |
1259 | 1295 | let terrainCounts = countTerrains(d[recTerrains]) | |
1260 | 1296 | let pieces = numPiecesBySize(d[recLandSize]) | |
1261 | 1297 | let props = updateProportions(terrainCounts, (pieces / SSIZE), 1) | |
1262 | 1298 | let artPieces = valueOrElse(getInteger(keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId)), if (valueOrElse(getBoolean(keyPresaleArtActivatedByAssetId(landAssetId)), false)) | |
1263 | 1299 | then pieces | |
1264 | 1300 | else 0) | |
1265 | 1301 | let landsStr = getString(keyStakedLandsByOwner(address)) | |
1266 | 1302 | let lands = if (isDefined(landsStr)) | |
1267 | 1303 | then split_51C(value(landsStr), "_") | |
1268 | 1304 | else nil | |
1269 | 1305 | if (containsElement(lands, landAssetId)) | |
1270 | 1306 | then throw(("Your staked lands already contain " + landAssetId)) | |
1271 | 1307 | else [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyStakedLandsByOwner(address), makeString_11C((lands :+ landAssetId), "_")), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, address), artPieces), StringEntry(keyResProportions(), props), prologAction] | |
1272 | 1308 | } | |
1273 | 1309 | } | |
1274 | 1310 | } | |
1275 | 1311 | } | |
1276 | 1312 | } | |
1277 | 1313 | } | |
1278 | 1314 | ||
1279 | 1315 | ||
1280 | 1316 | ||
1281 | 1317 | @Callable(i) | |
1282 | 1318 | func unstakeLand (landAssetIdIn) = { | |
1283 | 1319 | let prologAction = prolog(i) | |
1284 | 1320 | if ((size(i.payments) != 0)) | |
1285 | 1321 | then throw("No payments required") | |
1286 | 1322 | else { | |
1287 | 1323 | let addr = toString(i.caller) | |
1288 | 1324 | let c = checkClaimConditions(addr, claimModeDuck, landAssetIdIn) | |
1289 | 1325 | let landAssetId = c._2 | |
1290 | 1326 | let landsKey = keyStakedLandsByOwner(addr) | |
1291 | 1327 | let terrainCounts = countTerrains(c._3[recTerrains]) | |
1292 | 1328 | let pieces = numPiecesBySize(c._3[recLandSize]) | |
1293 | 1329 | let props = updateProportions(terrainCounts, (pieces / SSIZE), -1) | |
1294 | 1330 | let claimResult = claimAll(addr, landAssetId, pieces, claimModeDuck) | |
1295 | 1331 | let lands = split_51C(valueOrElse(getString(landsKey), ""), "_") | |
1296 | 1332 | let idx = indexOf(lands, landAssetId) | |
1297 | 1333 | if (!(isDefined(idx))) | |
1298 | 1334 | then throw(("Your staked lands don't contain " + landAssetId)) | |
1299 | 1335 | else { | |
1300 | 1336 | let t = value(blockInfoByHeight(height)).timestamp | |
1301 | 1337 | let releaseTime = valueOrElse(getInteger(govContract, keyUserGwlReleaseTime(addr)), 0) | |
1302 | 1338 | if ((releaseTime >= t)) | |
1303 | 1339 | then throw(("Your gWL are taking part in voting, cannot unstake until " + toString(releaseTime))) | |
1304 | 1340 | else [ScriptTransfer(i.caller, 1, fromBase58String(landAssetId)), DeleteEntry(keyStakedTimeByAssetId(landAssetId)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, addr)), StringEntry(keyResProportions(), props), StringEntry(claimResult._2, makeString(claimResult._3, ":")), if ((size(lands) > 1)) | |
1305 | 1341 | then StringEntry(landsKey, makeString_11C(removeByIndex(lands, value(idx)), "_")) | |
1306 | 1342 | else DeleteEntry(landsKey), prologAction] | |
1307 | 1343 | } | |
1308 | 1344 | } | |
1309 | 1345 | } | |
1310 | 1346 | ||
1311 | 1347 | ||
1312 | 1348 | ||
1313 | 1349 | @Callable(i) | |
1314 | 1350 | func stakeDuck () = { | |
1315 | 1351 | let prologAction = prolog(i) | |
1316 | 1352 | if ((size(i.payments) != 1)) | |
1317 | 1353 | then throw("Exactly one payment required") | |
1318 | 1354 | else { | |
1319 | 1355 | let pmt = value(i.payments[0]) | |
1320 | 1356 | let assetId = value(pmt.assetId) | |
1321 | 1357 | let address = toString(i.caller) | |
1322 | 1358 | if ((pmt.amount != 1)) | |
1323 | 1359 | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
1324 | 1360 | else { | |
1325 | 1361 | let asset = value(assetInfo(assetId)) | |
1326 | 1362 | if (if ((asset.issuer != incubatorAddr)) | |
1327 | 1363 | then (asset.issuer != breederAddr) | |
1328 | 1364 | else false) | |
1329 | 1365 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
1330 | 1366 | else if (!(contains(asset.name, DUCKPREFIX))) | |
1331 | 1367 | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
1332 | 1368 | else { | |
1333 | 1369 | let assetIdStr = toBase58String(assetId) | |
1334 | 1370 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
1335 | 1371 | if (isDefined(getInteger(timeKey))) | |
1336 | 1372 | then throw((("NFT " + asset.name) + " is already staked")) | |
1337 | 1373 | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
1338 | 1374 | then throw(("You already staked one duck: " + asset.name)) | |
1339 | 1375 | else { | |
1340 | 1376 | let locKey = keyDuckLocation(assetIdStr) | |
1341 | 1377 | let location = getString(locKey) | |
1342 | 1378 | let bpKey = keyBackpackByDuck(assetIdStr) | |
1343 | 1379 | let backpack = getString(bpKey) | |
1344 | 1380 | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
1345 | 1381 | then nil | |
1346 | 1382 | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(backpack)) | |
1347 | 1383 | then nil | |
1348 | 1384 | else (([StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")] :+ IntegerEntry(keyDuckHealth(assetIdStr), 100)) :+ prologAction))))) | |
1349 | 1385 | } | |
1350 | 1386 | } | |
1351 | 1387 | } | |
1352 | 1388 | } | |
1353 | 1389 | } | |
1354 | 1390 | ||
1355 | 1391 | ||
1356 | 1392 | ||
1357 | 1393 | @Callable(i) | |
1358 | 1394 | func unstakeDuck (assetIdStr) = { | |
1359 | 1395 | let prologAction = prolog(i) | |
1360 | 1396 | if ((size(i.payments) != 0)) | |
1361 | 1397 | then throw("No payments required") | |
1362 | 1398 | else { | |
1363 | 1399 | let assetId = fromBase58String(assetIdStr) | |
1364 | 1400 | let address = toString(i.caller) | |
1365 | 1401 | let asset = value(assetInfo(assetId)) | |
1366 | 1402 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
1367 | 1403 | if (!(isDefined(getInteger(timeKey)))) | |
1368 | 1404 | then throw((("NFT " + asset.name) + " is not staked")) | |
1369 | 1405 | else if (!(isDefined(getString(keyStakedDuckByOwner(address))))) | |
1370 | 1406 | then throw((("The duck " + asset.name) + " is not staked")) | |
1371 | 1407 | else { | |
1372 | 1408 | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
1373 | 1409 | if ((owner != address)) | |
1374 | 1410 | then throw("Staked NFT is not yours") | |
1375 | 1411 | else { | |
1376 | 1412 | let keyHealth = keyDuckHealth(assetIdStr) | |
1377 | 1413 | let health = valueOrElse(getInteger(keyHealth), 100) | |
1378 | 1414 | if ((100 > health)) | |
1379 | 1415 | then throw("Please heal your duck before unstaking") | |
1380 | 1416 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyHealth), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address)), prologAction] | |
1381 | 1417 | } | |
1382 | 1418 | } | |
1383 | 1419 | } | |
1384 | 1420 | } | |
1385 | 1421 | ||
1386 | 1422 | ||
1387 | 1423 | ||
1388 | 1424 | @Callable(i) | |
1389 | 1425 | func claimRes (amount,landAssetIdStr) = { | |
1390 | 1426 | let prologAction = prolog(i) | |
1391 | 1427 | if ((size(i.payments) != 0)) | |
1392 | 1428 | then throw("No payments required") | |
1393 | 1429 | else { | |
1394 | 1430 | let addr = toString(i.originCaller) | |
1395 | 1431 | let result = claimResInternal(addr, amount, claimModeDuck, landAssetIdStr) | |
1396 | 1432 | $Tuple2((((result._1 :+ StringEntry(result._2, makeString(result._3, ":"))) :+ StringEntry(result._4, makeString(result._5, ":"))) :+ prologAction), result._3[bpIdxRes]) | |
1397 | 1433 | } | |
1398 | 1434 | } | |
1399 | 1435 | ||
1400 | 1436 | ||
1401 | 1437 | ||
1402 | 1438 | @Callable(i) | |
1403 | 1439 | func claimResToWH (amount,landAssetIdStr) = { | |
1404 | 1440 | let prologAction = prolog(i) | |
1405 | 1441 | if ((size(i.payments) != 0)) | |
1406 | 1442 | then throw("No payments required") | |
1407 | 1443 | else { | |
1408 | 1444 | let addr = toString(i.originCaller) | |
1409 | 1445 | let result = claimResInternal(addr, amount, claimModeWh, landAssetIdStr) | |
1410 | 1446 | $Tuple2((((result._1 :+ StringEntry(result._2, makeString(result._3, ":"))) :+ StringEntry(result._4, makeString(result._5, ":"))) :+ prologAction), result._5[whIdxRes]) | |
1411 | 1447 | } | |
1412 | 1448 | } | |
1413 | 1449 | ||
1414 | 1450 | ||
1415 | 1451 | ||
1416 | 1452 | @Callable(i) | |
1417 | 1453 | func flight (message,sig) = { | |
1418 | 1454 | let prologAction = prolog(i) | |
1419 | 1455 | if (!(sigVerify_8Kb(message, sig, pub))) | |
1420 | 1456 | then throw("signature does not match") | |
1421 | 1457 | else if ((size(i.payments) != 0)) | |
1422 | 1458 | then throw("No payments required") | |
1423 | 1459 | else { | |
1424 | 1460 | let parts = split(toUtf8String(message), ";") | |
1425 | 1461 | let flightLog = split(parts[0], "|") | |
1426 | 1462 | let hp = split(flightLog[flHealth], "_") | |
1427 | 1463 | let curHP = parseIntValue(hp[0]) | |
1428 | 1464 | let newHP = parseIntValue(hp[1]) | |
1429 | 1465 | let newLocTxVer = split(parts[1], ":") | |
1430 | 1466 | let newLocation = newLocTxVer[0] | |
1431 | 1467 | let time = parseIntValue(flightLog[flTimestamp]) | |
1432 | 1468 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
1433 | 1469 | then true | |
1434 | 1470 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
1435 | 1471 | then throw("signature outdated") | |
1436 | 1472 | else { | |
1437 | 1473 | let txFromMsg = newLocTxVer[1] | |
1438 | 1474 | let lastTx = valueOrElse(getString(keyLastTxIdByUser(toString(i.originCaller))), "") | |
1439 | 1475 | if ((lastTx != txFromMsg)) | |
1440 | 1476 | then throw(((("Tx ids don't match! In state: " + lastTx) + ", in msg: ") + txFromMsg)) | |
1441 | 1477 | else { | |
1442 | 1478 | let userAddr = toString(i.caller) | |
1443 | 1479 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked") | |
1444 | 1480 | let keyHealth = keyDuckHealth(duckAssetId) | |
1445 | 1481 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
1446 | 1482 | if ((oldFromState != curHP)) | |
1447 | 1483 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
1448 | 1484 | else if ((0 >= curHP)) | |
1449 | 1485 | then throw("You can't fly with zero health") | |
1450 | 1486 | else { | |
1451 | 1487 | let locKey = keyDuckLocation(duckAssetId) | |
1452 | 1488 | let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION) | |
1453 | 1489 | if ((newLocation == curLocation)) | |
1454 | 1490 | then throw("You can't fly to the same location") | |
1455 | 1491 | else { | |
1456 | 1492 | let bonus = if ((size(flightLog) > flBonus)) | |
1457 | 1493 | then flightLog[flBonus] | |
1458 | 1494 | else "" | |
1459 | 1495 | let sentAmount = if (if ((newHP > 0)) | |
1460 | 1496 | then (bonus == "$") | |
1461 | 1497 | else false) | |
1462 | 1498 | then asInt(invoke(restContract, "sendUsdtPrize", [userAddr], nil)) | |
1463 | 1499 | else 0 | |
1464 | 1500 | $Tuple2([StringEntry(locKey, if ((newHP > 0)) | |
1465 | 1501 | then newLocation | |
1466 | 1502 | else curLocation), IntegerEntry(keyHealth, newHP), prologAction], sentAmount) | |
1467 | 1503 | } | |
1468 | 1504 | } | |
1469 | 1505 | } | |
1470 | 1506 | } | |
1471 | 1507 | } | |
1472 | 1508 | } | |
1473 | 1509 | ||
1474 | 1510 | ||
1475 | 1511 | ||
1476 | 1512 | @Callable(i) | |
1477 | 1513 | func setHealth (health,duckAssetId) = { | |
1478 | 1514 | let prologAction = prolog(i) | |
1479 | 1515 | if (if ((0 > health)) | |
1480 | 1516 | then true | |
1481 | 1517 | else (health > 100)) | |
1482 | 1518 | then throw("HP should be within 0..100") | |
1483 | 1519 | else [IntegerEntry(keyDuckHealth(duckAssetId), health), prologAction] | |
1484 | 1520 | } | |
1485 | 1521 | ||
1486 | 1522 | ||
1487 | 1523 | ||
1488 | 1524 | @Callable(i) | |
1489 | 1525 | func heal (matType,amount) = { | |
1490 | 1526 | let prologAction = prolog(i) | |
1491 | 1527 | if (if ((0 > matType)) | |
1492 | 1528 | then true | |
1493 | 1529 | else (matType >= NUMRES)) | |
1494 | 1530 | then throw(("Unknown material: " + toString(matType))) | |
1495 | 1531 | else if ((0 >= amount)) | |
1496 | 1532 | then throw(("Amount should be positive! " + toString(amount))) | |
1497 | 1533 | else { | |
1498 | 1534 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
1499 | 1535 | let keyHealth = keyDuckHealth(duckAssetId) | |
1500 | 1536 | let oldHealth = valueOrElse(getInteger(keyHealth), 100) | |
1501 | 1537 | if ((oldHealth >= 100)) | |
1502 | 1538 | then throw("HP should be < 100 to heal") | |
1503 | 1539 | else { | |
1504 | 1540 | let bpKey = keyBackpackByDuck(duckAssetId) | |
1505 | 1541 | let currentPack = getBackpack(bpKey) | |
1506 | 1542 | let mList = split(currentPack[bpIdxMat], "_") | |
1507 | 1543 | let currentAmount = parseIntValue(mList[matType]) | |
1508 | 1544 | let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)]) | |
1509 | 1545 | let spendAmount = (deltaHealth * HEALCOST) | |
1510 | 1546 | if ((spendAmount > currentAmount)) | |
1511 | 1547 | then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount))) | |
1512 | 1548 | else { | |
1513 | 1549 | let newMat = subOneInList(mList, matType, spendAmount) | |
1514 | 1550 | [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":")), prologAction] | |
1515 | 1551 | } | |
1516 | 1552 | } | |
1517 | 1553 | } | |
1518 | 1554 | } | |
1519 | 1555 | ||
1520 | 1556 | ||
1521 | 1557 | ||
1522 | 1558 | @Callable(i) | |
1523 | 1559 | func updateBackpack (duckAssetId,newPack) = { | |
1524 | 1560 | let prologAction = prolog(i) | |
1525 | 1561 | if ((i.caller != economyContract)) | |
1526 | 1562 | then throw("permission denied") | |
1527 | 1563 | else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack), prologAction], newPack) | |
1528 | 1564 | } | |
1529 | 1565 | ||
1530 | 1566 | ||
1531 | 1567 | ||
1532 | 1568 | @Callable(i) | |
1533 | 1569 | func buySLand () = { | |
1534 | 1570 | let prologAction = prolog(i) | |
1535 | 1571 | if ((size(i.payments) != 1)) | |
1536 | 1572 | then throw("Exactly one payment required") | |
1537 | 1573 | else { | |
1538 | 1574 | let pmt = value(i.payments[0]) | |
1539 | 1575 | if ((pmt.assetId != usdtAssetId)) | |
1540 | 1576 | then throw("Allowed USDT payment only!") | |
1541 | 1577 | else if ((pmt.amount != EXPUSDT)) | |
1542 | 1578 | then throw(("Payment attached should be " + toString(EXPUSDT))) | |
1543 | 1579 | else { | |
1544 | 1580 | let result = expeditionInternal(i.caller, i.transactionId) | |
1545 | 1581 | $Tuple2(((result._1 :+ ScriptTransfer(economyContract, pmt.amount, usdtAssetId)) :+ prologAction), result._2._1) | |
1546 | 1582 | } | |
1547 | 1583 | } | |
1548 | 1584 | } | |
1549 | 1585 | ||
1550 | 1586 | ||
1551 | 1587 | ||
1552 | 1588 | @Callable(i) | |
1553 | 1589 | func expedition (message,sig) = { | |
1554 | 1590 | let prologAction = prolog(i) | |
1555 | 1591 | if ((size(i.payments) != 0)) | |
1556 | 1592 | then throw("No payments required") | |
1557 | 1593 | else { | |
1558 | 1594 | let result = expeditionCommon(true, i.caller, i.transactionId, message, sig) | |
1559 | 1595 | $Tuple2((result._1 :+ prologAction), result._2) | |
1560 | 1596 | } | |
1561 | 1597 | } | |
1562 | 1598 | ||
1563 | 1599 | ||
1564 | 1600 | ||
1565 | 1601 | @Callable(i) | |
1566 | 1602 | func upgradeInfra (landAssetId) = { | |
1567 | 1603 | let prologAction = prolog(i) | |
1568 | 1604 | if ((size(i.payments) != 0)) | |
1569 | 1605 | then throw("No payments required") | |
1570 | 1606 | else { | |
1571 | 1607 | let result = upInfraCommon(true, i.caller, 0, landAssetId) | |
1572 | 1608 | $Tuple2((result._1 :+ prologAction), result._2) | |
1573 | 1609 | } | |
1574 | 1610 | } | |
1575 | 1611 | ||
1576 | 1612 | ||
1577 | 1613 | ||
1578 | 1614 | @Callable(i) | |
1579 | 1615 | func upgradeInfraUsdt (landAssetId) = if ((i.caller != this)) | |
1580 | 1616 | then throw("Permission denied") | |
1581 | 1617 | else { | |
1582 | 1618 | let prologAction = prolog(i) | |
1583 | 1619 | if ((size(i.payments) != 1)) | |
1584 | 1620 | then throw("Exactly one payment required") | |
1585 | 1621 | else { | |
1586 | 1622 | let pmt = value(i.payments[0]) | |
1587 | 1623 | if ((pmt.assetId != usdtAssetId)) | |
1588 | 1624 | then throw("Allowed USDT payment only!") | |
1589 | 1625 | else { | |
1590 | 1626 | let result = upInfraCommon(false, i.caller, pmt.amount, landAssetId) | |
1591 | 1627 | $Tuple2(((result._1 :+ ScriptTransfer(economyContract, pmt.amount, usdtAssetId)) :+ prologAction), result._2) | |
1592 | 1628 | } | |
1593 | 1629 | } | |
1594 | 1630 | } | |
1595 | 1631 | ||
1596 | 1632 | ||
1597 | 1633 | ||
1598 | 1634 | @Callable(i) | |
1599 | 1635 | func activateArtifact (artName,landAssetId) = { | |
1600 | 1636 | let prologAction = prolog(i) | |
1601 | 1637 | if ((size(i.payments) != 0)) | |
1602 | 1638 | then throw("No payments required") | |
1603 | 1639 | else { | |
1604 | 1640 | let result = match artName { | |
1605 | 1641 | case _ => | |
1606 | 1642 | if (("PRESALE" == $match0)) | |
1607 | 1643 | then activatePresaleArt(toString(i.caller), landAssetId) | |
1608 | 1644 | else throw("Unknown artifact") | |
1609 | 1645 | } | |
1610 | 1646 | (result :+ prologAction) | |
1611 | 1647 | } | |
1612 | 1648 | } | |
1613 | 1649 | ||
1614 | 1650 | ||
1615 | 1651 | ||
1616 | 1652 | @Callable(i) | |
1617 | 1653 | func mergeLands (landAssetIds) = { | |
1618 | 1654 | let prologAction = prolog(i) | |
1619 | 1655 | if ((size(i.payments) != 0)) | |
1620 | 1656 | then throw("No payments required") | |
1621 | 1657 | else { | |
1622 | 1658 | let result = mergeCommon(true, toString(i.caller), 0, landAssetIds, i.transactionId) | |
1623 | 1659 | $Tuple2((result._1 :+ prologAction), result._2) | |
1624 | 1660 | } | |
1625 | 1661 | } | |
1626 | 1662 | ||
1627 | 1663 | ||
1628 | 1664 | ||
1629 | 1665 | @Callable(i) | |
1630 | 1666 | func mergeLandsUsdt (landAssetIds) = { | |
1631 | 1667 | let prologAction = prolog(i) | |
1632 | 1668 | if ((size(i.payments) != 1)) | |
1633 | 1669 | then throw("Exactly one payment required") | |
1634 | 1670 | else { | |
1635 | 1671 | let pmt = value(i.payments[0]) | |
1636 | 1672 | if ((pmt.assetId != usdtAssetId)) | |
1637 | 1673 | then throw("Allowed USDT payment only!") | |
1638 | 1674 | else { | |
1639 | 1675 | let result = mergeCommon(false, toString(i.caller), pmt.amount, landAssetIds, i.transactionId) | |
1640 | 1676 | $Tuple2(((result._1 :+ ScriptTransfer(economyContract, pmt.amount, usdtAssetId)) :+ prologAction), result._2) | |
1641 | 1677 | } | |
1642 | 1678 | } | |
1643 | 1679 | } | |
1644 | 1680 | ||
1645 | 1681 | ||
1646 | 1682 | ||
1647 | 1683 | @Callable(i) | |
1648 | 1684 | func cargoExchange (cargoListStr,landAssetId) = { | |
1649 | 1685 | let prologAction = prolog(i) | |
1650 | 1686 | if ((size(i.payments) != 0)) | |
1651 | 1687 | then throw("No payments required") | |
1652 | 1688 | else { | |
1653 | 1689 | let cargoParts = split_4C(cargoListStr, ":") | |
1654 | 1690 | let addr = toString(i.originCaller) | |
1655 | 1691 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
1656 | 1692 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
1657 | 1693 | if (!(isDefined(getInteger(timeKey)))) | |
1658 | 1694 | then throw((asset.name + " is not staked")) | |
1659 | 1695 | else { | |
1660 | 1696 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
1661 | 1697 | if ((owner != addr)) | |
1662 | 1698 | then throw((LANDPREFIX + " is not yours")) | |
1663 | 1699 | else { | |
1664 | 1700 | let landIndex = (numPiecesBySize(split(asset.description, "_")[recLandSize]) / SSIZE) | |
1665 | 1701 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
1666 | 1702 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
1667 | 1703 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
1668 | 1704 | let loc = split(value(curLocation), "_") | |
1669 | 1705 | if ((loc[locIdxType] != "L")) | |
1670 | 1706 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
1671 | 1707 | else if ((loc[locIdxId] != landAssetId)) | |
1672 | 1708 | then throw(("Duck should be on the land " + landAssetId)) | |
1673 | 1709 | else { | |
1674 | 1710 | let whKey = keyWarehouseByLand(landAssetId) | |
1675 | 1711 | let currentWh = getWarehouse(whKey, landIndex, infraLevel) | |
1676 | 1712 | let bpKey = keyBackpackByDuck(duckAssetId) | |
1677 | 1713 | let currentPack = getBackpack(bpKey) | |
1678 | 1714 | let result = moveStuff(cargoParts, currentWh, currentPack) | |
1679 | - | [StringEntry(bpKey, makeString([currentPack[bpIdxLevel], result._4, result._5, result._6], ":")), StringEntry(whKey, makeString([currentWh[whIdxVol], result._1, result._2, result._3, currentWh[whIdxLockedVol]], ":")), prologAction] | |
1715 | + | let loft = split(currentWh[whIdxLOFT], "_") | |
1716 | + | let loftO = (parseIntValue(loft[volOccupied]) + result._7) | |
1717 | + | let loftF = (parseIntValue(loft[volFree]) - result._7) | |
1718 | + | [StringEntry(bpKey, makeString_2C([currentPack[bpIdxLevel], result._4, result._5, result._6], ":")), StringEntry(whKey, makeString_2C([currentWh[whIdxLevels], result._1, result._2, result._3, makeString([loft[volLocked], toString(loftO), toString(loftF), loft[volTotal]], "_")], ":")), prologAction] | |
1680 | 1719 | } | |
1681 | 1720 | } | |
1682 | 1721 | } | |
1683 | 1722 | } | |
1684 | 1723 | } | |
1685 | 1724 | ||
1686 | 1725 | ||
1687 | 1726 | ||
1688 | 1727 | @Callable(i) | |
1689 | 1728 | func saveWarehouse (whStr,landAssetId) = { | |
1690 | 1729 | let prologAction = prolog(i) | |
1691 | 1730 | if ((i.caller != economyContract)) | |
1692 | 1731 | then throw("Access denied") | |
1693 | 1732 | else { | |
1694 | 1733 | let whKey = keyWarehouseByLand(landAssetId) | |
1695 | - | if ((size(split_4C(whStr, ":")) != 5)) | |
1734 | + | let wh = split_4C(whStr, ":") | |
1735 | + | if ((size(wh) != 5)) | |
1696 | 1736 | then throw("warehouse string should contain 4 ':' separators") | |
1697 | - | else $Tuple2([StringEntry(whKey, whStr), prologAction], whStr) | |
1737 | + | else { | |
1738 | + | let loftL = split(wh[whIdxLOFT], "_")[volLocked] | |
1739 | + | let loftO = getWarehouseOccupiedVol(wh) | |
1740 | + | let loftT = getWarehouseTotalVolume(wh[whIdxLevels]) | |
1741 | + | let loftF = ((loftT - parseIntValue(loftL)) - loftO) | |
1742 | + | let newWhStr = makeString_2C([wh[whIdxLevels], wh[whIdxRes], wh[whIdxMat], wh[whIdxProd], makeString([loftL, toString(loftO), toString(loftF), toString(loftT)], "_")], ":") | |
1743 | + | $Tuple2([StringEntry(whKey, newWhStr), prologAction], newWhStr) | |
1744 | + | } | |
1698 | 1745 | } | |
1699 | 1746 | } | |
1700 | 1747 | ||
1701 | 1748 | ||
1702 | 1749 | ||
1703 | 1750 | @Callable(i) | |
1704 | 1751 | func replaceBooleanArtifact (landAssetId) = if ((i.caller != restContract)) | |
1705 | 1752 | then throw("Access denied") | |
1706 | 1753 | else { | |
1707 | 1754 | let boolKey = keyPresaleArtActivatedByAssetId(landAssetId) | |
1708 | 1755 | let intKey = keyLandArtStatusByTypeAndAssetId(ARTPRESALE, landAssetId) | |
1709 | 1756 | let boolArt = getBoolean(boolKey) | |
1710 | 1757 | if (isDefined(boolArt)) | |
1711 | 1758 | then { | |
1712 | 1759 | let d = split(value(assetInfo(fromBase58String(landAssetId))).description, "_") | |
1713 | 1760 | let pieces = numPiecesBySize(d[recLandSize]) | |
1714 | 1761 | let artPieces = valueOrElse(getInteger(intKey), pieces) | |
1715 | 1762 | let owner = getString(keyLandAssetIdToOwner(landAssetId)) | |
1716 | 1763 | let ownerRecords = if (isDefined(owner)) | |
1717 | 1764 | then [IntegerEntry(keyLandArtStatusByTypeAssetIdAndOwner(ARTPRESALE, landAssetId, value(owner)), artPieces), DeleteEntry(keyPresaleArtActivatedByAssetIdAndOwner(landAssetId, value(owner)))] | |
1718 | 1765 | else nil | |
1719 | 1766 | if (value(boolArt)) | |
1720 | 1767 | then $Tuple2(((ownerRecords :+ IntegerEntry(intKey, artPieces)) :+ DeleteEntry(boolKey)), 2) | |
1721 | 1768 | else $Tuple2([DeleteEntry(boolKey)], 1) | |
1722 | 1769 | } | |
1723 | 1770 | else $Tuple2(nil, 0) | |
1724 | 1771 | } | |
1725 | 1772 | ||
1726 | 1773 | ||
1727 | 1774 | ||
1728 | 1775 | @Callable(i) | |
1729 | 1776 | func setCustomName (assetId,customName,type) = { | |
1730 | 1777 | let prologAction = prolog(i) | |
1731 | 1778 | if ((size(i.payments) != 1)) | |
1732 | 1779 | then throw("Exactly one payment required") | |
1733 | 1780 | else { | |
1734 | 1781 | let pmt = value(i.payments[0]) | |
1735 | 1782 | if ((pmt.assetId != usdtAssetId)) | |
1736 | 1783 | then throw("Allowed USDT payment only!") | |
1737 | 1784 | else if ((pmt.amount != RENAMINGCOST)) | |
1738 | 1785 | then throw(("Payment should be " + toString(RENAMINGCOST))) | |
1739 | 1786 | else if (contains(customName, "__")) | |
1740 | 1787 | then throw(("Name should not contain '__': " + customName)) | |
1741 | 1788 | else if ((size(customName) > MAXNAMELEN)) | |
1742 | 1789 | then throw(("Name too long, maxLength=" + toString(MAXNAMELEN))) | |
1743 | 1790 | else { | |
1744 | 1791 | let addr = toString(i.originCaller) | |
1745 | 1792 | let actions = match type { | |
1746 | 1793 | case _ => | |
1747 | 1794 | if (("ACCOUNT" == $match0)) | |
1748 | 1795 | then { | |
1749 | 1796 | let reverseKey = keyCustomNameToAddress(customName) | |
1750 | 1797 | let oldName = getString(reverseKey) | |
1751 | 1798 | if (isDefined(oldName)) | |
1752 | 1799 | then throw(("Name already registered: " + customName)) | |
1753 | 1800 | else [StringEntry(keyAddressToCustomName(addr), customName), StringEntry(reverseKey, addr)] | |
1754 | 1801 | } | |
1755 | 1802 | else if (("LAND" == $match0)) | |
1756 | 1803 | then { | |
1757 | 1804 | let asset = value(assetInfo(fromBase58String(assetId))) | |
1758 | 1805 | let timeKey = keyStakedTimeByAssetId(assetId) | |
1759 | 1806 | if (!(isDefined(getInteger(timeKey)))) | |
1760 | 1807 | then throw((asset.name + " is not staked")) | |
1761 | 1808 | else { | |
1762 | 1809 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(assetId)), (("NFT " + asset.name) + " is orphaned")) | |
1763 | 1810 | if ((owner != addr)) | |
1764 | 1811 | then throw((LANDPREFIX + " is not yours")) | |
1765 | 1812 | else { | |
1766 | 1813 | let reverseKey = keyLandCustomNameToAssetId(customName) | |
1767 | 1814 | let oldName = getString(reverseKey) | |
1768 | 1815 | if (isDefined(oldName)) | |
1769 | 1816 | then throw(("Name already registered: " + customName)) | |
1770 | 1817 | else [StringEntry(keyLandAssetIdToCustomName(assetId), customName), StringEntry(reverseKey, assetId)] | |
1771 | 1818 | } | |
1772 | 1819 | } | |
1773 | 1820 | } | |
1774 | 1821 | else if (("DUCK" == $match0)) | |
1775 | 1822 | then { | |
1776 | 1823 | let asset = value(assetInfo(fromBase58String(assetId))) | |
1777 | 1824 | let timeKey = keyStakedTimeByAssetId(assetId) | |
1778 | 1825 | if (if (!(isDefined(getInteger(timeKey)))) | |
1779 | 1826 | then true | |
1780 | 1827 | else !(isDefined(getString(keyStakedDuckByOwner(addr))))) | |
1781 | 1828 | then throw((asset.name + " is not staked")) | |
1782 | 1829 | else { | |
1783 | 1830 | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(assetId)), (("NFT " + asset.name) + " is orphaned")) | |
1784 | 1831 | if ((owner != addr)) | |
1785 | 1832 | then throw((DUCKPREFIX + " is not yours")) | |
1786 | 1833 | else { | |
1787 | 1834 | let reverseKey = keyDuckCustomNameToAssetId(customName) | |
1788 | 1835 | let oldName = getString(reverseKey) | |
1789 | 1836 | if (isDefined(oldName)) | |
1790 | 1837 | then throw(("Name already registered: " + customName)) | |
1791 | 1838 | else [StringEntry(keyDuckAssetIdToCustomName(assetId), customName), StringEntry(reverseKey, assetId)] | |
1792 | 1839 | } | |
1793 | 1840 | } | |
1794 | 1841 | } | |
1795 | 1842 | else throw("Unknown entity type") | |
1796 | 1843 | } | |
1797 | 1844 | $Tuple2(((actions :+ ScriptTransfer(economyContract, pmt.amount, usdtAssetId)) :+ prologAction), 0) | |
1798 | 1845 | } | |
1799 | 1846 | } | |
1800 | 1847 | } | |
1801 | 1848 | ||
1802 | 1849 | ||
1803 | 1850 | ||
1804 | 1851 | @Callable(i) | |
1805 | 1852 | func setReferrals (oldPlayer,newPlayer) = if ((i.callerPublicKey != pub)) | |
1806 | 1853 | then throw("Permission denied") | |
1807 | 1854 | else { | |
1808 | 1855 | let prologAction = prolog(i) | |
1809 | 1856 | if ((size(i.payments) != 0)) | |
1810 | 1857 | then throw("No payments required") | |
1811 | 1858 | else if (!(isDefined(addressFromString(oldPlayer)))) | |
1812 | 1859 | then throw(("Invalid address: " + oldPlayer)) | |
1813 | 1860 | else if (!(isDefined(addressFromString(newPlayer)))) | |
1814 | 1861 | then throw(("Invalid address: " + newPlayer)) | |
1815 | 1862 | else { | |
1816 | 1863 | let oldsKey = keyOldies() | |
1817 | 1864 | let olds = getString(oldsKey) | |
1818 | 1865 | let oldies = if (isDefined(olds)) | |
1819 | 1866 | then split_4C(value(olds), "_") | |
1820 | 1867 | else nil | |
1821 | 1868 | if (containsElement(oldies, newPlayer)) | |
1822 | 1869 | then throw((newPlayer + " is not newbie (already has referrals)")) | |
1823 | 1870 | else { | |
1824 | 1871 | let refByKey = keyAddressRefBy(newPlayer) | |
1825 | 1872 | let refBy = getString(refByKey) | |
1826 | 1873 | if (if (isDefined(refBy)) | |
1827 | 1874 | then isDefined(addressFromString(value(refBy))) | |
1828 | 1875 | else false) | |
1829 | 1876 | then throw(((newPlayer + " already has refBy: ") + value(refBy))) | |
1830 | 1877 | else { | |
1831 | 1878 | let refsKey = keyAddressReferrals(oldPlayer) | |
1832 | 1879 | let refs = getString(refsKey) | |
1833 | 1880 | let refsArray = if (isDefined(refs)) | |
1834 | 1881 | then split_4C(value(refs), "_") | |
1835 | 1882 | else nil | |
1836 | 1883 | if (containsElement(refsArray, newPlayer)) | |
1837 | 1884 | then throw((((oldPlayer + " already contains ") + newPlayer) + " within referrals")) | |
1838 | 1885 | else { | |
1839 | 1886 | let newRefs = makeString_2C((refsArray :+ newPlayer), "_") | |
1840 | 1887 | let newOlds = makeString_2C((oldies :+ oldPlayer), "_") | |
1841 | 1888 | $Tuple2([StringEntry(refByKey, oldPlayer), StringEntry(refsKey, newRefs), StringEntry(oldsKey, newOlds), prologAction], 0) | |
1842 | 1889 | } | |
1843 | 1890 | } | |
1844 | 1891 | } | |
1845 | 1892 | } | |
1846 | 1893 | } | |
1847 | 1894 | ||
1848 | 1895 | ||
1849 | 1896 | ||
1850 | 1897 | @Callable(i) | |
1851 | 1898 | func splitByGlobalWeightsREADONLY (amount) = $Tuple2(nil, getNeededMaterials(amount)) | |
1852 | 1899 | ||
1853 | 1900 | ||
1854 | 1901 | ||
1855 | 1902 | @Callable(i) | |
1856 | 1903 | func splitByGlobalAndLocalWeightsREADONLY (matAmount,resAmount,terrains) = { | |
1857 | 1904 | let terrainCounts = countTerrains(terrains) | |
1858 | 1905 | $Tuple2(nil, $Tuple2(getNeededMaterials(matAmount), distributeByWeights(resAmount, terrainCounts))) | |
1859 | 1906 | } | |
1860 | 1907 | ||
1861 | 1908 | ||
1862 | 1909 | ||
1863 | 1910 | @Callable(i) | |
1864 | 1911 | func getBackpackREADONLY (duckAssetId) = $Tuple2(nil, makeString(getBackpack(keyBackpackByDuck(duckAssetId)), ":")) | |
1865 | 1912 | ||
1866 | 1913 | ||
1867 | 1914 | ||
1868 | 1915 | @Callable(i) | |
1869 | 1916 | func getWarehouseREADONLY (landAssetId) = { | |
1870 | 1917 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
1871 | 1918 | let landIndex = (numPiecesBySize(split(asset.description, "_")[recLandSize]) / SSIZE) | |
1872 | 1919 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
1873 | 1920 | $Tuple2(nil, makeString_2C(getWarehouse(keyWarehouseByLand(landAssetId), landIndex, infraLevel), ":")) | |
1874 | 1921 | } | |
1875 | 1922 | ||
1876 | 1923 |
github/deemru/w8io/026f985 216.38 ms ◑