Stungloves, forcegloves, and watches, oh my!

This commit is contained in:
FelisCorax
2016-01-15 14:00:26 -05:00
parent ec73203bd5
commit e2f63626f3
7 changed files with 339 additions and 9 deletions

View File

@@ -51,3 +51,152 @@
item_state = "ggloves"
permeability_coefficient = 0.05
siemens_coefficient = 0.50 //thick work gloves
/obj/item/clothing/gloves/watch
desc = "A small wristwatch, capable of telling time."
name = "watch"
icon_state = "watch"
item_state = "watchgloves"
w_class = 1
wired = 1
species_restricted = null
verb/checktime()
set category = "Object"
set name = "Check Time"
set src in usr
if(wired && !clipped)
usr << "You check your watch, spotting a digital collection of numbers reading '[worldtime2text()]'. Today's date is '[time2text(world.time, "Month DD")]. [game_year]'."
if (emergency_shuttle.get_status_panel_eta())
usr << "\red The shuttle's status is reported as: [emergency_shuttle.get_status_panel_eta()]."
else if(wired && clipped)
usr << "You check your watch realising it's still open"
else
usr << "You check your watch as it dawns on you that it's broken"
verb/pointatwatch()
set category = "Object"
set name = "Point at watch"
set src in usr
if(wired && !clipped)
usr.visible_message ("<span class='notice'>[usr] taps their foot on the floor, arrogantly pointing at the [src] on their wrist with a look of derision in their eyes.</span>", "<span class='notice'>You point down at the [src], an arrogant look about your eyes.</span>")
else if(wired && clipped)
usr.visible_message ("<span class='notice'>[usr] taps their foot on the floor, arrogantly pointing at the [src] on their wrist with a look of derision in their eyes, not noticing it's open</span>", "<span class='notice'>You point down at the [src], an arrogant look about your eyes.</span>")
else
usr.visible_message ("<span class='notice'>[usr] taps their foot on the floor, arrogantly pointing at the [src] on their wrist with a look of derision in their eyes, not noticing it's broken</span>", "<span class='notice'>You point down at the [src], an arrogant look about your eyes.</span>")
examine(mob/user)
..()
if (get_dist(src, user) <= 1)
checktime()
attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/screwdriver))
if (clipped) //Using clipped because adding a new var for something is dumb
user.visible_message("\blue [user] screws the cover of the [src] closed.","\blue You screw the cover of the [src] closed..")
clipped = 0
return
// playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("\blue [user] unscrew the cover of the [src].","\blue You unscrew the cover of the [src].")
clipped = 1
return
if(wired)
return
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (!clipped)
user << "<span class='notice'>The [src] is not open.</span>"
return
if(wired)
user << "<span class='notice'>The [src] are already wired.</span>"
return
if(C.amount < 2)
user << "<span class='notice'>There is not enough wire to cover the [src].</span>"
return
C.use(2)
wired = 1
user << "<span class='notice'>You repair some wires in the [src].</span>"
return
emp_act(severity)
if(prob(50/severity))
wired = 0
..()
/*
Forcegloves. They amplify force from melee hits as well as muck up disarm and stuff a little.
Has bits of code in item_attack.dm, stungloves.dm, human_attackhand, human_defense
*/
/obj/item/clothing/gloves/force // this pair should be put in r&d if you choose to do so. and also the hos office locker. do it okay
desc = "These gloves bend gravity and bluespace, dampening inertia and augmenting the wearer's melee capabilities."
name = "force gloves"
icon_state = "black"
item_state = "swat_gl"
siemens_coefficient = 0.6
permeability_coefficient = 0.05
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECTION_TEMPERATURE
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE
var/active = 1 //i am actually too lazy to code an on/off switch so if you want it off, take them off for now. yes.
var/amplification = 2
/obj/item/clothing/gloves/force/basic //dooo iiiitttttt
desc = "These gloves bend gravity and bluespace, providing a cheap boost to the effectiveness of your average security staff."
name = "basic force gloves" //do it skull do it give it to all sec the forums agree go
amplification = 1 //just do it
/obj/item/clothing/gloves/force/syndicate //for syndies. pda, *maybe* nuke team or ert. up to you. maybe just use the amp 2 variant.
desc = "These gloves bend gravity and bluespace, dampening inertia and augmenting the wearer's melee capabilities."
name = "enhanced force gloves"
icon_state = "black"
item_state = "swat_gl"
amplification = 2.5 //because *2.5 is kind of scary okay. sometimes you want the scary effect. sometimes not.
/* this is too cluttered. i'd rather keep it simple.
verb/toggleGloves() //also this doesn't actually do anything yet. if you want to code in on/off, it needs interactions with the human attackhand file.
set category = "Object"
set name = "Toggle Forceglove Activity"
set src in usr
if (active == 0)
active = 1
amplification = 1.5
usr << "You squeeze twice, activating the gloves and amplifying the force of your blows. Your hands tingle pleasantly."
else if (active == 1)
active = 0
amplification = 1
usr << "You deactivate the forcegloves. Your hands feel heavy."
verb/toggleForceAmp()
set category = "Object"
set name = "Toggle Force-Amplification Level"
set src in usr
if (active == 0)
usr << "You wiggle your fingers, but the gloves aren't active. You activate them, setting the gloves to their lowest setting: Lethal. You will now hit 1.5x as hard."
amplification = 1.5
else if (amplification < 1.5 || amplification == 2.5 )
amplification = 1.5
usr << "You wiggle your fingers, setting the gloves to their lowest setting: Lethal. You will now hit 1.5x as hard."
else if (amplification == 1.5)
amplification = 2
usr << "You wiggle your fingers, setting the gloves to the medium setting: Very Lethal. You will now hit twice as hard."
else if (amplification == 2)
amplification = 2.5
usr << "You wiggle your fingers, setting the gloves to the highest setting: Extremely Lethal. You will now hit 2.5x as hard."
*/

View File

@@ -0,0 +1,93 @@
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
if(istype(src, /obj/item/clothing/gloves/boxing)) //quick fix for stunglove overlay not working nicely with boxing gloves.
user << "<span class='notice'>That won't work.</span>" //i'm not putting my lips on that!
..()
return
else if(istype(src, /obj/item/clothing/gloves/force))
user << "<span class='notice'>That seems like a terrible idea.</span>"
..()
return
//add wires
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (clipped)
user << "<span class='notice'>The [src] are too badly mangled for wiring.</span>"
return
if(wired)
user << "<span class='notice'>The [src] are already wired.</span>"
return
if(C.amount < 2)
user << "<span class='notice'>There is not enough wire to cover the [src].</span>"
return
C.use(2)
wired = 1
siemens_coefficient = 3.0
user << "<span class='notice'>You wrap some wires around the [src].</span>"
update_icon()
return
//add cell
else if(istype(W, /obj/item/weapon/cell))
if(!wired)
user << "<span class='notice'>The [src] need to be wired first.</span>"
else if(!cell)
user.drop_item()
W.loc = src
cell = W
w_class = 3.0
user << "<span class='notice'>You attach the [cell] to the [src].</span>"
update_icon()
else
user << "<span class='notice'>A [cell] is already attached to the [src].</span>"
return
else if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel))
//stunglove stuff
if(cell)
cell.update_icon()
user << "<span class='notice'>You cut the [cell] away from the [src].</span>"
cell.loc = get_turf(src.loc)
cell = null
w_class = 2.0
update_icon()
return
if(wired) //wires disappear into the void because fuck that shit
wired = 0
siemens_coefficient = initial(siemens_coefficient)
user << "<span class='notice'>You cut the wires away from the [src].</span>"
update_icon()
return
//clipping fingertips
if(!clipped)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("\red [user] cuts the fingertips off of the [src].","\red You cut the fingertips off of the [src].")
clipped = 1
name = "mangled [name]"
desc = "[desc]<br>They have had the fingertips cut off of them."
if("exclude" in species_restricted)
species_restricted -= "Unathi"
species_restricted -= "Tajaran"
return
else
user << "<span class='notice'>The [src] have already been clipped!</span>"
update_icon()
return
return
..()
/obj/item/clothing/gloves/update_icon()
..()
overlays.Cut()
if(wired)
overlays += "gloves_wire"
if(cell)
overlays += "gloves_cell"

View File

@@ -24,6 +24,42 @@
H.do_attack_animation(src)
return 0
if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = H.gloves
if(G.cell)
if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.use(G.cell.charge) //So it drains the cell.
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name_admin(M)] stungloved [src.name] ([src.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)")
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
apply_effects(5,5,0,0,5,0,0,armorblock)
apply_damage(rand(5,25), BURN, M.zone_sel.selecting,armorblock)
if(prob(15))
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
M.visible_message("\red The power source on [M]'s stun gloves overloads in a terrific fashion!", "\red Your jury rigged stun gloves malfunction!", "\red You hear a loud sparking.")
if(prob(50))
M.apply_damage(rand(1,5), BURN)
for(M in viewers(3, null))
var/safety = M:eyecheck()
if(!safety)
if(!M.blinded)
flick("flash", M.flash)
return 1
else
M << "\red Not enough charge! "
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
return
if(istype(H.gloves, /obj/item/clothing/gloves/boxing/hologlove))
H.do_attack_animation(src)
var/damage = rand(0, 9)
@@ -104,6 +140,11 @@
H.do_attack_animation(src)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves/force))
G.state = GRAB_AGGRESSIVE
G.icon_state = "grabbed1"
visible_message("<span class='warning'>[M] gets a strong grip on [src]!</span>")
return 1
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
return 1
@@ -209,8 +250,11 @@
if(HULK in H.mutations)
real_damage *= 2 // Hulks do twice the damage
rand_damage *= 2
real_damage = max(1, real_damage)
real_damage = max(1, real_damage)
if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves/force))
var/obj/item/clothing/gloves/force/X = H.gloves
real_damage *= X.amplification
var/armour = run_armor_check(affecting, "melee")
// Apply additional unarmed effects.
attack.apply_effects(H, src, armour, rand_damage, hit_zone)
@@ -244,16 +288,40 @@
var/randn = rand(1, 100)
if(!(species.flags & NO_SLIP) && randn <= 25)
var/armor_check = run_armor_check(affecting, "melee")
apply_effect(3, WEAKEN, armor_check)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(armor_check < 2)
visible_message("<span class='danger'>[M] has pushed [src]!</span>")
if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves/force))
apply_effect(6, WEAKEN, run_armor_check(affecting, "melee"))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[M] hurls [src] to the floor!</B>")
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
return
else
visible_message("<span class='warning'>[M] attempted to push [src]!</span>")
return
var/armor_check = run_armor_check(affecting, "melee")
apply_effect(3, WEAKEN, armor_check)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(armor_check < 2)
visible_message("<span class='danger'>[M] has pushed [src]!</span>")
else
visible_message("<span class='warning'>[M] attempted to push [src]!</span>")
return
if(randn <= 60)
if(H.gloves && istype(H.gloves,/obj/item/clothing/gloves/force))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[M] shoves, sending [src] flying!</B>")
step_away(src,M,15)
sleep(1)
step_away(src,M,15)
sleep(1)
step_away(src,M,15)
sleep(1)
step_away(src,M,15)
sleep(1)
apply_effect(1, WEAKEN, run_armor_check(affecting, "melee"))
return
//See about breaking grips or pulls
if(break_all_grabs(M))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)

View File

@@ -211,6 +211,13 @@ emp_act
if(user.a_intent == "disarm") effective_force = round(I.force/2)
var/hit_area = affecting.name
// forceglove amplification
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/X = user
if(X.gloves && istype(X.gloves,/obj/item/clothing/gloves/force))
var/obj/item/clothing/gloves/force/G = X.gloves
effective_force *= G.amplification
if((user != src) && check_shields(effective_force, "the [I.name]"))
return 0
@@ -482,4 +489,3 @@ emp_act
perm += perm_by_part[part]
return perm

View File

@@ -1375,6 +1375,19 @@ datum/design/item/weapon/phoronpistol
materials = list("$metal" = 5000, "$glass" = 1000, "$phoron" = 3000)
build_path = /obj/item/weapon/gun/energy/toxgun
/*This is all the station gets for producable force gloves. It's a high-risk item and thus considered contraband
outside of RnD without paperwork with the RD's stamp on it. */
datum/design/item/forcegloves
name = "Force Gloves"
desc = "These gloves bend gravity and bluespace, dampening inertia and augmenting the wearer's melee capabilities."
id = "forcegloves"
req_tech = list("combat" = 3,"bluespace" = 3, "engineering" = 3, "magnets" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 4000)
build_path = "/obj/item/clothing/gloves/force/basic"
locked = 1
category = "Weapons"
/////////////////////////////////////////
/////////////////Mining//////////////////
/////////////////////////////////////////