Merge branch 'R74nCom:main' into main
This commit is contained in:
commit
046632988a
|
|
@ -16704,10 +16704,10 @@ Cancer, Landmine, Grenade, Smoke Grenade">?</span>
|
|||
<option value="pt_br">Português (Brasil)</option>
|
||||
<option value="vi">Tiếng Việt</option>
|
||||
<option value="zh_hant">繁體中文</option>
|
||||
<option value="zh_cn">简体中文</option>
|
||||
<optgroup label="Incomplete">
|
||||
<option value="es">Español</option>
|
||||
<option value="ru">Русский Язык</option>
|
||||
<option value="zh_cn">简体中文</option>
|
||||
</optgroup>
|
||||
</select></p>
|
||||
<p>Try our NEW GAME: <a href="https://R74n.com/cook/" target="_blank">Infinite Chef</a></p>
|
||||
|
|
|
|||
421
lang/zh_cn.json
421
lang/zh_cn.json
|
|
@ -180,67 +180,67 @@
|
|||
"straw": "干草",
|
||||
"paper": "纸",
|
||||
"pollen": "花粉",
|
||||
"flower_seed":"",
|
||||
"pistil":"",
|
||||
"petal":"",
|
||||
"tree_branch":"",
|
||||
"vine":"",
|
||||
"bamboo_plant":"",
|
||||
"foam":"",
|
||||
"flower_seed": "花种子",
|
||||
"pistil": "雌蕊",
|
||||
"petal": "花瓣",
|
||||
"tree_branch": "树支",
|
||||
"vine": "藤蔓",
|
||||
"bamboo_plant": "竹子",
|
||||
"foam": "泡沫",
|
||||
"bubble": "泡泡",
|
||||
"acid":"",
|
||||
"neutral_acid":"",
|
||||
"acid_gas":"",
|
||||
"acid": "酸",
|
||||
"neutral_acid": "中性酸性",
|
||||
"acid_gas": "酸气",
|
||||
"glue": "粘",
|
||||
"soda": "汽水",
|
||||
"gray_goo": "灰粘",
|
||||
"malware":"",
|
||||
"ecloner":"",
|
||||
"slow_cloner":"",
|
||||
"clone_powder":"",
|
||||
"floating_cloner":"",
|
||||
"malware": "恶意软件",
|
||||
"ecloner": "电子克隆机",
|
||||
"slow_cloner": "慢克隆机",
|
||||
"clone_powder": "克隆粉",
|
||||
"floating_cloner": "浮动克隆机",
|
||||
"virus": "病毒",
|
||||
"ice_nine":"冰九",
|
||||
"strange_matter":"",
|
||||
"permafrost":"",
|
||||
"melted_butter":"",
|
||||
"melted_cheese":"",
|
||||
"mushroom_spore":"",
|
||||
"mushroom_stalk":"",
|
||||
"mushroom_gill":"",
|
||||
"mushroom_cap":"",
|
||||
"hyphae":"",
|
||||
"mycelium":"",
|
||||
"mulch":"",
|
||||
"ice_nine": "冰-九",
|
||||
"strange_matter": "奇怪物质",
|
||||
"permafrost": "永冻土",
|
||||
"melted_butter": "融化牛油",
|
||||
"melted_cheese": "融化芝士",
|
||||
"mushroom_spore": "蘑菇孢子",
|
||||
"mushroom_stalk": "蘑菇茎",
|
||||
"mushroom_gill": "蘑菇鳃",
|
||||
"mushroom_cap": "蘑菇帽",
|
||||
"hyphae": "菌丝",
|
||||
"mycelium": "菌丝体",
|
||||
"mulch": "覆盖物",
|
||||
"ant_wall": "蚂蚁墙",
|
||||
"lichen":"",
|
||||
"antimatter":"",
|
||||
"lichen": "地衣",
|
||||
"antimatter": "反物质",
|
||||
"plastic": "塑料",
|
||||
"molten_plastic":"",
|
||||
"cellulose":"",
|
||||
"wax":"",
|
||||
"melted_wax":"",
|
||||
"incense":"",
|
||||
"fuse":"",
|
||||
"dioxin":"",
|
||||
"insulation":"",
|
||||
"molten_plastic": "熔融塑料",
|
||||
"cellulose": "纤维素",
|
||||
"wax": "蜡",
|
||||
"melted_wax": "熔化蜡",
|
||||
"incense": "香",
|
||||
"fuse": "保险丝",
|
||||
"dioxin": "二恶英",
|
||||
"insulation": "绝缘",
|
||||
"sponge": "海绵",
|
||||
"bamboo": "竹子",
|
||||
"iron": "铁",
|
||||
"copper": "铜",
|
||||
"gold": "金",
|
||||
"steel":"",
|
||||
"nickel":"",
|
||||
"zinc":"",
|
||||
"steel": "钢",
|
||||
"nickel": "镍",
|
||||
"zinc": "锌",
|
||||
"silver": "银",
|
||||
"tin":"",
|
||||
"lead":"",
|
||||
"tin": "相信",
|
||||
"lead": "带领",
|
||||
"aluminum": "铝",
|
||||
"tungsten":"",
|
||||
"molten_tungsten":"",
|
||||
"brass":"",
|
||||
"bronze":"",
|
||||
"sterling":"",
|
||||
"tungsten": "钨",
|
||||
"molten_tungsten": "熔融钨",
|
||||
"brass": "黄铜",
|
||||
"bronze": "青铜",
|
||||
"sterling": "英镑",
|
||||
"gallium": "镓",
|
||||
"molten_gallium": "熔融镓",
|
||||
"gallium_gas": "镓气",
|
||||
|
|
@ -248,16 +248,16 @@
|
|||
"purple_gold": "紫金",
|
||||
"blue_gold": "蓝金",
|
||||
"electrum": "金金银",
|
||||
"pyrite":"",
|
||||
"solder":"",
|
||||
"pyrite": "黄铁矿",
|
||||
"solder": "焊接",
|
||||
"molten_copper": "熔融铜",
|
||||
"molten_gold": "熔融金",
|
||||
"molten_silver":"",
|
||||
"molten_iron":"",
|
||||
"molten_nickel":"",
|
||||
"molten_tin":"",
|
||||
"molten_lead":"",
|
||||
"molten_solder":"",
|
||||
"molten_silver": "熔银",
|
||||
"molten_iron": "铁水",
|
||||
"molten_nickel": "熔融镍",
|
||||
"molten_tin": "熔锡",
|
||||
"molten_lead": "熔化铅",
|
||||
"molten_solder": "熔化焊料",
|
||||
"juice": "果汁",
|
||||
"juice_ice": "果汁冰",
|
||||
"broth": "汤",
|
||||
|
|
@ -288,19 +288,19 @@
|
|||
"pumpkin_seed": "南瓜种子",
|
||||
"corn": "玉米",
|
||||
"popcorn": "爆米花",
|
||||
"corn_seed":"",
|
||||
"corn_seed": "玉米种子",
|
||||
"potato": "土豆",
|
||||
"baked_potato": "烤土豆",
|
||||
"mashed_potato": "薯泥",
|
||||
"potato_seed":"",
|
||||
"potato_seed": "马铃薯种子",
|
||||
"root": "根",
|
||||
"fiber":"",
|
||||
"yeast":"",
|
||||
"fiber": "纤维",
|
||||
"yeast": "酵母",
|
||||
"bread": "面包",
|
||||
"toast": "烤面包",
|
||||
"gingerbread":"",
|
||||
"crumb":"",
|
||||
"baked_batter":"",
|
||||
"gingerbread": "姜饼",
|
||||
"crumb": "屑",
|
||||
"baked_batter": "烘焙面糊",
|
||||
"wheat": "麦",
|
||||
"candy": "糖果",
|
||||
"coffee_bean": "咖啡豆",
|
||||
|
|
@ -310,25 +310,25 @@
|
|||
"nut_butter": "花生酱",
|
||||
"jelly": "布丁",
|
||||
"baking_soda": "苏打粉",
|
||||
"yogurt":"",
|
||||
"frozen_yogurt":"",
|
||||
"yogurt": "酸奶",
|
||||
"frozen_yogurt": "冰冻酸奶",
|
||||
"ice_cream": "冰淇凌",
|
||||
"cream": "奶油",
|
||||
"beans": "豆子",
|
||||
"dry_ice": "干冰",
|
||||
"nitrogen_ice":"",
|
||||
"nitrogen_ice": "氮冰",
|
||||
"particleboard": "皮肤",
|
||||
"skin": "皮肤",
|
||||
"hair": "头发",
|
||||
"alcohol": "酒",
|
||||
"alcohol_gas": "酒气",
|
||||
"basalt":"",
|
||||
"tuff":"",
|
||||
"molten_tuff":"",
|
||||
"basalt": "玄武岩",
|
||||
"tuff": "凝灰岩",
|
||||
"molten_tuff": "熔凝灰岩",
|
||||
"soap": "肥皂",
|
||||
"bleach": "漂白",
|
||||
"chlorine": "氯",
|
||||
"liquid_chlorine":"",
|
||||
"liquid_chlorine": "液氯",
|
||||
"dye": "染料",
|
||||
"ink": "墨水",
|
||||
"mercury": "汞",
|
||||
|
|
@ -336,209 +336,214 @@
|
|||
"solid_mercury": "固体汞",
|
||||
"blood": "血",
|
||||
"vaccine": "疫苗",
|
||||
"antibody":"",
|
||||
"antibody": "抗体",
|
||||
"infection": "感染",
|
||||
"poison": "毒",
|
||||
"poison_gas": "毒气",
|
||||
"poison_ice": "毒冰",
|
||||
"antidote":"",
|
||||
"antidote": "解毒剂",
|
||||
"tea": "茶",
|
||||
"coffee": "咖啡",
|
||||
"honey": "蜂蜜",
|
||||
"sap": "树叶",
|
||||
"amber":"",
|
||||
"amber": "琥珀色",
|
||||
"caramel": "焦糖",
|
||||
"molasses":"",
|
||||
"molasses": "糖蜜",
|
||||
"ketchup": "蕃茄酱",
|
||||
"mayo": "蛋黄酱",
|
||||
"melted_chocolate": "熔融巧克力",
|
||||
"liquid_hydrogen":"",
|
||||
"liquid_oxygen":"",
|
||||
"liquid_nitrogen":"",
|
||||
"liquid_helium":"",
|
||||
"liquid_hydrogen": "液氢",
|
||||
"liquid_oxygen": "液氧",
|
||||
"liquid_nitrogen": "液氮",
|
||||
"liquid_helium": "液氦",
|
||||
"sodium": "钠",
|
||||
"molten_sodium":"",
|
||||
"sodium_gas":"",
|
||||
"molten_sodium": "熔融钠",
|
||||
"sodium_gas": "钠气",
|
||||
"calcium": "钙",
|
||||
"molten_calcium":"",
|
||||
"limestone":"",
|
||||
"quicklime":"",
|
||||
"slaked_lime":"",
|
||||
"thermite":"",
|
||||
"molten_thermite":"",
|
||||
"slag":"",
|
||||
"amalgam":"",
|
||||
"molten_aluminum":"",
|
||||
"molten_zinc":"",
|
||||
"molten_calcium": "熔融钙",
|
||||
"limestone": "石灰石",
|
||||
"quicklime": "生石灰",
|
||||
"slaked_lime": "熟石灰",
|
||||
"thermite": "铝热剂",
|
||||
"molten_thermite": "熔融铝热剂",
|
||||
"slag": "矿渣",
|
||||
"amalgam": "汞合金",
|
||||
"molten_aluminum": "熔融铝",
|
||||
"molten_zinc": "熔融锌",
|
||||
"neon": "氖气",
|
||||
"liquid_neon":"",
|
||||
"smog":"",
|
||||
"liquid_neon": "液体氖气",
|
||||
"smog": "烟雾",
|
||||
"stench": "臭",
|
||||
"liquid_stench":"",
|
||||
"liquid_stench": "液体恶臭",
|
||||
"fragrance": "香水",
|
||||
"perfume": "香水",
|
||||
"cyanide":"",
|
||||
"cyanide_gas":"",
|
||||
"ozone":"",
|
||||
"cyanide": "氰化物",
|
||||
"cyanide_gas": "氰化物气体",
|
||||
"ozone": "臭氧",
|
||||
"cloud": "云",
|
||||
"rain_cloud": "雨云",
|
||||
"snow_cloud": "雪云",
|
||||
"hail_cloud": "冰雹云",
|
||||
"thunder_cloud": "雷云",
|
||||
"acid_cloud": "酸云",
|
||||
"pyrocumulus":"",
|
||||
"pyrocumulus": "火积云",
|
||||
"fire_cloud": "火云",
|
||||
"color_smoke":"",
|
||||
"spray_paint":"",
|
||||
"color_smoke": "彩色烟雾",
|
||||
"spray_paint": "喷漆",
|
||||
"led_r": "红灯",
|
||||
"led_g": "绿灯",
|
||||
"led_b": "蓝灯",
|
||||
"sulfur":"",
|
||||
"molten_sulfur":"",
|
||||
"sulfur_gas":"",
|
||||
"copper_sulfate":"",
|
||||
"sulfur": "硫",
|
||||
"molten_sulfur": "熔融硫磺",
|
||||
"sulfur_gas": "硫磺气体",
|
||||
"copper_sulfate": "硫酸铜",
|
||||
"snake": "蛇",
|
||||
"loopy":"",
|
||||
"warp":"",
|
||||
"radiation":"",
|
||||
"rad_steam":"",
|
||||
"rad_cloud":"",
|
||||
"fallout":"",
|
||||
"neutron":"",
|
||||
"proton":"",
|
||||
"loopy": "疯狂的",
|
||||
"warp": "经",
|
||||
"radiation": "辐射",
|
||||
"rad_steam": "辐射蒸汽",
|
||||
"rad_cloud": "拉德云",
|
||||
"fallout": "掉出来",
|
||||
"neutron": "中子",
|
||||
"proton": "质子",
|
||||
"electric": "电",
|
||||
"uranium": "铀",
|
||||
"molten_uranium": "熔融铀",
|
||||
"diamond": "钻石",
|
||||
"gold_coin": "硬币",
|
||||
"rust":"",
|
||||
"oxidized_copper":"",
|
||||
"alga":"",
|
||||
"metal_scrap":"",
|
||||
"glass_shard":"",
|
||||
"rad_shard":"",
|
||||
"brick_rubble":"",
|
||||
"baked_clay":"",
|
||||
"clay_shard":"",
|
||||
"porcelain_shard":"",
|
||||
"rust": "锈",
|
||||
"oxidized_copper": "氧化铜",
|
||||
"alga": "藻类",
|
||||
"metal_scrap": "金属废料",
|
||||
"glass_shard": "玻璃碎片",
|
||||
"rad_shard": "rad shard",
|
||||
"brick_rubble": "砖瓦砾",
|
||||
"baked_clay": "烘焙粘土",
|
||||
"clay_shard": "粘土碎片",
|
||||
"porcelain_shard": "瓷器碎片",
|
||||
"feather": "羽毛",
|
||||
"confetti":"",
|
||||
"glitter":"",
|
||||
"bead":"",
|
||||
"confetti": "五彩纸屑",
|
||||
"glitter": "闪光",
|
||||
"bead": "珠子",
|
||||
"color_sand": "彩色沙",
|
||||
"borax":"",
|
||||
"epsom_salt":"",
|
||||
"potassium_salt":"",
|
||||
"sodium_acetate":"",
|
||||
"lightning":"",
|
||||
"bless":"",
|
||||
"god_ray":"",
|
||||
"heat_ray":"",
|
||||
"explosion":"",
|
||||
"n_explosion":"",
|
||||
"supernova":"",
|
||||
"borax": "硼砂",
|
||||
"epsom_salt": "泻盐",
|
||||
"potassium_salt": "钾盐",
|
||||
"sodium_acetate": "乙酸钠",
|
||||
"lightning": "闪电",
|
||||
"bless": "保佑",
|
||||
"god_ray": "神雷",
|
||||
"heat_ray": "热射线",
|
||||
"explosion": "爆炸",
|
||||
"n_explosion": "n 爆炸",
|
||||
"supernova": "超新星",
|
||||
"pop": "爆",
|
||||
"cook": "煮",
|
||||
"incinerate":"",
|
||||
"room_temp":"",
|
||||
"positron":"",
|
||||
"tnt":"",
|
||||
"incinerate": "焚化",
|
||||
"room_temp": "房间温度",
|
||||
"positron": "正电子",
|
||||
"tnt": "tnt",
|
||||
"c4": "C4",
|
||||
"grenade":"",
|
||||
"dynamite":"",
|
||||
"gunpowder":"",
|
||||
"ember":"",
|
||||
"grenade": "手榴弹",
|
||||
"dynamite": "炸药",
|
||||
"gunpowder": "火药",
|
||||
"ember": "人类",
|
||||
"firework": "烟花",
|
||||
"fw_ember": "烟火",
|
||||
"nuke":"",
|
||||
"h_bomb":"",
|
||||
"dirty_bomb":"",
|
||||
"emp_bomb":"",
|
||||
"nitro":"",
|
||||
"greek_fire":"",
|
||||
"fireball":"",
|
||||
"rocket":"",
|
||||
"nuke": "核武器",
|
||||
"h_bomb": "h 炸弹",
|
||||
"dirty_bomb": "脏炸弹",
|
||||
"emp_bomb": "电子炸弹",
|
||||
"nitro": "硝基",
|
||||
"greek_fire": "希腊火",
|
||||
"fireball": "火球",
|
||||
"rocket": "火箭",
|
||||
"cold_bomb": "冷炸弹",
|
||||
"hot_bomb": "热炸弹",
|
||||
"antimatter_bomb":"",
|
||||
"party_popper":"",
|
||||
"antimatter_bomb": "反物质炸弹",
|
||||
"party_popper": "礼花",
|
||||
"flashbang": "光榴弹",
|
||||
"flash":"",
|
||||
"flash": "闪光",
|
||||
"smoke_grenade": "烟榴弹",
|
||||
"landmine":"",
|
||||
"armageddon":"",
|
||||
"tesla_coil":"",
|
||||
"landmine": "地雷",
|
||||
"armageddon": "世界末日",
|
||||
"tesla_coil": "特斯拉线圈",
|
||||
"light_bulb": "灯泡",
|
||||
"shocker":"",
|
||||
"pressure_plate":"",
|
||||
"primordial_soup":"",
|
||||
"molten_slag":"",
|
||||
"molten_dirt":"",
|
||||
"debug":"",
|
||||
"prop":"",
|
||||
"shocker": "令人震惊",
|
||||
"pressure_plate": "压力板",
|
||||
"primordial_soup": "原始汤",
|
||||
"molten_slag": "熔渣",
|
||||
"molten_dirt": "熔化污垢",
|
||||
"debug": "调试",
|
||||
"prop": "支柱",
|
||||
"salt_ice": "盐水冰",
|
||||
"sugar_ice": "糖水冰",
|
||||
"seltzer_ice": "苏打水冰",
|
||||
"dirty_ice":"",
|
||||
"pool_ice":"",
|
||||
"dirty_ice": "脏冰",
|
||||
"pool_ice": "池冰",
|
||||
"blood_ice": "血冰",
|
||||
"antibody_ice":"",
|
||||
"infection_ice":"",
|
||||
"antibody_ice": "抗体 冰",
|
||||
"infection_ice": "感染冰",
|
||||
"unknown": "未知",
|
||||
"slime_ice":"",
|
||||
"antiice":"",
|
||||
"ammonia_ice":"",
|
||||
"liquid_propane":"",
|
||||
"methane_ice":"",
|
||||
"molten_brick":"",
|
||||
"acid_ice":"",
|
||||
"slime_ice": "史莱姆 冰",
|
||||
"antiice": "防冰",
|
||||
"ammonia_ice": "氨 冰",
|
||||
"liquid_propane": "液体丙烷",
|
||||
"methane_ice": "甲烷 冰",
|
||||
"molten_brick": "熔化的砖",
|
||||
"acid_ice": "酸 冰",
|
||||
"soda_ice": "汽水冰",
|
||||
"molten_steel":"",
|
||||
"molten_brass":"",
|
||||
"molten_bronze":"",
|
||||
"molten_sterling":"",
|
||||
"molten_rose_gold":"",
|
||||
"molten_purple_gold":"",
|
||||
"molten_blue_gold":"",
|
||||
"molten_electrum":"",
|
||||
"molten_pyrite":"",
|
||||
"broth_ice":"",
|
||||
"frozen_vinegar":"",
|
||||
"molten_steel": "钢水",
|
||||
"molten_brass": "熔融黄铜",
|
||||
"molten_bronze": "熔化青铜",
|
||||
"molten_sterling": "熔化英镑",
|
||||
"molten_rose_gold": "熔化玫瑰金",
|
||||
"molten_purple_gold": "熔化紫金",
|
||||
"molten_blue_gold": "熔蓝金",
|
||||
"molten_electrum": "熔融金金矿",
|
||||
"molten_pyrite": "熔融黄铁矿",
|
||||
"broth_ice": "肉汤冰",
|
||||
"frozen_vinegar": "冷冻醋",
|
||||
"sauce_ice": "酱冰",
|
||||
"alcohol_ice": "酒冰",
|
||||
"bleach_ice":"",
|
||||
"chlorine_ice":"",
|
||||
"frozen_ink":"",
|
||||
"bleach_ice": "漂白冰",
|
||||
"chlorine_ice": "氯冰",
|
||||
"frozen_ink": "冰冻墨水",
|
||||
"tea_ice": "茶冰",
|
||||
"coffee_ice": "咖啡冰",
|
||||
"hydrogen_ice":"",
|
||||
"oxygen_ice":"",
|
||||
"molten_amalgam":"",
|
||||
"neon_ice":"",
|
||||
"cyanide_ice":"",
|
||||
"molten_copper_sulfate":"",
|
||||
"molten_alga":"",
|
||||
"molten_metal_scrap":"",
|
||||
"molten_borax":"",
|
||||
"molten_epsom_salt":"",
|
||||
"molten_potassium_salt":"",
|
||||
"molten_sodium_acetate":"",
|
||||
"frozen_nitro":"",
|
||||
"cured_meat": "",
|
||||
"hydrogen_ice": "氢冰",
|
||||
"oxygen_ice": "氧气 冰",
|
||||
"molten_amalgam": "熔融汞合金",
|
||||
"neon_ice": "霓虹灯冰",
|
||||
"cyanide_ice": "氰化物冰",
|
||||
"molten_copper_sulfate": "熔融硫酸铜",
|
||||
"molten_alga": "熔藻",
|
||||
"molten_metal_scrap": "熔融金属废料",
|
||||
"molten_borax": "熔融硼砂",
|
||||
"molten_epsom_salt": "熔盐",
|
||||
"molten_potassium_salt": "熔融钾盐",
|
||||
"molten_sodium_acetate": "熔融乙酸钠",
|
||||
"frozen_nitro": "冷冻硝基",
|
||||
"cured_meat": "腌肉",
|
||||
"nut_oil": "花生油",
|
||||
"grease": "",
|
||||
"grease": "润滑脂",
|
||||
"fat": "肥",
|
||||
"potassium": "钾",
|
||||
"molten_potassium": "熔融钾",
|
||||
"magnesium": "镁",
|
||||
"molten_magnesium": "熔融镁",
|
||||
"sandstorm": "",
|
||||
"sandstorm": "沙暴",
|
||||
"caustic_potash": "氢氧化钾",
|
||||
"antibomb": "",
|
||||
"antibomb": "反炸弹",
|
||||
"tornado": "龙卷风",
|
||||
"earthquake": "地震",
|
||||
"tsunami": "海啸",
|
||||
"blaster": "",
|
||||
"propane_ice": "",
|
||||
"molten_caustic_potash": "熔融氢氧化钾"
|
||||
"blaster": "冲击波",
|
||||
"propane_ice": "丙烷冰",
|
||||
"molten_caustic_potash": "熔融氢氧化钾",
|
||||
"cloth": "布",
|
||||
"kelp": "海带",
|
||||
"grinder": "磨床",
|
||||
"mixer": "混合机",
|
||||
"freeze_ray": "冷射线"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@
|
|||
<tr><td>more_breaking.js</td><td>Allows for breaking more elements in explosions</td><td>Alice</td></tr>
|
||||
<tr><td>rays.js</td><td>Adds more Ray types</td><td>Alice</td></tr>
|
||||
<tr><td>rays++.js</td><td>Adds a couple more rays</td><td>uptzik</td></tr>
|
||||
<tr><td>subspace.js</td><td>Adds the Subspace Tripmine from Roblox</td><td>nousernamefound</td></tr>
|
||||
<tr><td>weapons.js</td><td>Adds varieties of different weapons </td><td>Jayd</td></tr>
|
||||
|
||||
<!----><tr><td class="modCat" colspan="3">Food & Cooking</td></tr><!---->
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
//aircrafts
|
||||
elements.bomb.ignore = ["super_bomber_left","super_bomber_right"],
|
||||
elements.fast_bullet_left = {
|
||||
color: "#4c4e42",
|
||||
behavior: [
|
||||
|
|
@ -222,4 +223,38 @@ elements.bomber_right = {
|
|||
burnInto: "metal_scrap",
|
||||
breakInto: "metal_scrap",
|
||||
conduct: 1
|
||||
},
|
||||
elements.super_bomber_left = {
|
||||
color: "#000000",
|
||||
category: "aircrafts",
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"M1%3 AND EX:7>fire,fire,fire,metal_scrap|XX|XX",
|
||||
"M1 AND EX:7>fire,fire,fire,metal_scrap|XX|XX",
|
||||
"M1%3 AND CR:bomb|CR:bomb|CR:smoke%10 AND CR:bomb",
|
||||
"CR:bomb|CR:bomb|CR:bomb",
|
||||
],
|
||||
ignore: "bomb",
|
||||
burnTime: 1000,
|
||||
burn: 40,
|
||||
burnInto: "metal_scrap",
|
||||
breakInto: "metal_scrap",
|
||||
conduct: 1
|
||||
},
|
||||
elements.super_bomber_right = {
|
||||
color: "#000000",
|
||||
category: "aircrafts",
|
||||
behavior: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|M1%3 AND EX:7>fire,fire,fire,metal_scrap",
|
||||
"XX|XX|M1 AND EX:7>fire,fire,fire,metal_scrap",
|
||||
"CR:smoke%10 AND CR:bomb|CR:bomb|M1%3 AND CR:bomb",
|
||||
"CR:bomb|CR:bomb|CR:bomb",
|
||||
],
|
||||
ignore: "bomb",
|
||||
burnTime: 1000,
|
||||
burn: 40,
|
||||
burnInto: "metal_scrap",
|
||||
breakInto: "metal_scrap",
|
||||
conduct: 1
|
||||
}
|
||||
|
|
@ -0,0 +1,285 @@
|
|||
// Redbirdly's Mod that adds a better light system
|
||||
// this is the faster version of lightmap.js (although lower quality)
|
||||
|
||||
let lightmap = [];
|
||||
let nextLightmap = [];
|
||||
let lightmapWidth, lightmapHeight;
|
||||
let pixelSizeQuarter = pixelSizeHalf / 2;
|
||||
let lightmapScale = 3;
|
||||
|
||||
// Define RGB colors
|
||||
let lightColor = [255, 223, 186];
|
||||
let sunColor = [255*8, 210*8, 26*8];
|
||||
let lampColor = [255*4, 223*4, 186*4];
|
||||
let laserColor = [255, 0, 0];
|
||||
let ledRColor = [255, 0, 0];
|
||||
let ledGColor = [0, 255, 0];
|
||||
let ledBColor = [0, 0, 255];
|
||||
let fireColor = [255, 69, 0];
|
||||
let plasmaColor = [160, 69, 255];
|
||||
let coldFireColor = [0, 191, 255];
|
||||
let magmaColor = [255, 140, 0];
|
||||
let neonColor = [255*2, 60*2, 10*2];
|
||||
|
||||
function initializeLightmap(width, height) {
|
||||
lightmapWidth = Math.ceil(width / lightmapScale);
|
||||
lightmapHeight = Math.ceil(height / lightmapScale);
|
||||
|
||||
for (let y = 0; y < lightmapHeight; y++) {
|
||||
lightmap[y] = [];
|
||||
nextLightmap[y] = [];
|
||||
for (let x = 0; x < lightmapWidth; x++) {
|
||||
lightmap[y][x] = { color: [0, 0, 0] };
|
||||
nextLightmap[y][x] = { color: [0, 0, 0] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function deepCopy(source, target) {
|
||||
for (let y = 0; y < source.length; y++) {
|
||||
target[y] = [];
|
||||
for (let x = 0; x < source[y].length; x++) {
|
||||
target[y][x] = { ...source[y][x] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function propagateLightmap() {
|
||||
if (!lightmap || !lightmap[0]) { return; }
|
||||
let width = lightmap[0].length;
|
||||
let height = lightmap.length;
|
||||
|
||||
let neighbors = [
|
||||
{ dx: 1, dy: 0 },
|
||||
{ dx: -1, dy: 0 },
|
||||
{ dx: 0, dy: 1 },
|
||||
{ dx: 0, dy: -1 },
|
||||
];
|
||||
|
||||
for (let y = 0; y < height; y++) {
|
||||
for (let x = 0; x < width; x++) {
|
||||
let totalColor = [0, 0, 0];
|
||||
let neighborCount = 0;
|
||||
neighbors.forEach(({ dx, dy }) => {
|
||||
let nx = x + dx;
|
||||
let ny = y + dy;
|
||||
if (nx >= 0 && ny >= 0 && nx < width && ny < height) {
|
||||
totalColor[0] += lightmap[ny][nx].color[0];
|
||||
totalColor[1] += lightmap[ny][nx].color[1];
|
||||
totalColor[2] += lightmap[ny][nx].color[2];
|
||||
neighborCount++;
|
||||
}
|
||||
});
|
||||
nextLightmap[y][x] = {
|
||||
color: [
|
||||
Math.min(Math.max(0, totalColor[0] / neighborCount * 0.8), 255*8),
|
||||
Math.min(Math.max(0, totalColor[1] / neighborCount * 0.8), 255*8),
|
||||
Math.min(Math.max(0, totalColor[2] / neighborCount * 0.8), 255*8)
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
deepCopy(nextLightmap, lightmap);
|
||||
}
|
||||
|
||||
function rgbToHsv(r, g, b) {
|
||||
r /= 255, g /= 255, b /= 255;
|
||||
let max = Math.max(r, g, b), min = Math.min(r, g, b);
|
||||
let h, s, v = max;
|
||||
|
||||
let d = max - min;
|
||||
s = max === 0 ? 0 : d / max;
|
||||
|
||||
if (max === min) {
|
||||
h = 0;
|
||||
} else {
|
||||
switch (max) {
|
||||
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
|
||||
case g: h = (b - r) / d + 2; break;
|
||||
case b: h = (r - g) / d + 4; break;
|
||||
}
|
||||
h /= 6;
|
||||
}
|
||||
|
||||
return [h, s, v];
|
||||
}
|
||||
|
||||
function hsvToRgb(h, s, v) {
|
||||
let r, g, b;
|
||||
|
||||
let i = Math.floor(h * 6);
|
||||
let f = h * 6 - i;
|
||||
let p = v * (1 - s);
|
||||
let q = v * (1 - f * s);
|
||||
let t = v * (1 - (1 - f) * s);
|
||||
|
||||
switch (i % 6) {
|
||||
case 0: r = v, g = t, b = p; break;
|
||||
case 1: r = q, g = v, b = p; break;
|
||||
case 2: r = p, g = v, b = t; break;
|
||||
case 3: r = p, g = q, b = v; break;
|
||||
case 4: r = t, g = p, b = v; break;
|
||||
case 5: r = v, g = p, b = q; break;
|
||||
}
|
||||
|
||||
return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
|
||||
}
|
||||
|
||||
function renderLightmap() {
|
||||
if (!canvas) { return; }
|
||||
if (!lightmap || !lightmap[0]) { return; }
|
||||
let context = canvas.getContext('2d');
|
||||
let width = lightmap[0].length;
|
||||
let height = lightmap.length;
|
||||
|
||||
for (let y = 0; y < height; y++) {
|
||||
for (let x = 0; x < width; x++) {
|
||||
let { color } = lightmap[y][x];
|
||||
let [r, g, b] = color;
|
||||
if (r > 0 || g > 0 || b > 0) {
|
||||
let [h, s, v] = rgbToHsv(r, g, b);
|
||||
let newColor = hsvToRgb(h, s, 1);
|
||||
let alpha = v;
|
||||
|
||||
context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha*0.4})`;
|
||||
context.fillRect(
|
||||
x * pixelSize * lightmapScale,
|
||||
y * pixelSize * lightmapScale,
|
||||
pixelSize * lightmapScale,
|
||||
pixelSize * lightmapScale
|
||||
);
|
||||
context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha * 0.25})`;
|
||||
context.fillRect(
|
||||
(x * pixelSize - pixelSizeHalf) * lightmapScale,
|
||||
(y * pixelSize - pixelSizeHalf) * lightmapScale,
|
||||
pixelSize * lightmapScale * 2,
|
||||
pixelSize * lightmapScale * 2
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elements.sun.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: sunColor };
|
||||
};
|
||||
|
||||
let originalLightTick = elements.light.tick;
|
||||
elements.light.tick = function(pixel) {
|
||||
originalLightTick(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: lightColor };
|
||||
};
|
||||
|
||||
let originalLiquidLightTick = elements.liquid_light.tick;
|
||||
elements.liquid_light.tick = function(pixel) {
|
||||
originalLiquidLightTick(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: lightColor };
|
||||
};
|
||||
|
||||
elements.magma.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: fireColor };
|
||||
};
|
||||
|
||||
elements.neon.tick = function(pixel) {
|
||||
if (!pixel.charge || pixel.charge <= 0) {return;}
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: neonColor };
|
||||
};
|
||||
|
||||
elements.light_bulb.behaviorOn = null
|
||||
elements.light_bulb.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 10;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: lampColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
elements.led_r.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 4;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: ledRColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
elements.led_g.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 4;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: ledGColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
elements.led_b.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 4;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: ledBColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
let originalLaserTick = elements.laser.tick;
|
||||
elements.laser.tick = function(pixel) {
|
||||
originalLaserTick(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: laserColor };
|
||||
};
|
||||
|
||||
let originalFireTick2 = elements.fire.tick;
|
||||
elements.fire.tick = function(pixel) {
|
||||
originalFireTick2(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: fireColor };
|
||||
};
|
||||
|
||||
elements.cold_fire.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: coldFireColor };
|
||||
};
|
||||
|
||||
elements.plasma.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: plasmaColor };
|
||||
};
|
||||
|
||||
// Wait for loading
|
||||
// if it loads too soon then width will be undefined
|
||||
setTimeout(() => { initializeLightmap(width, height); }, 700);
|
||||
|
||||
// Add code to functions instead of replacing them
|
||||
let originalTick = tick;
|
||||
tick = function() {
|
||||
originalTick();
|
||||
if (!paused) {propagateLightmap();}
|
||||
};
|
||||
// Even after updating tick(), setInterval still uses the old tick(), reset setInterval
|
||||
resetInterval(tps);
|
||||
|
||||
let originalDrawPixels = drawPixels;
|
||||
drawPixels = function(forceTick = false) {
|
||||
originalDrawPixels(forceTick);
|
||||
renderLightmap();
|
||||
};
|
||||
|
|
@ -1,3 +1,169 @@
|
|||
function getImportantLetters(input) { // entirely chadgbd i just told it what algoritm to make
|
||||
const isVowel = char => 'AEIOU'.includes(char);
|
||||
const isConsonant = char => /^[BCDFGHJKLMNPQRSTVWXYZ]$/.test(char);
|
||||
|
||||
const removeDuplicates = str => {
|
||||
let seen = new Set();
|
||||
return str.split('').filter(char => {
|
||||
if (seen.has(char)) {
|
||||
return false;
|
||||
} else {
|
||||
seen.add(char);
|
||||
return true;
|
||||
}
|
||||
}).join('');
|
||||
};
|
||||
|
||||
const words = input.replace(/[^a-zA-Z0-9\s_]/g, '').replace(/_/g, ' ').toUpperCase().split(/\s+/);
|
||||
|
||||
if (input.length <= 4) {
|
||||
return input.toUpperCase();
|
||||
} else if (words.length === 1) {
|
||||
const word = removeDuplicates(words[0]);
|
||||
let result = '';
|
||||
let consonantCount = 0;
|
||||
let vowelFound = false;
|
||||
|
||||
for (let char of word) {
|
||||
if (isVowel(char) && !vowelFound) {
|
||||
result += char;
|
||||
vowelFound = true;
|
||||
} else if (isConsonant(char) && consonantCount < 3) {
|
||||
result += char;
|
||||
consonantCount++;
|
||||
}
|
||||
if (result.length === 4) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result.padEnd(4, result[result.length - 1] || '');
|
||||
} else if (words.length === 2) {
|
||||
const firstWord = words[0];
|
||||
const secondWord = words[1];
|
||||
let result = '';
|
||||
|
||||
if (isNaN(firstWord) && !isNaN(secondWord)) {
|
||||
const word = removeDuplicates(firstWord);
|
||||
let consonantCount = 0;
|
||||
let vowelFound = false;
|
||||
|
||||
for (let char of word) {
|
||||
if (isVowel(char) && !vowelFound) {
|
||||
result += char;
|
||||
vowelFound = true;
|
||||
} else if (isConsonant(char) && consonantCount < 2) {
|
||||
result += char;
|
||||
consonantCount++;
|
||||
}
|
||||
if (result.length === 3) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
result = result.padEnd(3, result[result.length - 1] || '') + secondWord;
|
||||
} else if (!isNaN(firstWord) && isNaN(secondWord)) {
|
||||
const word = removeDuplicates(secondWord);
|
||||
let consonantCount = 0;
|
||||
let vowelFound = false;
|
||||
|
||||
for (let char of word) {
|
||||
if (isVowel(char) && !vowelFound) {
|
||||
result += char;
|
||||
vowelFound = true;
|
||||
} else if (isConsonant(char) && consonantCount < 2) {
|
||||
result += char;
|
||||
consonantCount++;
|
||||
}
|
||||
if (result.length === 3) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
result = result.padEnd(3, result[result.length - 1] || '') + firstWord;
|
||||
} else {
|
||||
result = firstWord[0];
|
||||
let consonants = [];
|
||||
let vowels = [];
|
||||
let allChars = [];
|
||||
|
||||
for (let char of secondWord) {
|
||||
allChars.push(char);
|
||||
if (isConsonant(char)) {
|
||||
consonants.push(char);
|
||||
} else if (isVowel(char)) {
|
||||
vowels.push(char);
|
||||
}
|
||||
}
|
||||
|
||||
if (consonants.length >= 3) {
|
||||
let consonantCount = 0;
|
||||
for (let char of allChars) {
|
||||
if (isConsonant(char) && consonantCount < 3) {
|
||||
result += char;
|
||||
consonantCount++;
|
||||
}
|
||||
if (result.length === 4) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (consonants.length === 2) {
|
||||
let consonantCount = 0;
|
||||
let vowelCount = 0;
|
||||
for (let char of allChars) {
|
||||
if (isConsonant(char) && consonantCount < 2) {
|
||||
result += char;
|
||||
consonantCount++;
|
||||
} else if (isVowel(char) && vowelCount < 1) {
|
||||
result += char;
|
||||
vowelCount++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let consonantCount = 0;
|
||||
let vowelCount = 0;
|
||||
for (let char of allChars) {
|
||||
if (isConsonant(char) && consonantCount < 1) {
|
||||
result += char;
|
||||
consonantCount++;
|
||||
} else if (isVowel(char) && vowelCount < 2) {
|
||||
result += char;
|
||||
vowelCount++;
|
||||
}
|
||||
if (result.length === 4) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result = result.padEnd(4, result[result.length - 1] || '');
|
||||
}
|
||||
|
||||
return result;
|
||||
} else if (words.length === 3) {
|
||||
const firstWord = words[0];
|
||||
const secondWord = words[1];
|
||||
const thirdWord = words[2];
|
||||
let result = firstWord[0] + secondWord[0];
|
||||
let consonantCount = 0;
|
||||
let vowelFound = false;
|
||||
|
||||
for (let char of thirdWord) {
|
||||
if (isVowel(char) && !vowelFound) {
|
||||
result += char;
|
||||
vowelFound = true;
|
||||
} else if (isConsonant(char) && consonantCount < 1) {
|
||||
result += char;
|
||||
consonantCount++;
|
||||
}
|
||||
if (result.length === 4) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result.padEnd(4, result[result.length - 1] || '');
|
||||
} else {
|
||||
return words.map(word => word[0]).join('').slice(0, 4);
|
||||
}
|
||||
}
|
||||
function swapObjectValues(obj) {
|
||||
const keys = Object.keys(obj);
|
||||
while (keys.length > 1) {
|
||||
|
|
@ -50,12 +216,15 @@ elements.name_settings = {
|
|||
if (doNameSwapping == "yes"){settings.funnyname.doNameSwapping = true} else {settings.funnyname.doNameSwapping = false}
|
||||
var doLetterSwapping = prompt("Would you like to swap the letters in the names? Type yes or no.", "no")
|
||||
if (doLetterSwapping == "yes"){settings.funnyname.doLetterSwapping = true} else {settings.funnyname.doLetterSwapping = false}
|
||||
var condenseToFour = prompt("Would you like to condense the names to 4 letters? Also known as TPT-ify. Type yes or no.", "no")
|
||||
if (condenseToFour == "yes"){settings.funnyname.condenseToFour = true} else {settings.funnyname.condenseToFour = false}
|
||||
var doNameRates = prompt("Would you like to make the names a rating? If yes, this will set all others to no (it is incompatible.) Type yes or no.", "no")
|
||||
if (doNameRates == "yes"){
|
||||
settings.funnyname.doNameRates = true
|
||||
settings.funnyname.doNameSwapping = false
|
||||
settings.funnyname.doVowelSwapping = false
|
||||
settings.funnyname.doLetterSwapping = false
|
||||
settings.funnyname.condenseToFour = false
|
||||
} else {settings.funnyname.doNameRates = false}
|
||||
saveSettings()
|
||||
var allNamesString = prompt("Would you like to set all names to a custom string? This will set all others to no. Type yes or no.", "no")
|
||||
|
|
@ -64,6 +233,7 @@ elements.name_settings = {
|
|||
settings.funnyname.doNameSwapping = false
|
||||
settings.funnyname.doVowelSwapping = false
|
||||
settings.funnyname.doLetterSwapping = false
|
||||
settings.funnyname.condenseToFour = false
|
||||
settings.funnyname.doNameRates = false
|
||||
customName = prompt("What would you like to set the names to?", "")
|
||||
settings.funnyname.customName = true
|
||||
|
|
@ -138,5 +308,13 @@ runAfterAutogen(
|
|||
}
|
||||
}
|
||||
}
|
||||
if (settings.funnyname.condenseToFour){
|
||||
for (let elementname in elements){
|
||||
if (elementname != "name_settings"){
|
||||
let newelementname = getImportantLetters((elements[elementname].name)||elementname)
|
||||
elements[elementname].name = newelementname
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
@ -377,7 +377,6 @@ elements.left_push = {
|
|||
breakPixel(p);
|
||||
}
|
||||
}
|
||||
if (p.del || !elements[p.element].movable) { return }
|
||||
tryMove(p,p.x-1,p.y);
|
||||
}
|
||||
})
|
||||
|
|
@ -413,7 +412,6 @@ elements.right_push = {
|
|||
breakPixel(p);
|
||||
}
|
||||
}
|
||||
if (p.del || !elements[p.element].movable) { return }
|
||||
tryMove(p,p.x+1,p.y);
|
||||
}
|
||||
})
|
||||
|
|
@ -449,7 +447,6 @@ elements.up_push = {
|
|||
breakPixel(p);
|
||||
}
|
||||
}
|
||||
if (p.del || !elements[p.element].movable) { return }
|
||||
tryMove(p,p.x,p.y-1);
|
||||
}
|
||||
})
|
||||
|
|
@ -485,7 +482,6 @@ elements.down_push = {
|
|||
breakPixel(p);
|
||||
}
|
||||
}
|
||||
if (p.del || !elements[p.element].movable) { return }
|
||||
tryMove(p,p.x,p.y+1);
|
||||
}
|
||||
})
|
||||
|
|
@ -501,6 +497,168 @@ elements.down_push = {
|
|||
state: "solid",
|
||||
density: 100000000,
|
||||
excludeRandom: true,
|
||||
},
|
||||
elements.leftquake = {
|
||||
color: ["#bda791","#997756","#613d19"],
|
||||
tick: function(pixel) {
|
||||
if (pixel.stage) {
|
||||
var coords = circleCoords(pixel.x,pixel.y,pixel.stage);
|
||||
if (pixel.stage >= pixel.mag) {
|
||||
deletePixel(pixel.x,pixel.y);
|
||||
return;
|
||||
}
|
||||
coords.forEach(function(coord){
|
||||
var x = coord.x;
|
||||
var y = coord.y;
|
||||
if (!isEmpty(x,y,true)) {
|
||||
var p = pixelMap[x][y];
|
||||
if (p.element === "leftquake") {
|
||||
if (pixel !== p) {
|
||||
pixel.mag += 3;
|
||||
deletePixel(p.x,p.y);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (elements[p.element].breakInto) {
|
||||
if (Math.random() < (elements[p.element].hardness || 1) * 0.25) {
|
||||
breakPixel(p);
|
||||
}
|
||||
}
|
||||
if (p.del || !elements[p.element].movable) { return }
|
||||
tryMove(p,p.x+1,p.y);
|
||||
}
|
||||
})
|
||||
pixel.stage++;
|
||||
}
|
||||
else if (!tryMove(pixel,pixel.x-1,pixel.y)) {
|
||||
// random 10 to 20
|
||||
pixel.mag = Math.floor(Math.random() * 10) + 20;
|
||||
pixel.stage = 1;
|
||||
}
|
||||
},
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 100000000,
|
||||
maxSize: 1,
|
||||
cooldown: defaultCooldown,
|
||||
excludeRandom: true,
|
||||
},
|
||||
elements.rightquake = {
|
||||
color: ["#bda791","#997756","#613d19"],
|
||||
tick: function(pixel) {
|
||||
if (pixel.stage) {
|
||||
var coords = circleCoords(pixel.x,pixel.y,pixel.stage);
|
||||
if (pixel.stage >= pixel.mag) {
|
||||
deletePixel(pixel.x,pixel.y);
|
||||
return;
|
||||
}
|
||||
coords.forEach(function(coord){
|
||||
var x = coord.x;
|
||||
var y = coord.y;
|
||||
if (!isEmpty(x,y,true)) {
|
||||
var p = pixelMap[x][y];
|
||||
if (p.element === "rightquake") {
|
||||
if (pixel !== p) {
|
||||
pixel.mag += 3;
|
||||
deletePixel(p.x,p.y);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (elements[p.element].breakInto) {
|
||||
if (Math.random() < (elements[p.element].hardness || 1) * 0.25) {
|
||||
breakPixel(p);
|
||||
}
|
||||
}
|
||||
if (p.del || !elements[p.element].movable) { return }
|
||||
tryMove(p,p.x-1,p.y);
|
||||
}
|
||||
})
|
||||
pixel.stage++;
|
||||
}
|
||||
else if (!tryMove(pixel,pixel.x+1,pixel.y)) {
|
||||
// random 10 to 20
|
||||
pixel.mag = Math.floor(Math.random() * 10) + 20;
|
||||
pixel.stage = 1;
|
||||
}
|
||||
},
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 100000000,
|
||||
maxSize: 1,
|
||||
cooldown: defaultCooldown,
|
||||
excludeRandom: true,
|
||||
},
|
||||
elements.upquake = {
|
||||
color: ["#bda791","#997756","#613d19"],
|
||||
tick: function(pixel) {
|
||||
if (pixel.stage) {
|
||||
var coords = circleCoords(pixel.x,pixel.y,pixel.stage);
|
||||
if (pixel.stage >= pixel.mag) {
|
||||
deletePixel(pixel.x,pixel.y);
|
||||
return;
|
||||
}
|
||||
coords.forEach(function(coord){
|
||||
var x = coord.x;
|
||||
var y = coord.y;
|
||||
if (!isEmpty(x,y,true)) {
|
||||
var p = pixelMap[x][y];
|
||||
if (p.element === "upquake") {
|
||||
if (pixel !== p) {
|
||||
pixel.mag += 3;
|
||||
deletePixel(p.x,p.y);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (elements[p.element].breakInto) {
|
||||
if (Math.random() < (elements[p.element].hardness || 1) * 0.25) {
|
||||
breakPixel(p);
|
||||
}
|
||||
}
|
||||
if (p.del || !elements[p.element].movable) { return }
|
||||
tryMove(p,p.x,p.y+1);
|
||||
}
|
||||
})
|
||||
pixel.stage++;
|
||||
}
|
||||
else if (!tryMove(pixel,pixel.x,pixel.y-1)) {
|
||||
// random 10 to 20
|
||||
pixel.mag = Math.floor(Math.random() * 10) + 20;
|
||||
pixel.stage = 1;
|
||||
}
|
||||
},
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
density: 100000000,
|
||||
maxSize: 1,
|
||||
cooldown: defaultCooldown,
|
||||
excludeRandom: true,
|
||||
},
|
||||
createAtXvar = 0;
|
||||
createAtYvar = 0;
|
||||
create1var = "";
|
||||
elements.element_spawner = {
|
||||
color: "#71797E",
|
||||
onSelect: function() {
|
||||
var answer1 = prompt("Please input the x value.",(createAtXvar||undefined));
|
||||
if (!answer1) {return}
|
||||
createAtXvar = parseInt(answer1);
|
||||
var answer2 = prompt("Please input the y value.",(createAtYvar||undefined));
|
||||
if (!answer2) {return}
|
||||
createAtYvar = parseInt(answer2);
|
||||
var answer3 = prompt("Please input what element should spawn.",(create1var||undefined));
|
||||
if (!answer3) {return}
|
||||
create1var = answer3;
|
||||
},
|
||||
tick: function(pixel) {
|
||||
if (pixel.charge){
|
||||
createPixel(create1var, createAtXvar, createAtYvar);
|
||||
}
|
||||
doDefaults(pixel);
|
||||
},
|
||||
density: 1,
|
||||
conduct: 1,
|
||||
state: "solid",
|
||||
category: "machines"
|
||||
//hello nouser if you are reading this:
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,285 @@
|
|||
// Redbirdly's Mod that adds a better light system
|
||||
// if the mod is too laggy, use fast_lightmap.js
|
||||
|
||||
let lightmap = [];
|
||||
let nextLightmap = [];
|
||||
let lightmapWidth, lightmapHeight;
|
||||
let pixelSizeQuarter = pixelSizeHalf / 2;
|
||||
let lightmapScale = 2;
|
||||
|
||||
// Define RGB colors
|
||||
let lightColor = [255, 223, 186];
|
||||
let sunColor = [255*8, 210*8, 26*8];
|
||||
let lampColor = [255*4, 223*4, 186*4];
|
||||
let laserColor = [255, 0, 0];
|
||||
let ledRColor = [255, 0, 0];
|
||||
let ledGColor = [0, 255, 0];
|
||||
let ledBColor = [0, 0, 255];
|
||||
let fireColor = [255, 69, 0];
|
||||
let plasmaColor = [160, 69, 255];
|
||||
let coldFireColor = [0, 191, 255];
|
||||
let magmaColor = [255, 140, 0];
|
||||
let neonColor = [255*2, 60*2, 10*2];
|
||||
|
||||
function initializeLightmap(width, height) {
|
||||
lightmapWidth = Math.ceil(width / lightmapScale);
|
||||
lightmapHeight = Math.ceil(height / lightmapScale);
|
||||
|
||||
for (let y = 0; y < lightmapHeight; y++) {
|
||||
lightmap[y] = [];
|
||||
nextLightmap[y] = [];
|
||||
for (let x = 0; x < lightmapWidth; x++) {
|
||||
lightmap[y][x] = { color: [0, 0, 0] };
|
||||
nextLightmap[y][x] = { color: [0, 0, 0] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function deepCopy(source, target) {
|
||||
for (let y = 0; y < source.length; y++) {
|
||||
target[y] = [];
|
||||
for (let x = 0; x < source[y].length; x++) {
|
||||
target[y][x] = { ...source[y][x] };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function propagateLightmap() {
|
||||
if (!lightmap || !lightmap[0]) { return; }
|
||||
let width = lightmap[0].length;
|
||||
let height = lightmap.length;
|
||||
|
||||
let neighbors = [
|
||||
{ dx: 1, dy: 0 },
|
||||
{ dx: -1, dy: 0 },
|
||||
{ dx: 0, dy: 1 },
|
||||
{ dx: 0, dy: -1 },
|
||||
];
|
||||
|
||||
for (let y = 0; y < height; y++) {
|
||||
for (let x = 0; x < width; x++) {
|
||||
let totalColor = [0, 0, 0];
|
||||
let neighborCount = 0;
|
||||
neighbors.forEach(({ dx, dy }) => {
|
||||
let nx = x + dx;
|
||||
let ny = y + dy;
|
||||
if (nx >= 0 && ny >= 0 && nx < width && ny < height) {
|
||||
totalColor[0] += lightmap[ny][nx].color[0];
|
||||
totalColor[1] += lightmap[ny][nx].color[1];
|
||||
totalColor[2] += lightmap[ny][nx].color[2];
|
||||
neighborCount++;
|
||||
}
|
||||
});
|
||||
nextLightmap[y][x] = {
|
||||
color: [
|
||||
Math.min(Math.max(0, totalColor[0] / neighborCount * 0.8), 255*8),
|
||||
Math.min(Math.max(0, totalColor[1] / neighborCount * 0.8), 255*8),
|
||||
Math.min(Math.max(0, totalColor[2] / neighborCount * 0.8), 255*8)
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
deepCopy(nextLightmap, lightmap);
|
||||
}
|
||||
|
||||
function rgbToHsv(r, g, b) {
|
||||
r /= 255, g /= 255, b /= 255;
|
||||
let max = Math.max(r, g, b), min = Math.min(r, g, b);
|
||||
let h, s, v = max;
|
||||
|
||||
let d = max - min;
|
||||
s = max === 0 ? 0 : d / max;
|
||||
|
||||
if (max === min) {
|
||||
h = 0;
|
||||
} else {
|
||||
switch (max) {
|
||||
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
|
||||
case g: h = (b - r) / d + 2; break;
|
||||
case b: h = (r - g) / d + 4; break;
|
||||
}
|
||||
h /= 6;
|
||||
}
|
||||
|
||||
return [h, s, v];
|
||||
}
|
||||
|
||||
function hsvToRgb(h, s, v) {
|
||||
let r, g, b;
|
||||
|
||||
let i = Math.floor(h * 6);
|
||||
let f = h * 6 - i;
|
||||
let p = v * (1 - s);
|
||||
let q = v * (1 - f * s);
|
||||
let t = v * (1 - (1 - f) * s);
|
||||
|
||||
switch (i % 6) {
|
||||
case 0: r = v, g = t, b = p; break;
|
||||
case 1: r = q, g = v, b = p; break;
|
||||
case 2: r = p, g = v, b = t; break;
|
||||
case 3: r = p, g = q, b = v; break;
|
||||
case 4: r = t, g = p, b = v; break;
|
||||
case 5: r = v, g = p, b = q; break;
|
||||
}
|
||||
|
||||
return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
|
||||
}
|
||||
|
||||
function renderLightmap() {
|
||||
if (!canvas) { return; }
|
||||
if (!lightmap || !lightmap[0]) { return; }
|
||||
let context = canvas.getContext('2d');
|
||||
let width = lightmap[0].length;
|
||||
let height = lightmap.length;
|
||||
|
||||
for (let y = 0; y < height; y++) {
|
||||
for (let x = 0; x < width; x++) {
|
||||
let { color } = lightmap[y][x];
|
||||
let [r, g, b] = color;
|
||||
if (r > 0 || g > 0 || b > 0) {
|
||||
let [h, s, v] = rgbToHsv(r, g, b);
|
||||
let newColor = hsvToRgb(h, s, 1);
|
||||
let alpha = v;
|
||||
|
||||
context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha*0.4})`;
|
||||
context.fillRect(
|
||||
x * pixelSize * lightmapScale,
|
||||
y * pixelSize * lightmapScale,
|
||||
pixelSize * lightmapScale,
|
||||
pixelSize * lightmapScale
|
||||
);
|
||||
context.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha * 0.25})`;
|
||||
context.fillRect(
|
||||
(x * pixelSize - pixelSizeHalf) * lightmapScale,
|
||||
(y * pixelSize - pixelSizeHalf) * lightmapScale,
|
||||
pixelSize * lightmapScale * 2,
|
||||
pixelSize * lightmapScale * 2
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elements.sun.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: sunColor };
|
||||
};
|
||||
|
||||
let originalLightTick = elements.light.tick;
|
||||
elements.light.tick = function(pixel) {
|
||||
originalLightTick(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: lightColor };
|
||||
};
|
||||
|
||||
let originalLiquidLightTick = elements.liquid_light.tick;
|
||||
elements.liquid_light.tick = function(pixel) {
|
||||
originalLiquidLightTick(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: lightColor };
|
||||
};
|
||||
|
||||
elements.magma.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: fireColor };
|
||||
};
|
||||
|
||||
elements.neon.tick = function(pixel) {
|
||||
if (!pixel.charge || pixel.charge <= 0) {return;}
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: neonColor };
|
||||
};
|
||||
|
||||
elements.light_bulb.behaviorOn = null
|
||||
elements.light_bulb.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 10;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: lampColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
elements.led_r.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 4;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: ledRColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
elements.led_g.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 4;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: ledGColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
elements.led_b.tick = function(pixel) {
|
||||
if (pixel.charge > 0) {pixel.lightIntensity = 4;}
|
||||
if (pixel.lightIntensity > 0) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: ledBColor };
|
||||
}
|
||||
pixel.lightIntensity -= 1;
|
||||
};
|
||||
|
||||
let originalLaserTick = elements.laser.tick;
|
||||
elements.laser.tick = function(pixel) {
|
||||
originalLaserTick(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: laserColor };
|
||||
};
|
||||
|
||||
let originalFireTick2 = elements.fire.tick;
|
||||
elements.fire.tick = function(pixel) {
|
||||
originalFireTick2(pixel);
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: fireColor };
|
||||
};
|
||||
|
||||
elements.cold_fire.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: coldFireColor };
|
||||
};
|
||||
|
||||
elements.plasma.tick = function(pixel) {
|
||||
let x = Math.floor(pixel.x / lightmapScale);
|
||||
let y = Math.floor(pixel.y / lightmapScale);
|
||||
lightmap[y][x] = { color: plasmaColor };
|
||||
};
|
||||
|
||||
// Wait for loading
|
||||
// if it loads too soon then width will be undefined
|
||||
setTimeout(() => { initializeLightmap(width, height); }, 700);
|
||||
|
||||
// Add code to functions instead of replacing them
|
||||
let originalTick = tick;
|
||||
tick = function() {
|
||||
originalTick();
|
||||
if (!paused) {propagateLightmap();}
|
||||
};
|
||||
// Even after updating tick(), setInterval still uses the old tick(), reset setInterval
|
||||
resetInterval(tps);
|
||||
|
||||
let originalDrawPixels = drawPixels;
|
||||
drawPixels = function(forceTick = false) {
|
||||
originalDrawPixels(forceTick);
|
||||
renderLightmap();
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2999,7 +2999,7 @@ elements.insulated_wire = {
|
|||
}
|
||||
elements.insulated_wire.desc = "Insulated wire. Only conducts to other insulated wires. Pairs with ray emitters to not make diagonal rays."
|
||||
elements.e_pipe.desc = "Electric pipe. Only passes elements while charged."
|
||||
elements.destructible_e_pipe.desc = elements.e_pipe.desc
|
||||
elements.destroyable_e_pipe.desc = elements.e_pipe.desc
|
||||
elements.channel_pipe.desc = "Channel pipe. Only passes elements to pipes of the same channel."
|
||||
elements.bridge_pipe.desc = "Bridge pipe. Can pass and receive from any other type of pipe."
|
||||
elements.ray_emitter.desc = "Emits a ray of the specified element in the opposite direction it was shocked from."
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
removeMod("pizzasstuff.js");
|
||||
addMod("mossstuff.js");
|
||||
reload();
|
||||
|
||||
elements.freeze_ray = {
|
||||
color: ["#8cf9ff","#5c59ff"],
|
||||
tick: function(pixel) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
function playSubspace(file) {
|
||||
var audio = new Audio("https://JustAGenericUsername.github.io/" + file + ".mp3");
|
||||
audio.play();
|
||||
}
|
||||
elements.subspace_trimpine = {
|
||||
color: "#2e2430",
|
||||
behavior: behaviors.STURDYPOWDER,
|
||||
maxSize: 1,
|
||||
cooldown: defaultCooldown,
|
||||
density: 1500,
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
properties:{
|
||||
counter: 0
|
||||
},
|
||||
tick: function(pixel){
|
||||
if (pixel.counter == 0){
|
||||
playSubspace("subspaceplace")
|
||||
}
|
||||
if (!pixel.rgb){pixel.rgb = pixel.color.match(/\d+/g);}
|
||||
if (pixel.counter >= 90 && pixel.counter < 121){
|
||||
if (!pixel.a){pixel.a = 1}
|
||||
pixel.a -= 0.05
|
||||
pixel.color = "rgba(" + pixel.rgb[0] + "," + pixel.rgb[1] + "," + pixel.rgb[2] + "," + pixel.a + ")"
|
||||
}
|
||||
if (pixel.counter >= 121){
|
||||
if (!isEmpty(pixel.x, pixel.y-1, true)){
|
||||
let oldx = pixel.x
|
||||
let oldy = pixel.y
|
||||
explodeAt(pixel.x, pixel.y, 20)
|
||||
playSubspace("subspaceboom")
|
||||
deletePixel(pixel.x, pixel.y)
|
||||
var coords = circleCoords(oldx, oldy, 25)
|
||||
for (var i = 0; i < coords.length; i++){
|
||||
var x = coords[i].x
|
||||
var y = coords[i].y
|
||||
if (!isEmpty(x, y, true)){
|
||||
var newPixel = pixelMap[x][y]
|
||||
newPixel.color = pixelColorPick(pixel, "#FF00FF")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pixel.counter ++
|
||||
}
|
||||
}
|
||||
217
mods/weapons.js
217
mods/weapons.js
|
|
@ -740,17 +740,17 @@ elements.tank_right = {
|
|||
"XX|M1|M1",
|
||||
],
|
||||
},
|
||||
elements.realistic_missle_left = {
|
||||
elements.realistic_missile_left = {
|
||||
color: "#524c41",
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
behavior: [
|
||||
"XX|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|XX",
|
||||
"EX:20>missile_shrapnel|XX|XX|XX|XX|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|XX|M2|XX|XX|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|XX|M1|XX|XX|CR:smoke|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|XX|M2|XX|XX|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|XX|XX|XX|XX|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|M2 AND EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|M1 AND EX:20>missile_shrapnel|XX|EX:20>missile_shrapnel|CR:smoke AND EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|M2 AND EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"XX|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|XX",
|
||||
],
|
||||
tick: function(pixel) {
|
||||
|
|
@ -765,17 +765,17 @@ elements.realistic_missle_left = {
|
|||
excludeRandom: true,
|
||||
cooldown: defaultCooldown
|
||||
},
|
||||
elements.realistic_missle_right = {
|
||||
elements.realistic_missile_right = {
|
||||
color: "#524c41",
|
||||
category: "weapons",
|
||||
state: "solid",
|
||||
behavior: [
|
||||
"XX|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|XX",
|
||||
"EX:20>missile_shrapnel|XX|XX|XX|XX|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|XX|XX|XX|M2|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|CR:smoke|XX|XX|M1|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|XX|XX|XX|M2|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|XX|XX|XX|XX|XX|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|M2 AND EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|CR:smoke AND EX:20>missile_shrapnel|EX:20>missile_shrapnel|XX|M1|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|M2 AND EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel",
|
||||
"XX|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|EX:20>missile_shrapnel|XX",
|
||||
],
|
||||
tick: function(pixel) {
|
||||
|
|
@ -803,4 +803,197 @@ elements.realistic_missle_right = {
|
|||
conduct: 1,
|
||||
state: "solid",
|
||||
category: "ammunition"
|
||||
},
|
||||
elements.vlms_left = {
|
||||
color: "#71797E",
|
||||
tick: function(pixel) {
|
||||
if ((pixel.temp > 1000 || pixel.charge) && !pixel.burning) {
|
||||
pixel.burning = true;
|
||||
pixel.burnStart = pixelTicks;
|
||||
}
|
||||
if (pixel.burning) {
|
||||
if (!tryMove(pixel, pixel.x, pixel.y-1)) {
|
||||
// tryMove again to the top left or top right
|
||||
tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y-1);
|
||||
}
|
||||
if (pixelTicks-pixel.burnStart > 50 && Math.random() < 0.1) {
|
||||
explodeAt(pixel.x, 10, 4, "realistic_missile_left");
|
||||
deletePixel(pixel.x,pixel.y)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!tryMove(pixel, pixel.x, pixel.y+1)) {
|
||||
// tryMove again to the bottom left or bottom right
|
||||
tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y+1);
|
||||
}
|
||||
}
|
||||
doDefaults(pixel);
|
||||
},
|
||||
burn: 90,
|
||||
burnTime: 100,
|
||||
density: 2000,
|
||||
conduct: 1,
|
||||
state: "solid",
|
||||
category: "weapons"
|
||||
},
|
||||
elements.vlms_right = {
|
||||
color: "#71797E",
|
||||
tick: function(pixel) {
|
||||
if ((pixel.temp > 1000 || pixel.charge) && !pixel.burning) {
|
||||
pixel.burning = true;
|
||||
pixel.burnStart = pixelTicks;
|
||||
}
|
||||
if (pixel.burning) {
|
||||
if (!tryMove(pixel, pixel.x, pixel.y-1)) {
|
||||
// tryMove again to the top left or top right
|
||||
tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y-1);
|
||||
}
|
||||
if (pixelTicks-pixel.burnStart > 50 && Math.random() < 0.1) {
|
||||
explodeAt(pixel.x, 10, 4, "realistic_missile_right");
|
||||
deletePixel(pixel.x,pixel.y)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!tryMove(pixel, pixel.x, pixel.y+1)) {
|
||||
// tryMove again to the bottom left or bottom right
|
||||
tryMove(pixel, pixel.x+(Math.random() < 0.5 ? -1 : 1), pixel.y+1);
|
||||
}
|
||||
}
|
||||
doDefaults(pixel);
|
||||
},
|
||||
burn: 90,
|
||||
burnTime: 100,
|
||||
density: 2000,
|
||||
conduct: 1,
|
||||
state: "solid",
|
||||
category: "weapons"
|
||||
},
|
||||
createAtXvar = 0;
|
||||
createAtYvar = 0;
|
||||
create1var = "";
|
||||
elements.element_spawner = {
|
||||
color: "#71797E",
|
||||
onSelect: function() {
|
||||
var answer1 = prompt("Please input the x value.",(createAtXvar||undefined));
|
||||
if (!answer1) {return}
|
||||
createAtXvar = parseInt(answer1);
|
||||
var answer2 = prompt("Please input the y value.",(createAtYvar||undefined));
|
||||
if (!answer2) {return}
|
||||
createAtYvar = parseInt(answer2);
|
||||
var answer3 = prompt("Please input what element should spawn.",(create1var||undefined));
|
||||
if (!answer3) {return}
|
||||
create1var = answer3;
|
||||
},
|
||||
tick: function(pixel) {
|
||||
if (pixel.charge){
|
||||
createPixel(create1var, createAtXvar, createAtYvar);
|
||||
}
|
||||
doDefaults(pixel);
|
||||
},
|
||||
density: 1,
|
||||
conduct: 1,
|
||||
state: "solid",
|
||||
category: "machines"
|
||||
},
|
||||
elements.railgun_beam_left = {
|
||||
color: ["#ff0000","#ff5e00"],
|
||||
tick: function(pixel) {
|
||||
var y = pixel.y;
|
||||
for (var x = pixel.x; x < width; x--) {
|
||||
if (outOfBounds(x, y)) {
|
||||
break;
|
||||
}
|
||||
if (isEmpty(x, y)) {
|
||||
createPixel("railgun_ammo_left", x, y);
|
||||
pixelMap[x][y].temp = 3500;
|
||||
}
|
||||
else {
|
||||
if (elements[pixelMap[x][y].element].isGas) { continue }
|
||||
if (elements[pixelMap[x][y].element].id === elements.railgun_beam_left.id) { break }
|
||||
pixelMap[x][y].temp += 100;
|
||||
pixelTempCheck(pixelMap[x][y]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
},
|
||||
temp: 3500,
|
||||
category: "ammunition",
|
||||
state: "gas",
|
||||
density: 1,
|
||||
excludeRandom: true,
|
||||
noMix: true
|
||||
},
|
||||
elements.railgun_beam_right = {
|
||||
color: ["#ff0000","#ff5e00"],
|
||||
tick: function(pixel) {
|
||||
var y = pixel.y;
|
||||
for (var x = pixel.x; x < width; x++) {
|
||||
if (outOfBounds(x, y)) {
|
||||
break;
|
||||
}
|
||||
if (isEmpty(x, y)) {
|
||||
createPixel("railgun_ammo_right", x, y);
|
||||
pixelMap[x][y].temp = 3500;
|
||||
}
|
||||
else {
|
||||
if (elements[pixelMap[x][y].element].isGas) { continue }
|
||||
if (elements[pixelMap[x][y].element].id === elements.railgun_beam_right.id) { break }
|
||||
pixelMap[x][y].temp += 100;
|
||||
pixelTempCheck(pixelMap[x][y]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
deletePixel(pixel.x, pixel.y);
|
||||
},
|
||||
temp: 3500,
|
||||
category: "ammunition",
|
||||
state: "gas",
|
||||
density: 1,
|
||||
excludeRandom: true,
|
||||
noMix: true
|
||||
},
|
||||
elements.railgun_ammo_left = {
|
||||
color: ["#ff0000","#ff5e00"],
|
||||
category: "ammunition",
|
||||
state: "solid",
|
||||
density: 1300,
|
||||
tick: function(pixel) {
|
||||
explodeAt(pixel.x, pixel.y, 10)
|
||||
doHeat(pixel);
|
||||
},
|
||||
},
|
||||
elements.railgun_ammo_right = {
|
||||
color: ["#ff0000","#ff5e00"],
|
||||
category: "ammunition",
|
||||
state: "solid",
|
||||
density: 1300,
|
||||
tick: function(pixel) {
|
||||
explodeAt(pixel.x, pixel.y, 10)
|
||||
doHeat(pixel);
|
||||
},
|
||||
},
|
||||
elements.railgun_left = {
|
||||
category: "weapons",
|
||||
behavior: behaviors.WALL,
|
||||
behaviorOn: [
|
||||
"XX|XX|XX",
|
||||
"CR:railgun_beam_left|XX|XX",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
color: "#71797E",
|
||||
conduct: 1,
|
||||
hardness: 1,
|
||||
},
|
||||
elements.railgun_right = {
|
||||
category: "weapons",
|
||||
behavior: behaviors.WALL,
|
||||
behaviorOn: [
|
||||
"XX|XX|XX",
|
||||
"XX|XX|CR:railgun_beam_right",
|
||||
"XX|XX|XX",
|
||||
],
|
||||
color: "#71797E",
|
||||
conduct: 1,
|
||||
hardness: 1,
|
||||
}
|
||||
Loading…
Reference in New Issue