diff --git a/code/citadel/dogborgstuff.dm b/code/citadel/dogborgstuff.dm index f7a4f9bccb..8fb3916132 100644 --- a/code/citadel/dogborgstuff.dm +++ b/code/citadel/dogborgstuff.dm @@ -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("You don't have enough charge for this operation!") @@ -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 << "ERROR: Subject is not in stable condition for auto-injection." else usr << "ERROR: Subject cannot metabolise chemicals." - 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) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 4c53739a0e..0e52ed64e2 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index e0ef270f5a..8d1b662080 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -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 << "Already activated" 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 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index e91ed2d529..c70a539e40 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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() diff --git a/tgui/src/interfaces/dogborg_sleeper.ract b/tgui/src/interfaces/dogborg_sleeper.ract new file mode 100644 index 0000000000..46da372198 --- /dev/null +++ b/tgui/src/interfaces/dogborg_sleeper.ract @@ -0,0 +1,56 @@ + + + + + {{data.occupant.name ? data.occupant.name : "No Occupant"}} + + {{#if data.occupied}} + + {{data.occupant.stat == 0 ? "Conscious" : data.occupant.stat == 1 ? "Unconcious" : "Dead"}} + + + {{Math.round(adata.occupant.health)}} + + {{#each [{label: "Brute", type: "bruteLoss"}, {label: "Respiratory", type: "oxyLoss"}, {label: "Toxin", type: "toxLoss"}, {label: "Burn", type: "fireLoss"}]}} + + {{Math.round(adata.occupant[type])}} + + {{/each}} + + {{data.occupant.cloneLoss ? "Damaged" : "Healthy"}} + + + {{data.occupant.brainLoss ? "Abnormal" : "Healthy"}} + + + {{#each adata.occupant.reagents}} + {{Math.fixed(volume, 1)}} units of {{name}}
+ {{else}} + Pure + {{/each}} +
+ {{/if}} +
+ + + Eject + + + {{#each data.chems}} + {{name}}
+ {{/each}} +
+