mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 09:34:21 +01:00
Makeshift weapons integration
This commit is contained in:
@@ -122,10 +122,21 @@
|
||||
/obj/item/weapon/handcuffs/cable/white
|
||||
icon_state = "cuff_white"
|
||||
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg
|
||||
dispenser = 1
|
||||
|
||||
/obj/item/weapon/handcuffs/pinkcuffs
|
||||
name = "fluffy pink handcuffs"
|
||||
desc = "Use this to keep prisoners in line. Or you know, your significant other."
|
||||
icon_state = "pinkcuffs"
|
||||
icon_state = "pinkcuffs"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||
R.use(1)
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||
del(src)
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
force = 10
|
||||
throwforce = 7
|
||||
w_class = 3
|
||||
var/charges = 10
|
||||
var/stunforce = 10
|
||||
var/status = 0
|
||||
var/mob/foundmob = "" //Used in throwing proc.
|
||||
var/obj/item/weapon/cell/high/bcell = 0
|
||||
var/hitcost = 1000
|
||||
|
||||
origin_tech = "combat=2"
|
||||
|
||||
@@ -18,82 +20,129 @@
|
||||
viewers(user) << "\red <b>[user] is putting the live [src.name] in \his mouth! It looks like \he's trying to commit suicide.</b>"
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/weapon/melee/baton/loaded/New()
|
||||
..()
|
||||
bcell = new(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
|
||||
if(bcell)
|
||||
if(bcell.rigged)
|
||||
bcell.explode()//exploding baton of justice
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
bcell.charge -= max(chrgdeductamt,0)
|
||||
if(bcell.charge < hitcost)
|
||||
status = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/melee/baton/examine()
|
||||
set src in view(1)
|
||||
..()
|
||||
if(bcell)
|
||||
usr <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
|
||||
if(!bcell)
|
||||
usr <<"<span class='warning'>The baton does not have a power source installed.</span>"
|
||||
|
||||
/obj/item/weapon/melee/baton/update_icon()
|
||||
if(status)
|
||||
icon_state = "stunbaton_active"
|
||||
item_state = "baton_on"
|
||||
icon_state = "[initial(name)]_active"
|
||||
else if(!bcell)
|
||||
icon_state = "[initial(name)]_nocell"
|
||||
else
|
||||
icon_state = "stunbaton"
|
||||
item_state = "baton"
|
||||
icon_state = "[initial(name)]"
|
||||
|
||||
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(!bcell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
bcell = W
|
||||
user << "<span class='notice'>You install a cell in [src].</span>"
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(bcell)
|
||||
bcell.updateicon()
|
||||
bcell.loc = get_turf(src.loc)
|
||||
bcell = null
|
||||
user << "<span class='notice'>You remove the cell from the [src].</span>"
|
||||
status = 0
|
||||
update_icon()
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/attack_self(mob/user as mob)
|
||||
if(status && (CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You grab the [src] on the wrong side."
|
||||
user.Weaken(30)
|
||||
charges--
|
||||
if(charges < 1)
|
||||
status = 0
|
||||
update_icon()
|
||||
user.Weaken(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
if(charges > 0)
|
||||
if(bcell && bcell.charge)
|
||||
status = !status
|
||||
user << "<span class='notice'>\The [src] is now [status ? "on" : "off"].</span>"
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
user << "<span class='notice'>[src] is now [status ? "on" : "off"].</span>"
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
update_icon()
|
||||
else
|
||||
status = 0
|
||||
user << "<span class='warning'>\The [src] is out of charge.</span>"
|
||||
if(!bcell)
|
||||
user << "<span class='warning'>[src] does not have a power source!</span>"
|
||||
else
|
||||
user << "<span class='warning'>[src] is out of charge.</span>"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob)
|
||||
if(status && (CLUMSY in user.mutations) && prob(50))
|
||||
user << "<span class='danger'>You accidentally hit yourself with the [src]!</span>"
|
||||
user.Weaken(30)
|
||||
charges--
|
||||
if(charges < 1)
|
||||
status = 0
|
||||
update_icon()
|
||||
user.Weaken(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(isrobot(M))
|
||||
..()
|
||||
return
|
||||
|
||||
if(user.a_intent == "hurt")
|
||||
if(!..()) return
|
||||
//H.apply_effect(5, WEAKEN, 0)
|
||||
//H.visible_message("<span class='danger'>[M] has been beaten with the [src] by [user]!</span>")
|
||||
if(!isliving(M))
|
||||
return
|
||||
var/mob/living/L = M
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Beat [H.name] ([H.ckey]) with [src.name]</font>"
|
||||
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Beaten by [user.name] ([user.ckey]) with [src.name]</font>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) beat [H.name] ([H.ckey]) with [src.name] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
if(user.a_intent == "harm")
|
||||
..()
|
||||
playsound(loc, "swing_hit", 50, 1, -1)
|
||||
|
||||
playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
else if(!status)
|
||||
H.visible_message("<span class='warning'>[M] has been prodded with the [src] by [user]. Luckily it was off.</span>")
|
||||
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
|
||||
return
|
||||
|
||||
if(status)
|
||||
H.apply_effect(10, STUN, 0)
|
||||
H.apply_effect(10, WEAKEN, 0)
|
||||
H.apply_effect(10, STUTTER, 0)
|
||||
user.lastattacked = M
|
||||
H.lastattacker = user
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
user.lastattacked = L
|
||||
L.lastattacker = user
|
||||
|
||||
L.Stun(stunforce)
|
||||
L.Weaken(stunforce)
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
|
||||
L.visible_message("<span class='danger'>[L] has been stunned with [src] by [user]!</span>")
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
R.cell.use(50)
|
||||
R.cell.use(hitcost)
|
||||
else
|
||||
charges--
|
||||
H.visible_message("<span class='danger'>[M] has been stunned with the [src] by [user]!</span>")
|
||||
deductcharge(hitcost)
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Stunned [H.name] ([H.ckey]) with [src.name]</font>"
|
||||
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Stunned by [user.name] ([user.ckey]) with [src.name]</font>"
|
||||
log_attack("[user.name] ([user.ckey]) stunned [H.name] ([H.ckey]) with [src.name]")
|
||||
|
||||
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
if(charges < 1)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Stunned [L.name] ([L.ckey]) with [name]</font>"
|
||||
L.attack_log += "\[[time_stamp()]\]<font color='orange'> Stunned by [user.name] ([user.ckey]) with [name]</font>"
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) stunned [L.name] ([L.ckey]) with [name]</font>" )
|
||||
|
||||
if(bcell.charge < hitcost)
|
||||
status = 0
|
||||
update_icon()
|
||||
|
||||
@@ -105,10 +154,16 @@
|
||||
if(istype(hit_atom, /mob/living))
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(status)
|
||||
H.apply_effect(10, STUN, 0)
|
||||
H.apply_effect(10, WEAKEN, 0)
|
||||
H.apply_effect(10, STUTTER, 0)
|
||||
charges--
|
||||
H.Stun(stunforce)
|
||||
H.Weaken(stunforce)
|
||||
H.apply_effect(STUTTER, stunforce)
|
||||
|
||||
deductcharge(hitcost)
|
||||
|
||||
if(bcell.charge < hitcost)
|
||||
status = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
for(var/mob/M in player_list) if(M.key == src.fingerprintslast)
|
||||
foundmob = M
|
||||
@@ -120,14 +175,11 @@
|
||||
log_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [H.name] ([H.ckey])" )
|
||||
|
||||
/obj/item/weapon/melee/baton/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
charges = 0
|
||||
if(2)
|
||||
charges = max(0, charges - 5)
|
||||
if(charges < 1)
|
||||
status = 0
|
||||
update_icon()
|
||||
if(bcell)
|
||||
deductcharge(1000 / severity)
|
||||
if(bcell.reliability != 100 && prob(50/severity))
|
||||
bcell.reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/melee/baton/ntcane
|
||||
@@ -143,4 +195,16 @@
|
||||
item_state = "cane_nt_active"
|
||||
else
|
||||
icon_state = "cane_nt"
|
||||
item_state = "cane_nt"
|
||||
item_state = "cane_nt"
|
||||
|
||||
//Makeshift stun baton. Replacement for stun gloves.
|
||||
/obj/item/weapon/melee/baton/cattleprod
|
||||
name = "stunprod"
|
||||
desc = "An improvised stun baton."
|
||||
icon_state = "stunprod_nocell"
|
||||
item_state = "prod"
|
||||
force = 3
|
||||
throwforce = 5
|
||||
stunforce = 5
|
||||
hitcost = 2500
|
||||
slot_flags = null
|
||||
|
||||
@@ -52,6 +52,18 @@
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/attackby(obj/item/weapon/W, mob/living/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/melee/energy/sword))
|
||||
if(W == src)
|
||||
user << "<span class='notice'>You try to attach the end of the energy sword to... itself. You're not very smart, are you?</span>"
|
||||
if(ishuman(user))
|
||||
user.adjustBrainLoss(10)
|
||||
else
|
||||
user << "<span class='notice'>You attach the ends of the two energy swords, making a single double-bladed weapon! You're cool.</span>"
|
||||
new /obj/item/weapon/twohanded/dualsaber(user.loc)
|
||||
del(W)
|
||||
del(src)
|
||||
/*
|
||||
* Classic Baton
|
||||
*/
|
||||
@@ -249,4 +261,4 @@
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
user << "\blue [src] can now be concealed."
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -175,4 +175,35 @@
|
||||
if(wielded)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/green
|
||||
New()
|
||||
color = "green"
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/red
|
||||
New()
|
||||
color = "red"
|
||||
|
||||
|
||||
//spears
|
||||
/obj/item/weapon/twohanded/spear
|
||||
icon_state = "spearglass0"
|
||||
name = "spear"
|
||||
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
|
||||
force = 10
|
||||
w_class = 4.0
|
||||
slot_flags = SLOT_BACK
|
||||
force_unwielded = 10
|
||||
force_wielded = 13
|
||||
throwforce = 15
|
||||
flags = FPRINT | TABLEPASS | NOSHIELD
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
|
||||
/obj/item/weapon/twohanded/spear/update_icon()
|
||||
icon_state = "spearglass[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/spear/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/harpoon
|
||||
name = "harpoon"
|
||||
sharp = 1
|
||||
@@ -145,4 +146,32 @@
|
||||
force = 20
|
||||
throwforce = 15
|
||||
w_class = 3
|
||||
attack_verb = list("jabbed","stabbed","ripped")
|
||||
attack_verb = list("jabbed","stabbed","ripped")
|
||||
|
||||
obj/item/weapon/wirerod
|
||||
name = "Wired rod"
|
||||
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
|
||||
icon_state = "wiredrod"
|
||||
item_state = "rods"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
force = 9
|
||||
throwforce = 10
|
||||
w_class = 3
|
||||
m_amt = 1875
|
||||
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
|
||||
|
||||
obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
if(istype(I, /obj/item/weapon/shard))
|
||||
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
|
||||
user.put_in_hands(S)
|
||||
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
|
||||
del(I)
|
||||
del(src)
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wirecutters))
|
||||
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
|
||||
user.put_in_hands(P)
|
||||
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
||||
del(I)
|
||||
del(src)
|
||||
|
||||
@@ -102,9 +102,9 @@
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
@@ -130,9 +130,9 @@
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/clothing/tie/holster/waist(src)
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
@@ -150,14 +150,13 @@
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/helmet/warden(src)
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
new /obj/item/weapon/storage/box/holobadge(src)
|
||||
return
|
||||
@@ -183,13 +182,12 @@
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
|
||||
else if (istype(O, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if (B.charges > 0 && B.status == 1)
|
||||
if (B.bcell.charge > 0 && B.status == 1)
|
||||
flick("baton_active", src)
|
||||
user.Stun(10)
|
||||
user.stuttering = 10
|
||||
@@ -375,7 +375,7 @@
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= 20
|
||||
else
|
||||
B.charges--
|
||||
B.deductcharge(B.hitcost)
|
||||
user.visible_message( \
|
||||
"[user] was stunned by his wet [O].", \
|
||||
"\red You have wet \the [O], it shocks you!")
|
||||
@@ -420,4 +420,3 @@
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
Reference in New Issue
Block a user