Title:
Author:
Script:
colourRGB = {255,255,255}
HL2Mod = {["version"] = 1.1}
local px,py,vcx,vcy = 11,379,0,0
local HeadCrab = elements.allocate("JWARD", "HDCB")
elements.element(HeadCrab, elements.element(elements.DEFAULT_PT_GRAV))
elements.property(HeadCrab, "Name", "HDCB")
elements.property(HeadCrab, "Description", "head crabs, evil things")
elements.property(HeadCrab, "Colour", 0xC1934E)
elements.property(HeadCrab, "Gravity", 0.6)
elements.property(HeadCrab, "Falldown", 1)
elements.property(HeadCrab, "Weight", 50)
elements.property(HeadCrab, "Properties", TYPE_SOLID)
elements.property(HeadCrab, "State", ST_SOLID)
elements.property(HeadCrab, "Flammable" , 0)
function stkm2yx(i, x, y, s, n)
px,py = x,y
end
tpt.element_func(stkm2yx,tpt.element("STK2"))
function stkmyx(i, x, y, s, n)
px,py = x,y
end
tpt.element_func(stkmyx,tpt.element("STKM"))
function fighyx(i, x, y, s, n)
px,py = x,y
end
tpt.element_func(stkmyx,tpt.element("FIGH"))
--headcrab movement
local crabs = {}
function seeker(i, x, y, s, n)
framereset = 0
frameCount = 1
yx = px - 10
zx = px + 10
jump1 = tpt.get_property("type",x-1,y)
jump2 = tpt.get_property("type",x+1,y)
crabtype = tpt.get_property("type",x,y)
if mousexupdate < x + 1 and mousexupdate > x - 1 and mouseyupdate < y + 1 and mouseyupdate > y - 1 and tpt.selectedl == "JWARD_PT_HDCB" then
tpt.selectedl="JWARD_PT_DECR"
end
if jump1 == 0 and jump2 == 0 then
else
tpt.set_property('vy', -1, x, y)
vcy = -1
end
if yx < x and zx > x then
if py < y then
tpt.set_property('vy', -1, x, y)
vcy = -1
end
if py > y or py == y then
tpt.set_property('vy', 5, x, y)
vcy = 0
end
end
if px > x then
tpt.set_property('vx', 1, x, y)
vcx = 1
end
if px < x then
tpt.set_property('vx', -1, x, y)
vcx = -1
end
if px == x then
vcx = 0
end
table.insert(crabs, i)
local clife = tpt.get_property('life', x, y)
if clife > 1 then
for cx = -1, 1, 2 do
for cy = -1, 1, 2 do
if math.random(1,20) == 1 then
tpt.create(x + cx, y + cy, 'fire')
tpt.set_property("temp", 200, x, y)
sim.pressure(x/4,y/4,0.25)
end
end
end
tpt.set_property('life', clife - 1, x, y)
elseif clife == 1 then
tpt.set_property('type', 0, x, y)
elseif s > 0 then
for cx = -1, 1, 2 do
for cy = -1, 1, 2 do
if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then
tpt.set_property('life', 110, x, y)
return true
end
end
end
end
end
tpt.element_func(seeker,HeadCrab)
function draw()
for i,v in ipairs(crabs) do
local crabtype = sim.partProperty(v, sim.FIELD_TYPE)
if crabtype == HeadCrab then
local x = sim.partProperty(v, sim.FIELD_X)
local y = sim.partProperty(v, sim.FIELD_Y)
tpt.drawline(x-4,y-1,x+3,y-1,193,147,78)
tpt.drawline(x-2,y-3,x+1,y-3,193,147,78)
tpt.drawpixel(x+2,y-2,193,147,78)
tpt.drawpixel(x-3,y-2,193,147,78)
tpt.drawpixel(x,y,0,0,0)
if vcx == 1 then
tpt.drawpixel(x+4,y-3,129,99,53)
tpt.drawpixel(x+5,y-4,129,99,53)
end
if vcx == -1 then
tpt.drawpixel(x-3,y-3,129,99,53)
tpt.drawpixel(x-4,y-4,129,99,53)
end
if vcx == 0 then
tpt.drawpixel(x-3,y-3,129,99,53,0)
tpt.drawpixel(x-4,y-4,129,99,53,0)
end
end
end
if tpt.set_pause() == 0 then
crabs = {}
end
end
tpt.register_step(draw)
--AEROGEL
local SiliconAeroGel = elements.allocate("JWARD", "SCAG")
local DECRO = elements.allocate("JWARD", "DECR")
elements.element(elements.JWARD_PT_SCAG, elements.element(elements.DEFAULT_PT_GRAV))
elements.property(elements.JWARD_PT_SCAG, "Name", "SCAG")
elements.property(elements.JWARD_PT_SCAG, "Description", "Silicon AeroGel, very heat resistant")
elements.property(elements.JWARD_PT_SCAG, "Colour", 0x1DBAFE)
elements.property(elements.JWARD_PT_SCAG, "MenuSection", 9)
elements.property(elements.JWARD_PT_SCAG, "Gravity", 0.236)
elements.property(elements.JWARD_PT_SCAG, "Flammable", 0)
elements.property(elements.JWARD_PT_SCAG, "Explosive", 0)
elements.property(elements.JWARD_PT_SCAG, "Loss", 0.15)
elements.property(elements.JWARD_PT_SCAG, "AirLoss", 0.96)
elements.property(elements.JWARD_PT_SCAG, "AirDrag", 0.03)
elements.property(elements.JWARD_PT_SCAG, "Advection", 0.2)
elements.property(elements.JWARD_PT_SCAG, "Weight", 100)
elements.property(elements.JWARD_PT_SCAG, "Falldown", 1)
elements.property(elements.JWARD_PT_SCAG, "HeatConduct", 1)
elements.property(elements.JWARD_PT_SCAG, "Hardness", 2)
elements.property(elements.JWARD_PT_SCAG, "Properties", elem.TYPE_GAS+elem.PROP_HOT_GLOW+elem.PROP_NEUTPASS+elem.PROP_NOAMBHEAT)
elements.property(elements.JWARD_PT_SCAG, "HighTemperature", 2473)
elements.property(elements.JWARD_PT_SCAG, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
elements.element(elements.JWARD_PT_DECR, elements.element(elements.DEFAULT_PT_DMND))
elements.property(elements.JWARD_PT_DECR, "Name", "DECR")
elements.property(elements.JWARD_PT_DECR, "Description", "........")
elements.property(elements.JWARD_PT_DECR, "Colour", 0x000000)
elements.property(elements.JWARD_PT_DECR, "MenuVisible", 0)
elements.property(elements.JWARD_PT_DECR, "Gravity", 0)
elements.property(elements.JWARD_PT_DECR, "Flammable", 0)
elements.property(elements.JWARD_PT_DECR, "Explosive", 0)
elements.property(elements.JWARD_PT_DECR, "Advection", 0)
elements.property(elements.JWARD_PT_DECR, "Falldown", 0)
elements.property(elements.JWARD_PT_DECR, "HeatConduct", 0)
elements.property(elements.JWARD_PT_DECR, "Properties", PROP_LIFE_DEC)
elements.property(elements.JWARD_PT_DECR, "Hardness", 0)
elements.property(elements.JWARD_PT_DECR, "Weight", 0)
function SCAG(i,x,y,s,n)
dis = tpt.get_property('ctype', x, y)
if dis == tpt.element('DUST') then
else
tpt.set_property('vx', 0, x, y)
tpt.set_property('vy', 0, x, y)
end
end
tpt.element_func(SCAG,SiliconAeroGel)
function DECR(i,x,y,s,n)
dis = tpt.get_property('type', x, y)
if dis == DECRO then
sim.partChangeType(i, tpt.element('NONE'))
end
end
tpt.element_func(DECR,DECRO)
function mouse(event)
mousexupdate = tpt.mousex
mouseyupdate = tpt.mousey
end
tpt.register_mouseclick(mouse)
---------------------------------------------------------------------------------------------------
--menu/better states of matter
function BSM(i,x,y,s,n)
stctype = tpt.get_property('ctype', x, y)
sttemp = tpt.get_property('temp', x, y)
if stctype == tpt.element('hygn') and sttemp > 14 then
sim.partChangeType(i, tpt.el.hygn.id)
end
if stctype == tpt.element('nble') and sttemp > 1 then
sim.partChangeType(i, tpt.el.nble.id)
end
if stctype == tpt.element('desl') and sttemp > 255.15 then
sim.partChangeType(i, tpt.el.desl.id)
end
end
tpt.element_func(BSM,tpt.el.ice.id)
function BSMp(i,x,y,s,n)
stctype = tpt.get_property('ctype', x, y)
sttemp = tpt.get_property('temp', x, y)
if stctype == tpt.element('hygn') and sttemp > 14 then
sim.partChangeType(i, tpt.el.hygn.id)
end
if stctype == tpt.element('nble') and sttemp > 1 then
sim.partChangeType(i, tpt.el.nble.id)
end
if stctype == tpt.element('desl') and sttemp > 255.15 then
sim.partChangeType(i, tpt.el.desl.id)
end
end
tpt.element_func(BSMp,tpt.el.snow.id)
function BSMM(i,x,y,s,n)
stctype = tpt.get_property('ctype', x, y)
sttemp = tpt.get_property('temp', x, y)
if stctype == tpt.element('merc') and sttemp > 234 then
sim.partChangeType(i, tpt.el.merc.id)
tpt.set_property('tmp', 22, x, y)
end
end
tpt.element_func(BSMM,tpt.el.metl.id)
function BSMMY(i,x,y,s,n)
sttemp = tpt.get_property('temp', x, y)
if buttonablest == 0 and sttemp < 234 then
sim.partChangeType(i, tpt.el.metl.id)
tpt.set_property('ctype', tpt.el.merc.id, x, y)
end
end
tpt.element_func(BSMMY,tpt.el.merc.id)
function BSMWT(i,x,y,s,n)
stctype = tpt.get_property('ctype', x, y)
sttemp = tpt.get_property('temp', x, y)
if stctype == tpt.element('deut') and sttemp < 376 then
sim.partChangeType(i, tpt.el.deut.id)
end
end
tpt.element_func(BSMWT,tpt.el.wtrv.id)
function BSMDWT(i,x,y,s,n)
stctype = tpt.get_property('ctype', x, y)
if stctype == tpt.element('deut') then
sim.partChangeType(i, tpt.el.deut.id)
end
end
tpt.element_func(BSMDWT,tpt.el.dstw.id)
function BSMDT(i,x,y,s,n)
sttemp = tpt.get_property('temp', x, y)
if buttonablest == 0 and sttemp > 376 then
sim.partChangeType(i, tpt.el.wtrv.id)
tpt.set_property('ctype', tpt.el.deut.id, x, y)
end
end
tpt.element_func(BSMDT,tpt.el.deut.id)
function BSMP(i,x,y,s,n)
sttemp = tpt.get_property('temp', x, y)
if buttonablest == 0 and sttemp < 260 then
BSMchance = math.random(1,3)
else
BSMchance = 0
end
if BSMchance == 1 then
sim.partChangeType(i, tpt.el.clst.id)
end
if BSMchance == 2 then
sim.partChangeType(i, tpt.el.ice.id)
tpt.set_property('ctype', tpt.el.pste.id, x, y)
end
if BSMchance == 3 then
sim.partChangeType(i, tpt.el.ice.id)
tpt.set_property('ctype', tpt.el.watr.id, x, y)
end
end
tpt.element_func(BSMP,tpt.el.pste.id)
topress,thx,buttonable = 0,0,1
function tick()
if thx == 1 then
tpt.message_box("thanks "..tpt.get_name().." for your purchase, ","construction or theft of one or more of jward's mods")
thx = 0
end
--greendragon or jacobs mod checker
if tpt.version.jacob1s_mod or elem.DEFAULT_PT_IRNX == 181 or nil ~= TPTMP then
if tpt.hud() == 1 then
if tpt.mousex >= 613 and tpt.mousey >= 1 and tpt.mousex <= 627 and tpt.mousey <= 14 then
else
tpt.drawrect(597, 1, 14, 14, 204, 204, 204)
tpt.fillrect(597, 1, 14, 14, 0, 0, 0, 255)
tpt.drawtext(598, 5, "JW", colourRGB[1], colourRGB[2], colourRGB[3], 255)
topress = 1
if tpt.mousex >= 597 and tpt.mousey >= 1 and tpt.mousex <= 611 and tpt.mousey <= 14 then
tpt.drawrect(597, 1, 14, 14, 255, 255, 255)
--alternate location for button
end
end
end
else
tpt.drawrect(613, 113, 14, 14, 204, 204, 204)
tpt.fillrect(613, 113, 14, 14, 0, 0, 0, 255)
tpt.drawtext(614, 117, "JW", colourRGB[1], colourRGB[2], colourRGB[3], 255)
--vanilla location for button
topress = 2
if tpt.mousex >= 613 and tpt.mousey >= 113 and tpt.mousex <= 627 and tpt.mousey <= 124 then
tpt.drawrect(613, 113, 14, 14, 255, 255, 255)
tpt.drawtext(500, 117, "JWARD's Mod options", colourRGB[1], colourRGB[2], colourRGB[3], 255)
--hover label
end
end
if toopress == 1 then
if topress == 1 then
tpt.fillrect(596, 0, 16, 16, 255, 255, 255, 255)
tpt.drawtext(598, 5, "JW", 0, 0, 0, 255)
--if clicked turn the box white and letter dark(alt)
end
if topress == 2 then
tpt.fillrect(612, 112, 16, 16, 255, 255, 255, 255)
tpt.drawtext(614, 117, "JW", 0, 0, 0, 255)
--if clicked turn the box white and letter dark(vanilla)
end
if items == 1 then
--the hud when opened
tpt.fillrect(150, 174, 16, 15, 255, 255, 255, 255)
tpt.drawline(153, 176, 158, 181, 0, 0, 0)
tpt.drawline(163, 176, 158, 181, 0, 0, 0)
tpt.drawline(153, 181, 158, 186, 0, 0, 0)
tpt.drawline(163, 181, 158, 186, 0, 0, 0)
tpt.drawrect(0, 205, 600, 175, 255, 255, 255)
tpt.fillrect(0, 205, 600, 175, 0, 0, 0, 255)
tpt.drawtext(25, 210, "JWARD's Mods' elements", colourRGB[1], colourRGB[2], colourRGB[3], 255)
tpt.drawrect(5, 208, 14, 14, 255, 255, 255)
tpt.drawline(17, 215, 12, 210, 255, 255, 255)
tpt.drawline(7, 215, 12, 210, 255, 255, 255)
tpt.drawline(17, 220, 12, 215, 255, 255, 255)
tpt.drawline(7, 220, 12, 215, 255, 255, 255)
--halflife in >> hud
tpt.drawtext(6, 266, "H", 255, 255, 255, 255)
tpt.drawtext(18, 266, "lf Life mods:", 255, 255, 255, 255)
tpt.drawpixel(12,272,255,187,0)
tpt.drawpixel(16,272,255,187,0)
tpt.drawpixel(13,271,255,187,0)
tpt.drawpixel(13,270,255,187,0)
tpt.drawpixel(15,271,255,187,0)
tpt.drawpixel(15,270,255,187,0)
tpt.drawpixel(14,269,255,187,0)
tpt.drawpixel(14,268,255,187,0)
tpt.drawpixel(15,267,255,187,0)
tpt.drawpixel(15,266,255,187,0)
tpt.drawpixel(16,266,255,187,0)
if FuelMod ~= nil then
tpt.drawtext(6, 229, "Fuel mod:", 255, 255, 255, 255)
--amfo
tpt.fillrect(50, 225, 28, 15, 255, 206, 202, 255)
tpt.drawtext(51, 229, "AMFO", 0, 0, 0, 255)
if tpt.mousex >= 50 and tpt.mousey >= 225 and tpt.mousex <= 78 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(49, 224, 30, 17, 255, 0, 0)
end
if redrect == 1 then
tpt.drawrect(49, 224, 30, 17, 255, 0, 0)
end
--PRPN
tpt.fillrect(83, 225, 28, 15, 244, 162, 106, 255)
tpt.drawtext(85, 229, "PRPN", 0, 0, 0, 255)
if tpt.mousex >= 83 and tpt.mousey >= 225 and tpt.mousex <= 111 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(82, 224, 30, 17, 255, 0, 0)
end
if redrect == 2 then
tpt.drawrect(82, 224, 30, 17, 255, 0, 0)
end
--COKE
tpt.fillrect(116, 225, 28, 15, 170, 170, 170, 255)
tpt.drawtext(118, 229, "COKE", 0, 0, 0, 255)
if tpt.mousex >= 116 and tpt.mousey >= 225 and tpt.mousex <= 144 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(115, 224, 30, 17, 255, 0, 0)
end
if redrect == 3 then
tpt.drawrect(115, 224, 30, 17, 255, 0, 0)
end
--OILC
tpt.fillrect(149, 225, 28, 15, 53, 53, 13, 255)
tpt.drawtext(153, 229, "OILC", 255, 255, 255, 255)
if tpt.mousex >= 149 and tpt.mousey >= 225 and tpt.mousex <= 177 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(148, 224, 30, 17, 255, 0, 0)
end
if redrect == 4 then
tpt.drawrect(148, 224, 30, 17, 255, 0, 0)
end
--plye
tpt.fillrect(182, 225, 28, 15, 204, 204, 204, 255)
tpt.drawtext(186, 229, "PLYE", 0, 0, 0, 255)
if tpt.mousex >= 182 and tpt.mousey >= 225 and tpt.mousex <= 210 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(181, 224, 30, 17, 255, 0, 0)
end
if redrect == 5 then
tpt.drawrect(181, 224, 30, 17, 255, 0, 0)
end
--JETB
tpt.fillrect(215, 225, 28, 15, 103, 102, 1, 255)
tpt.drawtext(217, 229, "JETB", 255, 255, 255, 255)
if tpt.mousex >= 215 and tpt.mousey >= 225 and tpt.mousex <= 243 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(214, 224, 30, 17, 255, 0, 0)
end
if redrect == 6 then
tpt.drawrect(214, 224, 30, 17, 255, 0, 0)
end
--kerosene
tpt.fillrect(248, 225, 28, 15, 1, 179, 255, 255)
tpt.drawtext(250, 229, "KERO", 0, 0, 0, 255)
if tpt.mousex >= 248 and tpt.mousey >= 225 and tpt.mousex <= 276 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(247, 224, 30, 17, 255, 0, 0)
end
if redrect == 7 then
tpt.drawrect(247, 224, 30, 17, 255, 0, 0)
end
--N2H4
tpt.fillrect(281, 225, 28, 15, 182, 240, 100, 255)
tpt.drawtext(283, 229, "N2H4", 0, 0, 0, 255)
if tpt.mousex >= 281 and tpt.mousey >= 225 and tpt.mousex <= 309 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(280, 224, 30, 17, 255, 0, 0)
end
if redrect == 8 then
tpt.drawrect(280, 224, 30, 17, 255, 0, 0)
end
--N2O4
tpt.fillrect(314, 225, 28, 15, 48, 206, 198, 255)
tpt.drawtext(316, 229, "N2O4", 0, 0, 0, 255)
if tpt.mousex >= 314 and tpt.mousey >= 225 and tpt.mousex <= 342 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(313, 224, 30, 17, 255, 0, 0)
end
if redrect == 9 then
tpt.drawrect(313, 224, 30, 17, 255, 0, 0)
end
--TAR
tpt.fillrect(347, 225, 28, 15, 13, 13, 3, 255)
tpt.drawtext(352, 229, "TAR", 255, 255, 255, 255)
if tpt.mousex >= 347 and tpt.mousey >= 225 and tpt.mousex <= 375 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(346, 224, 30, 17, 255, 0, 0)
end
if redrect == 10 then
tpt.drawrect(346, 224, 30, 17, 255, 0, 0)
end
--AFRZ
tpt.fillrect(380, 225, 28, 15, 12, 63, 91, 255)
tpt.drawtext(382, 229, "AFRZ", 255, 255, 255, 255)
if tpt.mousex >= 380 and tpt.mousey >= 225 and tpt.mousex <= 408 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(379, 224, 30, 17, 255, 0, 0)
end
if redrect == 11 then
tpt.drawrect(379, 224, 30, 17, 255, 0, 0)
end
--N2O
tpt.fillrect(413, 225, 28, 15, 67, 218, 255, 255)
tpt.drawtext(418, 229, "N2O", 0, 0, 0, 255)
if tpt.mousex >= 413 and tpt.mousey >= 225 and tpt.mousex <= 441 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(412, 224, 30, 17, 255, 0, 0)
end
if redrect == 12 then
tpt.drawrect(412, 224, 30, 17, 255, 0, 0)
end
--N2
tpt.fillrect(446, 225, 28, 15, 94, 82, 255, 255)
tpt.drawtext(454, 229, "N2", 0, 0, 0, 255)
if tpt.mousex >= 446 and tpt.mousey >= 225 and tpt.mousex <= 474 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(445, 224, 30, 17, 255, 0, 0)
end
if redrect == 13 then
tpt.drawrect(445, 224, 30, 17, 255, 0, 0)
end
--PTRL
tpt.fillrect(479, 225, 28, 15, 10, 74, 92, 255)
tpt.drawtext(482, 229, "PTRL", 255, 255, 255, 255)
if tpt.mousex >= 479 and tpt.mousey >= 225 and tpt.mousex <= 507 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(478, 224, 30, 17, 255, 0, 0)
end
if redrect == 14 then
tpt.drawrect(478, 224, 30, 17, 255, 0, 0)
end
--COIL
tpt.fillrect(512, 225, 28, 15, 165, 114, 20, 255)
tpt.drawtext(515, 229, "COIL", 0, 0, 0, 255)
if tpt.mousex >= 512 and tpt.mousey >= 225 and tpt.mousex <= 540 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(511, 224, 30, 17, 255, 0, 0)
end
if redrect == 15 then
tpt.drawrect(511, 224, 30, 17, 255, 0, 0)
end
--CALS
tpt.fillrect(545, 225, 28, 15, 144, 150, 95, 255)
tpt.drawtext(548, 229, "CALS", 0, 0, 0, 255)
if tpt.mousex >= 545 and tpt.mousey >= 225 and tpt.mousex <= 573 and tpt.mousey <= 240 and items == 1 then
tpt.drawrect(544, 224, 30, 17, 255, 0, 0)
end
if redrect == 16 then
tpt.drawrect(544, 224, 30, 17, 255, 0, 0)
end
--BDSL
tpt.fillrect(6, 245, 28, 15, 51, 16, 0, 255)
tpt.drawtext(8, 249, "BDSL", 255, 255, 255, 255)
if tpt.mousex >= 6 and tpt.mousey >= 245 and tpt.mousex <= 34 and tpt.mousey <= 260 and items == 1 then
tpt.drawrect(5, 244, 30, 17, 255, 0, 0)
end
if redrect == 17 then
tpt.drawrect(5, 244, 30, 17, 255, 0, 0)
end
--LN2O
tpt.fillrect(39, 245, 28, 15, 51, 193, 245, 255)
tpt.drawtext(41, 249, "LN2O", 0, 0, 0, 255)
if tpt.mousex >= 39 and tpt.mousey >= 245 and tpt.mousex <= 67 and tpt.mousey <= 260 and items == 1 then
tpt.drawrect(38, 244, 30, 17, 255, 0, 0)
end
if redrect == 18 then
tpt.drawrect(38, 244, 30, 17, 255, 0, 0)
end
--CRST
tpt.fillrect(72, 245, 28, 15, 15, 14, 4, 255)
tpt.drawtext(74, 249, "CRST", 255, 255, 255, 255)
if tpt.mousex >= 72 and tpt.mousey >= 245 and tpt.mousex <= 100 and tpt.mousey <= 260 and items == 1 then
tpt.drawrect(71, 244, 30, 17, 255, 0, 0)
end
if redrect == 19 then
tpt.drawrect(71, 244, 30, 17, 255, 0, 0)
end
end
--HDCB
tpt.fillrect(78, 263, 28, 15, 193, 147, 78, 255)
tpt.drawtext(81, 267, "HDCB", 0, 0, 0, 255)
if tpt.mousex >= 78 and tpt.mousey >= 263 and tpt.mousex <= 106 and tpt.mousey <= 278 and items == 1 then
tpt.drawrect(77, 262, 30, 17, 255, 0, 0)
end
if redrect == 31 then
tpt.drawrect(77, 262, 30, 17, 255, 0, 0)
end
end
tpt.drawrect(0, 0, 200, 200, 255, 255, 255)
tpt.fillrect(0, 0, 200, 200, 0, 0, 0, 255)
tpt.drawtext(10, 5, "JWARD's Mod options", colourRGB[1], colourRGB[2], colourRGB[3], 255)
--close
tpt.drawrect(10, 174, 60, 16, 255, 255, 255)
tpt.drawtext(25, 178, "Close", colourRGB[1], colourRGB[2], colourRGB[3], 255)
--antisave breaking
tpt.drawrect(10, 150, 15, 15, 255, 255, 255)
tpt.drawrect(35, 150, 15, 15, 255, 255, 255)
tpt.drawtext(13, 154, "on", colourRGB[1], colourRGB[2], colourRGB[3], 255)
tpt.drawtext(37, 154, "off", colourRGB[1], colourRGB[2], colourRGB[3], 255)
tpt.drawtext(10, 140, "antisave breaking", colourRGB[1], colourRGB[2], colourRGB[3], 255)
--THanKs
tpt.drawrect(80, 174, 60, 16, 255, 255, 255)
tpt.drawtext(88, 178, ">THanKs<", colourRGB[1], colourRGB[2], colourRGB[3], 255)
--better states of matter
tpt.drawtext(13, 127, "on", colourRGB[1], colourRGB[2], colourRGB[3], 255)
tpt.drawtext(37, 127, "off", colourRGB[1], colourRGB[2], colourRGB[3], 255)
tpt.drawrect(10, 123, 15, 15, 255, 255, 255)
tpt.drawrect(35, 123, 15, 15, 255, 255, 255)
tpt.drawtext(10, 114, "better states of matter", colourRGB[1], colourRGB[2], colourRGB[3], 255)
--elements
tpt.drawrect(150, 174, 16, 15, 255, 255, 255)
tpt.drawline(153, 176, 158, 181, 255, 255, 255)
tpt.drawline(163, 176, 158, 181, 255, 255, 255)
tpt.drawline(153, 181, 158, 186, 255, 255, 255)
tpt.drawline(163, 181, 158, 186, 255, 255, 255)
end
end
function pressthingy()
if topress == 1 then
if tpt.mousex >= 597 and tpt.mousey >= 1 and tpt.mousex <= 611 and tpt.mousey <= 14 and tpt.hud() == 1 then
open = 1
windowclick = 1
--if mouse click for alt jw button
end
end
if topress == 2 then
if tpt.mousex >= 613 and tpt.mousey >= 113 and tpt.mousex <= 627 and tpt.mousey <= 124 then
open = 1
windowclick = 1
--if mouse click for vanilla spot for jw button
end
end
if tpt.mousex >= 0 and tpt.mousey >= 0 and tpt.mousex <= 200 and tpt.mousey <= 200 and windowclick == 1 then
open = 1
--idk??
end
if open == 1 then
if tpt.mousex >= 10 and tpt.mousey >= 174 and tpt.mousex <= 70 and tpt.mousey <= 190 then
open = 0
toopress = 0
windowclick = 0
end
if tpt.mousex >= 80 and tpt.mousey >= 174 and tpt.mousex <= 140 and tpt.mousey <= 190 then
thx = 1
--if click open thanks window
end
if tpt.mousex >= 150 and tpt.mousey >= 174 and tpt.mousex <= 166 and tpt.mousey <= 189 then
items = 1
--open >> button on mouse click
end
if tpt.mousex >= 5 and tpt.mousey >= 208 and tpt.mousex <= 19 and tpt.mousey <= 222 and items == 1 then
items = 0
--close >> button on mouse click
end
if tpt.mousex >= 78 and tpt.mousey >= 263 and tpt.mousex <= 106 and tpt.mousey <= 278 and items == 1 then
tpt.selectedl="JWARD_PT_HDCB"
redrect = 31
--if HDCB clicked then select HDCB
end
if FuelMod ~= nil then
if tpt.mousex >= 50 and tpt.mousey >= 225 and tpt.mousex <= 78 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_AMFO"
redrect = 1
end
if tpt.mousex >= 83 and tpt.mousey >= 225 and tpt.mousex <= 111 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_PRPN"
redrect = 2
end
if tpt.mousex >= 116 and tpt.mousey >= 225 and tpt.mousex <= 144 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_COKE"
redrect = 3
end
if tpt.mousex >= 149 and tpt.mousey >= 225 and tpt.mousex <= 177 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_OILC"
redrect = 4
end
if tpt.mousex >= 182 and tpt.mousey >= 225 and tpt.mousex <= 210 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_PLYE"
redrect = 5
end
if tpt.mousex >= 215 and tpt.mousey >= 225 and tpt.mousex <= 243 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_JETB"
redrect = 6
end
if tpt.mousex >= 248 and tpt.mousey >= 225 and tpt.mousex <= 276 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_KERO"
redrect = 7
end
if tpt.mousex >= 281 and tpt.mousey >= 225 and tpt.mousex <= 309 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_N2H4"
redrect = 8
end
if tpt.mousex >= 314 and tpt.mousey >= 225 and tpt.mousex <= 342 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_N2O4"
redrect = 9
end
if tpt.mousex >= 347 and tpt.mousey >= 225 and tpt.mousex <= 375 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_TAR"
redrect = 10
end
if tpt.mousex >= 380 and tpt.mousey >= 225 and tpt.mousex <= 408 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_AFRZ"
redrect = 11
end
if tpt.mousex >= 413 and tpt.mousey >= 225 and tpt.mousex <= 441 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_N2O"
redrect = 12
end
if tpt.mousex >= 446 and tpt.mousey >= 225 and tpt.mousex <= 474 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_N2"
redrect = 13
end
if tpt.mousex >= 479 and tpt.mousey >= 225 and tpt.mousex <= 507 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_PTRL"
redrect = 14
end
if tpt.mousex >= 512 and tpt.mousey >= 225 and tpt.mousex <= 540 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_COIL"
redrect = 15
end
if tpt.mousex >= 545 and tpt.mousey >= 225 and tpt.mousex <= 573 and tpt.mousey <= 240 and items == 1 then
tpt.selectedl="JWARD_PT_CALS"
redrect = 16
end
if tpt.mousex >= 6 and tpt.mousey >= 245 and tpt.mousex <= 34 and tpt.mousey <= 260 and items == 1 then
tpt.selectedl="JWARD_PT_BDSL"
redrect = 17
end
if tpt.mousex >= 39 and tpt.mousey >= 245 and tpt.mousex <= 67 and tpt.mousey <= 260 and items == 1 then
tpt.selectedl="JWARD_PT_LN2O"
redrect = 18
end
if tpt.mousex >= 72 and tpt.mousey >= 245 and tpt.mousex <= 100 and tpt.mousey <= 260 and items == 1 then
tpt.selectedl="JWARD_PT_CRST"
redrect = 19
end
end
if tpt.mousex >= 35 and tpt.mousey >= 123 and tpt.mousex <= 50 and tpt.mousey <= 138 then
--better states of matter off
elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 77)
elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.DEFAULT_PT_NONE)
elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", elements.DEFAULT_PT_OIL)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 0)
elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0.001)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", DEFAULT_PT_GAS)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", elements.DEFAULT_PT_FIRE)
elements.property(elements.DEFAULT_PT_GAS, "Temperature", 273.15)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 573)
elements.property(elements.DEFAULT_PT_GAS, "HighPressure", 6)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 333)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", NT)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", ITL)
elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", NT)
elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", ITL)
elements.property(elements.DEFAULT_PT_NBLE, "LowTemperature", NT)
elements.property(elements.DEFAULT_PT_NBLE, "LowTemperatureTransition", ITL)
elements.property(elements.DEFAULT_PT_COAL, "HighPressure", 256)
elements.property(elements.DEFAULT_PT_COAL, "HighPressureTransition", elements.DEFAULT_PT_COAL)
elements.property(elements.DEFAULT_PT_BCOL, "HighPressure", 256)
elements.property(elements.DEFAULT_PT_BCOL, "HighPressureTransition", elements.DEFAULT_PT_BCOL)
elements.property(elements.JWARD_PT_COKE, "HighPressure", 256)
elements.property(elements.JWARD_PT_COKE, "HighPressureTransition", elements.JWARD_PT_COKE)
elements.property(elements.JWARD_PT_COKE, "HighTemperature", 10000)
elements.property(elements.JWARD_PT_COKE, "HighTemperatureTransition", elements.JWARD_PT_COKE)
elements.property(elements.DEFAULT_PT_URAN, "HighTemperature", 10000)
elements.property(elements.DEFAULT_PT_URAN, "HighTemperatureTransition", elements.DEFAULT_PT_URAN)
elements.property(elements.DEFAULT_PT_PLUT, "HighTemperature", 10000)
elements.property(elements.DEFAULT_PT_PLUT, "HighTemperatureTransition", elements.DEFAULT_PT_PLUT)
elements.property(elements.DEFAULT_PT_DEUT, "LowTemperature", 0)
elements.property(elements.DEFAULT_PT_DEUT, "LowTemperatureTransition", elements.DEFAULT_PT_DEUT)
buttonablest = 1
end
if tpt.mousex >= 10 and tpt.mousey >= 123 and tpt.mousex <= 25 and tpt.mousey <= 138 then
--better states of matter on
elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 76)
elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.JWARD_PT_N2)
elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", 256)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 573.15)
elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", elements.DEFAULT_PT_OIL)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", NT)
elements.property(elements.DEFAULT_PT_GAS, "Temperature", 583.15)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 10000)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 573.15)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
elements.property(elements.DEFAULT_PT_DESL, "HighTemperatureTransition", elements.JWARD_PT_DSLV)
elements.property(elements.DEFAULT_PT_DESL, "HighTemperature", 473.15)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", 255.15)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", 14)
elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
elements.property(elements.DEFAULT_PT_NBLE, "LowTemperature", 1)
elements.property(elements.DEFAULT_PT_NBLE, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
elements.property(elements.DEFAULT_PT_COAL, "HighPressure", 122)
elements.property(elements.DEFAULT_PT_COAL, "HighPressureTransition", elements.DEFAULT_PT_DMND)
elements.property(elements.DEFAULT_PT_BCOL, "HighPressure", 122)
elements.property(elements.DEFAULT_PT_BCOL, "HighPressureTransition", elements.DEFAULT_PT_DMND)
elements.property(elements.JWARD_PT_COKE, "HighPressure", 122)
elements.property(elements.JWARD_PT_COKE, "HighPressureTransition", elements.DEFAULT_PT_DMND)
elements.property(elements.JWARD_PT_COKE, "HighTemperature", 4373.15)
elements.property(elements.JWARD_PT_COKE, "HighTemperatureTransition", elements.DEFAULT_PT_CO2)
elements.property(elements.DEFAULT_PT_URAN, "HighTemperature", 1405)
elements.property(elements.DEFAULT_PT_URAN, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
elements.property(elements.DEFAULT_PT_PLUT, "HighTemperature", 912)
elements.property(elements.DEFAULT_PT_PLUT, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
elements.property(elements.DEFAULT_PT_DEUT, "LowTemperature", 276)
elements.property(elements.DEFAULT_PT_DEUT, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
buttonablest = 0
end
if tpt.mousex >= 10 and tpt.mousey >= 150 and tpt.mousex <= 25 and tpt.mousey <= 165 then
--antisave breaking on (returns to vanilla element settings)
elements.property(elements.DEFAULT_PT_ACID, "Diffusion", 0)
elements.property(elements.DEFAULT_PT_ACID, "Gravity", 0.1)
elements.property(elements.DEFAULT_PT_ACID, "Description", "Dissolves almost everything.")
elements.property(elements.DEFAULT_PT_ACID, "Flammable", 40)
elements.property(elements.DEFAULT_PT_INSL, "Hardness", 10)
elements.property(elements.DEFAULT_PT_INSL, "Flammable", 7)
elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 77)
elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.DEFAULT_PT_NONE)
elements.property(elements.DEFAULT_PT_WATR, "Hardness", 20)
elements.property(elements.DEFAULT_PT_WATR, "Weight", 30)
elements.property(elements.DEFAULT_PT_DSTW, "Hardness", 20)
elements.property(elements.DEFAULT_PT_DSTW, "Weight", 30)
elements.property(elements.DEFAULT_PT_SLTW, "Hardness", 20)
elements.property(elements.DEFAULT_PT_SLTW, "Weight", 35)
elements.property(elements.DEFAULT_PT_BUBW, "Hardness", 20)
elements.property(elements.DEFAULT_PT_BUBW, "Weight", 30)
elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", elements.DEFAULT_PT_OIL)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 0)
elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0.001)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", DEFAULT_PT_GAS)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", elements.DEFAULT_PT_FIRE)
elements.property(elements.DEFAULT_PT_GAS, "Temperature", 273.15)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 573)
elements.property(elements.DEFAULT_PT_GAS, "HighPressure", 6)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 333)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", NT)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", ITL)
elements.property(elements.DEFAULT_PT_DESL, "Weight", 15)
elements.property(elements.DEFAULT_PT_DESL, "HighPressure", 2)
buttonable = 0
end
if tpt.mousex >= 35 and tpt.mousey >= 150 and tpt.mousex <= 50 and tpt.mousey <= 165 then
--antisave breaking off (returns to mod element settings)
elements.property(elements.DEFAULT_PT_ACID, "Diffusion", 1.2)
elements.property(elements.DEFAULT_PT_ACID, "Gravity", 0.62)
elements.property(elements.DEFAULT_PT_ACID, "Description", "Bubbling caustic liquid.")
elements.property(elements.DEFAULT_PT_ACID, "Flammable", 0)
elements.property(elements.DEFAULT_PT_INSL, "Hardness", 0)
elements.property(elements.DEFAULT_PT_INSL, "Flammable", 0)
elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 76)
elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.JWARD_PT_N2)
elements.property(elements.DEFAULT_PT_WATR, "Hardness", 0.25)
elements.property(elements.DEFAULT_PT_WATR, "Weight", 32)
elements.property(elements.DEFAULT_PT_DSTW, "Hardness", 0)
elements.property(elements.DEFAULT_PT_DSTW, "Weight", 32)
elements.property(elements.DEFAULT_PT_SLTW, "Hardness", 0)
elements.property(elements.DEFAULT_PT_SLTW, "Weight", 32)
elements.property(elements.DEFAULT_PT_BUBW, "Hardness", 0)
elements.property(elements.DEFAULT_PT_BUBW, "Weight", 32)
elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", 256)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 573.15)
elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0)
elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", elements.DEFAULT_PT_OIL)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", NT)
elements.property(elements.DEFAULT_PT_GAS, "Temperature", 583.15)
elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 10000)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 573.15)
elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
elements.property(elements.DEFAULT_PT_DESL, "HighTemperatureTransition", elements.JWARD_PT_DSLV)
elements.property(elements.DEFAULT_PT_DESL, "HighTemperature", 473.15)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", 255.15)
elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
elements.property(elements.DEFAULT_PT_DESL, "Weight", 12)
elements.property(elements.DEFAULT_PT_DESL, "HighPressure", 256)
buttonable = 1
end
--do when hud open
tpt.set_pause(1)
toopress = 1
return false
else
--on close of hud
toopress = 0
return true
end
end
tpt.register_mouseclick(pressthingy)
tpt.register_mouseclick(tick)
tpt.register_step(tick)
Description:
Changelog: