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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
| local function count_current(prefab) local count = 0 for k,v in pairs(Ents) do if v.prefab == prefab then if v.components.inventoryitem then if v.components.inventoryitem.owner == nil then count = count + 1 end else count = count + 1 end end end return count end
local function s_rmognum(name,maxnum) local count = 0 for k,v in pairs(Ents) do if v.prefab == name then if v.components.inventoryitem then if v.components.inventoryitem.owner == nil and count_current(name) > maxnum then v:Remove() count = count + 1 end else if count_current(name) > maxnum then v:Remove() count = count + 1 end end end end if count ~= 0 then print("removed", count, name) end end
local rmlist = { {"hound", 30}, {"firehound", 10}, {"icehound", 10}, {"spider_warrior", 10}, {"spider", 10}, {"flies", 10}, {"mosquito", 10}, {"bee", 10}, {"killerbee", 10}, {"frog", 20}, {"beefalo", 50}, {"grassgekko", 15}, {"lightninggoat", 50}, {"deer", 50}, {"evergreen_sparse", 250}, {"twiggytree", 150}, {"marsh_tree", 100}, {"rock_petrified_tree", 1000}, {"skeleton_player", 50}, {"spiderden", 80}, {"burntground", 50}, {"poop", 0}, {"guano", 0}, {"manrabbit_tail", 0}, {"silk", 50}, {"spidergland", 50}, {"stinger", 0}, {"houndstooth", 0}, {"mosquitosack", 0}, {"slurtleslime", 0}, {"slurtle_shellpieces", 0}, {"charcoal", 0}, {"rottenegg", 0}, {"horn", 5}, {"beardhair", 0}, {"beefalowool", 0}, {"feather_crow", 0}, {"feather_robin", 0}, {"feather_robin_winter", 0}, {"spoiled_food", 0}, {"sketch", 0}, {"blueprint", 0}, {"backpack", 0}, {"piggyback", 0}, {"candybag", 0}, {"compass", 0}, {"bedroll_furry", 0}, {"bedroll_straw", 0}, {"axe", 3}, {"goldenaxe", 3}, {"torch", 0}, {"pickaxe", 3}, {"goldenpickaxe", 3}, {"hammer", 3}, {"shovel", 3}, {"goldenshovel", 3}, {"razor", 1}, {"pitchfork", 0}, {"bugnet", 0}, {"fishingrod", 0}, {"umbrella", 0}, {"earmuffshat", 0}, {"winterhat", 0}, {"strawhat", 0}, {"tophat", 0}, {"featherhat", 0}, {"beehat", 0}, {"spiderhat", 0}, {"bushhat", 0}, {"trap", 10}, {"birdtrap", 3}, {"spear", 0}, {"boomerang", 0}, {"ruins_bat", 0}, {"armorgrass", 0}, {"armormarble", 0}, {"armorsnurtleshell", 0}, {"armorwood", 0}, {"armordragonfly", 0}, {"armor_bramble", 0}, {"footballhat", 0}, {"slurtlehat", 0}, {"chesspiece_deerclops_sketch", 0}, {"chesspiece_bearger_sketch", 0}, {"chesspiece_moosegoose_sketch", 0}, {"chesspiece_dragonfly_sketch", 0}, {"oar", 0}, {"oar_driftwood", 0}, {"antliontrinket", 0}, {"portablecookpot_item", 0}, {"portableblender_item", 0}, {"portablespicer_item", 0}, }
local function winterfeast_rmlist() for i=1,9 do table.insert(rmlist, {"winter_food"..i, 0}) end for i=1,12 do table.insert(rmlist, {"winter_ornament_plain"..i, 0}) end for i=1,8 do table.insert(rmlist, {"winter_ornament_fancy"..i, 0}) end for i=1,8 do table.insert(rmlist, {"winter_ornament_light"..i, 0}) end for i=1,5 do table.insert(rmlist, {"winter_ornament_festivalevents"..i, 0}) end table.insert(rmlist, {"winter_ornament_boss_bearger", 0 }) table.insert(rmlist, {"winter_ornament_boss_beequeen", 0}) table.insert(rmlist, {"winter_ornament_boss_deerclops", 0}) table.insert(rmlist, {"winter_ornament_boss_dragonfly", 0}) table.insert(rmlist, {"winter_ornament_boss_moose", 0}) table.insert(rmlist, {"winter_ornament_boss_toadstool", 0}) table.insert(rmlist, {"winter_ornament_boss_antlion", 0}) table.insert(rmlist, {"winter_ornament_boss_fuelweaver", 0}) table.insert(rmlist, {"winter_ornament_boss_klaus", 0}) table.insert(rmlist, {"winter_ornament_boss_krampus", 0}) table.insert(rmlist, {"winter_ornament_boss_noeyered", 0}) table.insert(rmlist, {"winter_ornament_boss_noeyeblue", 0}) end
local function hallowed_night_rmlist() for i=1,14 do table.insert(rmlist, {"halloweencandy_"..i, 0}) end for i=1,6 do table.insert(rmlist, {"halloween_ornament_"..i, 0}) end table.insert(rmlist, {"halloween_experiment_bravery", 0}) table.insert(rmlist, {"halloween_experiment_health", 0}) table.insert(rmlist, {"halloween_experiment_sanity", 0}) table.insert(rmlist, {"halloween_experiment_volatile", 0}) table.insert(rmlist, {"halloween_experiment_moon", 0}) table.insert(rmlist, {"halloween_experiment_root", 0}) end
local function trinket_rmlist() for i=2,5 do table.insert(rmlist, {"trinket_"..i, 0}) end for i=7,45 do table.insert(rmlist, {"trinket_"..i, 0}) end end
function clean() winterfeast_rmlist() hallowed_night_rmlist() trinket_rmlist() for k,v in pairs(rmlist) do s_rmognum(v[1],v[2]) end print("Clean Finished!") end
|