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:
Poojawa
2018-03-04 11:53:48 -06:00
committed by GitHub
parent 2990c2814b
commit 61b121a4c9
17 changed files with 140 additions and 44 deletions
@@ -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
+22 -5
View File
@@ -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()