Merge pull request #2660 from Spamcat/bleeding-edge-freeze

Folding batons
This commit is contained in:
Chinsky
2013-04-17 04:52:54 -07:00
6 changed files with 88 additions and 5 deletions

View File

@@ -75,13 +75,13 @@
else
user.take_organ_damage(2*force)
return
/*this is already called in ..()
src.add_fingerprint(user)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
*/
if (user.a_intent == "hurt")
if(!..()) return
playsound(src.loc, "swing_hit", 50, 1, -1)
@@ -90,13 +90,88 @@
M.Stun(8)
M.Weaken(8)
for(var/mob/O in viewers(M))
if (O.client) O.show_message("\red <B>[M] has been beaten with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
if (O.client) O.show_message("\red <B>[M] has been beaten with \the [src] by [user]!</B>", 1, "\red You hear someone fall", 2)
else
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1)
M.Stun(5)
M.Weaken(5)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
src.add_fingerprint(user)
for(var/mob/O in viewers(M))
if (O.client) O.show_message("\red <B>[M] has been stunned with the police baton by [user]!</B>", 1, "\red You hear someone fall", 2)
if (O.client) O.show_message("\red <B>[M] has been stunned with \the [src] by [user]!</B>", 1, "\red You hear someone fall", 2)
//Telescopic baton
/obj/item/weapon/melee/telebaton
name = "telescopic baton"
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton_0"
item_state = "telebaton_0"
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2
force = 3
var/on = 0
/obj/item/weapon/melee/telebaton/attack_self(mob/user as mob)
on = !on
if(on)
user.visible_message("\red You extend the baton.",\
"\red With a flick of their wrist, [user] extends their telescopic baton.",\
"You hear an ominous click.")
icon_state = "telebaton_1"
item_state = "telebaton_1"
w_class = 4
force = 15//quite robust
attack_verb = list("smacked", "struck", "slapped")
else
user.visible_message("\blue You collapse the baton.",\
"\blue [user] collapses their telescopic baton.",\
"You hear a click.")
icon_state = "telebaton_0"
item_state = "telebaton_0"
w_class = 2
force = 3//not so robust now
attack_verb = list("hit", "punched")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
add_fingerprint(user)
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
var/icon/I = new /icon(src.icon, src.icon_state)
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
blood_overlay = I
overlays += blood_overlay
return
/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob)
if(on)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You club yourself over the head."
user.Weaken(3 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, "head")
else
user.take_organ_damage(2*force)
return
if(!..()) return
playsound(src.loc, "swing_hit", 50, 1, -1)
//target.Stun(4) //naaah
target.Weaken(4)
return
else
return ..()
/*
*Energy Blade

View File

@@ -26,6 +26,7 @@
new /obj/item/clothing/gloves/captain(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/suit/armor/captain(src)
new /obj/item/weapon/melee/telebaton(src)
return
@@ -90,6 +91,7 @@
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/tie/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
return

View File

@@ -58,7 +58,13 @@ Stuff which is in development and not yet visible to players or just code relate
should be listed in the changelog upon commit though. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<div class="commit sansserif">
<h2 class="date">15.04.2013</h2>
<h3 class="author">Spamcat updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Added <a href=http://www.safecity.com.au/aspchrlar.jpg>telescopic batons</a> to HoS's and captain's lockers. These are quite robust and easily concealable.</li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">March 27th 2013</h2>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB