16
Coding / Re: lua design thoughts
« on: November 19, 2014, 07:32:37 pm »
Yet another thing - how to apply string value to cvar?
New board
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
mail:set_closebutton(true)
But I don't see any close button somehow.confunc add_mail
{
call *node:root.maillist.mainBody.mails@createChild("mail<1>", "mailheader")
*node:root.maillist.mainBody.mails.mail<1>.header.index@integer = <1>
*node:root.maillist.mainBody.mails.mail<1>.header.headline@string = <2>
*node:root.maillist.mainBody.mails.mail<1>.icon@src = <3>
if ( <4> eq 0 ) {
*node:root.maillist.mainBody.mails.mail<1>.header@bgcolor = "0.56 0.81 0.76 0.6"
}
*node:root.maillist.mainBody.mails.mail<1>.header.date@string = <5>
}
and my interpretation:add_mail = ufo.create_confunc(mailclient, "add_mail", nil)
add_mail.on_click = function(sender, index, headline, icon, state, date)
local mail = ufo.create_control(mails, "mailheader", "mail"..index, nil)
mail:child("header"):child("index"):set_value(index)
mail:child("header"):child("headline"):set_text(headline)
mail:child("header"):child("icon"):set_src(icon)
mail:child("header"):child("date"):set_text(date)
if (state == 0) then
mail:child("header"):set_backgroundcolor(0.56, 0.81, 0.76, 0.6)
end
end
a) As PHALANX gains recognition and fame, more experienced soldiers join the cause (seriously, rookies' stats suck so hard they could power a vacuum tube). I would happily trade 30 lousy soldiers for one decent guy who knows not to shoot himself in the foot. Seriously, you're fighting an advanced alien race and all you get are boot camp rejects?It was so in previous releases (2.4 and below). There were reasons to do that, but I don't remember exactly.
b) Make armour actually relevant, with some armours nearly entirely negating one weapon type damage but leaving nearly unguarded against another. For example, aerogel has a melting point of 1,200°C (yes, it actually exists) so armour based on the technology would be able to dissipate plasma blasts almost entirely, protect decently against laser (since it's more concentrated) but be nearly useless against explosives (except plasma grenades) or penetrating force (needler).And aerogel is extremely light, so armour weight should go down.