Merge remote-tracking branch 'remotes/upstream/master' into Botcall_V2

Conflicts:
	code/game/machinery/bots/bots.dm
This commit is contained in:
GunHog
2015-05-03 17:59:46 -05:00
203 changed files with 2135 additions and 1197 deletions
+1
View File
@@ -26,6 +26,7 @@
H.med_hud_set_status()
spawn(0)
RemoveInfectionImages(affected_mob)
affected_mob = null
..()
/obj/item/body_egg/process()
+3 -3
View File
@@ -38,7 +38,7 @@
desc = "A very sad-looking crayon."
colour = "#FFFFFF"
colourName = "mime"
uses = 0
uses = -1
/obj/item/toy/crayon/mime/attack_self(mob/living/user as mob)
update_window(user)
@@ -63,7 +63,7 @@
icon_state = "crayonrainbow"
colour = "#FFF000"
colourName = "rainbow"
uses = 0
uses = -1
/obj/item/toy/crayon/rainbow/attack_self(mob/living/user as mob)
update_window(user)
@@ -111,7 +111,7 @@
user << "It is empty."
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
var/choice = input(user,"Spraycan options") in list("Toggle Cap","Change Drawing","Change Color","Cancel")
var/choice = input(user,"Spraycan options") as null|anything in list("Toggle Cap","Change Drawing","Change Color")
switch(choice)
if("Toggle Cap")
user << "<span class='notice'>You [capped ? "Remove" : "Replace"] the cap of the [src]</span>"
@@ -49,7 +49,8 @@
qdel(expansion)
expansion = null
del(src)
/* Easier to just call del() than this nonsense
//Easier to just call del() than this nonsense
// ya no, del() takes 0.8ds to run on avg. this takes less than 0.01
get_cameras()
for(var/cam_tag in bugged_cameras)
var/obj/machinery/camera/camera = bugged_cameras[cam_tag]
@@ -59,7 +60,7 @@
if(tracking)
tracking = null
..()
*/
/obj/item/device/camera_bug/interact(var/mob/user = usr)
var/datum/browser/popup = new(user, "camerabug","Camera Bug",nref=src)
+68 -26
View File
@@ -31,15 +31,16 @@
if(user.mind in (ticker.mode.A_bosses | ticker.mode.B_bosses))
dat += "Give this device to another member of your organization to use.<br>"
else
dat += "<a href='?src=\ref[src];choice=register'>Register Device</a><br>"
dat += "<a href='?src=\ref[src];register=1'>Register Device</a><br>"
else
var/gang_size = ((gang == "A")? (ticker.mode.A_gang.len + ticker.mode.A_bosses.len) : (ticker.mode.B_gang.len + ticker.mode.B_bosses.len))
var/gang_territory = ((gang == "A")? ticker.mode.A_territory.len : ticker.mode.B_territory.len)
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
dat += "Registration: <B>[(gang == "A")? gang_name("A") : gang_name("B")] Gang [boss ? "Administrator" : "Member"]</B><br>"
dat += "Registration: <B>[(gang == "A")? gang_name("A") : gang_name("B")] Gang [boss ? "Administrator" : "Lieutenant"]</B><br>"
dat += "Organization Size: <B>[gang_size]</B><br>"
dat += "Station Control: <B>[round((gang_territory/start_state.num_territories)*100, 1)]%</B><br>"
dat += "<a href='?src=\ref[src];choice=ping'>Rally Your Gang</a><br>"
dat += "<a href='?src=\ref[src];choice=recall'>Recall Emergency Shuttle</a><br>"
dat += "<br>"
dat += "Influence: <B>[points]</B><br>"
@@ -70,8 +71,8 @@
else
dat += "10mm Ammo<br>"
dat += "(50 Influence) "
if(points >= 50)
dat += "(40 Influence) "
if(points >= 40)
dat += "<a href='?src=\ref[src];purchase=pen'>Recruitment Pen</a><br>"
else
dat += "Recruitment Pen<br>"
@@ -99,6 +100,12 @@
add_fingerprint(usr)
if(href_list["register"])
register_device(usr)
else if(!gang) //Gangtool must be registered before you can use the functions below
return
if(href_list["purchase"])
var/points = ((gang == "A") ? ticker.mode.gang_points.A : ticker.mode.gang_points.B)
var/item_type
@@ -120,9 +127,9 @@
item_type = /obj/item/ammo_box/magazine/m10mm
points = 10
if("pen")
if(points >= 50)
if(points >= 40)
item_type = /obj/item/weapon/pen/gang
points = 50
points = 40
if("gangtool")
if((promotions < 3) && (points >= (promotions*20)+10))
item_type = /obj/item/device/gangtool/lt
@@ -144,12 +151,34 @@
switch(href_list["choice"])
if("recall")
recall(usr)
if("register")
register_device(usr)
if("ping")
ping_gang(usr)
attack_self(usr)
/obj/item/device/gangtool/proc/ping_gang(var/mob/user)
if(!user)
return
var/area/location = get_area(user)
if(location && location.z != 1)
user << "<span class='info'>\icon[src]Error: Signal out of range of station.</span>"
return
var/list/members = list()
if(gang == "A")
members += ticker.mode.A_bosses | ticker.mode.A_gang
else if(gang == "B")
members += ticker.mode.B_bosses | ticker.mode.B_gang
if(members.len)
for(var/datum/mind/ganger in members)
ganger.current << "<span class='danger'>A powerful thought invades your mind... The gang is rallying at <b>[location]</b>!</span>"
log_game("[key_name(user)] summoned the [gang_name(gang)] Gang ([gang]) to [location].")
/obj/item/device/gangtool/proc/register_device(var/mob/user)
if(jobban_isbanned(user, "gangster") || jobban_isbanned(user, "Syndicate"))
user << "<span class='warning'>\icon[src] ACCESS DENIED: Blacklisted user.</span>"
return 0
var/promoted
if(user.mind in (ticker.mode.A_gang | ticker.mode.A_bosses))
ticker.mode.A_tools += src
@@ -185,26 +214,39 @@
if(recalling || !can_use(user))
return
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
recalling = 1
loc << "<span class='info'>\icon[src]Generating shuttle recall order with codes retrieved from last call signal...</span>"
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
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))
sleep(rand(10,30))
if(SSshuttle.emergency.mode != SHUTTLE_CALL) //Shuttle can only be recalled when it's moving to the station
user << "<span class='info'>\icon[src]Emergency shuttle cannot be recalled at this time.</span>"
recalling = 0
log_game("[key_name(user)] has recalled the shuttle with a gangtool.")
message_admins("[key_name_admin(user)] has recalled the shuttle with a gangtool.", 1)
if(!SSshuttle.cancelEvac(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>"
loc << "<span class='info'>\icon[src]Shuttle recall order generated. Accessing station long-range communication arrays...</span>"
sleep(rand(10,30))
var/turf/userturf = get_turf(user)
if(userturf.z != 1) //Shuttle can only be recalled while on station
user << "<span class='info'>\icon[src]Error: Device out of range of station communication arrays.</span>"
recalling = 0
return
var/datum/station_state/end_state = new /datum/station_state()
end_state.count()
if((100 * start_state.score(end_state)) < 70) //Shuttle cannot be recalled if the station is too damaged
user << "<span class='info'>\icon[src]Error: Station communication systems compromised. Unable to establish connection.</span>"
recalling = 0
return
loc << "<span class='info'>\icon[src]Comm arrays accessed. Broadcasting recall signal...</span>"
sleep(rand(10,30))
recalling = 0
log_game("[key_name(user)] has tried to recall the shuttle with a gangtool.")
message_admins("[key_name_admin(user)] has tried to recall the shuttle with a gangtool.", 1)
if(!SSshuttle.cancelEvac(user))
loc << "<span class='info'>\icon[src]No response recieved. Emergency shuttle cannot be recalled at this time.</span>"
/obj/item/device/gangtool/proc/can_use(mob/living/carbon/human/user)
if(!istype(user))
+14 -14
View File
@@ -165,26 +165,25 @@
if(!M.brainmob)
user << "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose!</span>"
return
if(!M.brainmob.key)
var/ghost_can_reenter = 0
if(M.brainmob.mind)
for(var/mob/dead/observer/G in player_list)
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
ghost_can_reenter = 1
break
if(!ghost_can_reenter)
user << "<span class='warning'>The MMI indicates that their mind is completely unresponsive; there's no point!</span>"
return
if(M.brainmob.stat == DEAD)
var/mob/living/carbon/brain/BM = M.brainmob
if(!BM.key || !BM.mind)
user << "<span class='warning'>The mmi indicates that their mind is completely unresponsive; there's no point!</span>"
return
if(!BM.client) //braindead
user << "<span class='warning'>The mmi indicates that their mind is currently inactive; it might change!</span>"
return
if(BM.stat == DEAD)
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
return
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))
if((BM.mind in ticker.mode.head_revolutionaries) || (BM.mind in ticker.mode.A_bosses) || (BM.mind in ticker.mode.B_bosses))
user << "<span class='warning'>The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the MMI!</span>"
return
if(jobban_isbanned(M.brainmob, "Cyborg"))
if(jobban_isbanned(BM, "Cyborg"))
user << "<span class='warning'>This MMI does not seem to fit!</span>"
return
@@ -211,7 +210,7 @@
if(ticker.mode.config_tag == "malfunction") //Don't let humans get a cyborg on their side during malf, for balance reasons.
O.set_zeroth_law("<span class='danger'>ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*&110010</span>")
M.brainmob.mind.transfer_to(O)
BM.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
O.mind.store_memory("As a cyborg, any objectives listed here are null and void, and will be marked as failed. They are simply here for memory purposes.")
@@ -223,6 +222,7 @@
chest.cell = null
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
O.mmi = W
O.updatename()
feedback_inc("cyborg_birth",1)
-2
View File
@@ -25,8 +25,6 @@
return
/obj/item/stack/Destroy()
if (is_cyborg)
return // Not supposed to be destroyed
if (usr && usr.machine==src)
usr << browse(null, "window=stack")
src.loc = null
+11 -6
View File
@@ -427,21 +427,22 @@
//Check area validity. Reject space, player-created areas, and non-station z-levels.
if (gangID)
var/area/user_area = get_area(user.loc)
territory = get_area(target)
if(territory && (territory.z == ZLEVEL_STATION) && territory.valid_territory)
//Check if this area is already tagged by a gang
if(!(locate(/obj/effect/decal/cleanable/crayon/gang) in target)) //Ignore the check if the tile being sprayed has a gang tag
if(territory_claimed(territory, user))
return
/*
//Prevent people spraying from outside of the territory (ie. Maint walls)
if(istype(user_area) && (user_area.type == territory.type))
if(locate(/obj/machinery/power/apc) in (user.loc.contents | target.contents))
user << "<span class='warning'>You cannot tag here.</span>"
return
else
var/area/user_area = get_area(user.loc)
if(istype(user_area) && (user_area.type != territory.type))
user << "<span class='warning'>You cannot tag [territory] from the outside.</span>"
return
*/
if(locate(/obj/machinery/power/apc) in (user.loc.contents | target.contents))
user << "<span class='warning'>You cannot tag here.</span>"
return
else
user << "<span class='warning'>[territory] is unsuitable for tagging.</span>"
return
@@ -481,6 +482,8 @@
user << "<span class='notice'>You finish [instant ? "spraying" : "drawing"] [temp].</span>"
if(instant<0)
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
if(uses < 0)
return
uses = max(0,uses-1)
if(!uses)
user << "<span class='warning'>There is no more of [src.name] left!</span>"
@@ -492,6 +495,8 @@
if(edible && (M == user))
user << "You take a bite of the [src.name]. Delicious!"
user.nutrition += 5
if(uses < 0)
return
uses = max(0,uses-5)
if(!uses)
user << "<span class='warning'>There is no more of [src.name] left!</span>"
+1 -1
View File
@@ -211,7 +211,7 @@ var/global/list/RPD_recipes=list(
if(found)
preview=new /icon(I.icon,I.icon_state)
if(screen == I.categoryId)
if(I.id == p_type)
if(I.id == p_type && p_class >= 0)
datbuild += "<span class='linkOn'>[label]</span>"
else
datbuild += I.Render(src,label)
+4 -4
View File
@@ -196,22 +196,22 @@ update_label("John Doe", "Clowny")
icon_state = "centcom"
registered_name = "Emergency Response Team Commander"
assignment = "Emergency Response Team Commander"
New() access = get_all_accesses()+get_ert_access("commander")
New() access = get_all_accesses()+get_ert_access("commander")-access_change_ids
/obj/item/weapon/card/id/ert/Security
registered_name = "Security Response Officer"
assignment = "Security Response Officer"
New() access = get_all_accesses()+get_ert_access("sec")
New() access = get_all_accesses()+get_ert_access("sec")-access_change_ids
/obj/item/weapon/card/id/ert/Engineer
registered_name = "Engineer Response Officer"
assignment = "Engineer Response Officer"
New() access = get_all_accesses()+get_ert_access("eng")
New() access = get_all_accesses()+get_ert_access("eng")-access_change_ids
/obj/item/weapon/card/id/ert/Medical
registered_name = "Medical Response Officer"
assignment = "Medical Response Officer"
New() access = get_all_accesses()+get_ert_access("med")
New() access = get_all_accesses()+get_ert_access("med")-access_change_ids
/obj/item/weapon/card/id/prisoner
name = "prisoner ID card"