12/21 modernizations from TG live (#103)
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
component.exports = {
|
||||
computed: {
|
||||
clickable () {
|
||||
if (this.get('enabled') && !this.get('state')) {
|
||||
if (this.get('enabled') && (!this.get('state') || this.get('state') == "toggle")) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -18,6 +18,8 @@
|
||||
},
|
||||
styles () {
|
||||
let extra = ''
|
||||
if (this.get('class'))
|
||||
extra += ' ' + this.get('class');
|
||||
if (this.get('tooltip-side'))
|
||||
extra = ` tooltip-${this.get('tooltip-side')}`
|
||||
if (this.get('grid'))
|
||||
@@ -33,15 +35,35 @@
|
||||
} else {
|
||||
return `inactive disabled ${extra}`
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
oninit () {
|
||||
this.on('press', (event) => {
|
||||
const { action, params } = this.get()
|
||||
act(this.get('config.ref'), action, params)
|
||||
event.node.blur()
|
||||
})
|
||||
}
|
||||
},
|
||||
data: {
|
||||
iconStackToHTML(icon_stack){ //turns a string such as 'square-o 2x, twitter 1x' into fully valid fontawesome syntax+HTML
|
||||
let resultHTML = '';
|
||||
let icons = icon_stack.split(',');
|
||||
if(icons.length){
|
||||
resultHTML += '<span class=\"fa-stack\">';
|
||||
for (let iconinfo of icons){
|
||||
let regex = /([\w\-]+)\s*(\dx)/g;
|
||||
let components = regex.exec(iconinfo);
|
||||
let icon = components[1]; //0 is the entire string
|
||||
let size = components[2];
|
||||
resultHTML += '<i class=\"fa fa-' + icon + ' fa-stack-' + size + '\"></i>';
|
||||
}
|
||||
}
|
||||
if(resultHTML){
|
||||
resultHTML += '</span>';
|
||||
}
|
||||
return resultHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -55,5 +77,8 @@
|
||||
{{#if icon}}
|
||||
<i class='fa fa-{{icon}}'></i>
|
||||
{{/if}}
|
||||
{{#if icon_stack}}
|
||||
{{{iconStackToHTML(icon_stack)}}}
|
||||
{{/if}}
|
||||
{{yield}}
|
||||
</span>
|
||||
|
||||
@@ -14,8 +14,8 @@ span.button
|
||||
@extend {context} $fontReset
|
||||
display: inline-block
|
||||
vertical-align: middle
|
||||
height: 20px
|
||||
line-height: @height - 3px
|
||||
min-height: 20px
|
||||
line-height: @min-height - 3px
|
||||
padding: 0 5px
|
||||
white-space: nowrap
|
||||
|
||||
@@ -27,6 +27,7 @@ span.button
|
||||
buttoncolor(normal, button-color-normal)
|
||||
buttoncolor(disabled, button-color-disabled)
|
||||
buttoncolor(selected, button-color-selected)
|
||||
buttoncolor(toggle, button-color-selected)
|
||||
buttoncolor(caution, button-color-caution)
|
||||
buttoncolor(danger, button-color-danger)
|
||||
|
||||
@@ -39,3 +40,5 @@ span:not(.button) + span.button
|
||||
|
||||
span.button + span:not(.button)
|
||||
margin-left: 5px
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ component.exports = {
|
||||
const onrelease = (event) => this.set({ drag: false, x: null, y: null })
|
||||
|
||||
this.observe('config.fancy', (newkey, oldkey, keypath) => {
|
||||
winset(this.get('config.window'), 'titlebar', !newkey)
|
||||
winset(this.get('config.window'), 'titlebar', !newkey && this.get('config.titlebar'))
|
||||
|
||||
if (newkey) {
|
||||
document.addEventListener('mousemove', ondrag)
|
||||
@@ -46,11 +46,13 @@ component.exports = {
|
||||
}
|
||||
</script>
|
||||
|
||||
<header class='titlebar' on-mousedown='drag'>
|
||||
<i class='statusicon fa fa-eye fa-2x {{visualStatus}}'></i>
|
||||
<span class='title'>{{yield}}</span>
|
||||
{{#if config.fancy}}
|
||||
<i class='minimize fa fa-minus fa-2x' on-click='minimize'></i>
|
||||
<i class='close fa fa-close fa-2x' on-click='close'></i>
|
||||
{{/if}}
|
||||
</header>
|
||||
{{#if config.titlebar}}
|
||||
<header class='titlebar' on-mousedown='drag'>
|
||||
<i class='statusicon fa fa-eye fa-2x {{visualStatus}}'></i>
|
||||
<span class='title'>{{yield}}</span>
|
||||
{{#if config.fancy}}
|
||||
<i class='minimize fa fa-minus fa-2x' on-click='minimize'></i>
|
||||
<i class='close fa fa-close fa-2x' on-click='close'></i>
|
||||
{{/if}}
|
||||
</header>
|
||||
{{/if}}
|
||||
Reference in New Issue
Block a user