diff --git a/aquila/aquila.dm b/aquila/aquila.dm index 31595aaefdc..60027231db9 100644 --- a/aquila/aquila.dm +++ b/aquila/aquila.dm @@ -72,6 +72,7 @@ #include "code\game\objects\items\implants\implant_security.dm" #include "code\game\objects\items\inducer.dm" #include "code\game\objects\items\manuals.dm" +#include "code\game\objects\items\melee\misc.dm" #include "code\game\objects\items\robot\robot_upgrades.dm" #include "code\game\objects\items\tools\crowbar.dm" #include "code\game\objects\items\tools\powertools.dm" @@ -225,11 +226,13 @@ #include "code\modules\spells\spell_types\godhand.dm" #include "code\modules\spells\spell_types\touch_attacks.dm" #include "code\modules\spells\spell_types\inflict_handler.dm" +#include "code\modules\surgery\bodyparts\bodyparts.dm" #include "code\modules\surgery\gender_reassignment.dm" #include "code\modules\uplink\uplink_items.dm" #include "code\modules\vending\boozeomat.dm" +#include "code\modules\vending\security.dm" #include "code\modules\vending\wardrobes.dm" #include "code\modules\projectiles\boxes_magazines\internal\shotgun.dm" #include "code\modules\research\designs\mecha_designs.dm" #include "code\modules\reagents\chemistry\recipes\other_reagents.dm" -#include "code\modules\reagents\reagent_containers\bottle.dm" +#include "code\modules\reagents\reagent_containers\bottle.dm" \ No newline at end of file diff --git a/aquila/code/game/objects/items/melee/misc.dm b/aquila/code/game/objects/items/melee/misc.dm new file mode 100644 index 00000000000..e0c53c79e08 --- /dev/null +++ b/aquila/code/game/objects/items/melee/misc.dm @@ -0,0 +1,196 @@ + +/obj/item/melee/classic_baton/proc/get_stun_description(mob/living/target, mob/living/user) + . = list() + + .["visibletrip"] = "[user] skosił [target] używając [src]! To musiało boleć." + .["localtrip"] = "[user] skosił cię używając [src]! Chryste Panie, jak to boli..." + .["visibleknockout"] = "[user] przyładował w łeb [target] za pomocą [src]! [target] pada nieprzytomny na glebę." + .["localknockout"] = "[user] przyładował ci w łeb [src] z taką siłą, że straciłeś przytomność..." + .["visibledisarm"] = "[user] celnym uderzeniem rozbroił [target] używając [src]!" + .["localdisarm"] = "[user] pogruchotał ci rękę używając [src]! Z bólu upuściłeś wszystko z rąk." + .["visiblestun"] = "[user] uderzył [target] przy użyciu [src]!" + .["localstun"] = "[user] uderzył cię przy użyciu [src]!" + .["visibleshead"] = "[user] pieprznął [target] w łeb używając [src]!" + .["localhead"] = "[user] pieprznął cię w łeb używając [src]!" + .["visiblearm"] = "[user] uderzył w rękę [target] używając [src]!" + .["localarm"] = "[user] uderzył w twoją rękę przy użyciu [src]!" + .["visibleleg"] = "[user] uderzył w nogę [target] używając [src]!" + .["localleg"] = "[user] uderzył cię w nogę używając [src]!" + + return . + +//Former Wooden Baton +/obj/item/melee/classic_baton/police/tonfa + name = "Milicyjna Tonfa" + desc = "Milicyjna, biała, gumowa pała z twardym rdzeniem. Obowiązkowe wyposażenie każdego zwyrodniałego milicjanta, który uwielbia odgłos łamanych kości - u niektórych wywołuje nawet pewien rodzaj nostalgii." + icon_state = "beater" + item_state = "beater" + lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi' + force = 8 + throwforce = 7 + cooldown = 0 + stamina_damage = 25 // 4 hits to stamcrit + stun_animation = TRUE + /// Per-mob sleep cooldowns. + /// [mob] = [world.time where the cooldown ends] + var/static/list/sleep_cooldowns = list() + /// Per-mob trip cooldowns. + /// [mob] = [world.time where the cooldown ends] + var/static/list/trip_cooldowns = list() + +/obj/item/melee/classic_baton/police/tonfa/attack(mob/living/target, mob/living/user) + var/def_check = target.getarmor(type = melee, penetration = armour_penetration) + + add_fingerprint(user) + if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50)) + to_chat(user, "You hit yourself over the head.") + user.adjustStaminaLoss(stamina_damage) + + additional_effects_carbon(user) // user is the target here + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD) + else + user.take_bodypart_damage(2*force) + return + if(!isliving(target)) + return + if(iscyborg(target)) + if (user.a_intent != INTENT_HARM) + playsound(get_turf(src), on_stun_sound, 75, 1, -1) + user.do_attack_animation(target) // The attacker cuddles the Cyborg, awww. No damage here. + return + return ..() + if (user.a_intent == INTENT_HARM) + if(!..()) + target.apply_damage(force, STAMINA, blocked = def_check) + return + else if(cooldown_check > world.time) + var/wait_desc = get_wait_description() + if (wait_desc) + to_chat(user, wait_desc) + return + if(ishuman(target)) + var/mob/living/carbon/human/H = target + if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) + return + if(check_martial_counter(H, user)) + return + + var/list/desc = get_stun_description(target, user) + var/obj/item/bodypart/La = target.get_bodypart(BODY_ZONE_L_ARM) + var/obj/item/bodypart/Ra = target.get_bodypart(BODY_ZONE_R_ARM) + var/obj/item/bodypart/Ll = target.get_bodypart(BODY_ZONE_L_LEG) + var/obj/item/bodypart/Rl = target.get_bodypart(BODY_ZONE_R_LEG) + var/mob/living/carbon/human/T = target + + user.do_attack_animation(target) + playsound(get_turf(src), on_stun_sound, 75, 1, -1) + additional_effects_carbon(target, user) + if(user.zone_selected(BODY_ZONE_CHEST) || user.zone_selected(BODY_ZONE_PRECISE_GROIN)) + target.apply_damage(stamina_damage, STAMINA, BODY_ZONE_CHEST, def_check) + log_combat(user, target, "stunned", src) + target.visible_message(desc["visiblestun"], desc["localstun"]) + + else if(user.zone_selected(BODY_ZONE_HEAD) || user.zone_selected(BODY_ZONE_PRECISE_EYES) || user.zone_selected(BODY_ZONE_PRECISE_MOUTH)) + target.apply_damage(18, STAMINA, BODY_ZONE_HEAD, def_check) // 90 : 5 = 18 , 5 hits to KnockOut + + if(target.staminaloss > 89 && !target.has_status_effect(STATUS_EFFECT_SLEEPING) && (!sleep_cooldowns[target] || COOLDOWN_FINISHED(src, sleep_cooldowns[target]))) + T.force_say(user) + target.balloon_alert_to_viewers("Knock-Out!") + if(!target.has_status_effect(STATUS_EFFECT_SLEEPING)) + target.Sleeping(80) + target.setStaminaLoss(0) + playsound(usr.loc, "sound/machines/bellsound.ogg", 15, 1) + log_combat(user, target, "Knocked-Out", src) + if(CHECK_BITFIELD(target.mobility_flags, MOBILITY_STAND)) //this is here so the "falls" message doesn't appear if the target is already on the floor + target.visible_message("[T] [pick(list("falls unconscious.","falls limp like a bag of bricks.","falls to the ground, unresponsive.","lays down on the ground for a little nap.","got [T.p_their()] dome rung in."))]") + else + target.visible_message("[T] [pick(list("falls unconscious.","falls into a deep sleep.","was sent to dreamland.","closes [T.p_their()] and prepares for a little nap."))]") + COOLDOWN_START(src, sleep_cooldowns[target], 16 SECONDS) + else + log_combat(user, target, "stunned", src) + target.visible_message(desc["visiblestun"], desc["localstun"]) + + else if(user.zone_selected(BODY_ZONE_L_LEG)) + log_combat(user, target, "stunned", src) + target.visible_message(desc["visibleleg"], desc["localleg"]) + if (Rl.get_staminaloss() < 26 && Ra.get_staminaloss() < 26 && La.get_staminaloss() < 26) + target.apply_damage(25, STAMINA, BODY_ZONE_L_LEG, def_check) + else + target.apply_damage(10, STAMINA, BODY_ZONE_L_LEG, def_check) + if (Ll.get_staminaloss() == 50) + target.apply_damage(10, STAMINA, BODY_ZONE_CHEST, def_check) + else + target.apply_damage(5, STAMINA, BODY_ZONE_CHEST, def_check) + + if(Ll.get_staminaloss() == 50 && CHECK_BITFIELD(target.mobility_flags, MOBILITY_STAND) && (!trip_cooldowns[target] || COOLDOWN_FINISHED(src, trip_cooldowns[target]))) + target.visible_message("[T] [pick(list("falls down.","falls face first into the floor.","gets viciously tripped.","got clumsy."))]") + target.balloon_alert_to_viewers("Tripped!") + target.Knockdown(7) + log_combat(user, target, "tripped", src) + target.visible_message(desc["visibletrip"], desc["localtrip"]) + playsound(usr.loc, "sound/misc/slip.ogg", 30, 1) + COOLDOWN_START(src, trip_cooldowns[target], 3 SECONDS) + + else if(user.zone_selected(BODY_ZONE_R_LEG)) + log_combat(user, target, "stunned", src) + target.visible_message(desc["visibleleg"], desc["localleg"]) + if (Ll.get_staminaloss() < 26 && Ra.get_staminaloss() < 26 && La.get_staminaloss() < 26) + target.apply_damage(25, STAMINA, BODY_ZONE_R_LEG, def_check) + else + target.apply_damage(10, STAMINA, BODY_ZONE_R_LEG, def_check) + if (Rl.get_staminaloss() == 50) + target.apply_damage(10, STAMINA, BODY_ZONE_CHEST, def_check) + else + target.apply_damage(5, STAMINA, BODY_ZONE_CHEST, def_check) + + if(Rl.get_staminaloss() == 50 && CHECK_BITFIELD(target.mobility_flags, MOBILITY_STAND) && (!trip_cooldowns[target] || COOLDOWN_FINISHED(src, trip_cooldowns[target]))) + target.visible_message("[T] [pick(list("falls down.","falls face first into the floor.","gets viciously tripped.","got clumsy."))]") + target.balloon_alert_to_viewers("Tripped!") + target.Knockdown(7) + log_combat(user, target, "tripped", src) + playsound(usr.loc, "sound/misc/slip.ogg", 30, 1) + target.visible_message(desc["visibletrip"], desc["localtrip"]) + COOLDOWN_START(src, trip_cooldowns[target], 3 SECONDS) + + else if(user.zone_selected(BODY_ZONE_L_ARM)) + if(!La.get_staminaloss() == 50) + log_combat(user, target, "stunned", src) + target.visible_message(desc["visiblearm"], desc["localarm"]) + else + log_combat(user, target, "disarmed", src) + target.visible_message(desc["visibledisarm"], desc["localdisarm"]) + if (Ra.get_staminaloss() < 26 && Ll.get_staminaloss() < 26 && Rl.get_staminaloss() < 26) + target.apply_damage(20, STAMINA, BODY_ZONE_L_ARM, def_check) + else + target.apply_damage(5, STAMINA, BODY_ZONE_L_ARM, def_check) + if (La.get_staminaloss() == 50) + target.apply_damage(10, STAMINA, BODY_ZONE_CHEST, def_check) + else + target.apply_damage(4, STAMINA, BODY_ZONE_CHEST, def_check) + + else if(user.zone_selected(BODY_ZONE_R_ARM)) + if(!Ra.get_staminaloss() == 50) + log_combat(user, target, "stunned", src) + target.visible_message(desc["visiblearm"], desc["localarm"]) + else + log_combat(user, target, "disarmed", src) + target.visible_message(desc["visibledisarm"], desc["localdisarm"]) + if (La.get_staminaloss() < 26 && Ll.get_staminaloss() < 26 && Rl.get_staminaloss() < 26) + target.apply_damage(20, STAMINA, BODY_ZONE_R_ARM, def_check) + else + target.apply_damage(5, STAMINA, BODY_ZONE_R_ARM, def_check) + if (Ra.get_staminaloss() == 50) + target.apply_damage(10, STAMINA, BODY_ZONE_CHEST, def_check) + else + target.apply_damage(4, STAMINA, BODY_ZONE_CHEST, def_check) + + add_fingerprint(user) + + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = WEAKREF(user) + COOLDOWN_START(src, cooldown_check, cooldown) \ No newline at end of file diff --git a/aquila/code/modules/surgery/bodyparts/bodyparts.dm b/aquila/code/modules/surgery/bodyparts/bodyparts.dm new file mode 100644 index 00000000000..28fa15d02b5 --- /dev/null +++ b/aquila/code/modules/surgery/bodyparts/bodyparts.dm @@ -0,0 +1,3 @@ +//Returns only stamina damage. +/obj/item/bodypart/proc/get_staminaloss() + return stamina_dam diff --git a/aquila/code/modules/vending/security.dm b/aquila/code/modules/vending/security.dm new file mode 100644 index 00000000000..6a1048d2f48 --- /dev/null +++ b/aquila/code/modules/vending/security.dm @@ -0,0 +1,13 @@ +/obj/machinery/vending/security + products = list(/obj/item/restraints/handcuffs = 8, + /obj/item/restraints/handcuffs/cable/zipties = 10, + /obj/item/grenade/flashbang = 4, + /obj/item/assembly/flash/handheld = 5, + /obj/item/book/manual/wiki/security_space_law = 3, + /obj/item/reagent_containers/food/snacks/donut = 12, + /obj/item/storage/box/evidence = 6, + /obj/item/flashlight/seclite = 4, + /obj/item/holosign_creator/security = 3, + /obj/item/restraints/legcuffs/bola/energy = 7, + //obj/item/melee/classic_baton/police = 5 //AQ edit - replaced with police tonfa + /obj/item/melee/classic_baton/police/tonfa = 5) diff --git a/aquila/icons/mob/inhands/equipment/security_lefthand.dmi b/aquila/icons/mob/inhands/equipment/security_lefthand.dmi new file mode 100644 index 00000000000..daa664209dc Binary files /dev/null and b/aquila/icons/mob/inhands/equipment/security_lefthand.dmi differ diff --git a/aquila/icons/mob/inhands/equipment/security_righthand.dmi b/aquila/icons/mob/inhands/equipment/security_righthand.dmi new file mode 100644 index 00000000000..9b52a15b1e8 Binary files /dev/null and b/aquila/icons/mob/inhands/equipment/security_righthand.dmi differ diff --git a/aquila/icons/obj/items_and_weapons.dmi b/aquila/icons/obj/items_and_weapons.dmi index 96b979a7770..8f1a9627366 100644 Binary files a/aquila/icons/obj/items_and_weapons.dmi and b/aquila/icons/obj/items_and_weapons.dmi differ