Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Tastyfish
2012-01-24 15:47:07 -05:00
54 changed files with 1176 additions and 272 deletions
+7
View File
@@ -202,6 +202,12 @@
else
jobs += "<BR><a href='?src=\ref[src];jobban3=Syndicate;jobban4=\ref[M]'>[dd_replacetext("Syndicate", " ", "&nbsp")]</a> "
if(jobban_isbanned(M, "Emergency Response Team"))
jobs += "<BR><a href='?src=\ref[src];jobban3=Emergency Response Team;jobban4=\ref[M]'><font color=red>[dd_replacetext("Emergency Response Team", " ", "&nbsp")]</font></a> "
else
jobs += "<BR><a href='?src=\ref[src];jobban3=Emergency Response Team;jobban4=\ref[M]'>[dd_replacetext("Emergency Response Team", " ", "&nbsp")]</a> "
if(jobban_isbanned(M, "pAI"))
jobs += "<BR><a href='?src=\ref[src];jobban3=pAI;jobban4=\ref[M]'><font color=red>pAI</font></a> "
else
@@ -333,6 +339,7 @@
jobs += "<a href='?src=\ref[src];newjobban2=Scientist_RD;jobban4=\ref[M]'>Scientist+RD</a> <br>"
jobs += "<a href='?src=\ref[src];newjobban2=AI_Cyborg;jobban4=\ref[M]'>AI+Cyborg</a> <br>"
jobs += "<a href='?src=\ref[src];newjobban2=Detective_HoS;jobban4=\ref[M]'>Detective+HoS</a> <br><br>"
jobs += "<a href='?src=\ref[src];newjobban2=ERT;jobban4=\ref[M]'>Emergency Response Team</a> <br><br>"
for(var/datum/job/job in job_master.occupations)
if(job.title == "Tourist")
continue
+6 -5
View File
@@ -480,6 +480,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
"assassin",
"death commando",
"syndicate commando",
"response team",
"centcom official",
"centcom commander",
"special ops officer",
@@ -677,6 +678,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if("syndicate commando")
M.equip_syndicate_commando()
if("response team")
M.equip_strike_team()
if("centcom official")
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_officer(M), M.slot_w_uniform)
M.equip_if_possible(new /obj/item/clothing/shoes/black(M), M.slot_shoes)
@@ -686,7 +690,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/clothing/glasses/sunglasses/V = new(M)
V.loc = K
M.equip_if_possible(K, M.slot_wear_suit)
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), M.slot_s_store)
M.equip_if_possible(new /obj/item/weapon/gun/energy/gun(M), M.slot_s_store)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
@@ -694,10 +698,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_if_possible(pda, M.slot_r_store)
var/obj/item/weapon/clipboard/G = new(M)
G.pen = new /obj/item/weapon/pen(G)
M.equip_if_possible(G, M.slot_l_store)
M.equip_if_possible(new /obj/item/weapon/clipboard(M), M.slot_l_store)
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
+11
View File
@@ -2187,6 +2187,17 @@
..()
reagents.add_reagent("cryoxadone", 30)
/obj/item/weapon/reagent_containers/glass/beaker/tricordrazine
name = "beaker"
desc = "A beaker. Can hold up to 50 units."
icon = 'chemical.dmi'
icon_state = "beaker0"
item_state = "beaker"
New()
..()
reagents.add_reagent("tricordrazine", 30)
/obj/item/weapon/reagent_containers/food/drinks/golden_cup
desc = "A golden cup"
name = "golden cup"
@@ -14,7 +14,7 @@ Doesn't work on other aliens/AI.*/
src << "\green Not enough plasma stored."
return 0
else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space)))
src << "\green Bad place for a garden!"
src << "\green Weeds would not be able to survive here."
return 0
else return 1
@@ -133,35 +133,32 @@ I kind of like the right click only--the window version can get a little confusi
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
break
else
src << "\red That vent is welded."
if(vent_found)
var/list/vents = list()
if(vent_found.network&&vent_found.network.normal_members.len)
var/list/ventAreas = list() // A list of the areas of all the vents you can go to.
var/list/vents = list() // The list of vent objects you can go to.
if(vent_found.network && vent_found.network.normal_members.len)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.loc == loc)
if(temp_vent.loc == loc || temp_vent.loc.z != loc.z)
continue
if(temp_vent.welded)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
if(vent.welded)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
// Hacky way of hopefully preventing a runtime error from happening
if(vents.len < selection_position)
vents.len = selection_position//What the fuck is this I dont even, Right will likely have to fix this later
var/atom/a = get_turf_loc(temp_vent)
ventAreas.Add(a.loc)
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
var/turf/startLoc = loc
var/area/destArea = input("Select a destination.", "Duct System") in ventAreas
var/destAreaIndex = ventAreas.Find(destArea)
if(loc==startLoc)
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[destAreaIndex]
if(target_vent)
for(var/mob/O in viewers(src, null))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
@@ -178,7 +175,7 @@ I kind of like the right click only--the window version can get a little confusi
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
if(!target_vent.welded)
for(var/mob/O in hearers(target_vent, null))
O.show_message("You hear something crawling trough the ventilation pipes.",2)
O.show_message("You hear something crawling through the ventilation pipes.",2)
spawn(travel_time)
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
@@ -121,11 +121,12 @@
if (src.stat == 1 || stat == 2)
usr << "\red [name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep."
if((health < 0 || stat == 1) && distance <= 3)
if(health < 0 && distance <= 3)
usr << "\red [name] does not appear to be breathing."
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0 && src.stat == 1 && distance <= 1)
for(var/mob/O in viewers(usr.loc, null))
O.show_message("[usr] checks [src]'s pulse.", 1)
sleep(15)
usr << "\blue [name] has a pulse!"
if (src.stat == 2 || (changeling && changeling.changeling_fakedeath == 1))
@@ -133,6 +134,7 @@
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
for(var/mob/O in viewers(usr.loc, null))
O.show_message("[usr] checks [src]'s pulse.", 1)
sleep(15)
usr << "\red [name] has no pulse!"
else
if (src.getBruteLoss())
+15 -7
View File
@@ -1469,7 +1469,7 @@
del(src)
return
if("internal")
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && istype(target.back, /obj/item/weapon/tank) && !( target.internal )) ) && !( target.internal )))
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && (istype(target.back, /obj/item/weapon/tank) || istype(target.belt, /obj/item/weapon/tank) || istype(target.s_store, /obj/item/weapon/tank)) && !( target.internal )) ) && !( target.internal )))
//SN src = null
del(src)
return
@@ -2118,11 +2118,11 @@ It can still be worn/put on as normal.
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(target.back, /obj/item/weapon/tank))
if (istype(target.back, /obj/item/weapon/tank) && (internalloc == "back" || !internalloc))
target.internal = target.back
else if (istype(target.s_store, /obj/item/weapon/tank))
else if (istype(target.s_store, /obj/item/weapon/tank) && (internalloc == "store" || !internalloc))
target.internal = target.s_store
else if (istype(target.belt, /obj/item/weapon/tank))
else if (istype(target.belt, /obj/item/weapon/tank) && (internalloc == "belt" || !internalloc))
target.internal = target.belt
if (target.internal)
for(var/mob/M in viewers(target, 1))
@@ -2136,10 +2136,16 @@ It can still be worn/put on as normal.
if(target)
target.update_clothing()
//SN src = null
for(var/mob/living/carbon/M in oview(1,target))
if(M.machine == target)
target.interact(M)
del(src)
return
/mob/living/carbon/human/show_inv(mob/user as mob)
interact(user)
/mob/living/carbon/human/proc/interact(mob/user as mob)
user.machine = src
var/dat = {"
@@ -2154,12 +2160,12 @@ It can still be worn/put on as normal.
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A> [(istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal;loc=belt'>Set Internal</A>", src) : ""]
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A>[(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal;loc=back'>Set Internal</A>", src) : ""]
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A>
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [(istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal;loc=store'>Set Internal</A>", src) : ""]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
@@ -2335,6 +2341,8 @@ It can still be worn/put on as normal.
O.s_loc = usr.loc
O.t_loc = loc
O.place = href_list["item"]
if(href_list["loc"])
O.internalloc = href_list["loc"]
requests += O
spawn( 0 )
O.process()
+37 -1
View File
@@ -753,18 +753,36 @@
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
else if(istype(module_state_1,/obj/item/weapon/zippo))
var/obj/item/weapon/zippo/Z = module_state_1
Z.lit = 1
Z.icon_state = "zippoon"
Z.item_state = "zippoon"
processing_objects.Add(Z)
else if(!module_state_2)
module_state_2 = O
O.layer = 20
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
else if(istype(module_state_2,/obj/item/weapon/zippo))
var/obj/item/weapon/zippo/Z = module_state_2
Z.lit = 1
Z.icon_state = "zippoon"
Z.item_state = "zippoon"
processing_objects.Add(Z)
else if(!module_state_3)
module_state_3 = O
O.layer = 20
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode
else if(istype(module_state_3,/obj/item/weapon/zippo))
var/obj/item/weapon/zippo/Z = module_state_3
Z.lit = 1
Z.icon_state = "zippoon"
Z.item_state = "zippoon"
processing_objects.Add(Z)
else
src << "You need to disable a module first!"
installed_modules()
@@ -773,12 +791,30 @@
var/obj/item/O = locate(href_list["deact"])
if(activated(O))
if(module_state_1 == O)
if(istype(module_state_1, /obj/item/weapon/zippo))
var/obj/item/weapon/zippo/Z = module_state_1
Z.lit = 0
Z.icon_state = "zippo"
Z.item_state = "zippo"
processing_objects.Remove(Z)
module_state_1 = null
contents -= O
else if(module_state_2 == O)
module_state_2 = null
if(istype(module_state_2, /obj/item/weapon/zippo))
var/obj/item/weapon/zippo/Z = module_state_2
Z.lit = 0
Z.icon_state = "zippo"
Z.item_state = "zippo"
processing_objects.Remove(Z)
module_state_2= null
contents -= O
else if(module_state_3 == O)
if(istype(module_state_3, /obj/item/weapon/zippo))
var/obj/item/weapon/zippo/Z = module_state_3
Z.lit = 0
Z.icon_state = "zippo"
Z.item_state = "zippo"
processing_objects.Remove(Z)
module_state_3 = null
contents -= O
else
@@ -193,10 +193,7 @@
src.modules += M
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
var/obj/item/weapon/zippo/L = new /obj/item/weapon/zippo(src)
L.lit = 1
src.modules += L
src.modules += new /obj/item/weapon/zippo(src)
src.modules += new /obj/item/weapon/tray(src)
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/shaker(src)
+3 -9
View File
@@ -270,15 +270,9 @@
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if (ticker.current_state == GAME_STATE_PLAYING)
var/ailist[] = list()
for (var/mob/living/silicon/ai/A in world)
if (!A.stat)
ailist += A
if (ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
if(character.mind)
if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE"))
announcer.say("[character.real_name] has signed up as [rank].")
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)
a.autosay("[character.real_name] has arrived on the station.", "Arrivals Announcement Computer")
del(a)
proc/ManifestLateSpawn(var/mob/living/carbon/human/H, icon/H_icon) // Attempted fix to add late joiners to various databases -- TLE
+2
View File
@@ -44,6 +44,8 @@
M.show_message(rendered, 2)
/mob/proc/say_understands(var/mob/other)
if(!other)
return 1
if (src.stat == 2)
return 1
else if (istype(other, src.type))
+175
View File
@@ -0,0 +1,175 @@
//Baseline portable generator. Has all the default handling. Not intended to be used on it's own (since it generates unlimited power).
/obj/machinery/power/port_gen/pacman2
name = "Pacman II"
desc = "P.A.C.M.A.N. type II portable generator. Uses liquid plasma as a fuel source."
power_gen = 4500
var
obj/item/weapon/tank/plasma/P = null
board_path = "/obj/item/weapon/circuitboard/pacman2"
emagged = 0
heat = 0
/*
process()
if(P)
if(P.air_contents.toxins <= 0)
P.air_contents.toxins = 0
eject()
else
P.air_contents.toxins -= 0.001
return
*/
HasFuel()
if(P.air_contents.toxins >= 0.1)
return 1
return 0
UseFuel()
P.air_contents.toxins -= 0.01
return
New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new board_path(src)
RefreshParts()
RefreshParts()
var/temp_rating = 0
var/temp_reliability = 0
for(var/obj/item/weapon/stock_parts/SP in component_parts)
if(istype(SP, /obj/item/weapon/stock_parts/matter_bin))
//max_coins = SP.rating * SP.rating * 1000
else if(istype(SP, /obj/item/weapon/stock_parts/micro_laser) || istype(SP, /obj/item/weapon/stock_parts/capacitor))
temp_rating += SP.rating
for(var/obj/item/weapon/CP in component_parts)
temp_reliability += CP.reliability
reliability = min(round(temp_reliability / 4), 100)
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
examine()
..()
usr << "\blue The generator has [P.air_contents.toxins] units of fuel left, producing [power_gen] per cycle."
if(crit_fail) usr << "\red The generator seems to have broken down."
handleInactive()
heat -= 2
if (heat < 0)
heat = 0
else
for(var/mob/M in viewers(1, src))
if (M.client && M.machine == src)
src.updateUsrDialog()
proc
overheat()
explosion(src.loc, 2, 5, 2, -1)
attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/tank/plasma))
if(P)
user << "\red The generator already has a plasma tank loaded!"
return
P = O
user.drop_item()
O.loc = src
user << "\blue You add the plasma tank to the generator."
else if (istype(O, /obj/item/weapon/card/emag))
emagged = 1
emp_act(1)
else if(!active)
if(istype(O, /obj/item/weapon/wrench))
anchored = !anchored
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
if(anchored)
user << "\blue You secure the generator to the floor."
else
user << "\blue You unsecure the generator from the floor."
makepowernets()
else if(istype(O, /obj/item/weapon/screwdriver))
open = !open
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(open)
user << "\blue You open the access panel."
else
user << "\blue You close the access panel."
else if(istype(O, /obj/item/weapon/crowbar) && !open)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)
if(I.reliability < 100)
I.crit_fail = 1
I.loc = src.loc
new_frame.state = 2
new_frame.icon_state = "box_1"
del(src)
attack_hand(mob/user as mob)
..()
if (!anchored)
return
interact(user)
attack_ai(mob/user as mob)
interact(user)
attack_paw(mob/user as mob)
interact(user)
proc
interact(mob/user)
if (get_dist(src, user) > 1 )
if (!istype(user, /mob/living/silicon/ai))
user.machine = null
user << browse(null, "window=port_gen")
return
user.machine = src
var/dat = text("<b>[name]</b><br>")
if (active)
dat += text("Generator: <A href='?src=\ref[src];action=disable'>On</A><br>")
else
dat += text("Generator: <A href='?src=\ref[src];action=enable'>Off</A><br>")
if(P)
dat += text("Currently loaded plasma tank: [P.air_contents.toxins]<br>")
else
dat += text("No plasma tank currently loaded.<br>")
dat += text("Power output: <A href='?src=\ref[src];action=lower_power'>-</A> [power_gen * power_output] <A href='?src=\ref[src];action=higher_power'>+</A><br>")
dat += text("Heat: [heat]<br>")
dat += "<br><A href='?src=\ref[src];action=close'>Close</A>"
user << browse("[dat]", "window=port_gen")
Topic(href, href_list)
if(..())
return
src.add_fingerprint(usr)
if(href_list["action"])
if(href_list["action"] == "enable")
if(!active && HasFuel() && !crit_fail)
active = 1
icon_state = "portgen1"
src.updateUsrDialog()
if(href_list["action"] == "disable")
if (active)
active = 0
icon_state = "portgen0"
src.updateUsrDialog()
if(href_list["action"] == "lower_power")
if (power_output > 1)
power_output--
src.updateUsrDialog()
if (href_list["action"] == "higher_power")
if (power_output < 4 || emagged)
power_output++
src.updateUsrDialog()
if (href_list["action"] == "close")
usr << browse(null, "window=port_gen")
usr.machine = null
+2 -1
View File
@@ -327,4 +327,5 @@ display round(lastgen) and plasmatank amount
time_per_coin = 60
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
overheat()
explosion(src.loc, 4, 4, 4, -1)
explosion(src.loc, 4, 4, 4, -1)
+12
View File
@@ -37,6 +37,18 @@
for(var/obj/O in contents)
O.emp_act(severity)
attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (M == user && user.zone_sel.selecting == "mouth" && load_into_chamber())
M.visible_message("\red [user] sticks their gun in their mouth, ready to pull the trigger...")
if(!do_after(user, 40))
M.visible_message("\blue [user] decided life was worth living")
return
M.visible_message("\red [user] pulls the trigger.")
M.apply_damage(70, BRUTE, "head")
M.apply_damage(110, BRUTE, "chest")
return
else
return ..()
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)//TODO: go over this
if(flag) return //we're placing gun on a table or in backpack