Dogborg fixes, Borg construction animations! (#5725)
* major re-works * Resting verb in, but the icons don't refresh correctly * tweaks self heal for engiborgs * minor fixes * Fixes borg animation flicker * ore pup stuff, maybe. * tweaks from upstream input * adds the basically useless check for dogborg specific modules * cleans up code and Scrubpup Animation! * Update robot_modules.dm
This commit is contained in:
@@ -61,10 +61,10 @@
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/zipties/cyborg/dog/attack(mob/living/carbon/C, mob/user)
|
||||
if(!C.handcuffed)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 60, 1, -2)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to put zipties on [C]!</span>")
|
||||
if(do_mob(user, C, 30))
|
||||
if(do_mob(user, C, 60))
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_inv_handcuffed(0)
|
||||
@@ -143,6 +143,8 @@
|
||||
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C)] °C</span>")
|
||||
|
||||
/obj/item/device/analyzer/nose/AltClick(mob/user) //Barometer output for measuring when the next storm happens
|
||||
. = ..()
|
||||
|
||||
//Delivery
|
||||
|
||||
@@ -206,7 +208,7 @@
|
||||
return
|
||||
if(R.client && (target in R.client.screen))
|
||||
to_chat(R, "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>")
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
else if(is_cleanable(target))
|
||||
R.visible_message("[R] begins to lick off \the [target.name].", "<span class='warning'>You begin to lick off \the [target.name]...</span>")
|
||||
if(do_after(R, src.cleanspeed, target = target))
|
||||
if(!in_range(src, target)) //Proximity is probably old news by now, do a new check.
|
||||
@@ -214,7 +216,7 @@
|
||||
to_chat(R, "<span class='notice'>You finish licking off \the [target.name].</span>")
|
||||
qdel(target)
|
||||
R.cell.give(50)
|
||||
else if(istype(target,/obj/item)) //hoo boy. danger zone man
|
||||
else if(isobj(target)) //hoo boy. danger zone man
|
||||
if(istype(target,/obj/item/trash))
|
||||
R.visible_message("[R] nibbles away at \the [target.name].", "<span class='warning'>You begin to nibble away at \the [target.name]...</span>")
|
||||
if(do_after(R, src.cleanspeed, target = target))
|
||||
@@ -291,24 +293,12 @@
|
||||
|
||||
//Defibs
|
||||
|
||||
/obj/item/twohanded/shockpaddles/hound
|
||||
/obj/item/twohanded/shockpaddles/cyborg/hound
|
||||
name = "defibrillator paws"
|
||||
desc = "MediHound specific shock paws."
|
||||
icon = 'icons/mob/dogborg.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = 0
|
||||
wielded = 1
|
||||
|
||||
/obj/item/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>")
|
||||
return
|
||||
if(src.cooldown == 0)
|
||||
R.cell.use(1000)
|
||||
return ..()
|
||||
|
||||
|
||||
//Sleeper
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 121 KiB |
@@ -648,4 +648,4 @@
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
|
||||
#undef HALFWAYCRITDEATH
|
||||
#undef HALFWAYCRITDEATH
|
||||
@@ -93,7 +93,7 @@
|
||||
cut_overlay(fire_overlay)
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(stat || buckled || lockcharge)
|
||||
if(stat || buckled || lockcharge || resting) //CITADEL EDIT resting dogborg-os
|
||||
canmove = 0
|
||||
else
|
||||
canmove = 1
|
||||
|
||||
@@ -159,6 +159,8 @@
|
||||
toner = tonermax
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
verbs += /mob/living/proc/lay_down //CITADEL EDIT borgs have rest verb now for snowflake reasons
|
||||
|
||||
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
|
||||
/mob/living/silicon/robot/Destroy()
|
||||
if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
|
||||
@@ -365,8 +367,12 @@
|
||||
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
|
||||
if(!W.use_tool(src, user, 50))
|
||||
return
|
||||
|
||||
adjustBruteLoss(-30)
|
||||
adjustBruteLoss(-10)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start fixing [src]...</span>")
|
||||
if(!do_after(user, 30, target = src))
|
||||
return
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
visible_message("<span class='notice'>[user] has fixed some of the dents on [src].</span>")
|
||||
@@ -376,11 +382,16 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if (getFireLoss() > 0 || getToxLoss() > 0)
|
||||
if(src == user)
|
||||
if(src == user && coil.use(1))
|
||||
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
|
||||
if(!do_after(user, 50, target = src))
|
||||
return
|
||||
adjustFireLoss(-10)
|
||||
adjustToxLoss(-10)
|
||||
if (coil.use(1))
|
||||
to_chat(user, "<span class='notice'>You start fixing [src]...</span>")
|
||||
if(!do_after(user, 30, target = src))
|
||||
return
|
||||
adjustFireLoss(-30)
|
||||
adjustToxLoss(-30)
|
||||
updatehealth()
|
||||
@@ -592,9 +603,8 @@
|
||||
|
||||
//Citadel changes start here - Allows modules to use different icon files, and allows modules to specify a pixel offset
|
||||
icon = (module.cyborg_icon_override ? module.cyborg_icon_override : initial(icon))
|
||||
|
||||
if(laser)
|
||||
add_overlay("module.laser")//Is this even used??? - Yes modular_citadel/borg/inventory.dm
|
||||
add_overlay("laser")//Is this even used??? - Yes borg/inventory.dm
|
||||
if(disabler)
|
||||
add_overlay("disabler")//ditto
|
||||
|
||||
@@ -602,6 +612,13 @@
|
||||
add_overlay("[module.sleeper_overlay]_g")
|
||||
if(sleeper_r && module.sleeper_overlay)
|
||||
add_overlay("[module.sleeper_overlay]_r")
|
||||
if(module.dogborg == TRUE)
|
||||
if(resting)
|
||||
cut_overlays()
|
||||
icon_state = "[module.cyborg_base_icon]-rest"
|
||||
else
|
||||
icon_state = "[module.cyborg_base_icon]"
|
||||
|
||||
if(stat == DEAD && module.has_snowflake_deadsprite)
|
||||
icon_state = "[module.cyborg_base_icon]-wreck"
|
||||
|
||||
|
||||
@@ -198,27 +198,31 @@
|
||||
|
||||
/obj/item/robot_module/proc/do_transform_animation()
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
R.notransform = TRUE
|
||||
var/obj/effect/temp_visual/decoy/fading/fivesecond/ANM = new /obj/effect/temp_visual/decoy/fading/fivesecond(R.loc, R)
|
||||
ANM.layer = R.layer - 0.01
|
||||
new /obj/effect/temp_visual/small_smoke(R.loc)
|
||||
if(R.hat)
|
||||
R.hat.forceMove(get_turf(R))
|
||||
R.hat = null
|
||||
R.update_headlamp()
|
||||
R.alpha = 0
|
||||
animate(R, alpha = 255, time = 50)
|
||||
R.cut_overlays()
|
||||
R.setDir(SOUTH)
|
||||
do_transform_delay()
|
||||
|
||||
/obj/item/robot_module/proc/do_transform_delay()
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
var/prev_lockcharge = R.lockcharge
|
||||
sleep(1)
|
||||
flick("[cyborg_base_icon]_transform", R)
|
||||
R.notransform = TRUE
|
||||
R.SetLockdown(1)
|
||||
R.anchored = TRUE
|
||||
sleep(2)
|
||||
sleep(1)
|
||||
for(var/i in 1 to 4)
|
||||
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
|
||||
sleep(12)
|
||||
sleep(7)
|
||||
if(!prev_lockcharge)
|
||||
R.SetLockdown(0)
|
||||
R.setDir(SOUTH)
|
||||
R.anchored = FALSE
|
||||
R.notransform = FALSE
|
||||
R.update_headlamp()
|
||||
R.notify_ai(NEW_MODULE)
|
||||
if(R.hud_used)
|
||||
R.hud_used.update_robot_modules_display()
|
||||
|
||||
Reference in New Issue
Block a user