Merge pull request #516 from Verkister/master

Bringing back the dogborgos.
This commit is contained in:
LetterJay
2017-04-26 06:24:26 -05:00
committed by GitHub
9 changed files with 166 additions and 54 deletions
+69 -52
View File
@@ -1,13 +1,10 @@
// Special tools and items for "Borgi" and "K-9 Unit"
// PASTA SPAGHETTI FEST WOOHOOO!!! var/regrets = null
/obj/item/weapon/dogborg/jaws/big
name = "combat jaws"
icon = 'icons/mob/dogborg.dmi'
icon_state = "jaws"
desc = "The jaws of the law."
flags = CONDUCT
force = 10
force = 12
throwforce = 0
hitsound = 'sound/weapons/bite.ogg'
attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced")
@@ -20,7 +17,7 @@
icon_state = "smalljaws"
desc = "The jaws of a small dog."
flags = CONDUCT
force = 5
force = 6
throwforce = 0
hitsound = 'sound/weapons/bite.ogg'
attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed")
@@ -28,6 +25,10 @@
sharpness = IS_SHARP
var/emagged = 0
/obj/item/weapon/dogborg/jaws/attack(atom/A, mob/living/silicon/robot/user)
..()
user.do_attack_animation(A, ATTACK_EFFECT_BITE)
/obj/item/weapon/dogborg/jaws/small/attack_self(mob/user)
var/mob/living/silicon/robot.R = user
if(R.emagged)
@@ -38,7 +39,7 @@
icon_state = "jaws"
desc = "The jaws of the law."
flags = CONDUCT
force = 10
force = 12
throwforce = 0
hitsound = 'sound/weapons/bite.ogg'
attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced")
@@ -62,20 +63,19 @@
//Cuffs
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/dog/attack(mob/living/carbon/C, mob/user)
if(isrobot(user))
if(!C.handcuffed)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 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(!C.handcuffed)
C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C)
C.update_inv_handcuffed(0)
user << "<span class='notice'>You handcuff [C].</span>"
playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
add_logs(user, C, "handcuffed")
else
user << "<span class='warning'>You fail to handcuff [C]!</span>"
if(!C.handcuffed)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 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(!C.handcuffed)
C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C)
C.update_inv_handcuffed(0)
user << "<span class='notice'>You handcuff [C].</span>"
playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
add_logs(user, C, "handcuffed")
else
user << "<span class='warning'>You fail to handcuff [C]!</span>"
//Boop
@@ -95,7 +95,7 @@
user.visible_message("[user] sniffs around the air.", "<span class='warning'>You sniff the air for gas traces.</span>")
var/turf/location = user.loc
if (!( istype(location, /turf) ))
if(!istype(location))
return
var/datum/gas_mixture/environment = location.return_air()
@@ -103,15 +103,15 @@
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
user.show_message("<span class='info'><B>Results:</B></span>", 1)
to_chat(user, "<span class='info'><B>Results:</B></span>")
if(abs(pressure - ONE_ATMOSPHERE) < 10)
user.show_message("<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>", 1)
to_chat(user, "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>")
else
user.show_message("<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>", 1)
to_chat(user, "<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>")
if(total_moles)
var/list/env_gases = environment.gases
environment.assert_gases(arglist(hardcoded_gases))
environment.assert_gases(arglist(GLOB.hardcoded_gases))
var/o2_concentration = env_gases["o2"][MOLES]/total_moles
var/n2_concentration = env_gases["n2"][MOLES]/total_moles
var/co2_concentration = env_gases["co2"][MOLES]/total_moles
@@ -119,27 +119,32 @@
environment.garbage_collect()
if(abs(n2_concentration - N2STANDARD) < 20)
user << "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
else
user << "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
if(abs(o2_concentration - O2STANDARD) < 2)
user << "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
else
user << "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
if(co2_concentration > 0.01)
user << "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
else
user << "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
if(plasma_concentration > 0.005)
user << "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
else
user << "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>"
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
user.show_message("<span class='info'>Temperature: [round(environment.temperature-T0C)] &deg;C</span>", 1)
return
for(var/id in env_gases)
if(id in GLOB.hardcoded_gases)
continue
var/gas_concentration = env_gases[id][MOLES]/total_moles
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)] &deg;C</span>")
//Delivery
@@ -262,7 +267,6 @@
if(do_after(user, src.cleanspeed, target = target))
user << "<span class='notice'>You clean \the [target.name].</span>"
target.color = initial(target.color)
target.set_opacity(initial(target.opacity))
else
user.visible_message("[user] begins to lick \the [target.name] clean...", "<span class='notice'>You begin to lick \the [target.name] clean...</span>")
if(do_after(user, src.cleanspeed, target = target))
@@ -312,6 +316,10 @@
/obj/item/weapon/dogborg/sleeper/Exit(atom/movable/O)
return 0
/obj/item/weapon/dogborg/sleeper/attack(mob/M, mob/living/silicon/robot/user)
..()
user.do_attack_animation(M, ATTACK_EFFECT_BITE)
/obj/item/weapon/dogborg/sleeper/afterattack(mob/living/carbon/target, mob/living/silicon/user, proximity)
if(!proximity)
return
@@ -324,6 +332,7 @@
if(!patient_insertion_check(target))
return
target.forceMove(src)
playsound(user.loc, 'sound/vore/gulpold.ogg', 50, 1)
patient = target
hound = user
target.reset_perspective(src)
@@ -382,13 +391,13 @@
else
dat += "<span class='linkOff'>Inject Epinephrine</span>"
if(patient && patient.health > min_health)
for(var/re in injection_chems)
var/datum/reagent/C = chemical_reagents_list[re]
for(var/chem in injection_chems)
var/datum/reagent/C = GLOB.chemical_reagents_list[chem]
if(C)
dat += "<BR><A href='?src=\ref[src];inject=[C.id]'>Inject [C.name]</A>"
else
for(var/re in injection_chems)
var/datum/reagent/C = chemical_reagents_list[re]
for(var/chem in injection_chems)
var/datum/reagent/C = GLOB.chemical_reagents_list[chem]
if(C)
dat += "<BR><span class='linkOff'>Inject [C.name]</span>"
@@ -473,7 +482,7 @@
var/mob/living/silicon/robot.R = user
R.cell.charge = R.cell.charge - 250 //-250 charge per sting.
var/units = round(patient.reagents.get_reagent_amount(chem))
user << "<span class='notice'>Occupant now has [units] unit\s of [chemical_reagents_list[chem]] in their bloodstream.</span>"
user << "<span class='notice'>Occupant now has [units] unit\s of [GLOB.chemical_reagents_list[chem]] in their bloodstream.</span>"
/obj/item/weapon/dogborg/sleeper/process()
if(src.occupied == 0)
@@ -511,7 +520,7 @@
var/sleeper_g
var/sleeper_r
#define MAX_K9_LEAP_DIST 3 //Dropped from 7 to 3 because waa waa
#define MAX_K9_LEAP_DIST 4 //because something's definitely borked the pounce functioning from a distance.
/obj/item/weapon/dogborg/pounce/afterattack(atom/A, mob/user)
var/mob/living/silicon/robot.R = user
@@ -522,7 +531,7 @@
src << "<span class='danger'>Your leg actuators are still recharging!</span>"
return
if(leaping) //Leap while you leap, so you can leap while you leap
if(leaping || stat || buckled || lying)
return
if(!has_gravity(src) || !has_gravity(A))
@@ -535,38 +544,46 @@
else
leaping = 1
weather_immunities += "lava"
pixel_y = 10
throw_at(A,MAX_K9_LEAP_DIST,1, spin=0, diagonals_first = 1)
leaping = 0
pixel_y = initial(pixel_y)
update_icons()
throw_at(A, MAX_K9_LEAP_DIST, 1, spin=0, diagonals_first = 1)
cell.charge = cell.charge - 500 //Doubled the energy consumption
weather_immunities -= "lava"
pounce_cooldown = !pounce_cooldown
spawn(pounce_cooldown_time)
pounce_cooldown = !pounce_cooldown
/mob/living/silicon/robot/throw_impact(atom/A, params)
/mob/living/silicon/robot/throw_impact(atom/A)
if(!leaping)
return ..()
if(A)
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/L = A
var/blocked = 0
if(ishuman(A))
var/mob/living/carbon/human/H = A
if(H.check_shields(90, "the [name]", src, 1))
if(H.check_shields(0, "the [name]", src, attack_type = LEAP_ATTACK))
blocked = 1
if(!blocked)
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
L.Weaken(2)// NO LONGER enough to cuff em before they run off again, unless you're lucky. Requested nerf.
L.Weaken(3)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
else
Weaken(2, 1, 1)
pounce_cooldown = !pounce_cooldown
spawn(pounce_cooldown_time) //3s by default
pounce_cooldown = !pounce_cooldown
else if(A.density && !A.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [A]!</span>")
weakened = 2
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
Weaken(2, 1, 1)
if(leaping)
leaping = 0
pixel_y = initial(pixel_y)
update_icons()
update_canmove()