diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index c83b1de19f2..5b406413abc 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -107,57 +107,73 @@ return return ..() -/obj/item/weapon/melee/baton/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) +/obj/item/weapon/melee/baton/attack(mob/M, mob/user,var/hit_zone) if(status && (CLUMSY in user.mutations) && prob(50)) user << "You accidentally hit yourself with the [src]!" user.Weaken(30) deductcharge(hitcost) return - if(isrobot(target)) - return ..() + if(isrobot(M)) + ..() + return var/agony = agonyforce var/stun = stunforce - var/obj/item/organ/external/affecting = null - if(ishuman(target)) - var/mob/living/carbon/human/H = target - affecting = H.get_organ(hit_zone) + var/mob/living/L = M + var/target_zone = check_zone(hit_zone) if(user.a_intent == I_HURT) - . = ..() - //whacking someone causes a much poorer electrical contact than deliberately prodding them. - agony *= 0.5 + if (!..()) //item/attack() does it's own messaging and logs + return 0 // item/attack() will return 1 if they hit, 0 if they missed. stun *= 0.5 if(status) //Checks to see if the stunbaton is on. agony *= 0.5 //whacking someone causes a much poorer contact than prodding them. else agony = 0 //we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to. - else if(!status) - if(affecting) - target.visible_message("[target] has been prodded in the [affecting.name] with [src] by [user]. Luckily it was off.") - else - target.visible_message("[target] has been prodded with [src] by [user]. Luckily it was off.") else - if(affecting) - target.visible_message("[target] has been prodded in the [affecting.name] with [src] by [user]!") + //copied from human_defense.dm - human defence code should really be refactored some time. + if (ishuman(L)) + user.lastattacked = L //are these used at all, if we have logs? + L.lastattacker = user + + if (user != L) // Attacking yourself can't miss + target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L) + + if(!target_zone) + L.visible_message("[user] misses [L] with \the [src]!") + return 0 + + var/mob/living/carbon/human/H = L + var/obj/item/organ/external/affecting = H.get_organ(target_zone) + if (affecting) + if(!status) + L.visible_message("[L] has been prodded in the [affecting.name] with [src] by [user]. Luckily it was off.") + return 1 + else + H.visible_message("[L] has been prodded in the [affecting.name] with [src] by [user]!") else - target.visible_message("[target] has been prodded with [src] by [user]!") - playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) + if(!status) + L.visible_message("[L] has been prodded with [src] by [user]. Luckily it was off.") + return 1 + else + L.visible_message("[L] has been prodded with [src] by [user]!") //stun effects - target.stun_effect_act(stun, agony, hit_zone, src) + L.stun_effect_act(stun, agony, target_zone, src) playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) - msg_admin_attack("[key_name(user)] stunned [key_name(target)] with the [src] (JMP)") - + msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src] (JMP)") + if(status) deductcharge(hitcost) - if(ishuman(target)) - var/mob/living/carbon/human/H = target - H.forcesay(hit_appends) + if(ishuman(L)) + var/mob/living/carbon/human/H = L + H.forcesay(hit_appends) + + return 1 /obj/item/weapon/melee/baton/emp_act(severity) if(bcell) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index b4d9d1614d8..e5dfad20602 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -28,13 +28,14 @@ if (blocked) damage /= blocked+1 - //blunt objects should really not be embedding in things unless a huge amount of force is involved - var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3) - var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class + if (I.can_embed)//If this weapon is allowed to embed in people + //blunt objects should really not be embedding in things unless a huge amount of force is involved + var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3) + var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class - //Sharp objects will always embed if they do enough damage. - if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance))) - src.embed(I, hit_zone) + //Sharp objects will always embed if they do enough damage. + if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance))) + src.embed(I, hit_zone) return 1 @@ -95,4 +96,4 @@ user.attack_log += "\[[time_stamp()]\] Knifed [name] ([ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(W.damtype)])" src.attack_log += "\[[time_stamp()]\] Got knifed by [user.name] ([user.ckey]) with [W.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(W.damtype)])" msg_admin_attack("[key_name(user)] knifed [key_name(src)] with [W.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(W.damtype)])" ) - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 82b96c5a518..fe5a0787073 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -16,13 +16,13 @@ spawn_flags = CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR -/datum/species/human/get_bodytype() - return "Human" - stamina = 130 // Humans can sprint for longer than any other species stamina_recovery = 5 sprint_speed_factor = 0.9 sprint_cost_factor = 0.5 + +/datum/species/human/get_bodytype() + return "Human" /datum/species/unathi name = "Unathi" diff --git a/code/modules/mob/living/silicon/robot/syndicate_robot.dm b/code/modules/mob/living/silicon/robot/syndicate_robot.dm index 31f3185c272..59c8acc69e8 100644 --- a/code/modules/mob/living/silicon/robot/syndicate_robot.dm +++ b/code/modules/mob/living/silicon/robot/syndicate_robot.dm @@ -58,6 +58,8 @@ return +//syndicate borg gear + //syndicate borg gear /obj/item/weapon/gun/energy/mountedsmg @@ -74,9 +76,9 @@ recharge_time = 5 firemodes = list( - list(name="semiauto", burst=1, fire_delay=0), - list(name="3-round bursts", burst=3, move_delay=4, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 1.0)), - list(name="short bursts", burst=5, move_delay=4, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)) + list(mode_name="semiauto", burst=1, fire_delay=0), + list(mode_name="3-round bursts", burst=3, move_delay=4, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 1.0)), + list(mode_name="short bursts", burst=5, move_delay=4, accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)) ) /obj/item/weapon/gun/energy/crossbow/cyborg diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 05cfa3782a1..c8cf42d52bd 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -135,47 +135,3 @@ ammo_type = /obj/item/ammo_casing/shotgun/pellet w_class = 3 force = 5 - -/obj/item/weapon/gun/projectile/shotgun/pump/boltaction - name = "\improper bolt action rifle" - desc = "A cheap ballistic rifle often found in the hands of crooks and frontiersmen." - icon_state = "moistnugget" - item_state = "moistnugget" - origin_tech = "combat=4;materials=2" - slot_flags = SLOT_BACK - load_method = SINGLE_CASING|SPEEDLOADER - caliber = "a762" - ammo_type = /obj/item/ammo_casing/a762 - max_shells = 5 - -/obj/item/weapon/gun/projectile/shotgun/pump/boltaction/attackby(var/obj/item/A as obj, mob/user as mob) - if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter) && w_class != 3) - user << "You begin to shorten the barrel and stock of \the [src]." - if(loaded.len) - afterattack(user, user) - playsound(user, fire_sound, 50, 1) - user.visible_message("[src] goes off!", "The rifle goes off in your face!") - return - if(do_after(user, 30)) - icon_state = "obrez" - w_class = 3 - recoil = 2 - accuracy = -2 - item_state = "gun" - slot_flags &= ~SLOT_BACK - slot_flags |= (SLOT_BELT|SLOT_HOLSTER) - name = "\improper obrez" - desc = "A shortened bolt action rifle, not really acurate. Uses 7.62mm rounds." - user << "You shorten the barrel and stock of the rifle!" - else - ..() - -/obj/item/weapon/gun/projectile/shotgun/pump/boltaction/obrez - name = "obrez" - desc = "A shortened bolt action rifle, not really accurate. Uses 7.62mm rounds." - icon_state = "obrez" - item_state = "gun" - w_class = 3 - recoil = 2 - accuracy = -2 - slot_flags = SLOT_BELT|SLOT_HOLSTER diff --git a/icons/misc/title.dmi b/icons/misc/title.dmi index e48b1418345..64573d5d5ff 100644 Binary files a/icons/misc/title.dmi and b/icons/misc/title.dmi differ diff --git a/icons/obj/food.dmi b/icons/obj/food.dmi index 90a4bb58075..fb68a8337e5 100644 Binary files a/icons/obj/food.dmi and b/icons/obj/food.dmi differ