Merge remote-tracking branch 'upstream/dev' into power-net

This commit is contained in:
mwerezak
2014-08-03 01:50:51 -04:00
148 changed files with 2848 additions and 1375 deletions
+8
View File
@@ -81,6 +81,14 @@
ninjastart += loc
del(src)
if("voxstart")
raider_spawn += loc
del(src)
if("Syndicate-Spawn")
synd_spawn += loc
del(src)
landmarks_list += src
return 1
+2 -1
View File
@@ -552,6 +552,8 @@
)
if(istype(M, /mob/living/carbon/human))
var/datum/organ/internal/eyes/eyes = H.internal_organs_by_name["eyes"]
if(!eyes)
return
eyes.damage += rand(3,4)
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
@@ -631,4 +633,3 @@
var/obj/item/I = get_active_hand()
if(I && !I.abstract)
I.showoff(src)
@@ -71,6 +71,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 15
body_parts_covered = 0
/obj/item/clothing/mask/cigarette/New()
..()
+61 -72
View File
@@ -14,83 +14,59 @@
origin_tech = "materials=1"
var/dispenser = 0
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
var/cuff_sound = 'sound/weapons/handcuffs.ogg'
/obj/item/weapon/handcuffs/attack(mob/living/carbon/C as mob, mob/user as mob)
if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user))
if(!C.handcuffed)
var/turf/p_loc = user.loc
var/turf/p_loc_m = C.loc
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
for(var/mob/O in viewers(user, null))
O.show_message("\red <B>[user] is trying to put handcuffs on [C]!</B>", 1)
spawn(30)
if(!C) return
if(p_loc == user.loc && p_loc_m == C.loc)
C.handcuffed = new /obj/item/weapon/handcuffs(C)
C.update_inv_handcuffed()
else
if ((CLUMSY in usr.mutations) && prob(50))
usr << "\red Uh ... how do those things work?!"
if (istype(C, /mob/living/carbon/human))
if(!C.handcuffed)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = user
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = user.loc
O.place = "handcuff"
C.requests += O
spawn( 0 )
O.process()
if (!istype(user, /mob/living/carbon/human))
user << "\red You don't have the dexterity to do this!"
return
if ((CLUMSY in usr.mutations) && prob(50))
user << "\red Uh ... how do those things work?!"
place_handcuffs(user, user)
return
if(!C.handcuffed)
//check for an aggressive grab
for (var/obj/item/weapon/grab/G in C.grabbed_by)
if (G.loc == user && G.state == GRAB_AGGRESSIVE)
place_handcuffs(C, user)
return
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "\red You don't have the dexterity to do this!"
return
if (istype(C, /mob/living/carbon/human))
if(!C.handcuffed)
user << "\red You need to have a firm grip on [C] before you can put \the [src] on!"
C.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [C.name] ([C.ckey])</font>")
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(C)]")
/obj/item/weapon/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user)
playsound(src.loc, cuff_sound, 30, 1, -2)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = C
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = C.loc
O.place = "handcuff"
C.requests += O
spawn( 0 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
feedback_add_details("handcuffs","C")
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
else
feedback_add_details("handcuffs","H")
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
O.process()
return
else
if(!C.handcuffed)
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = user
O.target = C
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = C.loc
O.place = "handcuff"
C.requests += O
spawn( 0 )
if(istype(src, /obj/item/weapon/handcuffs/cable))
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
else
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
O.process()
return
return
if (ishuman(target))
var/mob/living/carbon/human/H = target
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = H
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = H.loc
O.place = "handcuff"
H.requests += O
spawn( 0 )
feedback_add_details("handcuffs","H")
O.process()
return
if (ismonkey(target))
var/mob/living/carbon/monkey/M = target
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = user
O.target = M
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
O.process()
return
var/last_chew = 0
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
@@ -122,6 +98,7 @@ var/last_chew = 0
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_white"
breakouttime = 300 //Deciseconds = 30s
cuff_sound = 'sound/weapons/cablecuff.ogg'
/obj/item/weapon/handcuffs/cable/red
color = "#DD0000"
@@ -162,3 +139,15 @@ var/last_chew = 0
/obj/item/weapon/handcuffs/cyborg
dispenser = 1
/obj/item/weapon/handcuffs/cyborg/attack(mob/living/carbon/C as mob, mob/user as mob)
if(!C.handcuffed)
var/turf/p_loc = user.loc
var/turf/p_loc_m = C.loc
playsound(src.loc, cuff_sound, 30, 1, -2)
user.visible_message("\red <B>[user] is trying to put handcuffs on [C]!</B>")
spawn(30)
if(!C) return
if(p_loc == user.loc && p_loc_m == C.loc)
C.handcuffed = new /obj/item/weapon/handcuffs(C)
C.update_inv_handcuffed()
+66 -53
View File
@@ -12,10 +12,11 @@
w_class = 3
origin_tech = "combat=2"
attack_verb = list("beaten")
var/stunforce = 7
var/status = 0
var/obj/item/weapon/cell/high/bcell = null
var/hitcost = 1000
var/stunforce = 0
var/agonyforce = 60
var/status = 0 //whether the thing is on or not
var/obj/item/weapon/cell/bcell = null
var/hitcost = 1000 //oh god why do power cells carry so much charge? We probably need to make a distinction between "industrial" sized power cells for APCs and power cells for everything else.
/obj/item/weapon/melee/baton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.</span>")
@@ -26,10 +27,9 @@
update_icon()
return
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
..()
bcell = new(src)
bcell = new/obj/item/weapon/cell/high(src)
update_icon()
return
@@ -103,64 +103,75 @@
deductcharge(hitcost)
return
if(isrobot(M))
..()
return
var/mob/living/carbon/human/H = M
var/agony = agonyforce
var/stun = stunforce
var/mob/living/L = M
var/target_zone = check_zone(user.zone_sel.selecting)
if(user.a_intent == "hurt")
if(!..()) return
H.visible_message("<span class='danger'>[M] has been beaten with the [src] by [user]!</span>")
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>)")
playsound(src.loc, "swing_hit", 50, 1, -1)
else if(!status)
H.visible_message("<span class='warning'>[H] has been prodded with [src] by [user]. Luckily it was off.</span>")
return
var/stunroll = (rand(1,100))
if(status)
user.lastattacked = H
H.lastattacker = user
if(user == H) // Attacking yourself can't miss
stunroll = 100
if(stunroll < 40)
H.visible_message("\red <B>[user] misses [H] with \the [src]!")
msg_admin_attack("[key_name(user)] attempted to stun [key_name(H)] with the [src].")
return
H.Stun(stunforce)
H.Weaken(stunforce)
H.apply_effect(STUTTER, stunforce)
H.visible_message("<span class='danger'>[H] has been stunned with [src] by [user]!</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
msg_admin_attack("[key_name(user)] stunned [key_name(H)] with the [src].")
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>"
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
if(R && R.cell)
R.cell.use(hitcost)
if (!..()) //item/attack() does it's own messaging and logs
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
stun *= 0.5
//we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to.
else
//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("\red <B>[user] misses [L] with \the [src]!")
return 0
var/mob/living/carbon/human/H = L
var/datum/organ/external/affecting = H.get_organ(target_zone)
if (affecting)
if(!status)
L.visible_message("<span class='warning'>[L] has been prodded in the [affecting.display_name] with [src] by [user]. Luckily it was off.</span>")
return 1
else
H.visible_message("<span class='danger'>[L] has been prodded in the [affecting.display_name] with [src] by [user]!</span>")
else
deductcharge(hitcost)
if(!status)
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
return 1
else
L.visible_message("<span class='danger'>[L] has been prodded with [src] by [user]!</span>")
//stun effects
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(L)] with the [src].")
deductcharge(hitcost)
return 1
/obj/item/weapon/melee/baton/emp_act(severity)
if(bcell)
deductcharge(1000 / severity)
if(bcell.reliability != 100 && prob(50/severity))
bcell.reliability -= 10 / severity
bcell.emp_act(severity) //let's not duplicate code everywhere if we don't have to please.
..()
//secborg stun baton module
/obj/item/weapon/melee/baton/robot/attack_self(mob/user)
//try to find our power cell
var/mob/living/silicon/robot/R = loc
if (istype(R))
bcell = R.cell
return ..()
/obj/item/weapon/melee/baton/robot/attackby(obj/item/weapon/W, mob/user)
return
//Makeshift stun baton. Replacement for stun gloves.
/obj/item/weapon/melee/baton/cattleprod
name = "stunprod"
@@ -169,6 +180,8 @@
item_state = "prod"
force = 3
throwforce = 5
stunforce = 5
stunforce = 0
agonyforce = 60 //same force as a stunbaton, but uses way more charge.
hitcost = 2500
attack_verb = list("poked")
slot_flags = null
@@ -91,7 +91,7 @@
*/
if (user.a_intent == "hurt")
if(!..()) return
playsound(src.loc, "swing_hit", 50, 1, -1)
//playsound(src.loc, "swing_hit", 50, 1, -1)
if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
M.stuttering = 8
M.Stun(8)
@@ -177,7 +177,7 @@
user.take_organ_damage(2*force)
return
if(..())
playsound(src.loc, "swing_hit", 50, 1, -1)
//playsound(src.loc, "swing_hit", 50, 1, -1)
return
else
return ..()
+1
View File
@@ -1,6 +1,7 @@
/obj/item/weapon
name = "weapon"
icon = 'icons/obj/weapons.dmi'
hitsound = "swing_hit"
/obj/item/weapon/Bump(mob/M as mob)
spawn(0)