Doge calibrations (#54)

* 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

* pixel issue resolved

Damnifino. It seems to work.

* fixes attack runtime

* Sleeper UI refresh

Also has tgui framework TBF
This commit is contained in:
Poojawa
2016-09-23 04:49:06 -05:00
committed by GitHub
parent 0b21154be4
commit d15016386f
5 changed files with 93 additions and 9 deletions

View File

@@ -286,7 +286,6 @@
wielded = 1
/obj/item/weapon/twohanded/shockpaddles/hound/attack(mob/M, mob/user)
...()
var/mob/living/silicon/robot.R = user
if(R.cell.charge < 1000)
user.visible_message("<span class='warning'>You don't have enough charge for this operation!</span class>")
@@ -441,16 +440,19 @@
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
popup.set_content(dat)
popup.open()
return
/obj/item/weapon/dogborg/sleeper/Topic(href, href_list)
if(..() || usr == patient)
return
usr.set_machine(src)
if(href_list["refresh"])
updateUsrDialog()
src.updateUsrDialog()
sleeperUI(usr)
return
if(href_list["eject"])
go_out()
sleeperUI(usr)
return
if(patient && patient.stat != DEAD)
if(href_list["inject"] == "epinephrine" || patient.health > min_health)
@@ -459,7 +461,9 @@
usr << "<span class='notice'>ERROR: Subject is not in stable condition for auto-injection.</span>"
else
usr << "<span class='notice'>ERROR: Subject cannot metabolise chemicals.</span>"
updateUsrDialog()
src.updateUsrDialog()
sleeperUI(usr) //Needs a callback to boop the page to refresh.
return
/obj/item/weapon/dogborg/sleeper/proc/inject_chem(mob/user, chem)
if(patient && patient.reagents)

View File

@@ -808,12 +808,14 @@ Sorry Giacom. Please don't be mad :(
adjust_fire_stacks(1)
IgniteMob()
/atom/movable/proc/do_attack_animation(atom/A, end_pixel_y)
/atom/movable/proc/do_attack_animation(atom/A, final_pixel_y, final_pixel_x)
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/final_pixel_y = initial(pixel_y)
if(end_pixel_y)
final_pixel_y = end_pixel_y
if(!final_pixel_y)
final_pixel_y = initial(pixel_y)
if(!final_pixel_x)
final_pixel_x = initial(pixel_x) //lol copypasta
var/direction = get_dir(src, A)
if(direction & NORTH)
@@ -827,8 +829,8 @@ Sorry Giacom. Please don't be mad :(
pixel_x_diff = -8
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
animate(pixel_x = initial(pixel_x), pixel_y = final_pixel_y, time = 2)
//animate(pixel_x = initial(pixel_x), pixel_y = final_pixel_y, time = 2)
animate(pixel_x = pixel_x - pixel_x_diff, pixel_y = final_pixel_y, time = 2) //Why reset when you can just reverse? 99% less shit-breaking.
/mob/living/do_attack_animation(atom/A)
var/final_pixel_y = get_standard_pixel_y_offset(lying)

View File

@@ -19,6 +19,16 @@
else if(istype(O, /obj/item/weapon/storage/bag/tray/))
var/obj/item/weapon/storage/bag/tray/T = O
T.do_quick_empty()
else if(istype(O, /obj/item/weapon/storage/bag/borgdelivery/))
var/obj/item/weapon/storage/bag/borgdelivery/T = O
T.do_quick_empty()
else if(istype(O,/obj/item/weapon/gun/energy/laser/cyborg))
laser = 0
update_icons()
else if(istype(O,/obj/item/weapon/gun/energy/disabler/cyborg))
disabler = 0
update_icons()
if(client)
client.screen -= O
contents -= O
@@ -36,6 +46,7 @@
else if(module_state_3 == O)
module_state_3 = null
inv3.icon_state = "inv3"
hud_used.update_robot_modules_display()
return 1
@@ -45,6 +56,12 @@
if(activated(O))
src << "<span class='notice'>Already activated</span>"
return
if(istype(O,/obj/item/weapon/gun/energy/laser/cyborg))
laser = 1
update_icons()
if(istype(O,/obj/item/weapon/gun/energy/disabler/cyborg))
disabler = 1
update_icons()
if(!module_state_1)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_1 = O

View File

@@ -899,6 +899,11 @@
update_fire()
if(laser == 1)
overlays += "laser"
if(disabler == 1)
overlays += "disabler"
/mob/living/silicon/robot/proc/installed_modules()
if(!module)
pick_module()

View File

@@ -0,0 +1,56 @@
<script>
component.exports = {
computed: {
occupantStatState () {
switch (this.get('data.occupant.stat')) {
case 0: return 'good'
case 1: return 'average'
default: return 'bad'
}
}
}
}
</script>
<ui-display title='Occupant'>
<ui-section label='Occupant'>
<span>{{data.occupant.name ? data.occupant.name : "No Occupant"}}</span>
</ui-section>
{{#if data.occupied}}
<ui-section label='State'>
<span class='{{occupantStatState}}'>{{data.occupant.stat == 0 ? "Conscious" : data.occupant.stat == 1 ? "Unconcious" : "Dead"}}</span>
</ui-section>
<ui-section label='Health'>
<ui-bar min='{{data.occupant.minHealth}}' max='{{data.occupant.maxHealth}}' value='{{data.occupant.health}}'
state='{{data.occupant.health >= 0 ? "good" : "average"}}'>{{Math.round(adata.occupant.health)}}</ui-bar>
</ui-section>
{{#each [{label: "Brute", type: "bruteLoss"}, {label: "Respiratory", type: "oxyLoss"}, {label: "Toxin", type: "toxLoss"}, {label: "Burn", type: "fireLoss"}]}}
<ui-section label='{{label}}'>
<ui-bar min='0' max='{{data.occupant.maxHealth}}' value='{{data.occupant[type]}}' state='bad'>{{Math.round(adata.occupant[type])}}</ui-bar>
</ui-section>
{{/each}}
<ui-section label='Cells'>
<span class='{{data.occupant.cloneLoss ? "bad" : "good"}}'>{{data.occupant.cloneLoss ? "Damaged" : "Healthy"}}</span>
</ui-section>
<ui-section label='Brain'>
<span class='{{data.occupant.brainLoss ? "bad" : "good"}}'>{{data.occupant.brainLoss ? "Abnormal" : "Healthy"}}</span>
</ui-section>
<ui-section label='Bloodstream'>
{{#each adata.occupant.reagents}}
<span class='highlight' intro-outro='fade'>{{Math.fixed(volume, 1)}} units of {{name}}</span><br/>
{{else}}
<span class='good'>Pure</span>
{{/each}}
</ui-section>
{{/if}}
</ui-display>
<ui-display title='Controls'>
<ui-section label='Eject?'>
<ui-button icon='eject' state='{{data.occupied}}' action='eject'>Eject</ui-button>
</ui-section>
<ui-section label='Inject'>
{{#each data.chems}}
<ui-button icon='flask' state='{{data.occupied && allowed ? null : "disabled"}}' action='inject' params='{"chem": "{{id}}"}'>{{name}}</ui-button><br/>
{{/each}}
</ui-section>
</ui-display>