Merge branch 'master' of https://github.com/tgstation/-tg-station into ammunitionlocker

Conflicts:
	_maps/map_files/tgstation.2.1.3.dmm
This commit is contained in:
ikarrus
2014-09-25 09:37:54 -06:00
109 changed files with 1341 additions and 363 deletions
+15 -9
View File
@@ -74,20 +74,26 @@
flick("e_flash", M.flash)
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
if(user.mind && user.mind in ticker.mode.head_revolutionaries)
if(user.mind && ((user.mind in ticker.mode.head_revolutionaries) || (user.mind in ticker.mode.A_bosses) || (user.mind in ticker.mode.B_bosses)))
if(M.client)
if(M.stat == CONSCIOUS)
var/revsafe = 0
if(isloyal(M))
revsafe = 1
M.mind_initialize() //give them a mind datum if they don't have one.
// if(M.mind.has_been_rev)
// revsafe = 2
if(!revsafe)
M.mind.has_been_rev = 1
var/resisted
if(isloyal(M))
resisted = 1
else if(user.mind in ticker.mode.head_revolutionaries)
if(!ticker.mode.add_revolutionary(M.mind))
resisted = 1
else if(user.mind in ticker.mode.A_bosses)
if(!ticker.mode.add_gangster(M.mind,"A"))
resisted = 1
else if(user.mind in ticker.mode.B_bosses)
if(!ticker.mode.add_gangster(M.mind,"B"))
resisted = 1
if(!resisted)
M.mind.has_been_rev = 1
ticker.mode.add_revolutionary(M.mind)
else if(revsafe == 1)
user << "<span class='warning'>Something seems to be blocking the flash!</span>"
else
user << "<span class='warning'>This mind seems resistant to the flash!</span>"
else
@@ -11,6 +11,13 @@
m_amt = 10000
var/code = 2
/obj/item/device/radio/electropack/initialize()
radio_controller.add_object(src, frequency, RADIO_CHAT)
/obj/item/device/radio/electropack/New()
if(radio_controller)
radio_controller.add_object(src, frequency, RADIO_CHAT)
/obj/item/device/radio/electropack/attack_hand(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
@@ -0,0 +1,38 @@
//Recaller device
//Allows gang leaders to recall the shuttle
/obj/item/device/recaller
name = "suspicious device"
desc = "A strange device of sorts. Hard to really make out what it actually does just by looking."
icon_state = "recaller"
item_state = "walkietalkie"
throwforce = 0
w_class = 1.0
throw_speed = 3
throw_range = 7
flags = CONDUCT
var/recalling = 0
/obj/item/device/recaller/attack_self(mob/user)
if(recalling)
return
if((user.mind in ticker.mode.A_bosses) || (user.mind in ticker.mode.B_bosses))
var/turf/userturf = get_turf(user)
if(userturf.z != 1)
user << "<span class='info'>\icon[src]Error: Device out of range of station communication arrays.</span>"
return
if(emergency_shuttle.location==0)
if (emergency_shuttle.online)
recalling = 1
loc << "<span class='info'>\icon[src]Generating shuttle recall order with codes retrieved from last call signal...</span>"
sleep(rand(10,30))
loc << "<span class='info'>\icon[src]Shuttle recall order generated. Accessing station long-range communication arrays...</span>"
sleep(rand(10,30))
loc << "<span class='info'>\icon[src]Comm arrays accessed. Broadcasting recall signal...</span>"
sleep(rand(10,30))
recalling = 0
if(!cancel_call_proc(user))
loc << "<span class='info'>\icon[src]No response recieved. Emergency shuttle cannot be recalled at this time.</span>"
return
user << "<span class='info'>\icon[src]Emergency shuttle cannot be recalled at this time.</span>"
+1 -1
View File
@@ -196,7 +196,7 @@
user << "<span class='danger'>Sticking a dead brain into the frame would sort of defeat the purpose.</span>"
return
if(M.brainmob.mind in ticker.mode.head_revolutionaries)
if((M.brainmob.mind in ticker.mode.head_revolutionaries) || (M.brainmob.mind in ticker.mode.A_bosses) || (M.brainmob.mind in ticker.mode.B_bosses))
user << "<span class='danger'>The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the MMI.</span>"
return
@@ -193,7 +193,7 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \
/*
* Clown
*/
/obj/item/stack/sheet/mineral/clown
/obj/item/stack/sheet/mineral/bananium
name = "bananium"
icon_state = "sheet-clown"
singular_name = "bananium sheet"
@@ -210,7 +210,7 @@ var/global/list/datum/stack_recipe/clown_recipes = list ( \
new/datum/stack_recipe("Clown Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/clown/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/bananium/New(var/loc, var/amount=null)
recipes = clown_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
+19 -7
View File
@@ -29,6 +29,7 @@
return // Not supposed to be destroyed
if (usr && usr.machine==src)
usr << browse(null, "window=stack")
src.loc = null
..()
/obj/item/stack/examine()
@@ -135,23 +136,32 @@
usr << "<span class='notice'>Building [R.title] ...</span>"
if (!do_after(usr, R.time))
return
if (src.get_amount() < R.req_amount*multiplier)
return
if (src.get_amount() < R.req_amount*multiplier)
return
var/atom/O = new R.result_type( usr.loc )
O.dir = usr.dir
use(R.req_amount * multiplier)
//is it a stack ?
if (R.max_res_amount > 1)
var/obj/item/stack/new_item = O
new_item.amount = R.res_amount*multiplier
new_item.add_to_stacks(usr)
use(R.req_amount * multiplier)
new_item.add_to_stacks(usr) //try to merge with existing stacks on current tile
if(new_item.amount <= 0)//if the stack is empty, i.e it has been merged with an existing stack and has been garbage collected
return
if (istype(O,/obj/item))
usr.put_in_hands(O)
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
if ( istype(O, /obj/item/weapon/storage) )
for (var/obj/item/I in O)
qdel(I)
//BubbleWrap END
if (src && usr.machine==src) //do not reopen closed window
spawn( 0 )
src.interact(usr)
@@ -188,7 +198,7 @@
continue
oldsrc.attackby(item, usr)
usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s."
if(!oldsrc)
if(oldsrc.amount <= 0)
break
/obj/item/stack/attack_hand(mob/user as mob)
@@ -206,7 +216,7 @@
return
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob)
..()
if (istype(W, src.type))
var/obj/item/stack/S = W
if (S.is_cyborg)
@@ -231,7 +241,9 @@
src.use(to_transfer)
if (src && usr.machine==src)
spawn(0) src.interact(usr)
else return ..()
else
..()
/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
src.blood_DNA = from.blood_DNA
@@ -25,7 +25,7 @@
return
/obj/item/stack/tile/plasteel/attackby(obj/item/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
@@ -45,7 +45,8 @@
if (!R && replace)
user.put_in_hands(new_item)
return
..()
else
..()
/*
/obj/item/stack/tile/plasteel/attack_self(mob/user as mob)
+17 -17
View File
@@ -1,7 +1,7 @@
//In this file: Plastic explosives (C4) and Syndicate Bombs
//In this file: C4 and Syndicate Bombs
/obj/item/weapon/plastique
name = "plastic explosives"
/obj/item/weapon/c4
name = "C-4"
desc = "Used to put holes in specific areas without too much extra hole."
gender = PLURAL
icon = 'icons/obj/assemblies.dmi'
@@ -10,20 +10,20 @@
flags = NOBLUDGEON
w_class = 2.0
origin_tech = "syndicate=2"
var/datum/wires/explosive/plastic/wires = null
var/datum/wires/explosive/c4/wires = null
var/timer = 10
var/atom/target = null
var/open_panel = 0
var/image_overlay = null
/obj/item/weapon/plastique/New()
/obj/item/weapon/c4/New()
wires = new(src)
image_overlay = image('icons/obj/assemblies.dmi', "plastic-explosive2")
..()
/obj/item/weapon/plastique/suicide_act(var/mob/user)
/obj/item/weapon/c4/suicide_act(var/mob/user)
. = BRUTELOSS
user.visible_message("<span class='suicide'>[user] activates the C4 and holds it above his head! It looks like \he's going out with a bang!</span>")
user.visible_message("<span class='suicide'>[user] activates the [src.name] and holds it above his head! It looks like \he's going out with a bang!</span>")
var/message_say = "FOR NO RAISIN!"
if(user.mind)
if(user.mind.special_role)
@@ -36,11 +36,11 @@
message_say = "FOR NARSIE!"
user.say(message_say)
target = user
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) suicided with C4 at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) suicided with [src.name] at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
explode(get_turf(user))
return .
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
/obj/item/weapon/c4/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
@@ -49,14 +49,14 @@
else
..()
/obj/item/weapon/plastique/attack_self(mob/user as mob)
/obj/item/weapon/c4/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
newtime = Clamp(newtime, 10, 60000)
timer = newtime
user << "Timer set for [timer] seconds."
/obj/item/weapon/plastique/afterattack(atom/movable/target, mob/user, flag)
/obj/item/weapon/c4/afterattack(atom/movable/target, mob/user, flag)
if (!flag)
return
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/))
@@ -71,19 +71,19 @@
if (ismob(target))
add_logs(user, target, "planted [name] on")
user.visible_message("<span class='danger'>[user.name] finished planting an explosive on [target.name]!</span>")
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted C4 on [key_name(target)](<A HREF='?_src_=holder;adminmoreinfo=\ref[target]'>?</A>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted C4 on [key_name(target)] with [timer] second fuse")
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted [src.name] on [key_name(target)](<A HREF='?_src_=holder;adminmoreinfo=\ref[target]'>?</A>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [key_name(target)] with [timer] second fuse")
else
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted C4 on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted C4 on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
target.overlays += image_overlay
user << "Bomb has been planted. Timer counting down from [timer]."
spawn(timer*10)
explode(get_turf(target))
/obj/item/weapon/plastique/proc/explode(var/location)
/obj/item/weapon/c4/proc/explode(var/location)
if(!target)
target = get_atom_on_turf(src)
if(!target)
@@ -101,5 +101,5 @@
target.overlays -= image_overlay
qdel(src)
/obj/item/weapon/plastique/attack(mob/M as mob, mob/user as mob, def_zone)
/obj/item/weapon/c4/attack(mob/M as mob, mob/user as mob, def_zone)
return
@@ -8,14 +8,10 @@
/obj/item/weapon/grenade/flashbang/prime()
update_mob()
var/flashbang_turf = get_turf(src)
for(var/obj/structure/closet/L in get_hear(7, flashbang_turf))
for(var/mob/living/M in L)
bang(get_turf(M), M)
for(var/mob/living/M in hearers(7, flashbang_turf))
for(var/mob/living/M in get_hearers_in_view(7, flashbang_turf))
bang(get_turf(M), M)
for(var/obj/effect/blob/B in view(8,flashbang_turf)) //Blob damage here
for(var/obj/effect/blob/B in get_hear(8,flashbang_turf)) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
B.health -= damage
B.update_icon()
@@ -36,7 +36,7 @@
new /obj/item/weapon/gun/projectile/revolver(src)
new /obj/item/ammo_box/a357(src)
new /obj/item/weapon/card/emag(src)
new /obj/item/weapon/plastique(src)
new /obj/item/weapon/c4(src)
return
if("murder")
@@ -121,7 +121,7 @@
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/clown,
/obj/item/stack/sheet/mineral/bananium,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/rods
)
+4 -2
View File
@@ -699,7 +699,7 @@ Destroy type values:
..()
/obj/structure/table/MouseDrop_T(mob/target, mob/living/carbon/human/user)
if(istype(target) && user == target)
if(istype(target) && user == target && istype(user))
if(user.canmove)
climb_table(user)
@@ -708,7 +708,9 @@ Destroy type values:
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
"<span class='notice'>[user] starts climbing onto [src].</span>")
if(do_mob(user, user, 20))
user.loc = src.loc
user.pass_flags += PASSTABLE
step(user,get_dir(user,src.loc))
user.pass_flags -= PASSTABLE
user.visible_message("<span class='warning'>[user] climbs onto [src].</span>", \
"<span class='notice'>[user] climbs onto [src].</span>")
add_logs(user, src, "climbed onto")