Finished borgopup port job and more!

-Old original features brought back:
--Defib paws for medihound.
--Pounce for k9.
--Laser/taser wielding overlays.
--Pounce as emag addition for all dogborgs.
-Some code cleanups.
-Removed the old botched feeding attempt that was also overriding my 0 force polaris fix.
-Finally fixed my original blooper of accidentally making the sprite files 62p wide instead of 64.
-Also fixed the taller fluff file.
-Enabled the sparky wreck overlay we apparently had.
-Separated janipup eye lights to their own overlay.
This commit is contained in:
Verkister
2017-11-20 13:52:20 +02:00
parent 094aa0ffae
commit 01ebd16f8b
6 changed files with 98 additions and 263 deletions
@@ -132,59 +132,15 @@
cant_hold = list(/obj/item/weapon/disk/nuclear)
*/
/obj/item/device/dogborg/dog_zapper //TODO
/obj/item/weapon/shockpaddles/robot/hound
name = "paws of life"
icon = 'icons/mob/dogborg_vr.dmi'
icon_state = "defibpaddles0"
desc = "Zappy paws. For fixing cardiac arrest."
flags = CONDUCT
force = 0
throwforce = 0
hitsound = 'sound/weapons/bite.ogg'
combat = 1
attack_verb = list("batted", "pawed", "bopped", "whapped")
w_class = ITEMSIZE_TINY
var/charge = 0
var/charge_required = 1000
var/charge_per = 100
var/state = 0 //0 = Off, 1 = Charging, 2 = Ready
chargecost = 500
//[round(((world.realtime - src.disconnect_time) / 10) / 60)]
/obj/item/device/dogborg/dog_zapper/attack_self(mob/user)
switch(state)
if(0) // Was off when clicked
if(charge < charge_required) //Turned on and now charging
state = 1
//TODO Change Icon
//TODO Start charging
user << "<span class='notice'>[name] now charging.</span>"
else //Turned on and was already charged
state = 2
user << "<span class='notice'>[name] now READY.</span>"
if(1) // Was charging when clicked
state = 0
//TODO Change Icon
user << "<span class='notice'>[name] now turned off.</span>"
if(2) // Was ready when clicked
state = 0
//TODO Change Icon
user << "<span class='notice'>[name] now turned off (fully charged).</span>"
/*
/obj/item/device/dogborg/dog_zapper/proc/charge()
var/mob/living/silicon/robot.R = usr
do
R.cell.charge -= charge_per
charge += charge_per
sleep(1)
while(state = 1 && charge < charge_required && (R.cell.charge > (charge_required - charge)))
if(charge = charge_required)
usr << "<span class='notice'>[name] now READY.</span>"
/obj/item/device/dogborg/dog_zapper/afterattack(mob/living/carbon/target, mob/living/silicon/user, proximity)
*/
//Tongue stuff
/obj/item/device/dogborg/tongue
name = "synthetic tongue"
@@ -227,7 +183,7 @@
user << "<span class='notice'>You finish licking off \the [target.name].</span>"
qdel(target)
var/mob/living/silicon/robot.R = user
R.cell.charge = R.cell.charge + 50
R.cell.charge += 50
else if(istype(target,/obj/item))
if(istype(target,/obj/item/trash))
user.visible_message("[user] nibbles away at \the [target.name].", "<span class='notice'>You begin to nibble away at \the [target.name]...</span>")
@@ -236,7 +192,7 @@
user << "<span class='notice'>You finish off \the [target.name].</span>"
qdel(target)
var/mob/living/silicon/robot.R = user
R.cell.charge = R.cell.charge + 250
R.cell.charge += 250
return
if(istype(target,/obj/item/weapon/cell))
user.visible_message("[user] begins cramming \the [target.name] down its throat.", "<span class='notice'>You begin cramming \the [target.name] down your throat...</span>")
@@ -245,7 +201,7 @@
user << "<span class='notice'>You finish off \the [target.name], and gain some charge!</span>"
var/mob/living/silicon/robot.R = user
var/obj/item/weapon/cell.C = target
R.cell.charge = R.cell.charge + (C.maxcharge / 3)
R.cell.charge += C.maxcharge / 3
qdel(target)
return
user.visible_message("[user] begins to lick \the [target.name] clean...", "<span class='notice'>You begin to lick \the [target.name] clean...</span>")
@@ -266,7 +222,7 @@
L.visible_message("<span class='danger'>[user] has shocked [L] with its tongue!</span>", \
"<span class='userdanger'>[user] has shocked you with its tongue! You can feel the betrayal.</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
R.cell.charge = R.cell.charge - 666
R.cell.charge -= 666
else
user.visible_message("<span class='notice'>\the [user] affectionally licks all over \the [target]'s face!</span>", "<span class='notice'>You affectionally lick all over \the [target]'s face!</span>")
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
@@ -332,11 +288,80 @@
usr << "It has [uses] lights remaining. Attempting to fabricate a replacement. Please stand still."
cooldown = 1
if(do_after(user, 50))
R.cell.charge = R.cell.charge - 800
R.cell.charge -= 800
AddUses(1)
cooldown = 0
else
cooldown = 0
else
usr << "It has [uses] lights remaining."
return
return
//Pounce stuff for K-9
/obj/item/weapon/dogborg/pounce
name = "pounce"
icon = 'icons/mob/dogborg_vr.dmi'
icon_state = "pounce"
desc = "Leap at your target to momentarily stun them."
force = 0
throwforce = 0
/obj/item/weapon/dogborg/pounce/New()
..()
flags |= NOBLUDGEON
/obj/item/weapon/dogborg/pounce/attack_self(mob/user)
var/mob/living/silicon/robot.R = user
R.leap()
/mob/living/silicon/robot/proc/leap()
if(last_special > world.time)
src << "Your leap actuators are still recharging."
return
if(cell.charge < 1000)
src << "Cell charge too low to continue."
return
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
src << "You cannot leap in your current state."
return
var/list/choices = list()
for(var/mob/living/M in view(6,src))
if(!istype(M,/mob/living/silicon))
choices += M
choices -= src
var/mob/living/T = input(src,"Who do you wish to leap at?") as null|anything in choices
if(!T || !src || src.stat) return
if(get_dist(get_turf(T), get_turf(src)) > 4) return
if(last_special > world.time)
return
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
src << "You cannot leap in your current state."
return
last_special = world.time + 75
status_flags |= LEAPING
pixel_y = 10
src.visible_message("<span class='danger'>\The [src] leaps at [T]!</span>")
src.throw_at(get_step(get_turf(T),get_turf(src)), 4, 1, src)
playsound(src.loc, 'sound/mecha/mechstep2.ogg', 50, 1)
pixel_y = 0
cell.charge -= 500
sleep(5)
if(status_flags & LEAPING) status_flags &= ~LEAPING
if(!src.Adjacent(T))
src << "<span class='warning'>You miss!</span>"
return
T.Weaken(4)
@@ -477,10 +477,6 @@
processing_objects.Remove(src)
return
/mob/living/silicon/robot
var/sleeper_g
var/sleeper_r
/obj/item/device/dogborg/sleeper/K9 //The K9 portabrig
name = "Brig-Belly"
desc = "Equipment for a K9 unit. A mounted portable-brig that holds criminals."
@@ -568,203 +564,4 @@
if(UI_open == 1)
sleeperUI(usr)
return
return
/mob/living/silicon/robot/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/handcuffs))
return
if(opened)
for(var/V in components)
var/datum/robot_component/C = components[V]
if(!C.installed && istype(W, C.external_type))
C.installed = 1
C.wrapped = W
C.install()
user.drop_item()
W.loc = null
var/obj/item/robot_parts/robot_component/WC = W
if(istype(WC))
C.brute_damage = WC.brute
C.electronics_damage = WC.burn
usr << "<font color='blue'>You install the [W.name].</font>"
return
if (istype(W, /obj/item/weapon/weldingtool))
if (src == user)
user << "<span class='warning'>You lack the reach to be able to repair yourself.</span>"
return
if (!getBruteLoss())
user << "Nothing to fix here!"
return
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
adjustBruteLoss(-30)
updatehealth()
add_fingerprint(user)
for(var/mob/O in viewers(user, null))
O.show_message(text("<span class='warning'>[user] has fixed some of the dents on [src]!</span>,"), 1)
else
user << "Need more welding fuel!"
return
else if(istype(W, /obj/item/stack/cable_coil) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
if (!getFireLoss())
user << "Nothing to fix here!"
return
var/obj/item/stack/cable_coil/coil = W
if (coil.use(1))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
adjustFireLoss(-30)
updatehealth()
for(var/mob/O in viewers(user, null))
O.show_message("<span class='warning'>\[user] has fixed some of the burnt wires on [src]</span>", 1)
else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
if(opened)
if(cell)
user << "You close the cover."
opened = 0
updateicon()
else if(wiresexposed && wires.IsAllCut())
//Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob.
if(!mmi)
user << "\The [src] has no brain to remove."
return
user << "You jam the crowbar into the robot and begin levering [mmi]."
sleep(30)
user << "You damage some parts of the chassis, but eventually manage to rip out [mmi]!"
var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc)
C.l_leg = new/obj/item/robot_parts/l_leg(C)
C.r_leg = new/obj/item/robot_parts/r_leg(C)
C.l_arm = new/obj/item/robot_parts/l_arm(C)
C.r_arm = new/obj/item/robot_parts/r_arm(C)
C.updateicon()
new/obj/item/robot_parts/chest(loc)
qdel(src)
else
// Okay we're not removing the cell or an MMI, but maybe something else?
var/list/removable_components = list()
for(var/V in components)
if(V == "power cell") continue
var/datum/robot_component/C = components[V]
if(C.installed == 1 || C.installed == -1)
removable_components += V
var/remove = input(user, "Which component do you want to pry out?", "Remove Component") as null|anything in removable_components
if(!remove)
return
var/datum/robot_component/C = components[remove]
var/obj/item/robot_parts/robot_component/I = C.wrapped
user << "You remove \the [I]."
if(istype(I))
I.brute = C.brute_damage
I.burn = C.electronics_damage
I.loc = src.loc
if(C.installed == 1)
C.uninstall()
C.installed = 0
else
if(locked)
user << "The cover is locked and cannot be opened."
else
user << "You open the cover."
opened = 1
updateicon()
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
var/datum/robot_component/C = components["power cell"]
if(wiresexposed)
user << "Close the panel first."
else if(cell)
user << "There is a power cell already installed."
else if(W.w_class != ITEMSIZE_NORMAL)
user << "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here."
else
user.drop_item()
W.loc = src
cell = W
user << "You insert the power cell."
C.installed = 1
C.wrapped = W
C.install()
//This will mean that removing and replacing a power cell will repair the mount, but I don't care at this point. ~Z
C.brute_damage = 0
C.electronics_damage = 0
else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool))
if (wiresexposed)
wires.Interact(user)
else
user << "You can't reach the wiring."
else if(istype(W, /obj/item/weapon/screwdriver) && opened && !cell) // haxing
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
updateicon()
else if(istype(W, /obj/item/weapon/screwdriver) && opened && cell) // radio
if(radio)
radio.attackby(W,user)//Push it to the radio to let it handle everything
else
user << "Unable to locate a radio."
updateicon()
else if(istype(W, /obj/item/device/encryptionkey/) && opened)
if(radio)//sanityyyyyy
radio.attackby(W,user)//GTFO, you have your own procs
else
user << "Unable to locate a radio."
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)||istype(W, /obj/item/weapon/card/robot)) // trying to unlock the interface with an ID card
if(emagged)//still allow them to open the cover
user << "The interface seems slightly damaged"
if(opened)
user << "You must close the cover to swipe an ID card."
else
if(allowed(usr))
locked = !locked
user << "You [ locked ? "lock" : "unlock"] [src]'s interface."
updateicon()
else
user << "<span class='warning'>Access denied.</span>"
else if(istype(W, /obj/item/borg/upgrade/))
var/obj/item/borg/upgrade/U = W
if(!opened)
usr << "You must access the borgs internals!"
else if(!src.module && U.require_module)
usr << "The borg must choose a module before he can be upgraded!"
else if(U.locked)
usr << "The upgrade is locked and cannot be used yet!"
else
if(U.action(src))
usr << "You apply the upgrade to [src]!"
usr.drop_item()
U.loc = src
else
usr << "Upgrade error!"
else if(module_active && istype(module_active,/obj/item/device/dogborg/sleeper/compactor && user.a_intent == I_HELP)) //Feeding?
if(src == user)
return
if(user.a_intent == I_HELP)
var/obj/item/device/dogborg/sleeper/compactor/CR = module_active
user << "You attempt to feed [W] to [src]."
W.attackby(CR,src)
else
if( !(istype(W, /obj/item/device/robotanalyzer) || istype(W, /obj/item/device/healthanalyzer)) )
spark_system.start()
return ..()
return
@@ -37,7 +37,7 @@
src.modules += new /obj/item/taperoll/police(src) //Block out crime scenes.
src.modules += new /obj/item/device/dogborg/sleeper/K9(src) //Eat criminals. Bring them to the brig.
src.modules += new /obj/item/weapon/gun/energy/taser/mounted/cyborg(src) //They /are/ a security borg, after all.
src.modules += new /obj/item/borg/sight/hud/sec(src) //Security hud to see criminals.
src.modules += new /obj/item/weapon/dogborg/pounce(src) //Pounce
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src) //Emag. Not a big problem.
R.icon = 'icons/mob/widerobot_vr.dmi'
R.hands.icon = 'icons/mob/screen1_robot_vr.dmi'
@@ -82,12 +82,13 @@
src.modules += new /obj/item/device/dogborg/tongue(src) //Clean up bloody items by licking them, and eat rubbish for minor energy.
src.modules += new /obj/item/device/healthanalyzer(src) // See who's hurt specificially.
src.modules += new /obj/item/device/dogborg/sleeper(src) //So they can nom people and heal them
src.modules += new /obj/item/borg/sight/hud/med(src) //See who's hurt generally.
src.modules += new /obj/item/weapon/extinguisher/mini(src) //So they can put burning patients out.
src.modules += new /obj/item/weapon/reagent_containers/borghypo(src)//So medi-hounds aren't nearly useless
src.modules += new /obj/item/weapon/reagent_containers/syringe(src) //In case the chemist is nice!
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker(src)//For holding the chemicals when the chemist is nice
src.modules += new /obj/item/device/sleevemate(src) //Lets them scan people.
src.modules += new /obj/item/weapon/shockpaddles/robot/hound(src) //Paws of life
src.emag = new /obj/item/weapon/dogborg/pounce(src) //Pounce
R.icon = 'icons/mob/widerobot_vr.dmi'
R.hands.icon = 'icons/mob/screen1_robot_vr.dmi'
//R.icon_state = "medihound"
@@ -116,7 +117,7 @@
src.modules += new /obj/item/weapon/gun/energy/taser/mounted/cyborg/ertgun(src)
src.modules += new /obj/item/weapon/dogborg/swordtail(src)
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src)
R.icon = 'icons/mob/62x62robot_vr.dmi'
R.icon = 'icons/mob/64x64robot_vr.dmi'
R.hands.icon = 'icons/mob/screen1_robot_vr.dmi'
R.pixel_x = -16
R.old_x = -16
@@ -136,6 +137,7 @@
src.modules += new /obj/item/device/dogborg/boop_module(src)
src.modules += new /obj/item/device/dogborg/tongue(src)
src.modules += new /obj/item/device/dogborg/sleeper/compactor(src)
src.emag = new /obj/item/weapon/dogborg/pounce(src) //Pounce
R.icon = 'icons/mob/widerobot_vr.dmi'
R.hands.icon = 'icons/mob/screen1_robot_vr.dmi'
//R.icon_state = "scrubpup"
@@ -1,3 +1,11 @@
/mob/living/silicon/robot
var/sleeper_g
var/sleeper_r
var/leaping = 0
var/pounce_cooldown = 0
var/pounce_cooldown_time = 40
var/leap_at
/mob/living/silicon/robot/verb/robot_nom(var/mob/living/T in oview(1))
set name = "Robot Nom"
set category = "IC"
@@ -9,12 +17,16 @@
/mob/living/silicon/robot/updateicon()
..()
if(icon == 'icons/mob/widerobot_vr.dmi' || 'icons/mob/62x62robot_vr.dmi')
if(icon == 'icons/mob/widerobot_vr.dmi' || 'icons/mob/64x64robot_vr.dmi')
if(stat == CONSCIOUS)
if(sleeper_g == 1)
overlays += "[module_sprites[icontype]]-sleeper_g"
if(sleeper_r == 1)
overlays += "[module_sprites[icontype]]-sleeper_r"
if(istype(module_active,/obj/item/weapon/gun/energy/laser/mounted))
overlays += "laser"
if(istype(module_active,/obj/item/weapon/gun/energy/taser/mounted/cyborg))
overlays += "taser"
if(resting)
overlays.Cut() // Hide that gut for it has no ground sprite yo.
icon_state = "[module_sprites[icontype]]-rest"
@@ -22,8 +34,7 @@
icon_state = module_sprites[icontype]
else if(stat == DEAD)
icon_state = "[module_sprites[icontype]]-wreck"
overlays += "wreck-overlay"
/mob/living/silicon/robot/Move(a, b, flag)
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB