diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 8d9c0a55f6f..02331d38c42 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -36,11 +36,16 @@ icon = 'icons/obj/decals.dmi' icon_state = "shock" +#define BORG_HUG 0 +#define BORG_HUG_SUPER 1 +#define BORG_HUG_SHOCK 2 +#define BORG_HUG_CRUSH 3 + /obj/item/borg/cyborghug name = "Hugging Module" icon_state = "hugmodule" desc = "For when a someone really needs a hug." - var/mode = 0 //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH + var/mode = BORG_HUG //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH var/ccooldown = 0 var/scooldown = 0 var/shockallowed = FALSE//Can it be a stunarm when emagged. Only PK borgs get this by default. @@ -49,31 +54,31 @@ /obj/item/borg/cyborghug/attack_self(mob/living/user) if(isrobot(user)) var/mob/living/silicon/robot/P = user - if(P.emagged && shockallowed == 1) - if(mode < 3) + if(P.emagged && shockallowed) + if(mode < BORG_HUG_CRUSH) mode++ else - mode = 0 - else if(mode < 1) + mode = BORG_HUG + else if(mode < BORG_HUG_SUPER) mode++ else - mode = 0 + mode = BORG_HUG switch(mode) - if(0) - to_chat(user, "Power reset. Hugs!") - if(1) - to_chat(user, "Power increased!") - if(2) - to_chat(user, "BZZT. Electrifying arms...") - if(3) - to_chat(user, "ERROR: ARM ACTUATORS OVERLOADED.") + if(BORG_HUG) + to_chat(user, "Power reset. Hugs!") + if(BORG_HUG_SUPER) + to_chat(user, "Power increased!") + if(BORG_HUG_SHOCK) + to_chat(user, "BZZT. Electrifying arms...") + if(BORG_HUG_CRUSH) + to_chat(user, "ERROR: ARM ACTUATORS OVERLOADED.") /obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user) if(M == user) return switch(mode) - if(0) - if(M.health >= 0) + if(BORG_HUG) + if(M.health >= config.health_threshold_crit) if(user.zone_sel.selecting == "head") user.visible_message("[user] playfully boops [M] on the head!", \ "You playfully boop [M] on the head!") @@ -93,8 +98,8 @@ user.visible_message("[user] pets [M]!", \ "You pet [M]!") playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - if(1) - if(M.health >= 0) + if(BORG_HUG_SUPER) + if(M.health >= config.health_threshold_crit) if(ishuman(M)) if(M.lying) user.visible_message("[user] shakes [M] trying to get \him up!", \ @@ -113,9 +118,9 @@ user.visible_message("[user] bops [M] on the head!", \ "You bop [M] on the head!") playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1) - if(2) + if(BORG_HUG_SHOCK) if(!scooldown) - if(M.health >= 0) + if(M.health >= config.health_threshold_crit) if(ishuman(M)) M.electrocute_act(5, "[user]", safety = 1) user.visible_message("[user] electrocutes [M] with their touch!", \ @@ -134,9 +139,9 @@ scooldown = TRUE spawn(20) scooldown = FALSE - if(3) + if(BORG_HUG_CRUSH) if(!ccooldown) - if(M.health >= 0) + if(M.health >= config.health_threshold_crit) if(ishuman(M)) user.visible_message("[user] crushes [M] in their grip!", \ "You crush [M] in your grip!") @@ -150,6 +155,11 @@ spawn(10) ccooldown = FALSE +#undefine BORG_HUG +#undefine BORG_HUG_SUPER +#undefine BORG_HUG_SHOCK +#undefine BORG_HUG_CRUSH + /obj/item/borg/cyborghug/peacekeeper shockallowed = TRUE @@ -182,17 +192,16 @@ if(R.emagged) safety = FALSE - if(safety == TRUE) - user.visible_message("[user] blares out a near-deafening siren from its speakers!", \ - "The siren pierces your hearing and confuses you!", \ - "The siren pierces your hearing!") + if(safety) + user.visible_message("[user] blares out a near-deafening siren from its speakers!") for(var/mob/living/carbon/M in get_mobs_in_view(9, user)) if(!M.check_ear_prot()) M.AdjustConfused(6) + to_chat(M, "The siren pierces your hearing!") audible_message("HUMAN HARM") playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3) cooldown = world.time + 200 - log_game("[user.ckey]([user]) used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") + log_game("[key_name(user)] used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") if(isrobot(user)) var/mob/living/silicon/robot/R = user if(R.connected_ai) @@ -200,25 +209,24 @@ return - if(safety == FALSE) - user.audible_message("BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT") - for(var/mob/living/carbon/human/H in get_mobs_in_view(9, user)) - if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf) - continue - var/earsafety = 0 - if(H.check_ear_prot()) - earsafety = 1 + user.audible_message("BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT") + for(var/mob/living/carbon/human/H in get_mobs_in_view(9, user)) + if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf) + continue + var/earsafety = 0 + if(H.check_ear_prot()) + earsafety = 1 - if(earsafety) - H.AdjustConfused(5) - H.AdjustStuttering(10) - H.Jitter(10) - else - H.Weaken(2) - H.AdjustConfused(10) - H.AdjustStuttering(15) - H.Jitter(25) + if(earsafety) + H.AdjustConfused(5) + H.AdjustStuttering(10) + H.Jitter(10) + else + H.Weaken(2) + H.AdjustConfused(10) + H.AdjustStuttering(15) + H.Jitter(25) - playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3) - cooldown = world.time + 600 - log_game("[user.ckey]([user]) used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") \ No newline at end of file + playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3) + cooldown = world.time + 600 + log_game("[key_name(user)] used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") \ No newline at end of file diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 675e194ae30..2c6b5723768 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -234,7 +234,7 @@ RSF return /obj/item/weapon/cookiesynth - name = "Cookie Synthesizer" + name = "\improper Cookie Synthesizer" desc = "A self-recharging device used to rapidly deploy cookies." icon = 'icons/obj/tools.dmi' icon_state = "rcd" @@ -255,9 +255,9 @@ RSF /obj/item/weapon/cookiesynth/emag_act(mob/user) emagged = !emagged if(emagged) - to_chat(user, "You short out the [src]'s reagent safety checker!") + to_chat(user, "You short out [src]'s reagent safety checker!") else - to_chat(user, "You reset the [src]'s reagent safety checker!") + to_chat(user, "You reset [src]'s reagent safety checker!") toxin = 0 /obj/item/weapon/cookiesynth/attack_self(mob/user) @@ -266,13 +266,13 @@ RSF P = user if(emagged && !toxin) toxin = 1 - to_chat(user, "Cookie Synthesizer Hacked") + to_chat(user, "Cookie Synthesizer Hacked.") else if(P.emagged && !toxin) toxin = 1 - to_chat(user, "Cookie Synthesizer Hacked") + to_chat(user, "Cookie Synthesizer Hacked.") else toxin = 0 - to_chat(user, "Cookie Synthesizer Reset") + to_chat(user, "Cookie Synthesizer Reset.") /obj/item/weapon/cookiesynth/process() if(matter < 10) @@ -283,7 +283,7 @@ RSF return if(!proximity) return - if (!(istype(A, /obj/structure/table) || isfloorturf(A))) + if(!(istype(A, /obj/structure/table) || isfloorturf(A))) return if(matter < 1) to_chat(user, "[src] doesn't have enough matter left. Wait for it to recharge!") @@ -294,7 +294,7 @@ RSF to_chat(user, "You do not have enough power to use [src].") return var/turf/T = get_turf(A) - playsound(src.loc, 'sound/machines/click.ogg', 10, 1) + playsound(loc, 'sound/machines/click.ogg', 10, 1) to_chat(user, "Fabricating Cookie..") var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T) if(toxin) diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index 83e00b52383..6b4b7918ead 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -1143,7 +1143,7 @@ M.AdjustConfused(3, bound_lower = 0, bound_upper = 5) M.AdjustDizzy(3, bound_lower = 0, bound_upper = 5) if(prob(20)) - to_chat(M, "You feel confused and disorientated.") + to_chat(M, "You feel confused and disorientated.") ..() /datum/reagent/peaceborg/tire @@ -1153,9 +1153,9 @@ metabolization_rate = 1.5 * REAGENTS_METABOLISM /datum/reagent/peaceborg/tire/on_mob_life(mob/living/M) - var/healthcomp = (100 - M.health) //DOES NOT ACCOUNT FOR ADMINBUS THINGS THAT MAKE YOU HAVE MORE THAN 200/210 HEALTH, OR SOMETHING OTHER THAN A HUMAN PROCESSING THIS. + var/healthcomp = (M.maxHealth - M.health) if(M.staminaloss < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.) M.adjustStaminaLoss(10) if(prob(30)) - to_chat(M, "You should sit down and take a rest...") + to_chat(M, "You should sit down and take a rest...") ..() \ No newline at end of file diff --git a/icons/mob/robots.dmi b/icons/mob/robots.dmi index 55b71cf33f1..63d92cae2ef 100644 Binary files a/icons/mob/robots.dmi and b/icons/mob/robots.dmi differ