Merge branch 'master' into surgery

Conflicts:
	code/WorkInProgress/surgery.dm
	code/modules/mob/living/carbon/carbon_defines.dm
This commit is contained in:
Chinsky
2013-01-15 13:42:13 +04:00
691 changed files with 46179 additions and 41058 deletions
+36 -13
View File
@@ -606,11 +606,11 @@ proc/process_ghost_teleport_locs()
icon_state = "fsmaint"
/area/maintenance/asmaint
name = "Library Maintenance"
name = "Medbay Maintenance"
icon_state = "asmaint"
/area/maintenance/asmaint2
name = "Med-Sci Maintenance"
name = "Science Maintenance"
icon_state = "asmaint"
/area/maintenance/apmaint
@@ -634,7 +634,7 @@ proc/process_ghost_teleport_locs()
icon_state = "pmaint"
/area/maintenance/aft
name = "Robotics Maintenance"
name = "Engineering Maintenance"
icon_state = "amaint"
/area/maintenance/storage
@@ -696,7 +696,7 @@ proc/process_ghost_teleport_locs()
music = null
/area/crew_quarters/captain
name = "\improper Captain's Quarters"
name = "\improper Captain's Office"
icon_state = "captain"
/area/crew_quarters/heads/hop
@@ -887,10 +887,10 @@ proc/process_ghost_teleport_locs()
engineering
name = "Engineering"
icon_state = "engine"
icon_state = "engine_smes"
break_room
name = "\improper Engineering Break Room"
name = "\improper Engineering Foyer"
icon_state = "engine"
chiefs_office
@@ -947,17 +947,24 @@ proc/process_ghost_teleport_locs()
/area/assembly/chargebay
name = "\improper Recharging Bay"
name = "\improper Mech Bay"
icon_state = "mechbay"
/area/assembly/showroom
name = "\improper Robotics Showroom"
icon_state = "showroom"
/area/assembly/assembly_line
name = "\improper Robotics Assembly Line"
/area/assembly/robotics
name = "\improper Robotics Lab"
icon_state = "ass_line"
/area/assembly/assembly_line //Derelict Assembly Line
name = "\improper Assembly Line"
icon_state = "ass_line"
power_equip = 0
power_light = 0
power_environ = 0
//Teleporter
/area/teleporter
@@ -965,7 +972,7 @@ proc/process_ghost_teleport_locs()
icon_state = "teleporter"
music = "signal"
/area/teleporter/gateway
/area/gateway
name = "\improper Gateway"
icon_state = "teleporter"
music = "signal"
@@ -1042,7 +1049,7 @@ proc/process_ghost_teleport_locs()
icon_state = "cloning"
/area/medical/sleeper
name = "\improper Medical Sleeper Room"
name = "Medbay Treatment Center"
icon_state = "exam_room"
//Security
@@ -1112,6 +1119,22 @@ proc/process_ghost_teleport_locs()
name = "\improper Security Checkpoint"
icon_state = "security"
/area/security/checkpoint/supply
name = "Security Post - Cargo Bay"
icon_state = "checkpoint1"
/area/security/checkpoint/engineering
name = "Security Post - Engineering"
icon_state = "checkpoint1"
/area/security/checkpoint/medical
name = "Security Post - Medbay"
icon_state = "checkpoint1"
/area/security/checkpoint/science
name = "Security Post - Science"
icon_state = "checkpoint1"
/area/security/vacantoffice
name = "\improper Vacant Office"
icon_state = "security"
@@ -1163,7 +1186,7 @@ proc/process_ghost_teleport_locs()
//Toxins
/area/toxins/lab
name = "\improper Research Hallway"
name = "\improper Research and Development"
icon_state = "toxlab"
/area/toxins/hallway
@@ -1400,7 +1423,7 @@ proc/process_ghost_teleport_locs()
icon_state = "ai_upload"
/area/turret_protected/ai_upload_foyer
name = "Secure Network Access"
name = "AI Upload Access"
icon_state = "ai_foyer"
/area/turret_protected/ai
+23 -33
View File
@@ -236,6 +236,9 @@ its easier to just keep the beam vertical.
/atom/proc/blob_act()
return
/atom/proc/fire_act()
return
/atom/proc/attack_hand(mob/user as mob)
return
@@ -270,8 +273,8 @@ its easier to just keep the beam vertical.
/atom/proc/attack_larva(mob/user as mob)
return
// for metroids
/atom/proc/attack_metroid(mob/user as mob)
// for slimes
/atom/proc/attack_slime(mob/user as mob)
return
/atom/proc/hand_h(mob/user as mob) //human (hand) - restrained
@@ -291,7 +294,7 @@ its easier to just keep the beam vertical.
src.hand_p(user)
return
/atom/proc/hand_m(mob/user as mob) //metroid - restrained
/atom/proc/hand_m(mob/user as mob) //slime - restrained
return
@@ -528,20 +531,7 @@ its easier to just keep the beam vertical.
var/turf/simulated/source2 = src
new /obj/effect/decal/cleanable/oil(source2)
/atom/proc/clean_prints()
if(istype(fingerprints, /list))
//Smudge up dem prints some
for(var/P in fingerprints)
var/test_print = stars(fingerprints[P], rand(10,20))
if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left)
fingerprints.Remove(P)
else
fingerprints[P] = test_print
if(!fingerprints.len)
del(fingerprints)
/atom/proc/clean_blood()
clean_prints()
src.germ_level = 0
if(istype(blood_DNA, /list))
del(blood_DNA)
@@ -602,8 +592,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.attack_paw(usr)
else if(isalienadult(usr))
src.attack_alien(usr)
else if(ismetroid(usr))
src.attack_metroid(usr)
else if(isslime(usr))
src.attack_slime(usr)
else if(isanimal(usr))
src.attack_animal(usr)
else
@@ -621,7 +611,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.hand_p(usr, usr.hand)
else if(isalienadult(usr))
src.hand_al(usr, usr.hand)
else if(ismetroid(usr))
else if(isslime(usr))
return
else if(isanimal(usr))
return
@@ -832,28 +822,28 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if ( !alien.restrained() )
attack_larva(alien)
else if(ismetroid(usr))
var/mob/living/carbon/metroid/metroid = usr
//-metroid stuff-
else if(isslime(usr))
var/mob/living/carbon/slime/slime = usr
//-slime stuff-
if(metroid.stat)
if(slime.stat)
return
var/in_range = in_range(src, metroid) || src.loc == metroid
var/in_range = in_range(src, slime) || src.loc == slime
if (in_range)
if ( !metroid.restrained() )
if ( !slime.restrained() )
if (W)
attackby(W,metroid)
attackby(W,slime)
if (W)
W.afterattack(src, metroid)
W.afterattack(src, slime)
else
attack_metroid(metroid)
attack_slime(slime)
else
hand_m(metroid, metroid.hand)
hand_m(slime, slime.hand)
else
if ( (W) && !metroid.restrained() )
W.afterattack(src, metroid)
if ( (W) && !slime.restrained() )
W.afterattack(src, slime)
else if(isanimal(usr))
@@ -1165,8 +1155,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.attack_larva(usr)
else if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
src.attack_ai(usr, usr.hand)
else if(istype(usr, /mob/living/carbon/metroid))
src.attack_metroid(usr)
else if(istype(usr, /mob/living/carbon/slime))
src.attack_slime(usr)
else if(istype(usr, /mob/living/simple_animal))
src.attack_animal(usr)
else
+1 -1
View File
@@ -90,7 +90,7 @@
while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf))
// only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up
if(error < 0)
var/atom/step = get_step(src, dy)
+2 -3
View File
@@ -106,11 +106,10 @@ var/list/radiochannels = list(
"Security" = 1359,
"Deathsquad" = 1441,
"Syndicate" = 1213,
"Mining" = 1349,
"Cargo" = 1347,
"Supply" = 1347,
)
//depenging helpers
var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1349,1347)
var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1347)
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
var/const/SYND_FREQ = 1213
+64 -43
View File
@@ -680,6 +680,19 @@
/////////////////////////// DNA MACHINES
/obj/machinery/dna_scannernew
name = "\improper DNA modifier"
desc = "It scans DNA structures."
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "scanner_0"
density = 1
var/locked = 0.0
var/mob/occupant = null
anchored = 1.0
use_power = 1
idle_power_usage = 50
active_power_usage = 300
/obj/machinery/dna_scannernew/New()
..()
component_parts = list()
@@ -838,6 +851,7 @@
A.loc = src.loc
del(src)
/obj/machinery/computer/scan_consolenew/ex_act(severity)
switch(severity)
@@ -993,31 +1007,32 @@
src.temphtml = text("No viable occupant detected.")//More than anything, this just acts as a sanity check in case the option DOES appear for whatever reason
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
src.delete = 1
src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
sleep(10*src.radduration)
if (!src.connected.occupant)
else
src.delete = 1
src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
sleep(10*src.radduration)
if (!src.connected.occupant)
temphtml = null
delete = 0
return null
if (prob(95))
if(prob(75))
randmutb(src.connected.occupant)
else
randmuti(src.connected.occupant)
else
if(prob(95))
randmutg(src.connected.occupant)
else
randmuti(src.connected.occupant)
src.connected.occupant.radiation += ((src.radstrength*3)+src.radduration*3)
src.connected.locked = lock_state
temphtml = null
delete = 0
return null
if (prob(95))
if(prob(75))
randmutb(src.connected.occupant)
else
randmuti(src.connected.occupant)
else
if(prob(95))
randmutg(src.connected.occupant)
else
randmuti(src.connected.occupant)
src.connected.occupant.radiation += ((src.radstrength*3)+src.radduration*3)
src.connected.locked = lock_state
temphtml = null
delete = 0
if (href_list["radset"])
src.temphtml = text("Radiation Duration: <B><font color='green'>[]</B></FONT><BR>", src.radduration)
src.temphtml += text("Radiation Intensity: <font color='green'><B>[]</B></FONT><BR><BR>", src.radstrength)
@@ -1056,21 +1071,22 @@
src.temphtml = text("No viable occupant detected.")
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
//src.temphtml = text("Unique Identifier: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.uni_identity)
//src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
else
//src.temphtml = text("Unique Identifier: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.uni_identity)
//src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
// New way of displaying DNA blocks
src.temphtml = text("Unique Identifier: <font color='blue'>[getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3, src,1)]</FONT><br><br>")
// New way of displaying DNA blocks
src.temphtml = text("Unique Identifier: <font color='blue'>[getblockstring(src.connected.occupant.dna.uni_identity,uniblock,subblock,3, src,1)]</FONT><br><br>")
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.uniblock)
src.temphtml += text("<A href='?src=\ref[];unimenuminus=1'><-</A> Block <A href='?src=\ref[];unimenuplus=1'>-></A><BR><BR>", src, src)
src.temphtml += text("Selected Sub-Block: <font color='blue'><B>[]</B></FONT><BR>", src.subblock)
src.temphtml += text("<A href='?src=\ref[];unimenusubminus=1'><-</A> Sub-Block <A href='?src=\ref[];unimenusubplus=1'>-></A><BR><BR>", src, src)
src.temphtml += text("Selected Target: <font color='blue'><B>[]</B></FONT><BR>", src.unitargethex)
src.temphtml += text("<A href='?src=\ref[];unimenutargetminus=1'><-</A> Target <A href='?src=\ref[];unimenutargetplus=1'>-></A><BR><BR>", src, src)
src.temphtml += "<B>Modify Block:</B><BR>"
src.temphtml += text("<A href='?src=\ref[];unipulse=1'>Irradiate</A><BR>", src)
src.delete = 0
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.uniblock)
src.temphtml += text("<A href='?src=\ref[];unimenuminus=1'><-</A> Block <A href='?src=\ref[];unimenuplus=1'>-></A><BR><BR>", src, src)
src.temphtml += text("Selected Sub-Block: <font color='blue'><B>[]</B></FONT><BR>", src.subblock)
src.temphtml += text("<A href='?src=\ref[];unimenusubminus=1'><-</A> Sub-Block <A href='?src=\ref[];unimenusubplus=1'>-></A><BR><BR>", src, src)
src.temphtml += text("Selected Target: <font color='blue'><B>[]</B></FONT><BR>", src.unitargethex)
src.temphtml += text("<A href='?src=\ref[];unimenutargetminus=1'><-</A> Target <A href='?src=\ref[];unimenutargetplus=1'>-></A><BR><BR>", src, src)
src.temphtml += "<B>Modify Block:</B><BR>"
src.temphtml += text("<A href='?src=\ref[];unipulse=1'>Irradiate</A><BR>", src)
src.delete = 0
if (href_list["unimenuplus"])
if (src.uniblock < 13)
src.uniblock++
@@ -1188,15 +1204,20 @@
src.temphtml = text("No viable occupant detected.")
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
var/mob/living/carbon/human/H = src.connected.occupant
if(H)
if (H.reagents.get_reagent_amount("inaprovaline") < 60)
H.reagents.add_reagent("inaprovaline", 30)
usr << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", H.reagents.get_reagent_amount("inaprovaline"))
src.delete = 0
else
var/mob/living/carbon/human/H = src.connected.occupant
if(H)
if (H.reagents.get_reagent_amount("inaprovaline") < 60)
H.reagents.add_reagent("inaprovaline", 30)
usr << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", H.reagents.get_reagent_amount("inaprovaline"))
src.delete = 0
////////////////////////////////////////////////////////
if (href_list["strucmenu"])
if(src.connected.occupant)
if(!src.connected.occupant || !src.connected.occupant.dna)
src.temphtml = text("No viable occupant detected.")
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
else
// Get this shit outta here it sucks
//src.temphtml = text("Structural Enzymes: <font color='blue'>[getleftblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)][getrightblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)]</FONT><BR><BR>")
//src.temphtml = text("Structural Enzymes: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.struc_enzymes)
+3 -1
View File
@@ -109,7 +109,9 @@ var/list/blob_nodes = list()
if (1)
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/outbreak5.ogg')
autoexpand = 0//No more extra pulses
stage = -1
//next stage in 4-5 minutes
+44 -1
View File
@@ -19,5 +19,48 @@
run_action()
if(spores.len >= max_spores) return 0
new/obj/effect/critter/blob(src.loc, src)
new/mob/living/simple_animal/hostile/blobspore(src.loc, src)
return 1
/mob/living/simple_animal/hostile/blobspore
name = "blob"
desc = "Some blob thing."
icon = 'icons/mob/critter.dmi'
icon_state = "blobsquiggle"
icon_living = "blobsquiggle"
pass_flags = PASSBLOB
health = 20
maxHealth = 20
melee_damage_lower = 4
melee_damage_upper = 8
attacktext = "hits"
attack_sound = 'sound/weapons/genhit1.ogg'
var/obj/effect/blob/factory/factory = null
faction = "blob"
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
maxbodytemp = 360
New(loc, var/obj/effect/blob/factory/linked_node)
..()
if(istype(linked_node))
factory = linked_node
factory.spores += src
..(loc)
return
Die()
..()
if(factory)
factory.spores -= src
..()
del(src)
@@ -35,29 +35,29 @@
//Helper proc. Does all the checks and stuff for us to avoid copypasta
/mob/proc/changeling_power(var/required_chems=0, var/required_dna=0, var/max_genetic_damage=100, var/max_stat=0)
if(!usr) return
if(!usr.mind) return
if(!iscarbon(usr)) return
var/datum/changeling/changeling = usr.mind.changeling
if(!src.mind) return
if(!iscarbon(src)) return
var/datum/changeling/changeling = src.mind.changeling
if(!changeling)
world.log << "[usr] has the changeling_transform() verb but is not a changeling."
world.log << "[src] has the changeling_transform() verb but is not a changeling."
return
if(usr.stat > max_stat)
usr << "<span class='warning'>We are incapacitated.</span>"
if(src.stat > max_stat)
src << "<span class='warning'>We are incapacitated.</span>"
return
if(changeling.absorbed_dna.len < required_dna)
usr << "<span class='warning'>We require at least [required_dna] samples of compatible DNA.</span>"
src << "<span class='warning'>We require at least [required_dna] samples of compatible DNA.</span>"
return
if(changeling.chem_charges < required_chems)
usr << "<span class='warning'>We require at least [required_chems] units of chemicals to do that!</span>"
src << "<span class='warning'>We require at least [required_chems] units of chemicals to do that!</span>"
return
if(changeling.geneticdamage > max_genetic_damage)
usr << "<span class='warning'>Our geneomes are still reassembling. We need time to recover first.</span>"
src << "<span class='warning'>Our geneomes are still reassembling. We need time to recover first.</span>"
return
return changeling
@@ -72,55 +72,55 @@
var/datum/changeling/changeling = changeling_power(0,0,100)
if(!changeling) return
var/obj/item/weapon/grab/G = usr.get_active_hand()
var/obj/item/weapon/grab/G = src.get_active_hand()
if(!istype(G))
usr << "<span class='warning'>We must be grabbing a creature in our active hand to absorb them.</span>"
src << "<span class='warning'>We must be grabbing a creature in our active hand to absorb them.</span>"
return
var/mob/living/carbon/human/T = G.affecting
if(!istype(T))
usr << "<span class='warning'>[T] is not compatible with our biology.</span>"
src << "<span class='warning'>[T] is not compatible with our biology.</span>"
return
if(NOCLONE in T.mutations)
usr << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
return
if(!G.killing)
usr << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
src << "<span class='warning'>We must have a tighter grip to absorb this creature.</span>"
return
if(changeling.isabsorbing)
usr << "<span class='warning'>We are already absorbing!</span>"
src << "<span class='warning'>We are already absorbing!</span>"
return
changeling.isabsorbing = 1
for(var/stage = 1, stage<=3, stage++)
switch(stage)
if(1)
usr << "<span class='notice'>This creature is compatible. We must hold still...</span>"
src << "<span class='notice'>This creature is compatible. We must hold still...</span>"
if(2)
usr << "<span class='notice'>We extend a proboscis.</span>"
usr.visible_message("<span class='warning'>[usr] extends a proboscis!</span>")
src << "<span class='notice'>We extend a proboscis.</span>"
src.visible_message("<span class='warning'>[src] extends a proboscis!</span>")
if(3)
usr << "<span class='notice'>We stab [T] with the proboscis.</span>"
usr.visible_message("<span class='danger'>[usr] stabs [T] with the proboscis!</span>")
src << "<span class='notice'>We stab [T] with the proboscis.</span>"
src.visible_message("<span class='danger'>[src] stabs [T] with the proboscis!</span>")
T << "<span class='danger'>You feel a sharp stabbing pain!</span>"
T.take_overall_damage(40)
feedback_add_details("changeling_powers","A[stage]")
if(!do_mob(usr, T, 150))
usr << "<span class='warning'>Our absorption of [T] has been interrupted!</span>"
if(!do_mob(src, T, 150))
src << "<span class='warning'>Our absorption of [T] has been interrupted!</span>"
changeling.isabsorbing = 0
return
usr << "<span class='notice'>We have absorbed [T]!</span>"
usr.visible_message("<span class='danger'>[usr] sucks the fluids from [T]!</span>")
src << "<span class='notice'>We have absorbed [T]!</span>"
src.visible_message("<span class='danger'>[src] sucks the fluids from [T]!</span>")
T << "<span class='danger'>You have been absorbed by the changeling!</span>"
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
changeling.absorbed_dna |= T.dna
if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400)
if(src.nutrition < 400) src.nutrition = min((src.nutrition + T.nutrition), 400)
changeling.chem_charges += 10
changeling.geneticpoints += 2
@@ -143,7 +143,7 @@
if(!Tp.isVerb)
call(Tp.verbpath)()
else
usr.make_changeling()
src.make_changeling()
changeling.chem_charges += T.mind.changeling.chem_charges
changeling.geneticpoints += T.mind.changeling.geneticpoints
@@ -179,15 +179,15 @@
return
changeling.chem_charges -= 5
usr.visible_message("<span class='warning'>[usr] transforms!</span>")
src.visible_message("<span class='warning'>[src] transforms!</span>")
changeling.geneticdamage = 30
usr.dna = chosen_dna
usr.real_name = chosen_dna.real_name
updateappearance(usr, usr.dna.uni_identity)
domutcheck(usr, null)
src.dna = chosen_dna
src.real_name = chosen_dna.real_name
updateappearance(src, src.dna.uni_identity)
domutcheck(src, null)
usr.verbs -= /mob/proc/changeling_transform
spawn(10) usr.verbs += /mob/proc/changeling_transform
src.verbs -= /mob/proc/changeling_transform
spawn(10) src.verbs += /mob/proc/changeling_transform
feedback_add_details("changeling_powers","TR")
return 1
@@ -201,7 +201,7 @@
var/datum/changeling/changeling = changeling_power(1,0,0)
if(!changeling) return
var/mob/living/carbon/C = usr
var/mob/living/carbon/C = src
changeling.chem_charges--
C.remove_changeling_powers()
C.visible_message("<span class='warning'>[C] transforms!</span>")
@@ -216,7 +216,7 @@
C.monkeyizing = 1
C.canmove = 0
C.icon = null
C.overlays = null
C.overlays.Cut()
C.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
@@ -276,7 +276,7 @@
if(!chosen_dna)
return
var/mob/living/carbon/C = usr
var/mob/living/carbon/C = src
changeling.chem_charges--
C.remove_changeling_powers()
@@ -290,7 +290,7 @@
C.monkeyizing = 1
C.canmove = 0
C.icon = null
C.overlays = null
C.overlays.Cut()
C.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
animation.icon_state = "blank"
@@ -300,7 +300,7 @@
sleep(48)
del(animation)
for(var/obj/item/W in usr)
for(var/obj/item/W in src)
C.u_equip(W)
if (C.client)
C.client.screen -= W
@@ -350,7 +350,7 @@
var/datum/changeling/changeling = changeling_power(20,1,100,DEAD)
if(!changeling) return
var/mob/living/carbon/C = usr
var/mob/living/carbon/C = src
if(!C.stat && alert("Are we sure we wish to fake our death?",,"Yes","No") == "No")//Confirmation for living changelings if they want to fake their death
return
C << "<span class='notice'>We will attempt to regenerate our form.</span>"
@@ -380,7 +380,7 @@
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
C.reagents.clear_reagents()
C << "<span class='notice'>We have regenerated.</span>"
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
C.visible_message("<span class='warning'>[src] appears to wake from the dead, having healed all wounds.</span>")
C.status_flags &= ~(FAKEDEATH)
C.update_canmove()
@@ -398,10 +398,10 @@
var/datum/changeling/changeling = changeling_power(10,0,100)
if(!changeling) return 0
changeling.chem_charges -= 10
usr << "<span class='notice'>Your throat adjusts to launch the sting.</span>"
src << "<span class='notice'>Your throat adjusts to launch the sting.</span>"
changeling.sting_range = 2
usr.verbs -= /mob/proc/changeling_boost_range
spawn(5) usr.verbs += /mob/proc/changeling_boost_range
src.verbs -= /mob/proc/changeling_boost_range
spawn(5) src.verbs += /mob/proc/changeling_boost_range
feedback_add_details("changeling_powers","RS")
return 1
@@ -416,7 +416,7 @@
if(!changeling) return 0
changeling.chem_charges -= 45
var/mob/living/carbon/human/C = usr
var/mob/living/carbon/human/C = src
C.stat = 0
C.SetParalysis(0)
C.SetStunned(0)
@@ -424,45 +424,44 @@
C.lying = 0
C.update_canmove()
usr.verbs -= /mob/proc/changeling_unstun
spawn(5) usr.verbs += /mob/proc/changeling_unstun
src.verbs -= /mob/proc/changeling_unstun
spawn(5) src.verbs += /mob/proc/changeling_unstun
feedback_add_details("changeling_powers","UNS")
return 1
//Speeds up chemical regeneration
/mob/proc/changeling_fastchemical()
usr.mind.changeling.chem_recharge_rate *= 2
src.mind.changeling.chem_recharge_rate *= 2
return 1
//Increases macimum chemical storage
/mob/proc/changeling_engorgedglands()
usr.mind.changeling.chem_storage += 25
src.mind.changeling.chem_storage += 25
return 1
//Prevents AIs tracking you but makes you easily detectable to the human-eye.
/mob/proc/changeling_digitalcamo()
set category = "Changeling"
set name = "Toggle Digital Camoflague (10)"
set name = "Toggle Digital Camoflague"
set desc = "The AI can no longer track us, but we will look different if examined. Has a constant cost while active."
var/datum/changeling/changeling = changeling_power(10)
var/datum/changeling/changeling = changeling_power()
if(!changeling) return 0
usr.mind.changeling.chem_charges -= 10
var/mob/living/carbon/human/C = usr
var/mob/living/carbon/human/C = src
if(C.digitalcamo) C << "<span class='notice'>We return to normal.</span>"
else C << "<span class='notice'>We distort our form to prevent AI-tracking.</span>"
C.digitalcamo = !C.digitalcamo
spawn(0)
while(C && C.digitalcamo)
C.mind.changeling.chem_charges -= 1
while(C && C.digitalcamo && C.mind && C.mind.changeling)
C.mind.changeling.chem_charges = max(C.mind.changeling.chem_charges - 1, 0)
sleep(40)
usr.verbs -= /mob/proc/changeling_digitalcamo
spawn(5) usr.verbs += /mob/proc/changeling_digitalcamo
src.verbs -= /mob/proc/changeling_digitalcamo
spawn(5) src.verbs += /mob/proc/changeling_digitalcamo
feedback_add_details("changeling_powers","CAM")
return 1
@@ -475,9 +474,9 @@
var/datum/changeling/changeling = changeling_power(30,0,100,UNCONSCIOUS)
if(!changeling) return 0
usr.mind.changeling.chem_charges -= 30
src.mind.changeling.chem_charges -= 30
var/mob/living/carbon/human/C = usr
var/mob/living/carbon/human/C = src
spawn(0)
for(var/i = 0, i<10,i++)
if(C)
@@ -487,8 +486,8 @@
C.adjustFireLoss(-10)
sleep(10)
usr.verbs -= /mob/proc/changeling_rapidregen
spawn(5) usr.verbs += /mob/proc/changeling_rapidregen
src.verbs -= /mob/proc/changeling_rapidregen
spawn(5) src.verbs += /mob/proc/changeling_rapidregen
feedback_add_details("changeling_powers","RR")
return 1
@@ -510,7 +509,7 @@ var/list/datum/dna/hivemind_bank = list()
names += DNA.real_name
if(names.len <= 0)
usr << "<span class='notice'>The airwaves already have all of our DNA.</span>"
src << "<span class='notice'>The airwaves already have all of our DNA.</span>"
return
var/S = input("Select a DNA to channel: ", "Channel DNA", null) as null|anything in names
@@ -522,7 +521,7 @@ var/list/datum/dna/hivemind_bank = list()
changeling.chem_charges -= 10
hivemind_bank += chosen_dna
usr << "<span class='notice'>We channel the DNA of [S] to the air.</span>"
src << "<span class='notice'>We channel the DNA of [S] to the air.</span>"
feedback_add_details("changeling_powers","HU")
return 1
@@ -540,7 +539,7 @@ var/list/datum/dna/hivemind_bank = list()
names[DNA.real_name] = DNA
if(names.len <= 0)
usr << "<span class='notice'>There's no new DNA to absorb from the air.</span>"
src << "<span class='notice'>There's no new DNA to absorb from the air.</span>"
return
var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in names
@@ -551,7 +550,7 @@ var/list/datum/dna/hivemind_bank = list()
changeling.chem_charges -= 20
changeling.absorbed_dna += chosen_dna
usr << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
src << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
feedback_add_details("changeling_powers","HD")
return 1
@@ -559,32 +558,32 @@ var/list/datum/dna/hivemind_bank = list()
/mob/proc/changeling_mimicvoice()
set category = "Changeling"
set name = "Mimic Voice (10)"
set desc = "Shape our vocal glands to form a voice of someone we choose."
set name = "Mimic Voice"
set desc = "Shape our vocal glands to form a voice of someone we choose. We cannot regenerate chemicals when mimicing."
var/datum/changeling/changeling = changeling_power(10,1)
var/datum/changeling/changeling = changeling_power()
if(!changeling) return
if(changeling.mimicing)
changeling.mimicing = ""
usr << "<span class='notice'>We return our vocal glands to their original location.</span>"
src << "<span class='notice'>We return our vocal glands to their original location.</span>"
return
var/mimic_voice = input("Enter a name to mimic.", "Mimic Voice", null) as text
if(!mimic_voice)
return
changeling.chem_charges -= 10
changeling.mimicing = mimic_voice
usr << "<span class='notice'>We shape our glands to take the voice of <b>[mimic_voice]</b>, this will stop us from regenerating chemicals while active.</span>"
usr << "<span class='notice'>Use this power again to return to our original voice and reproduce chemicals again.</span>"
src << "<span class='notice'>We shape our glands to take the voice of <b>[mimic_voice]</b>, this will stop us from regenerating chemicals while active.</span>"
src << "<span class='notice'>Use this power again to return to our original voice and reproduce chemicals again.</span>"
feedback_add_details("changeling_powers","MV")
spawn(0)
while(src && src.mind && src.mind.changeling && src.mind.changeling.mimicing)
src.mind.changeling.chem_charges -= 1
src.mind.changeling.chem_charges = max(src.mind.changeling.chem_charges - 1, 0)
sleep(40)
if(src && src.mind && src.mind.changeling)
src.mind.changeling.mimicing = ""
@@ -607,7 +606,7 @@ var/list/datum/dna/hivemind_bank = list()
var/list/victims = list()
for(var/mob/living/carbon/C in oview(changeling.sting_range))
victims += C
var/mob/living/carbon/T = input(usr, "Who will we sting?") as null|anything in victims
var/mob/living/carbon/T = input(src, "Who will we sting?") as null|anything in victims
if(!T) return
if(!(T in view(changeling.sting_range))) return
@@ -616,10 +615,10 @@ var/list/datum/dna/hivemind_bank = list()
changeling.chem_charges -= required_chems
changeling.sting_range = 1
usr.verbs -= verb_path
spawn(10) usr.verbs += verb_path
src.verbs -= verb_path
spawn(10) src.verbs += verb_path
usr << "<span class='notice'>We stealthily sting [T].</span>"
src << "<span class='notice'>We stealthily sting [T].</span>"
if(!T.mind || !T.mind.changeling) return T //T will be affected by the sting
T << "<span class='warning'>You feel a tiny prick.</span>"
return
@@ -712,7 +711,7 @@ var/list/datum/dna/hivemind_bank = list()
var/mob/living/carbon/T = changeling_sting(40,/mob/proc/changeling_transformation_sting)
if(!T) return 0
if((HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T)))
usr << "<span class='warning'>Our sting appears ineffective against its DNA.</span>"
src << "<span class='warning'>Our sting appears ineffective against its DNA.</span>"
return 0
T.visible_message("<span class='warning'>[T] transforms!</span>")
T.dna = chosen_dna
@@ -756,8 +755,8 @@ var/list/datum/dna/hivemind_bank = list()
set desc="Stealthily sting a target to extract their DNA."
var/datum/changeling/changeling = null
if(usr.mind && usr.mind.changeling)
changeling = usr.mind.changeling
if(src.mind && src.mind.changeling)
changeling = src.mind.changeling
if(!changeling)
return 0
@@ -81,7 +81,7 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/mimicvoice
name = "Mimic Voice"
desc = "We shape our vocal glands to sound like a desired voice."
helptext = "Will turn your voice into the name that you enter."
helptext = "Will turn your voice into the name that you enter. We must constantly expend chemicals to maintain our form like this"
genomecost = 3
verbpath = /mob/proc/changeling_mimicvoice
@@ -494,7 +494,7 @@ var/list/datum/power/changeling/powerinstances = list()
purchasedpowers += Thepower
if(!Thepower.isVerb && Thepower.verbpath)
call(Thepower.verbpath)()
call(M.current, Thepower.verbpath)()
else if(remake_verbs)
M.current.make_changeling()
-21
View File
@@ -654,24 +654,3 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
R.word3=cultwords["technology"]
R.loc = user.loc
R.check_icon()
/obj/item/weapon/paperscrap
name = "scrap of paper"
icon_state = "scrap"
throw_speed = 1
throw_range = 2
w_class = 1.0
flags = FPRINT | TABLEPASS
var/data
attack_self(mob/user as mob)
view_scrap(user)
examine()
set src in usr
view_scrap(usr)
proc/view_scrap(var/viewer)
viewer << browse(data)
+4
View File
@@ -377,10 +377,14 @@ var/list/sacrificed = list()
"\red A shape forms in the center of the rune. A shape of... a man.", \
"\red You hear liquid flowing.")
D.real_name = "Unknown"
var/chose_name = 0
for(var/obj/item/weapon/paper/P in this_rune.loc)
if(P.info)
D.real_name = copytext(P.info, 1, MAX_NAME_LEN)
chose_name = 1
break
if(!chose_name)
D.real_name = "[pick(first_names_male)] [pick(last_names)]"
D.universal_speak = 1
D.status_flags &= ~GODMODE
+97 -15
View File
@@ -8,12 +8,14 @@
/*if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")*/
if (!event)
if(!event)
//CARN: checks to see if random events are enabled.
if(config.allow_random_events)
hadevent = event()
else
Holiday_Random_Event()
if(prob(eventchance))
event()
hadevent = 1
else
Holiday_Random_Event()
else
event = 0
sleep(2400)
@@ -77,15 +79,52 @@
switch(picked_event)
if("Meteor")
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
spawn(700)
meteor_wave()
spawn_meteors()
if("Blob")
mini_blob_event()
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
/*
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/spanomalies.ogg')
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/effect/portal/P = new /obj/effect/portal( T )
P.target = picked
P.creator = null
P.icon = 'icons/obj/objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
del(P)
*/
if(3)
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
if(4) mini_blob_event()
if("Space Ninja")
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
space_ninja_arrival()
@@ -118,13 +157,16 @@
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
A << "<span class='warning'>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT</span>"
A << "<br>"
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
A << "<br>"
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
/proc/power_failure()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
world << sound('sound/AI/poweroff.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
for(var/obj/machinery/power/smes/S in world)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
@@ -172,7 +214,8 @@
/proc/power_restore()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('sound/AI/poweron.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
@@ -194,7 +237,8 @@
/proc/power_restore_quick()
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('sound/AI/poweron.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
@@ -250,6 +294,8 @@
var/foundAlready = 0 // don't infect someone that already has the virus
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
continue
for(var/datum/disease/D in H.viruses)
@@ -278,7 +324,8 @@
break
spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/outbreak7.ogg')
/proc/alien_infestation(var/spawncount = 1) // -- TLE
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
@@ -306,7 +353,8 @@
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('sound/AI/aliens.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/aliens.ogg')
/proc/high_radiation_event()
@@ -321,6 +369,8 @@
sleep(600)
for(var/mob/living/carbon/human/H in living_mob_list)
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
continue
if(istype(H,/mob/living/carbon/human))
@@ -329,12 +379,15 @@
H.apply_effect((rand(90,150)),IRRADIATE,0)
for(var/mob/living/carbon/monkey/M in living_mob_list)
var/turf/T = get_turf(M)
if(!T)
continue
if(T.z != 1)
continue
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
command_alert("Radiation levels are within standard parameters again.", "Anomaly Alert")
world << sound('sound/AI/radiation.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/radiation.ogg')
@@ -384,7 +437,8 @@
//sleep(100)
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
world << sound('sound/AI/commandreport.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
@@ -451,46 +505,74 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
crew = "Any Human"
switch(rand(1,14))
if(1)
M << "<br>"
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
if(2)
M << "<br>"
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
if(3)
M << "<br>"
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
if(4)
M << "<br>"
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
M << "<br>"
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
M << "<br>"
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
if(6)
M << "<br>"
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
if(7)
M << "<br>"
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU ARE [amount] [who2]")
if(8)
M << "<br>"
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU MUST ALWAYS [aimust]")
if(9)
M << "<br>"
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[area] [area2] [amount] [what2]")
if(10)
M << "<br>"
M << "\red [crew] is [target]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[crew] is [target]")
if(11)
M << "<br>"
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[define] IS A FORM OF HARM")
if(12)
M << "<br>"
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
M << "<br>"
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
if(13)
M << "<br>"
M << "\red [crew] is [allergysev] to [allergy]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("[crew] is [allergysev] to [allergy]")
if(14)
M << "<br>"
M << "\red THE STATION IS [who2pref] [who2]...LAWS UPDATED"
M << "<br>"
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
+1 -1
View File
@@ -100,7 +100,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
if(ismob(A))
A.meteorhit(src)//This should work for now I guess
else if(!istype(A,/obj/machinery/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
life--
@@ -1 +1,63 @@
//placeholder for holiday stuff
/proc/Christmas_Game_Start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != 1) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/a_gift(T)
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
/proc/ChristmasEvent()
for(var/obj/structure/flora/tree/pine/xmas in world)
var/mob/living/simple_animal/hostile/tree/evil_tree = new /mob/living/simple_animal/hostile/tree(xmas.loc)
evil_tree.icon_state = xmas.icon_state
evil_tree.icon_living = evil_tree.icon_state
evil_tree.icon_dead = evil_tree.icon_state
evil_tree.icon_gib = evil_tree.icon_state
del(xmas)
/obj/item/weapon/toy/xmas_cracker
name = "xmas cracker"
icon = 'icons/obj/christmas.dmi'
icon_state = "cracker"
desc = "Directions for use: Requires two people, one to pull each end."
var/cracked = 0
/obj/item/weapon/toy/xmas_cracker/New()
..()
/obj/item/weapon/toy/xmas_cracker/attack(mob/target, mob/user)
if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() )
target.visible_message("<span class='notice'>[user] and [target] pop \an [src]! *pop*</span>", "<span class='notice'>You pull \an [src] with [target]! *pop*</span>", "<span class='notice'>You hear a *pop*.</span>")
var/obj/item/weapon/paper/Joke = new /obj/item/weapon/paper(user.loc)
Joke.name = "[pick("awful","terrible","unfunny")] joke"
Joke.info = pick("What did one snowman say to the other?\n\n<i>'Is it me or can you smell carrots?'</i>",
"Why couldn't the snowman get laid?\n\n<i>He was frigid!</i>",
"Where are santa's helpers educated?\n\n<i>Nowhere, they're ELF-taught.</i>",
"What happened to the man who stole advent calanders?\n\n<i>He got 25 days.</i>",
"What does Santa get when he gets stuck in a chimney?\n\n<i>Claus-trophobia.</i>",
"Where do you find chili beans?\n\n<i>The north pole.</i>",
"What do you get from eating tree decorations?\n\n<i>Tinsilitis!</i>",
"What do snowmen wear on their heads?\n\n<i>Ice caps!</i>",
"Why is Christmas just like life on ss13?\n\n<i>You do all the work and the fat guy gets all the credit.</i>",
"Why doesnt Santa have any children?\n\n<i>Because he only comes down the chimney.</i>")
new /obj/item/clothing/head/festive(target.loc)
user.update_icons()
cracked = 1
icon_state = "cracker1"
var/obj/item/weapon/toy/xmas_cracker/other_half = new /obj/item/weapon/toy/xmas_cracker(target)
other_half.cracked = 1
other_half.icon_state = "cracker2"
target.put_in_active_hand(other_half)
playsound(user, 'sound/effects/snap.ogg', 50, 1)
return 1
return ..()
/obj/item/clothing/head/festive
name = "festive paper hat"
icon_state = "xmashat"
desc = "A crappy paper hat that you are REQUIRED to wear."
flags_inv = 0
flags = FPRINT|TABLEPASS
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
@@ -101,6 +101,7 @@ var/global/Holiday = null
switch(DD)
if(10) Holiday = "Human-Rights Day"
if(14) Holiday = "Monkey Day"
if(21) if(YY==12) Holiday = "End of the World"
if(22) Holiday = "Orgasming Day" //lol. These all actually exist
if(24) Holiday = "Christmas Eve"
if(25) Holiday = "Christmas"
@@ -120,14 +121,13 @@ var/global/Holiday = null
set desc = "Force-set the Holiday variable to make the game think it's a certain day."
if(!check_rights(R_SERVER)) return
if(!T) return
Holiday = T
//get a new station name
station_name = null
station_name()
//update our hub status
world.update_status()
// Holiday_Game_Start()
Holiday_Game_Start()
message_admins("\blue ADMIN: Event: [key_name(src)] force-set Holiday to \"[Holiday]\"")
log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"")
@@ -141,10 +141,9 @@ var/global/Holiday = null
switch(Holiday) //special holidays
if("Easter")
//do easter stuff
if("Christmas ")
//do christmas stuff
else
//etc. you get what I'm getting at
if("Christmas Eve","Christmas")
Christmas_Game_Start()
return
//Nested in the random events loop. Will be triggered every 2 minutes
@@ -171,4 +170,9 @@ var/global/Holiday = null
if(S.z != 1) continue
containers += S
message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
if("End of the World")
if(prob(eventchance)) GameOver()
if("Christmas","Christmas Eve")
if(prob(eventchance)) ChristmasEvent()
@@ -0,0 +1,10 @@
/proc/GameOver()
if(!hadevent)
hadevent = 1
message_admins("The apocalypse has begun! (this holiday event can be disabled by toggling events off within 60 seconds)")
spawn(600)
if(!config.allow_random_events) return
Show2Group4Delay(ScreenText(null,"<center><font color='red' size='8'>GAME OVER</font></center>"),null,150)
for(var/i=1,i<=4,i++)
event()
sleep(50)
+6 -4
View File
@@ -9,11 +9,13 @@
blobevent = 1
spawn(0)
dotheblobbaby()
spawn(12000) // blob event can last up to 20 minutes
spawn(3000)
blobevent = 0
spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/outbreak5.ogg')
/proc/dotheblobbaby()
if (blobevent)
@@ -25,5 +27,5 @@
if(B.z != 1)
continue
B.Life()
spawn(280) // advance 1 tile every 30 seconds
dotheblobbaby()
spawn(30)
dotheblobbaby()
@@ -540,7 +540,7 @@ ________________________________________________________________________________
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
O.show_message(text("\icon[P] *[P.ttone]*"))
P.overlays = null
P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r")
if("Inject")
@@ -976,7 +976,7 @@ ________________________________________________________________________________
flick("apc-spark", src)
A.emagged = 1
A.locked = 0
A.updateicon()
A.update_icon()
else
U << "\red This APC has run dry of power. You must find another source."
+3 -1
View File
@@ -8,7 +8,9 @@
if(pick_turfs.len)
//All ready. Announce that bad juju is afoot.
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/spanomalies.ogg')
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/spanomalies.ogg')
//prob(20) can be approximated to 1 wormhole every 5 turfs!
//admittedly less random but totally worth it >_<
+4 -4
View File
@@ -124,7 +124,7 @@
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle;
/obj/item/weapon/storage/emp_kit:3:5 EMP Grenades;
/obj/item/weapon/storage/box/emps:3:5 EMP Grenades;
Whitespace:Seperator;
Stealthy and Inconspicuous Weapons;
/obj/item/weapon/pen/paralysis:3:Paralysis Pen;
@@ -141,7 +141,7 @@ Whitespace:Seperator;
Devices and Tools;
/obj/item/weapon/card/emag:3:Cryptographic Sequencer;
/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox;
/obj/item/weapon/storage/syndie_kit/space:3:Space Suit;
/obj/item/weapon/storage/box/syndie_kit/space:3:Space Suit;
/obj/item/clothing/glasses/thermal/syndi:3:Thermal Imaging Glasses;
/obj/item/device/encryptionkey/binary:3:Binary Translator Key;
/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module;
@@ -151,8 +151,8 @@ Devices and Tools;
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
Whitespace:Seperator;
Implants;
/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant;
/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
Whitespace:Seperator;
(Pointless) Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
+8 -8
View File
@@ -34,7 +34,7 @@
/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow;
/obj/item/weapon/melee/energy/sword:4:Energy Sword;
/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle;
/obj/item/weapon/storage/emp_kit:3:5 EMP Grenades;
/obj/item/weapon/storage/box/emps:3:5 EMP Grenades;
Whitespace:Seperator;
Stealthy and Inconspicuous Weapons;
/obj/item/weapon/pen/paralysis:3:Paralysis Pen;
@@ -51,7 +51,7 @@ Whitespace:Seperator;
Devices and Tools;
/obj/item/weapon/card/emag:3:Cryptographic Sequencer;
/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox;
/obj/item/weapon/storage/syndie_kit/space:3:Space Suit;
/obj/item/weapon/storage/box/syndie_kit/space:3:Space Suit;
/obj/item/clothing/glasses/thermal/syndi:3:Thermal Imaging Glasses;
/obj/item/device/encryptionkey/binary:3:Binary Translator Key;
/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module;
@@ -61,11 +61,10 @@ Devices and Tools;
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
Whitespace:Seperator;
Implants;
/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant;
/obj/item/weapon/storage/box/syndie_kit/imp_freedom:3:Freedom Implant;
/obj/item/weapon/storage/box/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
/obj/item/weapon/implant/explosive:6:Explosive Implant (DANGER!);
/obj/item/weapon/implant/compressed:4:Compressed Matter Implant;
/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals);
Whitespace:Seperator;
/obj/item/weapon/implant/compressed:4:Compressed Matter Implant;Whitespace:Seperator;
(Pointless) Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"}
@@ -233,7 +232,9 @@ Whitespace:Seperator;
world << sound('commandreport.ogg')
/* command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.")
world << sound('sound/AI/intercept.ogg')
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/intercept.ogg')
if(security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)*/
@@ -320,7 +321,6 @@ Whitespace:Seperator;
if(applicant)
candidates += applicant
drafted.Remove(applicant)
log_admin("[applicant.key] drafted into antagonist role against their preferences.")
message_admins("[applicant.key] drafted into antagonist role against their preferences.")
else // Not enough scrubs, ABORT ABORT ABORT
+8 -5
View File
@@ -37,9 +37,9 @@ var/global/datum/controller/gameticker/ticker
var/triai = 0//Global holder for Triumvirate
/datum/controller/gameticker/proc/pregame()
login_music = pick('sound/ambience/title1.ogg','sound/ambience/title2.ogg','sound/ambience/b12_combined_start.ogg') // choose title music!
/* for(var/mob/new_player/M in mob_list)
if(M.client) M.client.playtitlemusic()*/
login_music = pick('sound/ambience/title2.ogg','sound/ambience/title1.ogg','sound/ambience/b12_combined_start.ogg') // choose title music!
for(var/mob/new_player/M in mob_list)
if(M.client) M.client.playtitlemusic()
do
pregame_timeleft = 180
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
@@ -123,7 +123,8 @@ var/global/datum/controller/gameticker/ticker
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()
start_events() //handles random events and space dust.
// start_events() //handles random events and space dust.
//new random event system is handled from the MC.
var/admins_number = 0
for(var/client/C)
@@ -274,7 +275,9 @@ var/global/datum/controller/gameticker/ticker
job_master.EquipRank(player, player.mind.assigned_role, 0)
EquipCustomItems(player)
if(captainless)
world << "Captainship not forced on anyone."
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << "Captainship not forced on anyone."
proc/process()
+32 -9
View File
@@ -1,5 +1,6 @@
/datum/intercept_text
var/text
/*
var/prob_correct_person_lower = 20
var/prob_correct_person_higher = 80
var/prob_correct_job_lower = 20
@@ -8,6 +9,7 @@
var/prob_correct_print_higher = 80
var/prob_correct_objective_lower = 20
var/prob_correct_objective_higher = 80
*/
var/list/org_names_1 = list(
"Blighted",
"Defiled",
@@ -48,7 +50,8 @@
"Booga",
"The Goatee of Wrath",
"Tam Lin",
"Species 3157"
"Species 3157",
"Small Prick"
)
@@ -85,7 +88,9 @@
else
return null
// NOTE: Commentted out was the code which showed the chance of someone being an antag. If you want to re-add it, just uncomment the code.
/*
/datum/intercept_text/proc/pick_mob()
var/list/dudes = list()
for(var/mob/living/carbon/human/man in player_list)
@@ -104,11 +109,13 @@
return num2text(md5(dude.dna.uni_identity))
else
return num2text(md5(num2text(rand(1,10000))))
*/
/datum/intercept_text/proc/build_traitor(datum/mind/correct_person)
var/name_1 = pick(src.org_names_1)
var/name_2 = pick(src.org_names_2)
/*
var/fingerprints
var/traitor_name
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -121,8 +128,11 @@
traitor_name = pick_mob()
else
fingerprints = pick_fingerprints()
*/
src.text += "<BR><BR>The <B>[name_1] [name_2]</B> implied an undercover operative was acting on their behalf on the station currently.<BR>"
src.text += "<BR><BR>The <B>[name_1] [name_2]</B> implied an undercover operative was acting on their behalf on the station currently."
src.text += "It would be in your best interests to suspect everybody, as these undercover operatives could have implants which trigger them to have their memories removed until they are needed. He, or she, could even be a high ranking officer."
/*
src.text += "After some investigation, we "
if(traitor_name)
src.text += "are [prob_right_dude]% sure that [traitor_name] may have been involved, and should be closely observed."
@@ -130,11 +140,13 @@
else
src.text += "discovered the following set of fingerprints ([fingerprints]) on sensitive materials, and their owner should be closely observed."
src.text += "However, these could also belong to a current Cent. Com employee, so do not act on this without reason."
*/
/datum/intercept_text/proc/build_cult(datum/mind/correct_person)
var/name_1 = pick(src.org_names_1)
var/name_2 = pick(src.org_names_2)
/*
var/traitor_name
var/traitor_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -156,19 +168,23 @@
traitor_name = correct_person:current
else
traitor_name = pick_mob()
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge on as many stations as they can.<BR>"
*/
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge onto as many stations as they can."
src.text += "Watch out for the following: praying to an unfamilar god, preaching the word of \[REDACTED\], sacrifices, magical dark power, living constructs of evil and a portal to the dimension of the underworld."
/*
src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted "
src.text += "and instilled with the idea of the flimsiness of the real world, seeking to destroy it. "
if(prob(prob_right_dude))
src.text += "<BR> In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this "
src.text += "organisation."
src.text += "<BR>However, if this information is acted on without substantial evidence, those responsible will face severe repercussions."
*/
/datum/intercept_text/proc/build_rev(datum/mind/correct_person)
var/name_1 = pick(src.org_names_1)
var/name_2 = pick(src.org_names_2)
/*
var/traitor_name
var/traitor_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -192,14 +208,17 @@
traitor_name = correct_person.current
else
traitor_name = src.pick_mob()
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector. <BR>"
*/
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector."
src.text += "Watch out for suspicious activity among the crew and make sure that all heads of staff report in periodically."
/*
src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been brainwashed "
src.text += "at a recent conference, and their department should be closely monitored for signs of mutiny. "
if(prob(prob_right_dude))
src.text += "<BR> In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this "
src.text += "organisation."
src.text += "<BR>However, if this information is acted on without substantial evidence, those responsible will face severe repercussions."
*/
/datum/intercept_text/proc/build_wizard(datum/mind/correct_person)
@@ -211,7 +230,7 @@
src.text += "Known attributes include: Brown sandals, a large blue hat, a voluptous white beard, and an inclination to cast spells."
/datum/intercept_text/proc/build_nuke(datum/mind/correct_person)
src.text += "<BR><BR>Cent. Com recently recieved a report of a plot to destory one of our stations in your area. We believe the Nuclear Authentication Disc "
src.text += "<BR><BR>Cent. Com recently recieved a report of a plot to destroy one of our stations in your area. We believe the Nuclear Authentication Disc "
src.text += "that is standard issue aboard your vessel may be a target. We recommend removal of this object, and it's storage in a safe "
src.text += "environment. As this may cause panic among the crew, all efforts should be made to keep this information a secret from all but "
src.text += "the most trusted crew-members."
@@ -226,6 +245,7 @@
var/cname = pick(src.changeling_names)
var/orgname1 = pick(src.org_names_1)
var/orgname2 = pick(src.org_names_2)
/*
var/changeling_name
var/changeling_job
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
@@ -245,9 +265,12 @@
changeling_name = src.pick_mob()
else
changeling_name = src.pick_mob()
*/
src.text += "<BR><BR>We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. "
/*
src.text += "Our intelligence suggests a [prob_right_job]% chance that a [changeling_job] on board your station has been replaced by the alien. "
src.text += "Additionally, the report indicates a [prob_right_dude]% chance that [changeling_name] may have been in contact with the lifeform at a recent social gathering. "
*/
src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. "
src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation."
src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!"
+10 -2
View File
@@ -65,6 +65,8 @@
if(alert(AI_mind.current,"Do you want to use an alternative sprite for your real core?",,"Yes","No")=="Yes")
AI_mind.current.icon_state = "ai-malf2"
*/
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -131,7 +133,11 @@
if (station_captured && !to_nuke_or_not_to_nuke)
return 1
if (is_malf_ai_dead())
return 1
if(config.continous_rounds)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 0
else
return 1
return ..() //check for shuttle and nuke
@@ -165,7 +171,9 @@
ticker.mode:malf_mode_declared = 1
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
world << sound('sound/AI/aimalf.ogg')
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/aimalf.ogg')
/datum/game_mode/malfunction/proc/ai_win()
+2 -2
View File
@@ -114,7 +114,7 @@
//Prevent meteors from blowing up the singularity's containment.
//Changing emitter and generator ex_act would result in them being bomb and C4 proof.
if(!istype(A,/obj/machinery/emitter) && \
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator) && \
prob(15))
@@ -141,7 +141,7 @@
spawn(0)
//Prevent meteors from blowing up the singularity's containment.
//Changing emitter and generator ex_act would result in them being bomb and C4 proof
if(!istype(A,/obj/machinery/emitter) && \
if(!istype(A,/obj/machinery/power/emitter) && \
!istype(A,/obj/machinery/field_generator))
if(--src.hits <= 0)
del(src) //Dont blow up singularity containment if we get stuck there.
+13 -3
View File
@@ -295,7 +295,7 @@ datum/objective/hijack
datum/objective/block
explanation_text = "Do not allow any humans to escape on the shuttle alive."
explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
check_completion()
@@ -474,16 +474,26 @@ datum/objective/steal
"a hand teleporter" = /obj/item/weapon/hand_tele,
"an RCD" = /obj/item/weapon/rcd,
"a jetpack" = /obj/item/weapon/tank/jetpack,
"a captains jumpsuit" = /obj/item/clothing/under/rank/captain,
"a captain's jumpsuit" = /obj/item/clothing/under/rank/captain,
"a functional AI" = /obj/item/device/aicard,
"a pair of magboots" = /obj/item/clothing/shoes/magboots,
"the station blueprints" = /obj/item/blueprints,
"a nasa voidsuit" = /obj/item/clothing/suit/space/nasavoid,
"28 moles of plasma (full tank)" = /obj/item/weapon/tank,
"a sample of slime extract" = /obj/item/slime_extract,
"a piece of corgi meat" = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi,
"a research director's jumpsuit" = /obj/item/clothing/under/rank/research_director,
"a chief engineer's jumpsuit" = /obj/item/clothing/under/rank/chief_engineer,
"a chief medical officer's jumpsuit" = /obj/item/clothing/under/rank/chief_medical_officer,
"a head of security's jumpsuit" = /obj/item/clothing/under/rank/head_of_security,
"a head of personnel's jumpsuit" = /obj/item/clothing/under/rank/head_of_personnel,
"the hypospray" = /obj/item/weapon/reagent_containers/hypospray,
"the captain's pinpointer" = /obj/item/weapon/pinpointer,
"an ablative armor vest" = /obj/item/clothing/suit/armor/laserproof,
)
var/global/possible_items_special[] = list(
"nuclear authentication disk" = /obj/item/weapon/disk/nuclear,
/*"nuclear authentication disk" = /obj/item/weapon/disk/nuclear,*///Broken with the change to nuke disk making it respawn on z level change.
"nuclear gun" = /obj/item/weapon/gun/energy/gun/nuclear,
"diamond drill" = /obj/item/weapon/pickaxe/diamonddrill,
"bag of holding" = /obj/item/weapon/storage/backpack/holding,
@@ -89,6 +89,8 @@
for(var/datum/mind/rev_mind in head_revolutionaries)
greet_revolutionary(rev_mind)
modePlayer += head_revolutionaries
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
..()
@@ -165,6 +167,11 @@
//Checks if the round is over//
///////////////////////////////
/datum/game_mode/revolution/check_finished()
if(config.continous_rounds)
if(finished != 0)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 0
return ..()
if(finished != 0)
return 1
else
-2
View File
@@ -144,8 +144,6 @@ datum/hSB
continue
if(istype(O, /obj/item/weapon/melee/energy/sword))
continue
if(istype(O, /obj/effect/critter))
continue
if(istype(O, /obj/structure))
continue
selectable += O
+4 -2
View File
@@ -15,5 +15,7 @@
M.CanBuild()
return 1
/datum/game_mode/sandbox/check_finished()
return 0
/datum/game_mode/sandbox/post_setup()
..()
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 1
+12 -5
View File
@@ -38,8 +38,10 @@
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=17'>Mastercrafted Armor Set</A><BR>"
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=18'>Staff of Animation</A><BR>"
dat += "<HR>"
if(op)
dat += "<A href='byond://?src=\ref[src];spell_choice=18'>Re-memorize Spells</A><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=19'>Re-memorize Spells</A><BR>"
user << browse(dat, "window=radio")
onclose(user, "radio")
return
@@ -54,9 +56,9 @@
if ( src.loc == usr || (in_range(src,usr) && istype(src.loc, /turf)))
usr.set_machine(src)
if(href_list["spell_choice"])
if(src.uses >= 1 && src.max_uses >=1 && text2num(href_list["spell_choice"]) < 18)
if(src.uses >= 1 && src.max_uses >=1 && text2num(href_list["spell_choice"]) < 19)
src.uses--
var/list/available_spells = list("Magic Missile","Fireball","Disintegrate","Disable Tech","Smoke","Blind","Mind Transfer","Forcewall","Blink","Teleport","Mutate","Ethereal Jaunt","Knock","Summon Guns","Staff of Change","Six Soul Stone Shards and the spell Artificer","Mastercrafted Armor Set")
var/list/available_spells = list("Magic Missile","Fireball","Disintegrate","Disable Tech","Smoke","Blind","Mind Transfer","Forcewall","Blink","Teleport","Mutate","Ethereal Jaunt","Knock","Summon Guns","Staff of Change","Six Soul Stone Shards and the spell Artificer","Mastercrafted Armor Set", "Staff of Animation")
var/already_knows = 0
for(var/obj/effect/proc_holder/spell/aspell in usr.spell_list)
if(available_spells[text2num(href_list["spell_choice"])] == aspell.name)
@@ -72,7 +74,7 @@
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
if ("2")
feedback_add_details("wizard_spell_learned","FB") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
usr.spell_list += new /obj/effect/proc_holder/spell/targeted/projectile/fireball(usr)
usr.spell_list += new /obj/effect/proc_holder/spell/dumbfire/fireball(usr)
src.temp = "This spell fires a fireball in the direction you're facing and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
if ("3")
feedback_add_details("wizard_spell_learned","DG") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
@@ -142,8 +144,13 @@
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(usr))
src.temp = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
src.max_uses--
if("18")
feedback_add_details("wizard_spell_learned","SA") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
new /obj/item/weapon/gun/energy/staff/animate(get_turf(usr))
src.temp = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
src.max_uses--
if (href_list["spell_choice"] == "18")
if (href_list["spell_choice"] == "19")
var/area/wizard_station/A = locate()
if(usr in A.contents)
src.uses = src.max_uses
+5
View File
@@ -183,6 +183,10 @@
/datum/game_mode/wizard/check_finished()
if(config.continous_rounds)
return ..()
var/wizards_alive = 0
for(var/datum/mind/wizard in wizards)
if(!istype(wizard.current,/mob/living/carbon))
@@ -198,6 +202,7 @@
return 1
/datum/game_mode/wizard/declare_completion()
if(finished)
feedback_set_details("round_end_result","loss - wizard killed")
+33 -117
View File
@@ -127,15 +127,17 @@
else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid))
var/mob/living/carbon/george = M
//they can only hold things :(
if(george.get_active_hand() && (istype(george.get_active_hand(), /obj/item/weapon/card/id) || istype(george.get_active_hand(), /obj/item/device/pda)) && src.check_access(george.get_active_hand()))
if(src.check_access(george.get_active_hand()))
return 1
return 0
/obj/proc/check_access(obj/item/weapon/card/id/I)
/obj/item/proc/GetAccess()
return list()
if (istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
/obj/item/proc/GetID()
return null
/obj/proc/check_access(obj/item/I)
if(!src.req_access && !src.req_one_access) //no requirements
return 1
@@ -145,14 +147,14 @@
var/list/L = src.req_access
if(!L.len && (!src.req_one_access || !src.req_one_access.len)) //no requirements
return 1
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
if(!I)
return 0
for(var/req in src.req_access)
if(!(req in I.access)) //doesn't have this access
if(!(req in I.GetAccess())) //doesn't have this access
return 0
if(src.req_one_access && src.req_one_access.len)
for(var/req in src.req_one_access)
if(req in I.access) //has an access from the single access list
if(req in I.GetAccess()) //has an access from the single access list
return 1
return 0
return 1
@@ -174,92 +176,6 @@
return 0
return 1
/proc/get_access(job)
switch(job)
if("Geneticist")
return list(access_medical, access_morgue, access_genetics)
if("Station Engineer")
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
if("Assistant")
if(config.assistant_maint)
return list(access_maint_tunnels)
else
return list()
if("Chaplain")
return list(access_morgue, access_chapel_office, access_crematorium)
if("Detective")
return list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
if("Medical Doctor")
return list(access_medical, access_morgue, access_surgery, access_virology)
if("Botanist") // -- TLE
return list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
if("Librarian") // -- TLE
return list(access_library)
if("Lawyer") //Muskets 160910
return list(access_lawyer, access_court)
if("Captain")
return get_all_accesses()
if("Security Officer")
return list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
if("Warden")
return list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels)
if("Scientist")
return list(access_tox, access_tox_storage, access_research, access_xenobiology)
if("Head of Security")
return list(access_medical, access_morgue, access_tox, access_tox_storage, access_chemistry, access_genetics, access_court,
access_teleporter, access_heads, access_tech_storage, access_security, access_sec_doors, access_brig, access_atmospherics,
access_maint_tunnels, access_bar, access_janitor, access_kitchen, access_robotics, access_armory, access_hydroponics,
access_theatre, access_research, access_hos, access_RC_announce, access_forensics_lockers, access_keycard_auth)
if("Head of Personnel")
return list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_tox, access_tox_storage, access_chemistry, access_medical, access_genetics, access_engine,
access_emergency_storage, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_tech_storage, access_maint_tunnels, access_bar, access_janitor,
access_crematorium, access_kitchen, access_robotics, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
if("Atmospheric Technician")
return list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
if("Bartender")
return list(access_bar)
if("Chemist")
return list(access_medical, access_chemistry)
if("Janitor")
return list(access_janitor, access_maint_tunnels)
if("Clown")
return list(access_clown, access_theatre)
if("Mime")
return list(access_mime, access_theatre)
if("Chef")
return list(access_kitchen, access_morgue)
if("Roboticist")
return list(access_robotics, access_tech_storage, access_morgue) //As a job that handles so many corpses, it makes sense for them to have morgue access.
if("Cargo Technician")
return list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
if("Shaft Miner")
return list(access_mining, access_mint, access_mining_station)
if("Quartermaster")
return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
if("Chief Engineer")
return list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_ai_upload, access_construction, access_robotics,
access_mint, access_ce, access_RC_announce, access_keycard_auth, access_tcomsat)
if("Research Director")
return list(access_rd, access_heads, access_tox, access_genetics,
access_tox_storage, access_teleporter,
access_research, access_robotics, access_xenobiology,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway)
if("Virologist")
return list(access_medical, access_virology)
if("Chief Medical Officer")
return list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth)
else
return list()
/proc/get_centcom_access(job)
switch(job)
if("VIP Guest")
@@ -285,12 +201,12 @@
return list(access_security, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_court,
access_medical, access_genetics, access_morgue, access_rd,
access_tox, access_tox_storage, access_chemistry, access_engine, access_engine_equip, access_maint_tunnels,
access_external_airlocks, access_emergency_storage, access_change_ids, access_ai_upload,
access_external_airlocks, access_change_ids, access_ai_upload,
access_teleporter, access_eva, access_heads, access_captain, access_all_personal_lockers,
access_tech_storage, access_chapel_office, access_atmospherics, access_kitchen,
access_bar, access_janitor, access_crematorium, access_robotics, access_cargo, access_cargo_bot, access_construction,
access_hydroponics, access_library, access_manufacturing, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting, access_mint_vault, access_mint,
access_bar, access_janitor, access_crematorium, access_robotics, access_cargo, access_construction,
access_hydroponics, access_library, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting,
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
access_keycard_auth, access_tcomsat, access_gateway)
@@ -309,15 +225,15 @@
if(2) //medbay
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
if(3) //research
return list(access_research, access_tox, access_tox_storage, access_xenobiology, access_rd)
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_rd)
if(4) //engineering and maintenance
return list(access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce)
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_ce)
if(5) //command
return list(access_heads, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_all_personal_lockers, access_heads_vault, access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_hop, access_captain)
return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_tcomsat, access_gateway, access_all_personal_lockers, access_heads_vault, access_hop, access_captain)
if(6) //station general
return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime)
if(7) //supply
return list(access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_mining, access_mining_station)
return list(access_mailsorting, access_mining, access_mining_station, access_cargo, access_qm)
/proc/get_region_accesses_name(var/code)
switch(code)
@@ -352,7 +268,7 @@
if(access_court)
return "Courtroom"
if(access_forensics_lockers)
return "Detective's Office"
return "Forensics"
if(access_medical)
return "Medical"
if(access_genetics)
@@ -360,13 +276,13 @@
if(access_morgue)
return "Morgue"
if(access_tox)
return "Research Lab"
return "R&D Lab"
if(access_tox_storage)
return "Toxins Storage"
return "Toxins Lab"
if(access_chemistry)
return "Chemistry Lab"
if(access_rd)
return "RD Private"
return "Research Director"
if(access_bar)
return "Bar"
if(access_janitor)
@@ -374,7 +290,7 @@
if(access_engine)
return "Engineering"
if(access_engine_equip)
return "APCs"
return "Power Equipment"
if(access_maint_tunnels)
return "Maintenance"
if(access_external_airlocks)
@@ -392,7 +308,7 @@
if(access_heads)
return "Bridge"
if(access_captain)
return "Captain Private"
return "Captain"
if(access_all_personal_lockers)
return "Personal Lockers"
if(access_chapel_office)
@@ -420,9 +336,9 @@
if(access_virology)
return "Virology"
if(access_cmo)
return "CMO Private"
return "Chief Medical Officer"
if(access_qm)
return "Quartermaster's Office"
return "Quartermaster"
/* if(access_clown)
return "HONK! Access"
if(access_mime)
@@ -440,7 +356,7 @@
if(access_mining_office)
return "Mining Office"
if(access_mailsorting)
return "Delivery Office"
return "Cargo Office"
if(access_mint)
return "Mint"
if(access_mint_vault)
@@ -448,15 +364,15 @@
if(access_heads_vault)
return "Main Vault"
if(access_mining_station)
return "Mining Station EVA"
return "Mining EVA"
if(access_xenobiology)
return "Xenobiology Lab"
if(access_hop)
return "HoP Private"
return "Head of Personnel"
if(access_hos)
return "HoS Private"
return "Head of Security"
if(access_ce)
return "CE Private"
return "Chief Engineer"
if(access_RC_announce)
return "RC Announcements"
if(access_keycard_auth)
@@ -492,8 +408,8 @@
/proc/get_all_jobs()
return list("Assistant", "Captain", "Head of Personnel", "Bartender", "Chef", "Botanist", "Quartermaster", "Cargo Technician",
"Shaft Miner", /*"Clown", "Mime", */"Janitor", "Librarian", "Lawyer", "Chaplain", "Chief Engineer", "Station Engineer",
"Atmospheric Technician", "Roboticist", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist",
"Research Director", "Scientist", "Head of Security", "Warden", "Detective", "Security Officer")
"Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist",
"Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer")
/proc/get_all_centcom_jobs()
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
+13 -9
View File
@@ -7,13 +7,17 @@
spawn_positions = -1
supervisors = "absolutely everyone"
selection_color = "#dddddd"
access = list() //See /datum/job/assistant/get_access()
minimal_access = list() //See /datum/job/assistant/get_access()
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/datum/job/assistant/equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
return 1
/datum/job/assistant/get_access()
if(config.assistant_maint)
return list(access_maint_tunnels)
else
return list()
+22 -5
View File
@@ -9,6 +9,8 @@
selection_color = "#ccccff"
idtype = /obj/item/weapon/card/id/gold
req_admin_notify = 1
access = list() //See get_access()
minimal_access = list() //See get_access()
equip(var/mob/living/carbon/human/H)
@@ -28,15 +30,18 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
world << "<b>[H.real_name] is the captain!</b>"
return 1
get_access()
return get_all_accesses()
/datum/job/hop
@@ -50,6 +55,18 @@
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
equip(var/mob/living/carbon/human/H)
@@ -64,7 +81,7 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/id_kit(H.back), slot_in_backpack)
return 1
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
return 1
+32 -8
View File
@@ -8,6 +8,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_bar)
minimal_access = list(access_bar)
equip(var/mob/living/carbon/human/H)
@@ -48,6 +50,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_kitchen, access_morgue)
minimal_access = list(access_kitchen, access_morgue)
equip(var/mob/living/carbon/human/H)
@@ -74,6 +78,8 @@
spawn_positions = 2
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
minimal_access = list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
equip(var/mob/living/carbon/human/H)
@@ -102,15 +108,17 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/qm(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/quartermaster(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
if(H.backbag == 1)
@@ -130,6 +138,8 @@
spawn_positions = 2
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
equip(var/mob/living/carbon/human/H)
@@ -138,7 +148,7 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
@@ -156,11 +166,13 @@
spawn_positions = 3
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_mine (H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_ears)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
@@ -168,15 +180,15 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/satchel(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/satchel(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
return 1
@@ -192,6 +204,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_clown, access_theatre)
minimal_access = list(access_clown, access_theatre)
equip(var/mob/living/carbon/human/H)
@@ -206,7 +220,8 @@
H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/crayonbox(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/toy/waterflower(H), slot_in_backpack)
H.mutations.Add(CLUMSY)
return 1
@@ -221,6 +236,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_mime, access_theatre)
minimal_access = list(access_mime, access_theatre)
equip(var/mob/living/carbon/human/H)
@@ -260,6 +277,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_janitor, access_maint_tunnels)
minimal_access = list(access_janitor, access_maint_tunnels)
equip(var/mob/living/carbon/human/H)
@@ -271,6 +290,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/key(H), slot_l_store)
return 1
@@ -285,6 +305,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_library)
minimal_access = list(access_library)
equip(var/mob/living/carbon/human/H)
@@ -311,6 +333,8 @@ var/global/lawyer = 0//Checks for another lawyer
spawn_positions = 2
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_lawyer, access_court, access_sec_doors)
minimal_access = list(access_lawyer, access_court, access_sec_doors)
equip(var/mob/living/carbon/human/H)
+2
View File
@@ -8,6 +8,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_morgue, access_chapel_office, access_crematorium)
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
equip(var/mob/living/carbon/human/H)
+13 -31
View File
@@ -9,6 +9,14 @@
selection_color = "#ffeeaa"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_construction, access_sec_doors,
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva,
access_heads, access_construction, access_sec_doors,
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat)
equip(var/mob/living/carbon/human/H)
@@ -41,6 +49,9 @@
spawn_positions = 5
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
equip(var/mob/living/carbon/human/H)
@@ -73,6 +84,8 @@
spawn_positions = 2
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
equip(var/mob/living/carbon/human/H)
@@ -90,35 +103,4 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1
/datum/job/roboticist
title = "Roboticist"
flag = ROBOTICIST
department_flag = ENGSEC
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the chief engineer and research director"
selection_color = "#fff5cc"
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_rob(H), slot_ears)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
+13
View File
@@ -3,6 +3,10 @@
//The name of the job
var/title = "NOPE"
//Job access. The use of minimal_access or access is determined by a config setting: config.jobs_have_minimal_access
var/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population)
var/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!)
//Bitflags for the job
var/flag = 0
var/department_flag = 0
@@ -36,3 +40,12 @@
/datum/job/proc/equip(var/mob/living/carbon/human/H)
return 1
/datum/job/proc/get_access()
if(!config) //Needed for robots.
return src.minimal_access
if(config.jobs_have_minimal_access)
return src.minimal_access
else
return src.access
+16 -2
View File
@@ -9,6 +9,12 @@
selection_color = "#ffddf0"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors)
equip(var/mob/living/carbon/human/H)
@@ -41,8 +47,10 @@
spawn_positions = 3
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
alt_titles = list("Surgeon", "Emergency Physician", "Virologist")
access = list(access_medical, access_morgue, access_surgery)
minimal_access = list(access_medical, access_morgue, access_surgery)
alt_titles = list("Surgeon", "Emergency Physician", "Virologist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -82,7 +90,7 @@
//Chemist is a medical job damnit //YEAH FUCK YOU SCIENCE -Pete
//Chemist is a medical job damnit //YEAH FUCK YOU SCIENCE -Pete //Guys, behave -Erro
/datum/job/chemist
title = "Chemist"
flag = CHEMIST
@@ -92,6 +100,8 @@
spawn_positions = 2
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_chemistry)
minimal_access = list(access_medical, access_chemistry)
equip(var/mob/living/carbon/human/H)
@@ -118,6 +128,8 @@
spawn_positions = 2
supervisors = "the chief medical officer and research director"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_genetics, access_research)
minimal_access = list(access_medical, access_morgue, access_genetics, access_research)
equip(var/mob/living/carbon/human/H)
@@ -145,6 +157,8 @@
spawn_positions = 1
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_virology)
minimal_access = list(access_medical, access_virology)
equip(var/mob/living/carbon/human/H)
+42 -1
View File
@@ -9,6 +9,14 @@
selection_color = "#ffddff"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway)
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway)
equip(var/mob/living/carbon/human/H)
@@ -36,8 +44,10 @@
spawn_positions = 3
supervisors = "the research director"
selection_color = "#ffeeff"
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist")
access = list(access_tox, access_tox_storage, access_research, access_xenobiology)
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenobiology)
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -46,6 +56,37 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/datum/job/roboticist
title = "Roboticist"
flag = ROBOTICIST
department_flag = MEDSCI
faction = "Station"
total_positions = 2
spawn_positions = 1
supervisors = "research director"
selection_color = "#ffeeff"
access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_ears)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
+15 -1
View File
@@ -9,6 +9,14 @@
selection_color = "#ffdddd"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
equip(var/mob/living/carbon/human/H)
@@ -47,6 +55,8 @@
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court)
equip(var/mob/living/carbon/human/H)
@@ -82,8 +92,10 @@
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
alt_titles = list("Forensic Technician")
access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
alt_titles = list("Forensic Technician")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -128,6 +140,8 @@
spawn_positions = 5
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court)
equip(var/mob/living/carbon/human/H)
+3 -8
View File
@@ -346,7 +346,6 @@ var/global/datum/controller/occupations/job_master
H << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
if(job.req_admin_notify)
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
spawnId(H,rank)
if(H.mind.assigned_role == rank && H.mind.role_alt_title)
spawnId(H, rank, H.mind.role_alt_title)
@@ -373,23 +372,19 @@ var/global/datum/controller/occupations/job_master
return
else
C = new job.idtype(H)
C.access = job.get_access()
else
C = new /obj/item/weapon/card/id(H)
if(C)
C.registered_name = H.real_name
C.assignment = title
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
C.access = get_access(rank)
H.equip_to_slot_or_del(C, slot_wear_id)
/* if(prob(50))
H.equip_to_slot_or_del(new /obj/item/weapon/pen(H), slot_r_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/pen/blue(H), slot_r_store)*/
H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
if(locate(/obj/item/device/pda,H))//I bet this could just use locate. It can --SkyMarshal
if(locate(/obj/item/device/pda,H))
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = H.wear_id.assignment
pda.ownjob = C.assignment
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
return 1
+20 -14
View File
@@ -175,9 +175,9 @@
user << "\blue <B>The sleeper is already occupied!</B>"
return
for(var/mob/living/carbon/metroid/M in range(1,G.affecting))
for(var/mob/living/carbon/slime/M in range(1,G.affecting))
if(M.Victim == G.affecting)
usr << "[G.affecting.name] will not fit into the sleeper because they have a Metroid latched onto their head."
usr << "[G.affecting.name] will not fit into the sleeper because they have a slime latched onto their head."
return
visible_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
@@ -230,7 +230,13 @@
del(src)
return
return
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(occupant)
go_out()
..(severity)
alter_health(mob/living/M as mob)
if (M.health > 0)
@@ -267,52 +273,52 @@
proc/inject_inap(mob/living/user as mob)
if(src.occupant)
if(src.occupant && src.occupant.reagents)
if(src.occupant.reagents.get_reagent_amount("inaprovaline") + 30 <= 60)
src.occupant.reagents.add_reagent("inaprovaline", 30)
user << text("Occupant now has [] units of Inaprovaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("inaprovaline"))
else
user << "No occupant!"
user << "There's no occupant in the sleeper or the subject rejects the chemicals!"
return
proc/inject_stox(mob/living/user as mob)
if(src.occupant)
if(src.occupant && src.occupant.reagents)
if(src.occupant.reagents.get_reagent_amount("stoxin") + 20 <= 40)
src.occupant.reagents.add_reagent("stoxin", 20)
user << text("Occupant now has [] units of soporifics in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("stoxin"))
else
user << "No occupant!"
user << "There's no occupant in the sleeper or the subject rejects the chemicals!"
return
proc/inject_dermaline(mob/living/user as mob)
if (src.occupant)
if(src.occupant && src.occupant.reagents)
if(src.occupant.reagents.get_reagent_amount("dermaline") + 20 <= 40)
src.occupant.reagents.add_reagent("dermaline", 20)
user << text("Occupant now has [] units of Dermaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dermaline"))
else
user << "No occupant!"
user << "There's no occupant in the sleeper or the subject rejects the chemicals!"
return
proc/inject_bicaridine(mob/living/user as mob)
if(src.occupant)
if(src.occupant && src.occupant.reagents)
if(src.occupant.reagents.get_reagent_amount("bicaridine") + 10 <= 20)
src.occupant.reagents.add_reagent("bicaridine", 10)
user << text("Occupant now has [] units of Bicaridine in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("bicaridine"))
else
user << "No occupant!"
user << "There's no occupant in the sleeper or the subject rejects the chemicals!"
return
proc/inject_dexalin(mob/living/user as mob)
if(src.occupant)
if(src.occupant && src.occupant.reagents)
if(src.occupant.reagents.get_reagent_amount("dexalin") + 20 <= 40)
src.occupant.reagents.add_reagent("dexalin", 20)
user << text("Occupant now has [] units of Dexalin in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dexalin"))
else
user << "No occupant!"
user << "There's no occupant in the sleeper or the subject rejects the chemicals!"
return
@@ -367,7 +373,7 @@
usr << "\blue <B>The sleeper is already occupied!</B>"
return
for(var/mob/living/carbon/metroid/M in range(1,usr))
for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
+1097 -911
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -87,6 +87,8 @@ obj/machinery/computer/general_air_control
var/datum/radio_frequency/radio_connection
attack_hand(mob/user)
if(..(user))
return
user << browse(return_text(),"window=computer")
user.set_machine(src)
onclose(user, "computer")
@@ -25,6 +25,8 @@
return
attack_hand(var/mob/user as mob)
if(..(user))
return
src.add_fingerprint(usr)
var/dat = {"
<html>
@@ -126,28 +128,6 @@
src.updateUsrDialog()
attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/area_atmos/M = new /obj/item/weapon/circuitboard/area_atmos( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.anchored = 1
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
A.state = 3
A.icon_state = "3"
else
user << "\blue You disconnect the monitor."
A.state = 4
A.icon_state = "4"
del(src)
/obj/machinery/computer/area_atmos/area
zone = "This computer is working in a wired network limited to this area."
+14
View File
@@ -1,3 +1,17 @@
/obj/machinery/meter
name = "meter"
desc = "It measures something."
icon = 'icons/obj/meter.dmi'
icon_state = "meterX"
var/obj/machinery/atmospherics/pipe/target = null
anchored = 1.0
power_channel = ENVIRON
var/frequency = 0
var/id
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/meter/New()
..()
src.target = locate(/obj/machinery/atmospherics/pipe) in loc
@@ -1,5 +1,6 @@
/obj/machinery/portable_atmospherics
name = "atmoalter"
use_power = 0
var/datum/gas_mixture/air_contents = new
var/obj/machinery/atmospherics/portables_connector/connected_port
@@ -105,7 +106,7 @@
user << "\blue Nothing happens."
return
else if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
else if ((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
visible_message("\red [user] has used [W] on \icon[icon]")
if(air_contents)
var/pressure = air_contents.return_pressure()
+16
View File
@@ -27,6 +27,22 @@
return
/obj/machinery/portable_atmospherics/pump/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(prob(50/severity))
on = !on
if(prob(100/severity))
direction_out = !direction_out
target_pressure = rand(0,1300)
update_icon()
..(severity)
/obj/machinery/portable_atmospherics/pump/process()
..()
if(on)
+11
View File
@@ -10,6 +10,17 @@
volume = 750
/obj/machinery/portable_atmospherics/scrubber/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(prob(50/severity))
on = !on
update_icon()
..(severity)
/obj/machinery/portable_atmospherics/scrubber/huge
name = "Huge Air Scrubber"
icon_state = "scrubber:0"
+1 -1
View File
@@ -20,7 +20,7 @@
if (istype(zvent_conn))
//both floors have simulated turfs, share()
var/turf/simulated/myturf = loc
var/datum/gas_mixture/conn_air = zturf_conn.air //TODO: pop culture reference
var/datum/gas_mixture/conn_air = zturf_conn.zone.air //TODO: pop culture reference
var/datum/gas_mixture/my_air = myturf.air
if (istype(conn_air) && istype(my_air))
// if (!my_air.compare(conn_air))
+25 -1
View File
@@ -59,10 +59,34 @@ var/global/list/autolathe_recipes_hidden = list( \
)
/obj/machinery/autolathe
var/busy = 0
name = "\improper Autolathe"
desc = "It produces items using metal and glass."
icon_state = "autolathe"
density = 1
var/m_amount = 0.0
var/max_m_amount = 150000.0
var/g_amount = 0.0
var/max_g_amount = 75000.0
var/operating = 0.0
var/opened = 0.0
anchored = 1.0
var/list/L = list()
var/list/LL = list()
var/hacked = 0
var/disabled = 0
var/shocked = 0
var/list/wires = list()
var/hack_wire
var/disable_wire
var/shock_wire
use_power = 1
idle_power_usage = 10
active_power_usage = 100
var/busy = 0
proc
wires_win(mob/user as mob)
var/dat as text
+1 -1
View File
@@ -42,7 +42,7 @@
updateUsrDialog()
else if(processing)
user << "\red The biogenerator is currently processing."
else if(istype(O, /obj/item/weapon/plantbag))
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
+11 -7
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/aibots.dmi'
layer = MOB_LAYER
luminosity = 3
use_power = 0
var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds"
var/on = 1
var/health = 0 //do not forget to set health for your bot!
@@ -88,13 +89,16 @@
else if (istype(W, /obj/item/weapon/card/emag) && emagged < 2)
Emag(user)
else
switch(W.damtype)
if("fire")
src.health -= W.force * fire_dam_coeff
if("brute")
src.health -= W.force * brute_dam_coeff
..()
healthcheck()
if(hasvar(W,"force") && hasvar(W,"damtype"))
switch(W.damtype)
if("fire")
src.health -= W.force * fire_dam_coeff
if("brute")
src.health -= W.force * brute_dam_coeff
..()
healthcheck()
else
..()
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
+2 -1
View File
@@ -52,7 +52,8 @@
should_patrol = 1
src.botcard = new /obj/item/weapon/card/id(src)
src.botcard.access = get_access("Janitor")
var/datum/job/janitor/J = new/datum/job/janitor
src.botcard.access = J.get_access()
if(radio_controller)
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
+42 -38
View File
@@ -7,7 +7,7 @@
density = 1
anchored = 0
// weight = 1.0E7
req_access = list(access_security)
req_one_access = list(access_security, access_forensics_lockers)
health = 100
maxhealth = 100
fire_dam_coeff = 0.7
@@ -78,7 +78,8 @@
src.icon_state = "[lasercolor]ed209[src.on]"
spawn(3)
src.botcard = new /obj/item/weapon/card/id(src)
src.botcard.access = get_access("Detective")
var/datum/job/detective/J = new/datum/job/detective
src.botcard.access = J.get_access()
if(radio_controller)
radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT)
@@ -194,11 +195,12 @@ Auto Patrol: []"},
user << "<span class='notice'>Access denied.</span>"
else
..()
if (!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!src.target))
src.target = user
if(lasercolor)//To make up for the fact that lasertag bots don't hunt
src.shootAt(user)
src.mode = SECBOT_HUNT
if (!istype(W, /obj/item/weapon/screwdriver) && (!src.target))
if(hasvar(W,"force") && W.force)//If force is defined and non-zero
src.target = user
if(lasercolor)//To make up for the fact that lasertag bots don't hunt
src.shootAt(user)
src.mode = SECBOT_HUNT
/obj/machinery/bot/ed209/Emag(mob/user as mob)
..()
@@ -317,29 +319,36 @@ Auto Patrol: []"},
mode = SECBOT_HUNT
return
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
if(istype(src.target,/mob/living/carbon))
if (!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
spawn(60)
if (get_dist(src, src.target) <= 1)
if (src.target.handcuffed)
return
spawn(60)
if (get_dist(src, src.target) <= 1)
if (src.target.handcuffed)
return
if(istype(src.target,/mob/living/carbon))
src.target.handcuffed = new /obj/item/weapon/handcuffs(src.target)
target.update_inv_handcuffed() //update handcuff overlays
if(istype(src.target,/mob/living/carbon))
src.target.handcuffed = new /obj/item/weapon/handcuffs(src.target)
target.update_inv_handcuffed() //update handcuff overlays
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
// playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
// playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
else
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
if(SECBOT_ARREST) // arresting
if(src.lasercolor)
@@ -704,22 +713,17 @@ Auto Patrol: []"},
if(istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag))
threatcount += 2
if (src.check_records)
if(src.check_records)
for (var/datum/data/record/E in data_core.general)
var/perpname = perp.name
if (perp:wear_id)
var/obj/item/weapon/card/id/id = perp:wear_id
if(istype(perp:wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = perp:wear_id
id = pda.id
if (id)
if(perp.wear_id)
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
if(id)
perpname = id.registered_name
else
var/obj/item/device/pda/pda = perp:wear_id
perpname = pda.owner
if (E.fields["name"] == perpname)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
threatcount = 4
break
+590
View File
@@ -0,0 +1,590 @@
//Farmbots by GauHelldragon - 12/30/2012
// A new type of buildable aiBot that helps out in hydroponics
// Made by using a robot arm on a water tank and then adding:
// A plant analyzer, a bucket, a mini-hoe and then a proximity sensor (in that order)
// Will water, weed and fertilize plants that need it
// When emagged, it will "water", "weed" and "fertilize" humans instead
// Holds up to 10 fertilizers (only the type dispensed by the machines, not chemistry bottles)
// It will fill up it's water tank at a sink when low.
// The behavior panel can be unlocked with hydroponics access and be modified to disable certain behaviors
// By default, it will ignore weeds and mushrooms, but can be set to tend to these types of plants as well.
#define FARMBOT_MODE_WATER 1
#define FARMBOT_MODE_FERTILIZE 2
#define FARMBOT_MODE_WEED 3
#define FARMBOT_MODE_REFILL 4
#define FARMBOT_MODE_WAITING 5
#define FARMBOT_ANIMATION_TIME 25 //How long it takes to use one of the action animations
#define FARMBOT_EMAG_DELAY 60 //How long of a delay after doing one of the emagged attack actions
#define FARMBOT_ACTION_DELAY 35 //How long of a delay after doing one of the normal actions
/obj/machinery/bot/farmbot
name = "Farmbot"
desc = "The botanist's best friend."
icon = 'aibots.dmi'
icon_state = "farmbot0"
layer = 5.0
density = 1
anchored = 0
health = 50
maxhealth = 50
req_access =list(access_hydroponics)
var/Max_Fertilizers = 10
var/setting_water = 1
var/setting_refill = 1
var/setting_fertilize = 1
var/setting_weed = 1
var/setting_ignoreWeeds = 1
var/setting_ignoreMushrooms = 1
var/atom/target //Current target, can be a human, a hydroponics tray, or a sink
var/mode //Which mode is being used, 0 means it is looking for work
var/obj/structure/reagent_dispensers/watertank/tank // the water tank that was used to make it, remains inside the bot.
var/path[] = new() // used for pathing
var/frustration
/obj/machinery/bot/farmbot/New()
..()
src.icon_state = "farmbot[src.on]"
spawn (4)
src.botcard = new /obj/item/weapon/card/id(src)
src.botcard.access = req_access
if ( !tank ) //Should be set as part of making it... but lets check anyway
tank = locate(/obj/structure/reagent_dispensers/watertank/) in contents
if ( !tank ) //An admin must have spawned the farmbot! Better give it a tank.
tank = new /obj/structure/reagent_dispensers/watertank(src)
/obj/machinery/bot/farmbot/Bump(M as mob|obj) //Leave no door unopened!
spawn(0)
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
var/obj/machinery/door/D = M
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
D.open()
src.frustration = 0
return
return
/obj/machinery/bot/farmbot/turn_on()
. = ..()
src.icon_state = "farmbot[src.on]"
src.updateUsrDialog()
/obj/machinery/bot/farmbot/turn_off()
..()
src.path = new()
src.icon_state = "farmbot[src.on]"
src.updateUsrDialog()
/obj/machinery/bot/farmbot/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/bot/farmbot/proc/get_total_ferts()
var total_fert = 0
for (var/obj/item/nutrient/fert in contents)
total_fert++
return total_fert
/obj/machinery/bot/farmbot/attack_hand(mob/user as mob)
. = ..()
if (.)
return
var/dat
dat += "<TT><B>Automatic Hyrdoponic Assisting Unit v1.0</B></TT><BR><BR>"
dat += "Status: <A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A><BR>"
dat += "Water Tank: "
if ( tank )
dat += "\[[tank.reagents.total_volume]/[tank.reagents.maximum_volume]\]"
else
dat += "Error: Water Tank not Found"
dat += "<br>Fertilizer Storage: <A href='?src=\ref[src];eject=1'>\[[get_total_ferts()]/[Max_Fertilizers]\]</a>"
dat += "<br>Behaviour controls are [src.locked ? "locked" : "unlocked"]<hr>"
if(!src.locked)
dat += "<TT>Watering Controls:<br>"
dat += " Water Plants : <A href='?src=\ref[src];water=1'>[src.setting_water ? "Yes" : "No"]</A><BR>"
dat += " Refill Watertank : <A href='?src=\ref[src];refill=1'>[src.setting_refill ? "Yes" : "No"]</A><BR>"
dat += "<br>Fertilizer Controls:<br>"
dat += " Fertilize Plants : <A href='?src=\ref[src];fertilize=1'>[src.setting_fertilize ? "Yes" : "No"]</A><BR>"
dat += "<br>Weeding Controls:<br>"
dat += " Weed Plants : <A href='?src=\ref[src];weed=1'>[src.setting_weed ? "Yes" : "No"]</A><BR>"
dat += "<br>Ignore Weeds : <A href='?src=\ref[src];ignoreWeed=1'>[src.setting_ignoreWeeds ? "Yes" : "No"]</A><BR>"
dat += "Ignore Mushrooms : <A href='?src=\ref[src];ignoreMush=1'>[src.setting_ignoreMushrooms ? "Yes" : "No"]</A><BR>"
dat += "</TT>"
user << browse("<HEAD><TITLE>Farmbot v1.0 controls</TITLE></HEAD>[dat]", "window=autofarm")
onclose(user, "autofarm")
return
/obj/machinery/bot/farmbot/Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if ((href_list["power"]) && (src.allowed(usr)))
if (src.on)
turn_off()
else
turn_on()
else if((href_list["water"]) && (!src.locked))
setting_water = !setting_water
else if((href_list["refill"]) && (!src.locked))
setting_refill = !setting_refill
else if((href_list["fertilize"]) && (!src.locked))
setting_fertilize = !setting_fertilize
else if((href_list["weed"]) && (!src.locked))
setting_weed = !setting_weed
else if((href_list["ignoreWeed"]) && (!src.locked))
setting_ignoreWeeds = !setting_ignoreWeeds
else if((href_list["ignoreMush"]) && (!src.locked))
setting_ignoreMushrooms = !setting_ignoreMushrooms
else if (href_list["eject"] )
flick("farmbot_hatch",src)
for (var/obj/item/nutrient/fert in contents)
fert.loc = get_turf(src)
src.updateUsrDialog()
return
/obj/machinery/bot/farmbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
src.updateUsrDialog()
else
user << "\red Access denied."
else if (istype(W, /obj/item/nutrient))
if ( get_total_ferts() >= Max_Fertilizers )
user << "The fertilizer storage is full!"
return
user.drop_item()
W.loc = src
user << "You insert [W]."
flick("farmbot_hatch",src)
src.updateUsrDialog()
return
else
..()
/obj/machinery/bot/farmbot/Emag(mob/user as mob)
..()
if(user) user << "\red You short out [src]'s plant identifier circuits."
spawn(0)
for(var/mob/O in hearers(src, null))
O.show_message("\red <B>[src] buzzes oddly!</B>", 1)
flick("farmbot_broke", src)
src.emagged = 1
src.on = 1
src.icon_state = "farmbot[src.on]"
target = null
mode = FARMBOT_MODE_WAITING //Give the emagger a chance to get away! 15 seconds should be good.
spawn(150)
mode = 0
/obj/machinery/bot/farmbot/explode()
src.on = 0
visible_message("\red <B>[src] blows apart!</B>", 1)
var/turf/Tsec = get_turf(src)
new /obj/item/weapon/minihoe(Tsec)
new /obj/item/weapon/reagent_containers/glass/bucket(Tsec)
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/device/analyzer/plant_analyzer(Tsec)
if ( tank )
tank.loc = Tsec
for ( var/obj/item/nutrient/fert in contents )
if ( prob(50) )
fert.loc = Tsec
if (prob(50))
new /obj/item/robot_parts/l_arm(Tsec)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
del(src)
return
/obj/machinery/bot/farmbot/process()
set background = 1
if(!src.on)
return
if ( emagged && prob(1) )
flick("farmbot_broke", src)
if ( mode == FARMBOT_MODE_WAITING )
return
if ( !mode || !target || !(target in view(7,src)) ) //Don't bother chasing down targets out of view
mode = 0
target = null
if ( !find_target() )
// Couldn't find a target, wait a while before trying again.
mode = FARMBOT_MODE_WAITING
spawn(100)
mode = 0
return
if ( mode && target )
if ( get_dist(target,src) <= 1 || ( emagged && mode == FARMBOT_MODE_FERTILIZE ) )
// If we are in emagged fertilize mode, we throw the fertilizer, so distance doesn't matter
frustration = 0
use_farmbot_item()
else
move_to_target()
return
/obj/machinery/bot/farmbot/proc/use_farmbot_item()
if ( !target )
mode = 0
return 0
if ( emagged && !ismob(target) ) // Humans are plants!
mode = 0
target = null
return 0
if ( !emagged && !istype(target,/obj/machinery/hydroponics) && !istype(target,/obj/structure/sink) ) // Humans are not plants!
mode = 0
target = null
return 0
if ( mode == FARMBOT_MODE_FERTILIZE )
//Find which fertilizer to use
var/obj/item/nutrient/fert
for ( var/obj/item/nutrient/nut in contents )
fert = nut
break
if ( !fert )
target = null
mode = 0
return
fertilize(fert)
if ( mode == FARMBOT_MODE_WEED )
weed()
if ( mode == FARMBOT_MODE_WATER )
water()
if ( mode == FARMBOT_MODE_REFILL )
refill()
/obj/machinery/bot/farmbot/proc/find_target()
if ( emagged ) //Find a human and help them!
for ( var/mob/living/carbon/human/human in view(7,src) )
if (human.stat == 2)
continue
var list/options = list(FARMBOT_MODE_WEED)
if ( get_total_ferts() )
options.Add(FARMBOT_MODE_FERTILIZE)
if ( tank && tank.reagents.total_volume >= 1 )
options.Add(FARMBOT_MODE_WATER)
mode = pick(options)
target = human
return mode
return 0
else
if ( setting_refill && tank && tank.reagents.total_volume < 100 )
for ( var/obj/structure/sink/source in view(7,src) )
target = source
mode = FARMBOT_MODE_REFILL
return 1
for ( var/obj/machinery/hydroponics/tray in view(7,src) )
var newMode = GetNeededMode(tray)
if ( newMode )
mode = newMode
target = tray
return 1
return 0
/obj/machinery/bot/farmbot/proc/GetNeededMode(obj/machinery/hydroponics/tray)
if ( !tray.planted || tray.dead )
return 0
if ( tray.myseed.plant_type == 1 && setting_ignoreWeeds )
return 0
if ( tray.myseed.plant_type == 2 && setting_ignoreMushrooms )
return 0
if ( setting_water && tray.waterlevel <= 10 && tank && tank.reagents.total_volume >= 1 )
return FARMBOT_MODE_WATER
if ( setting_weed && tray.weedlevel >= 5 )
return FARMBOT_MODE_WEED
if ( setting_fertilize && tray.nutrilevel <= 2 && get_total_ferts() )
return FARMBOT_MODE_FERTILIZE
return 0
/obj/machinery/bot/farmbot/proc/move_to_target()
//Mostly copied from medibot code.
if(src.frustration > 8)
target = null
mode = 0
frustration = 0
src.path = new()
if(src.target && (src.path.len) && (get_dist(src.target,src.path[src.path.len]) > 2))
src.path = new()
if(src.target && src.path.len == 0 && (get_dist(src,src.target) > 1))
spawn(0)
var/turf/dest = get_step_towards(target,src) //Can't pathfind to a tray, as it is dense, so pathfind to the spot next to the tray
src.path = AStar(src.loc, dest, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
src.path = reverselist(src.path)
if(src.path.len == 0)
for ( var/turf/spot in orange(1,target) ) //The closest one is unpathable, try the other spots
if ( spot == dest ) //We already tried this spot
continue
if ( spot.density )
continue
src.path = AStar(src.loc, spot, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30,id=botcard)
src.path = reverselist(src.path)
if ( src.path.len > 0 )
break
if ( src.path.len == 0 )
target = null
mode = 0
return
if(src.path.len > 0 && src.target)
step_to(src, src.path[1])
src.path -= src.path[1]
spawn(3)
if(src.path.len)
step_to(src, src.path[1])
src.path -= src.path[1]
if(src.path.len > 8 && src.target)
src.frustration++
/obj/machinery/bot/farmbot/proc/fertilize(obj/item/nutrient/fert)
if ( !fert )
target = null
mode = 0
return 0
if ( emagged ) // Warning, hungry humans detected: throw fertilizer at them
spawn(0)
fert.loc = src.loc
fert.throw_at(target, 16, 3)
src.visible_message("\red <b>[src] launches [fert.name] at [target.name]!</b>")
flick("farmbot_broke", src)
spawn (FARMBOT_EMAG_DELAY)
mode = 0
target = null
return 1
else // feed them plants~
var /obj/machinery/hydroponics/tray = target
tray.nutrilevel = 10
tray.yieldmod = fert.yieldmod
tray.mutmod = fert.mutmod
del fert
tray.updateicon()
icon_state = "farmbot_fertile"
mode = FARMBOT_MODE_WAITING
spawn (FARMBOT_ACTION_DELAY)
mode = 0
target = null
spawn (FARMBOT_ANIMATION_TIME)
icon_state = "farmbot[src.on]"
return 1
/obj/machinery/bot/farmbot/proc/weed()
icon_state = "farmbot_hoe"
spawn(FARMBOT_ANIMATION_TIME)
icon_state = "farmbot[src.on]"
if ( emagged ) // Warning, humans infested with weeds!
mode = FARMBOT_MODE_WAITING
spawn(FARMBOT_EMAG_DELAY)
mode = 0
if ( prob(50) ) // better luck next time little guy
src.visible_message("\red <b>[src] swings wildly at [target] with a minihoe, missing completely!</b>")
else // yayyy take that weeds~
var/attackVerb = pick("slashed", "sliced", "cut", "clawed")
var /mob/living/carbon/human/human = target
src.visible_message("\red <B>[src] [attackVerb] [human]!</B>")
var/damage = 5
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = human.get_organ(ran_zone(dam_zone))
var/armor = human.run_armor_check(affecting, "melee")
human.apply_damage(damage,BRUTE,affecting,armor)
else // warning, plants infested with weeds!
mode = FARMBOT_MODE_WAITING
spawn(FARMBOT_ACTION_DELAY)
mode = 0
var /obj/machinery/hydroponics/tray = target
tray.weedlevel = 0
tray.updateicon()
/obj/machinery/bot/farmbot/proc/water()
if ( !tank || tank.reagents.total_volume < 1 )
mode = 0
target = null
return 0
icon_state = "farmbot_water"
spawn(FARMBOT_ANIMATION_TIME)
icon_state = "farmbot[src.on]"
if ( emagged ) // warning, humans are thirsty!
var splashAmount = min(70,tank.reagents.total_volume)
src.visible_message("\red [src] splashes [target] with a bucket of water!")
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
if ( prob(50) )
tank.reagents.reaction(target, TOUCH) //splash the human!
else
tank.reagents.reaction(target.loc, TOUCH) //splash the human's roots!
spawn(5)
tank.reagents.remove_any(splashAmount)
mode = FARMBOT_MODE_WAITING
spawn(FARMBOT_EMAG_DELAY)
mode = 0
else
var /obj/machinery/hydroponics/tray = target
var/b_amount = tank.reagents.get_reagent_amount("water")
if(b_amount > 0 && tray.waterlevel < 100)
if(b_amount + tray.waterlevel > 100)
b_amount = 100 - tray.waterlevel
tank.reagents.remove_reagent("water", b_amount)
tray.waterlevel += b_amount
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
tray.toxic -= round(b_amount/4)
if (tray.toxic < 0 ) // Make sure it won't go overboard
tray.toxic = 0
tray.updateicon()
mode = FARMBOT_MODE_WAITING
spawn(FARMBOT_ACTION_DELAY)
mode = 0
/obj/machinery/bot/farmbot/proc/refill()
if ( !tank || !tank.reagents.total_volume > 600 || !istype(target,/obj/structure/sink) )
mode = 0
target = null
return
mode = FARMBOT_MODE_WAITING
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
src.visible_message("\blue [src] starts filling it's tank from [target].")
spawn(300)
src.visible_message("\blue [src] finishes filling it's tank.")
src.mode = 0
tank.reagents.add_reagent("water", tank.reagents.maximum_volume - tank.reagents.total_volume )
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
/obj/item/weapon/farmbot_arm_assembly
name = "water tank/robot arm assembly"
desc = "A water tank with a robot arm permanently grafted to it."
icon = 'aibots.dmi'
icon_state = "water_arm"
var/build_step = 0
var/created_name = "Farmbot" //To preserve the name if it's a unique farmbot I guess
w_class = 3.0
New()
..()
spawn(4) // If an admin spawned it, it won't have a watertank it, so lets make one for em!
var tank = locate(/obj/structure/reagent_dispensers/watertank) in contents
if( !tank )
new /obj/structure/reagent_dispensers/watertank(src)
/obj/structure/reagent_dispensers/watertank/attackby(var/obj/item/robot_parts/S, mob/user as mob)
if ((!istype(S, /obj/item/robot_parts/l_arm)) && (!istype(S, /obj/item/robot_parts/r_arm)))
..()
return
//Making a farmbot!
var/obj/item/weapon/farmbot_arm_assembly/A = new /obj/item/weapon/farmbot_arm_assembly
A.loc = src.loc
A.layer = 20
user << "You add the robot arm to the [src]"
src.loc = A //Place the water tank into the assembly, it will be needed for the finished bot
del(S)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if((istype(W, /obj/item/device/analyzer/plant_analyzer)) && (!src.build_step))
src.build_step++
user << "You add the plant analyzer to [src]!"
src.name = "farmbot assembly"
del(W)
else if(( istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (src.build_step == 1))
src.build_step++
user << "You add a bucket to [src]!"
src.name = "farmbot assembly with bucket"
del(W)
else if(( istype(W, /obj/item/weapon/minihoe)) && (src.build_step == 2))
src.build_step++
user << "You add a minihoe to [src]!"
src.name = "farmbot assembly with bucket and minihoe"
del(W)
else if((isprox(W)) && (src.build_step == 3))
src.build_step++
user << "You complete the Farmbot! Beep boop."
var/obj/machinery/bot/farmbot/S = new /obj/machinery/bot/farmbot
for ( var/obj/structure/reagent_dispensers/watertank/wTank in src.contents )
wTank.loc = S
S.tank = wTank
S.loc = get_turf(src)
S.name = src.created_name
del(W)
del(src)
else if(istype(W, /obj/item/weapon/pen))
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
t = copytext(sanitize(t), 1, MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
return
src.created_name = t
+1 -1
View File
@@ -45,7 +45,7 @@
var/turf/target
var/turf/oldtarget
var/oldloc = null
req_access = list(access_atmospherics)
req_access = list(access_construction)
var/path[] = new()
var/targetdirection
+163 -113
View File
@@ -6,17 +6,17 @@
/obj/machinery/bot/medbot
name = "Medibot"
desc = "A little medical robot. He looks somewhat underwhelmed."
icon = 'aibots.dmi'
icon = 'icons/obj/aibots.dmi'
icon_state = "medibot0"
layer = 5.0
density = 1
density = 0
anchored = 0
health = 20
maxhealth = 20
req_access =list(access_medical)
var/stunned = 0 //It can be stunned by tasers. Delicate circuits.
var/obj/machinery/camera/cam = null
var/list/botcard_access = list(access_medical, access_morgue, access_genetics, access_robotics)
//var/emagged = 0
var/list/botcard_access = list(access_medical)
var/obj/item/weapon/reagent_containers/glass/reagent_glass = null //Can be set to draw from this for reagents.
var/skin = null //Set to "tox", "ointment" or "o2" for the other two firstaid kits.
var/frustration = 0
@@ -27,29 +27,30 @@
var/last_found = 0
var/last_newpatient_speak = 0 //Don't spam the "HEY I'M COMING" messages
var/currently_healing = 0
var/injection_amount = 5 //How much reagent do we inject at a time?
var/heal_threshold = 15 //Start healing when they have this much damage in a category
var/use_beaker = 1 //Use reagents in beaker instead of default treatment agents.
var/injection_amount = 15 //How much reagent do we inject at a time?
var/heal_threshold = 10 //Start healing when they have this much damage in a category
var/use_beaker = 0 //Use reagents in beaker instead of default treatment agents.
//Setting which reagents to use to treat what by default. By id.
var/treatment_brute = "bicaridine"
var/treatment_oxy = "dexalin"
var/treatment_fire = "kelotane"
var/treatment_tox = "anti_toxin"
var/treatment_brute = "tricordrazine"
var/treatment_oxy = "tricordrazine"
var/treatment_fire = "tricordrazine"
var/treatment_tox = "tricordrazine"
var/treatment_virus = "spaceacillin"
var/reagent_id = "inaprovaline"
var/shut_up = 0 //self explanatory :)
var/always_inject = 0
/obj/machinery/bot/medbot/mysterious
name = "Mysterious Medibot"
desc = "International Medibot of mystery."
skin = "bezerk"
reagent_id = "dexalinp"
treatment_oxy = "dexalinp"
treatment_brute = "bicaridine"
treatment_fire = "kelotane"
treatment_tox = "anti_toxin"
/obj/item/weapon/firstaid_arm_assembly
name = "first aid/robot arm assembly"
desc = "A first aid kit with a robot arm permanently grafted to it."
icon = 'aibots.dmi'
icon = 'icons/obj/aibots.dmi'
icon_state = "firstaid_arm"
var/build_step = 0
var/created_name = "Medibot" //To preserve the name if it's a unique medbot I guess
@@ -60,7 +61,7 @@
..()
spawn(5)
if(src.skin)
src.overlays += image('aibots.dmi', "kit_skin_[src.skin]")
src.overlays += image('icons/obj/aibots.dmi', "kit_skin_[src.skin]")
/obj/machinery/bot/medbot/New()
@@ -69,16 +70,14 @@
spawn(4)
if(src.skin)
src.overlays += image('aibots.dmi', "medskin_[src.skin]")
src.overlays += image('icons/obj/aibots.dmi', "medskin_[src.skin]")
src.botcard = new /obj/item/weapon/card/id(src)
if(isnull(src.botcard_access) || (src.botcard_access.len < 1))
src.botcard.access = get_access("Medical Doctor")
var/datum/job/doctor/J = new/datum/job/doctor
src.botcard.access = J.get_access()
else
src.botcard.access = src.botcard_access
src.cam = new /obj/machinery/camera(src)
src.cam.c_tag = src.name
src.cam.network = "Medbay"
/obj/machinery/bot/medbot/turn_on()
. = ..()
@@ -106,6 +105,7 @@
var/dat
dat += "<TT><B>Automatic Medical Unit v1.0</B></TT><BR><BR>"
dat += "Status: <A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A><BR>"
dat += "Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"
dat += "Beaker: "
if (src.reagent_glass)
dat += "<A href='?src=\ref[src];eject=1'>Loaded \[[src.reagent_glass.reagents.total_volume]/[src.reagent_glass.reagents.maximum_volume]\]</a>"
@@ -130,9 +130,6 @@
dat += "Reagent Source: "
dat += "<a href='?src=\ref[src];use_beaker=1'>[src.use_beaker ? "Loaded Beaker (When available)" : "Internal Synthesizer"]</a><br>"
dat += "Inject: "
dat += "<a href='?src=\ref[src];toggle_inject=1'>[src.always_inject ? "Always" : "If loaded chemical is known to help"]</a><br>"
dat += "The speaker switch is [src.shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a>"
user << browse("<HEAD><TITLE>Medibot v1.0 controls</TITLE></HEAD>[dat]", "window=automed")
@@ -168,12 +165,13 @@
else if((href_list["use_beaker"]) && (!src.locked || issilicon(usr)))
src.use_beaker = !src.use_beaker
else if((href_list["toggle_inject"]) && (!src.locked))
src.always_inject = !src.always_inject
else if (href_list["eject"] && (!isnull(src.reagent_glass)))
src.reagent_glass.loc = get_turf(src)
src.reagent_glass = null
if(!src.locked)
src.reagent_glass.loc = get_turf(src)
src.reagent_glass = null
else
usr << "<span class='notice'>You cannot eject the beaker because the panel is locked.</span>"
else if ((href_list["togglevoice"]) && (!src.locked || issilicon(usr)))
src.shut_up = !src.shut_up
@@ -183,22 +181,30 @@
/obj/machinery/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
if (src.allowed(user) && !open && !emagged)
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
user << "<span class='notice'>Controls are now [src.locked ? "locked." : "unlocked."]</span>"
src.updateUsrDialog()
else
user << "\red Access denied."
if(emagged)
user << "<span class='warning'>ERROR</span>"
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
else
user << "<span class='warning'>Access denied.</span>"
else if (istype(W, /obj/item/weapon/reagent_containers/glass))
if(src.locked)
user << "<span class='notice'>You cannot insert a beaker because the panel is locked.</span>"
return
if(!isnull(src.reagent_glass))
user << "There is already a beaker loaded!"
user << "<span class='notice'>There is already a beaker loaded.</span>"
return
user.drop_item()
W.loc = src
src.reagent_glass = W
user << "You insert [W]."
user << "<span class='notice'>You insert [W].</span>"
src.updateUsrDialog()
return
@@ -209,19 +215,20 @@
/obj/machinery/bot/medbot/Emag(mob/user as mob)
..()
if(user) user << "\red You short out [src]'s reagent synthesis circuits."
spawn(0)
for(var/mob/O in hearers(src, null))
O.show_message("\red <B>[src] buzzes oddly!</B>", 1)
flick("medibot_spark", src)
src.patient = null
if(user) src.oldpatient = user
src.currently_healing = 0
src.last_found = world.time
src.anchored = 0
src.emagged = 1
src.on = 1
src.icon_state = "medibot[src.on]"
if(open && !locked)
if(user) user << "<span class='warning'>You short out [src]'s reagent synthesis circuits.</span>"
spawn(0)
for(var/mob/O in hearers(src, null))
O.show_message("\red <B>[src] buzzes oddly!</B>", 1)
flick("medibot_spark", src)
src.patient = null
if(user) src.oldpatient = user
src.currently_healing = 0
src.last_found = world.time
src.anchored = 0
src.emagged = 2
src.on = 1
src.icon_state = "medibot[src.on]"
/obj/machinery/bot/medbot/process()
set background = 1
@@ -251,7 +258,7 @@
src.path = new()
if(!src.patient)
if(prob(1) && (!src.shut_up))
if(!src.shut_up && prob(1))
var/message = pick("Radar, put a mask on!","There's always a catch, and it's the best there is.","I knew it, I should've been a plastic surgeon.","What kind of medbay is this? Everyone's dropping like dead flies.","Delicious!")
src.speak(message)
@@ -262,9 +269,6 @@
if ((C == src.oldpatient) && (world.time < src.last_found + 100))
continue
if(C.getOxyLoss() < 5 && reagent_id == "inaprovaline" && !src.emagged && !src.reagent_glass)
continue
if(src.assess_patient(C))
src.patient = C
src.oldpatient = C
@@ -324,7 +328,7 @@
if(C.suiciding)
return 0 //Kevorkian school of robotic medical assistants.
if(src.emagged) //Everyone needs our medicine. (Our medicine is toxins)
if(src.emagged == 2) //Everyone needs our medicine. (Our medicine is toxins)
return 1
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
@@ -335,18 +339,25 @@
continue
//They're injured enough for it!
if(C.getBruteLoss() >= heal_threshold)
if((C.getBruteLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_brute)))
return 1 //If they're already medicated don't bother!
if(C.getOxyLoss() >= (15 + heal_threshold))
if((C.getOxyLoss() >= (15 + heal_threshold)) && (!C.reagents.has_reagent(src.treatment_oxy)))
return 1
if(C.getFireLoss() >= heal_threshold)
if((C.getFireLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_fire)))
return 1
if(C.getToxLoss() >= heal_threshold)
if((C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_tox)))
return 1
for(var/datum/disease/D in C.viruses)
if((D.stage > 1) || (D.spread_type == AIRBORNE))
if (!C.reagents.has_reagent(src.treatment_virus))
return 1 //STOP DISEASE FOREVER
return 0
/obj/machinery/bot/medbot/proc/medicate_patient(mob/living/carbon/C as mob)
@@ -369,37 +380,40 @@
src.last_found = world.time
return
//See if we have anything inside the beaker to help.
var/reagent_id = null
//Use whatever is inside the loaded beaker. If there is one.
if((src.use_beaker) && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume))
if(always_inject)
reagent_id = "internal_beaker"
else if (C.getBruteLoss() >= heal_threshold && reagent_glass.reagents.has_reagent(src.treatment_brute))
reagent_id = "internal_beaker"
reagent_id = "internal_beaker"
else if (C.getOxyLoss() >= (15 + heal_threshold) && reagent_glass.reagents.has_reagent(src.treatment_oxy))
reagent_id = "internal_beaker"
else if (C.getFireLoss() >= heal_threshold && reagent_glass.reagents.has_reagent(src.treatment_fire))
reagent_id = "internal_beaker"
else if (C.getToxLoss() >= heal_threshold && reagent_glass.reagents.has_reagent(src.treatment_tox))
reagent_id = "internal_beaker"
else if (100 - C.health >= heal_threshold && reagent_glass.reagents.has_reagent("tricordrazine"))
reagent_id = "internal_beaker"
if(src.emagged) //Emagged! Time to poison everybody.
if(src.emagged == 2) //Emagged! Time to poison everybody.
reagent_id = "toxin"
if(reagent_id == "internal_beaker" && \
src.patient.reagents.has_reagent(src.reagent_glass.reagents.get_master_reagent_id()) )
if(prob(10))
var/message = pick("Oops, that's an overdose!", "You're going to be just fine!")
src.speak(message)
return
var/virus = 0
for(var/datum/disease/D in C.viruses)
virus = 1
if(C.getOxyLoss() < 10 && reagent_id == "inaprovaline") //If they don't need any of that they're probably cured!
if (!reagent_id && (virus))
if(!C.reagents.has_reagent(src.treatment_virus))
reagent_id = src.treatment_virus
if (!reagent_id && (C.getBruteLoss() >= heal_threshold))
if(!C.reagents.has_reagent(src.treatment_brute))
reagent_id = src.treatment_brute
if (!reagent_id && (C.getOxyLoss() >= (15 + heal_threshold)))
if(!C.reagents.has_reagent(src.treatment_oxy))
reagent_id = src.treatment_oxy
if (!reagent_id && (C.getFireLoss() >= heal_threshold))
if(!C.reagents.has_reagent(src.treatment_fire))
reagent_id = src.treatment_fire
if (!reagent_id && (C.getToxLoss() >= heal_threshold))
if(!C.reagents.has_reagent(src.treatment_tox))
reagent_id = src.treatment_tox
if(!reagent_id) //If they don't need any of that they're probably cured!
src.oldpatient = src.patient
src.patient = null
src.currently_healing = 0
@@ -421,9 +435,10 @@
src.icon_state = "medibot[src.on]"
src.currently_healing = 0
reagent_id = "inaprovaline"
return
// src.speak(reagent_id)
reagent_id = null
return
@@ -438,11 +453,6 @@
src.stunned = min(stunned+10,20)
..()
/obj/machinery/bot/medbot/emp_act(severity)
if (cam)
cam.emp_act(severity)
..()
/obj/machinery/bot/medbot/explode()
src.on = 0
visible_message("\red <B>[src] blows apart!</B>", 1)
@@ -468,24 +478,53 @@
return
/obj/machinery/bot/medbot/Bump(M as mob|obj) //Leave no door unopened!
spawn(0)
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
var/obj/machinery/door/D = M
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
D.open()
src.frustration = 0
else if ((istype(M, /mob/living/)) && (!src.anchored))
src.loc = M:loc
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
var/obj/machinery/door/D = M
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
D.open()
src.frustration = 0
return
else if ((istype(M, /mob/living/)) && (!src.anchored))
src.loc = M:loc
src.frustration = 0
return
/* terrible
/obj/machinery/bot/medbot/Bumped(atom/movable/M as mob|obj)
spawn(0)
if (M)
var/turf/T = get_turf(src)
M:loc = T
*/
/*
* Pathfinding procs, allow the medibot to path through doors it has access to.
*/
//Pretty ugh
/*
/turf/proc/AdjacentTurfsAllowMedAccess()
var/L[] = new()
for(var/turf/t in oview(src,1))
if(!t.density)
if(!LinkBlocked(src, t) && !TurfBlockedNonWindowNonDoor(t,get_access("Medical Doctor")))
L.Add(t)
return L
//It isn't blocked if we can open it, man.
/proc/TurfBlockedNonWindowNonDoor(turf/loc, var/list/access)
for(var/obj/O in loc)
if(O.density && !istype(O, /obj/structure/window) && !istype(O, /obj/machinery/door))
return 1
if (O.density && (istype(O, /obj/machinery/door)) && (access.len))
var/obj/machinery/door/D = O
for(var/req in D.req_access)
if(!(req in access)) //doesn't have this access
return 1
return 0
*/
/*
* Medbot Assembly -- Can be made out of all three medkits.
@@ -499,7 +538,7 @@
//Making a medibot!
if(src.contents.len >= 1)
user << "\red You need to empty [src] out first!"
user << "<span class='notice'>You need to empty [src] out first.</span>"
return
var/obj/item/weapon/firstaid_arm_assembly/A = new /obj/item/weapon/firstaid_arm_assembly
@@ -509,22 +548,11 @@
A.skin = "tox"
else if(istype(src,/obj/item/weapon/storage/firstaid/o2))
A.skin = "o2"
else if(istype(src,/obj/item/weapon/storage/firstaid/adv))
A.skin = "adv"
//A.loc = user
if(src.loc == user)
if (user.r_hand == S)
user.u_equip(S)
user.equip_to_slot_if_possible(A, slot_r_hand)
else
user.u_equip(S)
user.equip_to_slot_if_possible(A, slot_l_hand)
else
A.loc = src.loc
A.layer = 20
user << "You add the robot arm to the first aid kit"
del(S)
user.put_in_hands(A)
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
user.drop_from_inventory(src)
del(src)
@@ -536,6 +564,28 @@
return
if (!in_range(src, usr) && src.loc != usr)
return
src.created_name = t
else
switch(build_step)
if(0)
if(istype(W, /obj/item/device/healthanalyzer))
user.drop_item()
del(W)
src.build_step++
user << "<span class='notice'>You add the health sensor to [src].</span>"
src.name = "First aid/robot arm/health analyzer assembly"
src.overlays += image('icons/obj/aibots.dmi', "na_scanner")
if(1)
if(isprox(W))
user.drop_item()
del(W)
src.build_step++
user << "<span class='notice'>You complete the Medibot! Beep boop.</span>"
var/turf/T = get_turf(src)
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
S.skin = src.skin
S.name = src.created_name
user.drop_from_inventory(src)
del(src)
+5 -4
View File
@@ -28,7 +28,7 @@
var/new_destination = "" // pending new destination (waiting for beacon response)
var/destination = "" // destination description
var/home_destination = "" // tag of home beacon
req_access = list(access_cargo, access_cargo_bot) // added robotics access so assembly line drop-off works properly -veyveyr //I don't think so, Tim. You need to add it to the MULE's hidden robot ID card. -NEO
req_access = list(access_cargo) // added robotics access so assembly line drop-off works properly -veyveyr //I don't think so, Tim. You need to add it to the MULE's hidden robot ID card. -NEO
var/path[] = new()
var/mode = 0 //0 = idle/ready
@@ -73,8 +73,9 @@
/obj/machinery/bot/mulebot/New()
..()
botcard = new(src)
botcard.access = get_access("Quartermaster")
botcard.access += access_robotics
var/datum/job/cargo_tech/J = new/datum/job/cargo_tech
botcard.access = J.get_access()
// botcard.access += access_robotics //Why --Ikki
cell = new(src)
cell.charge = 2000
cell.maxcharge = 2000
@@ -510,7 +511,7 @@
return
mode = 1
overlays = null
overlays.Cut()
load.loc = src.loc
load.pixel_y -= 9
+32 -29
View File
@@ -11,7 +11,7 @@
fire_dam_coeff = 0.7
brute_dam_coeff = 0.5
// weight = 1.0E7
req_access = list(access_security)
req_one_access = list(access_security, access_forensics_lockers)
var/mob/living/carbon/target
var/oldtarget_name
var/threatlevel = 0
@@ -74,7 +74,8 @@
src.icon_state = "secbot[src.on]"
spawn(3)
src.botcard = new /obj/item/weapon/card/id(src)
src.botcard.access = get_access("Detective")
var/datum/job/detective/J = new/datum/job/detective
src.botcard.access = J.get_access()
if(radio_controller)
radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT)
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
@@ -259,29 +260,36 @@ Auto Patrol: []"},
mode = SECBOT_HUNT
return
if(!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
if(istype(src.target,/mob/living/carbon))
if(!src.target.handcuffed && !src.arrest_type)
playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
mode = SECBOT_ARREST
visible_message("\red <B>[src] is trying to put handcuffs on [src.target]!</B>")
spawn(60)
if(get_dist(src, src.target) <= 1)
if(src.target.handcuffed)
return
spawn(60)
if(get_dist(src, src.target) <= 1)
if(src.target.handcuffed)
return
if(istype(src.target,/mob/living/carbon))
target.handcuffed = new /obj/item/weapon/handcuffs(target)
target.update_inv_handcuffed() //update the handcuffs overlay
if(istype(src.target,/mob/living/carbon))
target.handcuffed = new /obj/item/weapon/handcuffs(target)
target.update_inv_handcuffed() //update the handcuffs overlay
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
playsound(src.loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
// var/arrest_message = pick("Have a secure day!","I AM THE LAW.", "God made tomorrow for the crooks we don't catch today.","You can't outrun a radio.")
// src.speak(arrest_message)
else
mode = SECBOT_IDLE
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
if(SECBOT_ARREST) // arresting
@@ -621,16 +629,11 @@ Auto Patrol: []"},
if(src.check_records)
for (var/datum/data/record/E in data_core.general)
var/perpname = perp.name
if(perp:wear_id)
var/obj/item/weapon/card/id/id = perp:wear_id
if(istype(perp:wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = perp:wear_id
id = pda.id
if(perp.wear_id)
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
if(id)
perpname = id.registered_name
else
var/obj/item/device/pda/pda = perp:wear_id
perpname = pda.owner
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
+47
View File
@@ -0,0 +1,47 @@
/obj/machinery/driver_button
name = "mass driver button"
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
desc = "A remote control switch for a mass driver."
var/id = null
var/active = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/ignition_switch
name = "ignition switch"
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
desc = "A remote control switch for a mounted igniter."
var/id = null
var/active = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/flasher_button
name = "flasher button"
desc = "A remote control switch for a mounted flasher."
icon = 'icons/obj/objects.dmi'
icon_state = "launcherbtt"
var/id = null
var/active = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/crema_switch
desc = "Burn baby burn!"
name = "crematorium igniter"
icon = 'icons/obj/power.dmi'
icon_state = "crema_switch"
anchored = 1.0
req_access = list(access_crematorium)
var/on = 0
var/area/area = null
var/otherarea = null
var/id = 1
@@ -86,6 +86,8 @@
C.network = "SS13"
C.network = input(usr, "Which network would you like to connect this camera to?", "Set Network", "SS13")
C.c_tag = "[get_area_name(src)] ([rand(1, 999)]"
for(var/i = 5; i >= 0; i -= 1)
var/direct = input(user, "Direction?", "Assembling Camera", null) in list("LEAVE IT", "NORTH", "EAST", "SOUTH", "WEST" )
if(direct != "LEAVE IT")
+10 -2
View File
@@ -21,12 +21,12 @@
if(chargelevel != newlevel)
overlays = null
overlays.Cut()
overlays += "ccharger-o[newlevel]"
chargelevel = newlevel
else
overlays = null
overlays.Cut()
examine()
set src in oview(5)
..()
@@ -79,6 +79,14 @@
attack_ai(mob/user)
return
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
return
if(charging)
charging.emp_act(severity)
..(severity)
process()
//world << "ccpt [charging] [stat]"
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
+3 -4
View File
@@ -377,13 +377,12 @@
/*
* Diskette Box
*/
/obj/item/weapon/storage/diskbox
/obj/item/weapon/storage/box/disks
name = "Diskette Box"
icon_state = "disk_kit"
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/diskbox/New()
/obj/item/weapon/storage/box/disks/New()
..()
new /obj/item/weapon/disk/data(src)
new /obj/item/weapon/disk/data(src)
@@ -198,6 +198,8 @@
/obj/machinery/computer/HolodeckControl/process()
if(!..())
return
if(active)
if(!checkInteg(linkedholodeck))
@@ -228,6 +230,9 @@
/obj/machinery/computer/HolodeckControl/proc/derez(var/obj/obj , var/silent = 1)
holographic_items.Remove(obj)
if(obj == null)
return
if(isobj(obj))
var/mob/M = obj.loc
if(ismob(M))
+2 -4
View File
@@ -76,7 +76,5 @@
/obj/machinery/computer/operating/process()
if(!(stat & (NOPOWER|BROKEN)) )
use_power(500)
src.updateDialog()
if(..())
src.updateDialog()
+5 -4
View File
@@ -162,7 +162,8 @@
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "\blue You connect the monitor."
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain )
A.rename_self("ai", 1)
if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created
A.rename_self("ai", 1)
feedback_inc("cyborg_ais_created",1)
del(src)
@@ -256,7 +257,7 @@ That prevents a few funky behaviors.
A.loc = T.loc//To replace the terminal.
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
C.overlays.Cut()
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
@@ -283,7 +284,7 @@ That prevents a few funky behaviors.
else for(var/mob/living/silicon/ai/A in C)
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
C.overlays.Cut()
A.loc = T
T.occupant = A
A.control_disabled = 1
@@ -379,7 +380,7 @@ That prevents a few funky behaviors.
A_T.loc = T//Throw them into suit.
C.icon_state = "aicard"
C.name = "inteliCard"
C.overlays = null
C.overlays.Cut()
T.AI = A_T
A_T.cancel_camera()
A_T << "You have been uploaded to a mobile storage device."
+18 -4
View File
@@ -108,12 +108,10 @@
return
/obj/machinery/computer/aifixer/process()
if(stat & (NOPOWER|BROKEN))
if(..())
src.updateDialog()
return
src.updateDialog()
return
/obj/machinery/computer/aifixer/Topic(href, href_list)
if(..())
return
@@ -144,3 +142,19 @@
return
/obj/machinery/computer/aifixer/update_icon()
..()
// Broken / Unpowered
if((stat & BROKEN) || (stat & NOPOWER))
overlays.Cut()
// Working / Powered
else
if (occupant)
switch (occupant.stat)
if (0)
overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
if (2)
overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
else
overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
+19 -15
View File
@@ -12,14 +12,14 @@
var/enemy_mp = 20
var/gameover = 0
var/blocked = 0 //Player cannot attack/heal while set
var/list/prizes = list( /obj/item/weapon/storage/snappopbox = 2,
var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2,
/obj/item/toy/blink = 2,
/obj/item/clothing/under/syndicate/tacticool = 2,
/obj/item/toy/sword = 2,
/obj/item/toy/gun = 2,
/obj/item/toy/crossbow = 2,
/obj/item/clothing/suit/syndicatefake = 2,
/obj/item/weapon/storage/crayonbox = 2,
/obj/item/weapon/storage/fancy/crayons = 2,
/obj/item/toy/spinningtoy = 2,
/obj/item/toy/prize/ripley = 1,
/obj/item/toy/prize/fireripley = 1,
@@ -46,7 +46,7 @@
name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ", "Pwn ", "Own ")
name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ")
name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "Metroid", "Griefer", "ERPer", "Lizard Man", "Unicorn")
name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn")
src.enemy_name = replacetext((name_part1 + name_part2), "the ", "")
src.name = (name_action + name_part1 + name_part2)
@@ -219,18 +219,6 @@
src.blocked = 0
return
/obj/machinery/computer/arcade/power_change()
if(stat & BROKEN)
icon_state = "arcadeb"
else
if( powered() )
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "arcade0"
stat |= NOPOWER
/obj/machinery/computer/arcade/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/card/emag) && !emagged)
@@ -270,3 +258,19 @@
A.icon_state = "4"
del(src)
/obj/machinery/computer/arcade/emp_act(severity)
if(stat & (NOPOWER|BROKEN))
..(severity)
return
var/empprize = null
var/num_of_prizes = 0
switch(severity)
if(1)
num_of_prizes = rand(1,4)
if(2)
num_of_prizes = rand(0,2)
for(num_of_prizes; num_of_prizes > 0; num_of_prizes--)
empprize = pickweight(prizes)
new empprize(src.loc)
..(severity)
+72 -89
View File
@@ -12,71 +12,77 @@
var/datum/radio_frequency/radio_connection
initialize()
set_frequency(receive_frequency)
/obj/machinery/computer/atmos_alert/initialize()
..()
set_frequency(receive_frequency)
receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/zone = signal.data["zone"]
var/severity = signal.data["alert"]
var/zone = signal.data["zone"]
var/severity = signal.data["alert"]
if(!zone || !severity) return
if(!zone || !severity) return
minor_alarms -= zone
priority_alarms -= zone
if(severity=="severe")
priority_alarms += zone
else if (severity=="minor")
minor_alarms += zone
update_icon()
minor_alarms -= zone
priority_alarms -= zone
if(severity=="severe")
priority_alarms += zone
else if (severity=="minor")
minor_alarms += zone
update_icon()
return
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, receive_frequency)
receive_frequency = new_frequency
radio_connection = radio_controller.add_object(src, receive_frequency, RADIO_ATMOSIA)
/obj/machinery/computer/atmos_alert/attack_hand(mob/user)
if(..(user))
return
user << browse(return_text(),"window=computer")
user.set_machine(src)
onclose(user, "computer")
proc/set_frequency(new_frequency)
radio_controller.remove_object(src, receive_frequency)
receive_frequency = new_frequency
radio_connection = radio_controller.add_object(src, receive_frequency, RADIO_ATMOSIA)
attack_hand(mob/user)
user << browse(return_text(),"window=computer")
user.set_machine(src)
onclose(user, "computer")
process()
..()
/obj/machinery/computer/atmos_alert/process()
if(..())
src.updateDialog()
update_icon()
if(priority_alarms.len)
icon_state = "alert:2"
else if(minor_alarms.len)
icon_state = "alert:1"
else
icon_state = "alert:0"
/obj/machinery/computer/atmos_alert/update_icon()
..()
if(stat & (NOPOWER|BROKEN))
return
if(priority_alarms.len)
icon_state = "alert:2"
else if(minor_alarms.len)
icon_state = "alert:1"
else
icon_state = "alert:0"
return
proc/return_text()
var/priority_text
var/minor_text
/obj/machinery/computer/atmos_alert/proc/return_text()
var/priority_text
var/minor_text
if(priority_alarms.len)
for(var/zone in priority_alarms)
priority_text += "<FONT color='red'><B>[zone]</B></FONT> <A href='?src=\ref[src];priority_clear=[ckey(zone)]'>X</A><BR>"
else
priority_text = "No priority alerts detected.<BR>"
if(priority_alarms.len)
for(var/zone in priority_alarms)
priority_text += "<FONT color='red'><B>[zone]</B></FONT> <A href='?src=\ref[src];priority_clear=[ckey(zone)]'>X</A><BR>"
else
priority_text = "No priority alerts detected.<BR>"
if(minor_alarms.len)
for(var/zone in minor_alarms)
minor_text += "<B>[zone]</B> <A href='?src=\ref[src];minor_clear=[ckey(zone)]'>X</A><BR>"
else
minor_text = "No minor alerts detected.<BR>"
if(minor_alarms.len)
for(var/zone in minor_alarms)
minor_text += "<B>[zone]</B> <A href='?src=\ref[src];minor_clear=[ckey(zone)]'>X</A><BR>"
else
minor_text = "No minor alerts detected.<BR>"
var/output = {"<B>[name]</B><HR>
var/output = {"<B>[name]</B><HR>
<B>Priority Alerts:</B><BR>
[priority_text]
<BR>
@@ -85,46 +91,23 @@
[minor_text]
<BR>"}
return output
return output
Topic(href, href_list)
if(..())
return
if(href_list["priority_clear"])
var/removing_zone = href_list["priority_clear"]
for(var/zone in priority_alarms)
if(ckey(zone) == removing_zone)
priority_alarms -= zone
if(href_list["minor_clear"])
var/removing_zone = href_list["minor_clear"]
for(var/zone in minor_alarms)
if(ckey(zone) == removing_zone)
minor_alarms -= zone
update_icon()
/obj/machinery/computer/atmos_alert/Topic(href, href_list)
if(..())
return
attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/atmos_alert/M = new /obj/item/weapon/circuitboard/atmos_alert( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.anchored = 1
if(href_list["priority_clear"])
var/removing_zone = href_list["priority_clear"]
for(var/zone in priority_alarms)
if(ckey(zone) == removing_zone)
priority_alarms -= zone
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
A.state = 3
A.icon_state = "3"
else
user << "\blue You disconnect the monitor."
A.state = 4
A.icon_state = "4"
del(src)
if(href_list["minor_clear"])
var/removing_zone = href_list["minor_clear"]
for(var/zone in minor_alarms)
if(ckey(zone) == removing_zone)
minor_alarms -= zone
update_icon()
return
+6
View File
@@ -88,6 +88,12 @@
density = 0
circuit = null
/obj/machinery/computer/security/telescreen/update_icon()
icon_state = initial(icon_state)
if(stat & BROKEN)
icon_state += "b"
return
/obj/machinery/computer/security/telescreen/entertainment
name = "entertainment monitor"
desc = "Damn, they better have /tg/thechannel on these things."
+11 -1
View File
@@ -235,7 +235,17 @@
if(temp_t)
t1 = temp_t
else
modify.access = ( istype(src,/obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : get_access(t1) )
var/datum/job/jobdatum
for(var/jobtype in typesof(/datum/job))
var/datum/job/J = new jobtype
if(ckey(J.title) == ckey(t1))
jobdatum = J
break
if(!jobdatum)
usr << "\red No log exists for this job."
return
modify.access = ( istype(src,/obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
if (modify)
modify.assignment = t1
if ("reg")
+6 -7
View File
@@ -31,7 +31,7 @@
var/delete = 0
var/injectorready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
var/temphtml = null
var/obj/machinery/dna_scanner/connected = null
var/obj/machinery/dna_scannernew/connected = null
var/obj/item/weapon/disk/data/diskette = null
anchored = 1.0
use_power = 1
@@ -464,15 +464,14 @@
break
return selected_record
/obj/machinery/computer/cloning/power_change()
/obj/machinery/computer/cloning/update_icon()
if(stat & BROKEN)
icon_state = "commb"
else
if( powered() )
if(stat & NOPOWER)
src.icon_state = "c_unpowered"
stat |= NOPOWER
else
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
stat |= NOPOWER
@@ -36,9 +36,9 @@
/obj/machinery/computer/communications/process()
..()
if(state != STATE_STATUSDISPLAY)
src.updateDialog()
if(..())
if(state != STATE_STATUSDISPLAY)
src.updateDialog()
/obj/machinery/computer/communications/Topic(href, href_list)
@@ -455,10 +455,6 @@
user << "The emergency shuttle is already on its way."
return
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "sandbox")
//New version pretends to call the shuttle but cause the shuttle to return after a random duration.
emergency_shuttle.fake_recall = rand(300,500)
if(ticker.mode.name == "blob")
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
+105 -114
View File
@@ -3,131 +3,122 @@
icon = 'icons/obj/computer.dmi'
density = 1
anchored = 1.0
var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassemble
use_power = 1
idle_power_usage = 300
active_power_usage = 300
var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassembly
var/processing = 0
/obj/machinery/computer/New()
..()
if(ticker)
initialize()
New()
..()
spawn(2)
power_change()
/obj/machinery/computer/initialize()
power_change()
/obj/machinery/computer/process()
if(stat & (NOPOWER|BROKEN))
return 0
return 1
/obj/machinery/computer/meteorhit(var/obj/O as obj)
for(var/x in verbs)
verbs -= x
set_broken()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(5, 0, src)
smoke.start()
return
meteorhit(var/obj/O as obj)
/obj/machinery/computer/emp_act(severity)
if(prob(20/severity)) set_broken()
..()
/obj/machinery/computer/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(25))
del(src)
return
if (prob(50))
for(var/x in verbs)
verbs -= x
set_broken()
if(3.0)
if (prob(25))
for(var/x in verbs)
verbs -= x
set_broken()
else
return
/obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj)
if(prob(Proj.damage))
set_broken()
..()
/obj/machinery/computer/blob_act()
if (prob(75))
for(var/x in verbs)
verbs -= x
set_broken()
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(5, 0, src)
smoke.start()
return
density = 0
emp_act(severity)
if(prob(20/severity)) set_broken()
..()
ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(25))
del(src)
return
if (prob(50))
for(var/x in verbs)
verbs -= x
set_broken()
if(3.0)
if (prob(25))
for(var/x in verbs)
verbs -= x
set_broken()
else
return
bullet_act(var/obj/item/projectile/Proj)
if(prob(Proj.damage))
set_broken()
..()
blob_act()
if (prob(75))
for(var/x in verbs)
verbs -= x
set_broken()
density = 0
power_change()
if(!istype(src,/obj/machinery/computer/security/telescreen))
if(stat & BROKEN)
icon_state = initial(icon_state)
icon_state += "b"
if (istype(src,/obj/machinery/computer/aifixer))
overlays = null
else if(powered())
icon_state = initial(icon_state)
stat &= ~NOPOWER
if (istype(src,/obj/machinery/computer/aifixer))
var/obj/machinery/computer/aifixer/O = src
if (O.occupant)
switch (O.occupant.stat)
if (0)
overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
if (2)
overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
else
overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
else
spawn(rand(0, 15))
//icon_state = "c_unpowered"
icon_state = initial(icon_state)
icon_state += "0"
stat |= NOPOWER
if (istype(src,/obj/machinery/computer/aifixer))
overlays = null
process()
if(stat & (NOPOWER|BROKEN))
return
use_power(250)
proc/set_broken()
icon_state = initial(icon_state)
/obj/machinery/computer/update_icon()
..()
icon_state = initial(icon_state)
// Broken
if(stat & BROKEN)
icon_state += "b"
stat |= BROKEN
// Powered
else if(stat & NOPOWER)
icon_state = initial(icon_state)
icon_state += "0"
attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.loc = src.loc
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
A.state = 3
A.icon_state = "3"
else
user << "\blue You disconnect the monitor."
A.state = 4
A.icon_state = "4"
del(src)
else
src.attack_hand(user)
return
/obj/machinery/computer/power_change()
..()
update_icon()
/obj/machinery/computer/proc/set_broken()
stat |= BROKEN
update_icon()
/obj/machinery/computer/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.loc = src.loc
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
A.state = 3
A.icon_state = "3"
else
user << "\blue You disconnect the monitor."
A.state = 4
A.icon_state = "4"
del(src)
else
src.attack_hand(user)
return
+90 -89
View File
@@ -9,110 +9,111 @@
var/list/tracked = list( )
New()
tracked = list()
..()
/obj/machinery/computer/crew/New()
tracked = list()
..()
attack_ai(mob/user)
attack_hand(user)
interact(user)
/obj/machinery/computer/crew/attack_ai(mob/user)
attack_hand(user)
interact(user)
attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
/obj/machinery/computer/crew/attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
power_change()
if(stat & BROKEN)
icon_state = "broken"
/obj/machinery/computer/crew/update_icon()
if(stat & BROKEN)
icon_state = "broken"
else
if(stat & NOPOWER)
src.icon_state = "c_unpowered"
stat |= NOPOWER
else
if( powered() )
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
stat |= NOPOWER
icon_state = initial(icon_state)
stat &= ~NOPOWER
Topic(href, href_list)
if(..()) return
if (src.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
if( href_list["close"] )
usr << browse(null, "window=crewcomp")
usr.unset_machine()
return
if(href_list["update"])
src.updateDialog()
return
/obj/machinery/computer/crew/Topic(href, href_list)
if(..()) return
if (src.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
if( href_list["close"] )
usr << browse(null, "window=crewcomp")
usr.unset_machine()
return
if(href_list["update"])
src.updateDialog()
return
interact(mob/user)
if( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if(!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=powcomp")
return
user.set_machine(src)
src.scan()
var/t = "<TT><B>Crew Monitoring</B><HR>"
t += "<BR><A href='?src=\ref[src];update=1'>Refresh</A> "
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
t += "<table><tr><td width='40%'>Name</td><td width='20%'>Vitals</td><td width='40%'>Position</td></tr>"
var/list/logs = list()
for(var/obj/item/clothing/under/C in src.tracked)
var/log = ""
var/turf/pos = get_turf(C)
if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode)
if(istype(C.loc, /mob/living/carbon/human))
/obj/machinery/computer/crew/interact(mob/user)
if(stat & (BROKEN|NOPOWER))
return
if(!istype(user, /mob/living/silicon) && get_dist(src, user) > 1)
user.unset_machine()
user << browse(null, "window=powcomp")
return
user.set_machine(src)
src.scan()
var/t = "<TT><B>Crew Monitoring</B><HR>"
t += "<BR><A href='?src=\ref[src];update=1'>Refresh</A> "
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
t += "<table><tr><td width='40%'>Name</td><td width='20%'>Vitals</td><td width='40%'>Position</td></tr>"
var/list/logs = list()
for(var/obj/item/clothing/under/C in src.tracked)
var/log = ""
var/turf/pos = get_turf(C)
if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode)
if(istype(C.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C.loc
var/mob/living/carbon/human/H = C.loc
var/dam1 = round(H.getOxyLoss(),1)
var/dam2 = round(H.getToxLoss(),1)
var/dam3 = round(H.getFireLoss(),1)
var/dam4 = round(H.getBruteLoss(),1)
var/dam1 = round(H.getOxyLoss(),1)
var/dam2 = round(H.getToxLoss(),1)
var/dam3 = round(H.getFireLoss(),1)
var/dam4 = round(H.getBruteLoss(),1)
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
var/life_status = "[H.stat > 1 ? "<font color=red>Deceased</font>" : "Living"]"
var/damage_report = "(<font color='blue'>[dam1]</font>/<font color='green'>[dam2]</font>/<font color='orange'>[dam3]</font>/<font color='red'>[dam4]</font>)"
if(H.wear_id)
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
else
log += "<tr><td width='40%'>Unknown</td>"
if(H.wear_id)
log += "<tr><td width='40%'>[H.wear_id.name]</td>"
else
log += "<tr><td width='40%'>Unknown</td>"
switch(C.sensor_mode)
if(1)
log += "<td width='15%'>[life_status]</td><td width='40%'>Not Available</td></tr>"
if(2)
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>Not Available</td></tr>"
if(3)
var/area/player_area = get_area(H)
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>[player_area.name] ([pos.x], [pos.y])</td></tr>"
logs += log
logs = sortList(logs)
for(var/log in logs)
t += log
t += "</table>"
t += "</FONT></PRE></TT>"
user << browse(t, "window=crewcomp;size=900x600")
onclose(user, "crewcomp")
switch(C.sensor_mode)
if(1)
log += "<td width='15%'>[life_status]</td><td width='40%'>Not Available</td></tr>"
if(2)
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>Not Available</td></tr>"
if(3)
var/area/player_area = get_area(H)
log += "<td width='20%'>[life_status] [damage_report]</td><td width='40%'>[player_area.name] ([pos.x], [pos.y])</td></tr>"
logs += log
logs = sortList(logs)
for(var/log in logs)
t += log
t += "</table>"
t += "</FONT></PRE></TT>"
user << browse(t, "window=crewcomp;size=900x600")
onclose(user, "crewcomp")
proc/scan()
for(var/obj/item/clothing/under/C in world)
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
var/check = 0
for(var/O in src.tracked)
if(O == C)
check = 1
break
if(!check)
src.tracked.Add(C)
return 1
/obj/machinery/computer/crew/proc/scan()
for(var/obj/item/clothing/under/C in world)
if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human)))
var/check = 0
for(var/O in src.tracked)
if(O == C)
check = 1
break
if(!check)
src.tracked.Add(C)
return 1
+29 -1
View File
@@ -309,7 +309,7 @@
if("watch")
src.active1.fields["m_stat"] = "*Watch*"
if("stable")
src.active2.fields["m_stat"] = "Stable"
src.active1.fields["m_stat"] = "Stable"
if (href_list["b_type"])
@@ -442,6 +442,34 @@
src.updateUsrDialog()
return
/obj/machinery/computer/med_data/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
for(var/datum/data/record/R in data_core.medical)
if(prob(10/severity))
switch(rand(1,6))
if(1)
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
R.fields["age"] = rand(5, 85)
if(4)
R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+")
if(5)
R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
if(6)
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
continue
else if(prob(1))
del(R)
continue
..(severity)
/obj/machinery/computer/med_data/laptop
name = "Medical Laptop"
+7 -7
View File
@@ -65,7 +65,7 @@
..()
return
/obj/machinery/computer/message_monitor/power_change()
/obj/machinery/computer/message_monitor/update_icon()
..()
if(stat & (NOPOWER|BROKEN))
return
@@ -74,7 +74,7 @@
else
icon_state = normal_icon
/obj/machinery/computer/message_monitor/process()
/obj/machinery/computer/message_monitor/initialize()
//Is the server isn't linked to a server, and there's a server available, default it to the first one in the list.
if(!linkedServer)
if(message_servers && message_servers.len > 0)
@@ -405,7 +405,7 @@
//Get out list of viable PDAs
var/list/obj/item/device/pda/sendPDAs = list()
for(var/obj/item/device/pda/P in PDAs)
if(!P.owner || P.toff) continue
if(!P.owner || P.toff || P.hidden) continue
sendPDAs += P
if(PDAs && PDAs.len > 0)
customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs)
@@ -437,7 +437,7 @@
var/obj/item/device/pda/PDARec = null
for (var/obj/item/device/pda/P in PDAs)
if (!P.owner||P.toff) continue
if (!P.owner || P.toff || P.hidden) continue
if(P.owner == customsender)
PDARec = P
//Sender isn't faking as someone who exists
@@ -452,7 +452,7 @@
var/mob/living/carbon/human/H = customrecepient.loc
H << "\icon[customrecepient] <b>Message from [customsender] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
customrecepient.overlays = null
customrecepient.overlays.Cut()
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
//Sender is faking as someone who exists
else
@@ -466,7 +466,7 @@
var/mob/living/carbon/human/H = customrecepient.loc
H << "\icon[customrecepient] <b>Message from [PDARec.owner] ([customjob]), </b>\"[custommessage]\" (<a href='byond://?src=\ref[customrecepient];choice=Message;skiprefresh=1;target=\ref[PDARec]'>Reply</a>)"
log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
customrecepient.overlays = null
customrecepient.overlays.Cut()
customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
//Finally..
ResetMessage()
@@ -499,7 +499,7 @@
for(var/obj/machinery/message_server/server in message_servers)
if(!isnull(server))
if(!isnull(server.decryptkey))
info = "<center><h2>Daily Key Reset</h2></center><br>The new message monitor key is '[server.decryptkey]'.<br>Please keep this a secret.<br>If necessary, change the password to a more secure one."
info = "<center><h2>Daily Key Reset</h2></center><br>The new message monitor key is '[server.decryptkey]'.<br>Please keep this a secret and away from the clown.<br>If necessary, change the password to a more secure one."
info_links = info
overlays += "paper_words"
break
+9 -2
View File
@@ -146,7 +146,8 @@
/obj/machinery/computer/pod/process()
..()
if(!..())
return
if(timing)
if(time > 0)
time = round(time) - 1
@@ -199,8 +200,14 @@
name = "ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
title = "External Airlock Controls"
req_access = list(access_syndicate)
/obj/machinery/computer/pod/old/syndicate/attack_hand(var/mob/user as mob)
if(!allowed(user))
user << "\red Access Denied"
return
else
..()
/obj/machinery/computer/pod/old/swf
name = "Magix System IV"
-4
View File
@@ -126,10 +126,6 @@
return
/obj/machinery/power/monitor/process()
if(!(stat & (NOPOWER|BROKEN)) )
use_power(250)
/obj/machinery/power/monitor/power_change()
if(stat & BROKEN)
+2 -4
View File
@@ -65,10 +65,8 @@
process()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
src.updateDialog()
if(!..())
src.updateDialog()
return
+28
View File
@@ -549,6 +549,34 @@ What a mess.*/
updateUsrDialog()
return
/obj/machinery/computer/secure_data/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
for(var/datum/data/record/R in data_core.security)
if(prob(10/severity))
switch(rand(1,6))
if(1)
R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
R.fields["age"] = rand(5, 85)
if(4)
R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Released")
if(5)
R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
if(6)
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
continue
else if(prob(1))
del(R)
continue
..(severity)
/obj/machinery/computer/secure_data/detective_computer
icon = 'icons/obj/computer.dmi'
icon_state = "messyfiles"
@@ -5,7 +5,7 @@
name = "syndicate shuttle terminal"
icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
req_access = list()
req_access = list(access_syndicate)
var/area/curr_location
var/moving = 0
var/lastMove = 0
@@ -47,7 +47,7 @@
/obj/machinery/computer/syndicate_station/attack_hand(mob/user as mob)
if(!allowed(user))
user << "<span class='notice'>Access Denied.</span>"
user << "\red Access Denied"
return
user.set_machine(src)
+8 -9
View File
@@ -35,18 +35,17 @@
switch(state)
if(1)
if(istype(P, /obj/item/weapon/cable_coil))
if(P:amount >= 5)
var/obj/item/weapon/cable_coil/C = P
if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You start to add cables to the frame."
if(do_after(user, 20))
if(!P)
user << "\blue You realize the cable coil no longer exist."
return;
P:amount -= 5
if(!P:amount) del(P)
user << "\blue You add cables to the frame."
state = 2
icon_state = "box_1"
if(C)
C.amount -= 5
if(!C.amount) del(C)
user << "\blue You add cables to the frame."
state = 2
icon_state = "box_1"
else
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
+3 -3
View File
@@ -120,9 +120,9 @@
else if(istype(G, /obj/item/weapon/grab))
if(!ismob(G:affecting))
return
for(var/mob/living/carbon/metroid/M in range(1,G:affecting))
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
if(M.Victim == G:affecting)
usr << "[G:affecting:name] will not fit into the cryo because they have a Metroid latched onto their head."
usr << "[G:affecting:name] will not fit into the cryo because they have a slime latched onto their head."
return
var/mob/M = G:affecting
if(put_mob(M))
@@ -253,7 +253,7 @@
set name = "Move Inside"
set category = "Object"
set src in oview(1)
for(var/mob/living/carbon/metroid/M in range(1,usr))
for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
+7
View File
@@ -229,6 +229,13 @@ for reference:
if (src.health <= 0)
src.explode()
return
emp_act(severity)
if(stat & (BROKEN|NOPOWER))
return
if(prob(50/severity))
locked = !locked
anchored = !anchored
icon_state = "barrier[src.locked]"
meteorhit()
src.explode()
+37
View File
@@ -1,3 +1,36 @@
/obj/machinery/door_control
name = "remote door-control"
desc = "It controls doors, remotely."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "doorctrl0"
desc = "A remote control-switch for a door."
power_channel = ENVIRON
var/id = null
var/range = 10
var/normaldoorcontrol = 0
var/desiredstate = 0 // Zero is closed, 1 is open.
var/specialfunctions = 1
/*
Bitflag, 1= open
2= idscan,
4= bolts
8= shock
16= door safties
*/
var/exposedwires = 0
var/wires = 3
/*
Bitflag, 1=checkID
2=Network Access
*/
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/door_control/attack_ai(mob/user as mob)
if(wires & 2)
return src.attack_hand(user)
@@ -24,6 +57,10 @@
*/
if(istype(W, /obj/item/device/detective_scanner))
return
if(istype(W, /obj/item/weapon/card/emag))
req_access = list()
req_one_access = list()
playsound(src.loc, "sparks", 100, 1)
return src.attack_hand(user)
/obj/machinery/door_control/attack_hand(mob/user as mob)
+14 -4
View File
@@ -92,6 +92,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
normalspeed = 1
var/obj/item/weapon/airlock_electronics/electronics = null
var/hasShocked = 0 //Prevents multiple shocks from happening
var/heat_proof = 0 // For glass airlocks
/obj/machinery/door/airlock/command
name = "Airlock"
@@ -216,6 +217,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
opacity = 0
doortype = 21
glass = 1
heat_proof = 1
/obj/machinery/door/airlock/glass_mining
name = "Maintenance Hatch"
@@ -630,8 +632,15 @@ About the new airlock wires panel:
return 0
/obj/machinery/door/airlock/update_heat_protection(var/turf/simulated/source)
if(istype(source))
if(src.density && (src.opacity || src.heat_proof))
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
else
source.thermal_conductivity = initial(source.thermal_conductivity)
/obj/machinery/door/airlock/update_icon()
if(overlays) overlays = null
if(overlays) overlays.Cut()
if(density)
if(locked && lights)
icon_state = "door_locked"
@@ -651,14 +660,14 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/animate(animation)
switch(animation)
if("opening")
if(overlays) overlays = null
if(overlays) overlays.Cut()
if(p_open)
spawn(2) // The only work around that works. Downside is that the door will be gone for a millisecond.
flick("o_door_opening", src) //can not use flick due to BYOND bug updating overlays right before flicking
else
flick("door_opening", src)
if("closing")
if(overlays) overlays = null
if(overlays) overlays.Cut()
if(p_open)
flick("o_door_closing", src)
else
@@ -825,7 +834,8 @@ About the new airlock wires panel:
sleep(10)
//bring up airlock dialog
src.aiHacking = 0
src.attack_ai(user)
if (user)
src.attack_ai(user)
/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (src.isElectrified())
@@ -1,7 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/item/weapon/airlock_electronics
name = "Airlock Electronics"
name = "airlock electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
w_class = 2.0 //It should be tiny! -Agouri
+3 -3
View File
@@ -219,7 +219,7 @@
// Adds an icon in case the screen is broken/off, stolen from status_display.dm
proc/set_picture(var/state)
picture_state = state
overlays = null
overlays.Cut()
overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
@@ -227,10 +227,10 @@
// Stolen from status_display
proc/update_display(var/line1, var/line2)
if(line2 == null) // single line display
overlays = null
overlays.Cut()
overlays += texticon(line1, 23, -13)
else // dual line display
overlays = null
overlays.Cut()
overlays += texticon(line1, 23, -9)
overlays += texticon(line2, 23, -17)
// return an icon of a time text string (tn)
+215 -285
View File
@@ -18,287 +18,246 @@
var/glass = 0
var/normalspeed = 1
proc/bumpopen(mob/user as mob)
proc/update_nearby_tiles(need_rebuild)
proc/requiresID() return 1
proc/animate(animation)
proc/open()
proc/close()
/obj/machinery/door/New()
..()
if(density)
layer = 3.1 //Above most items if closed
explosion_resistance = initial(explosion_resistance)
update_heat_protection(get_turf(src))
else
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
explosion_resistance = 0
update_nearby_tiles(need_rebuild=1)
return
New()
..()
if(density)
layer = 3.1 //Above most items if closed
explosion_resistance = initial(explosion_resistance)
if(opacity)
var/turf/T = get_turf(src)
T.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
else
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
explosion_resistance = 0
update_nearby_tiles(need_rebuild=1)
/obj/machinery/door/Del()
density = 0
update_nearby_tiles()
..()
return
//process()
//return
/obj/machinery/door/Bumped(atom/AM)
if(p_open || operating) return
if(ismob(AM))
var/mob/M = AM
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
M.last_bumped = world.time
if(!M.restrained())
bumpopen(M)
return
Del()
density = 0
update_nearby_tiles()
..()
return
//process()
//return
Bumped(atom/AM)
if(p_open || operating) return
if(ismob(AM))
var/mob/M = AM
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
M.last_bumped = world.time
if(!M.restrained())
bumpopen(M)
return
if(istype(AM, /obj/machinery/bot))
var/obj/machinery/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)
open()
return
if(istype(AM, /obj/effect/critter))
var/obj/effect/critter/critter = AM
if(critter.opensdoors) return
if(src.check_access_list(critter.access_list))
if(density)
open()
return
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(istype(AM, /obj/machinery/bot))
var/obj/machinery/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
open()
else
flick("door_deny", src)
return
open()
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
bumpopen(mob/user as mob)
if(operating) return
src.add_fingerprint(user)
if(!src.requiresID())
user = null
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(allowed(user)) open()
else flick("door_deny", src)
return
meteorhit(obj/M as obj)
src.open()
return
attack_ai(mob/user as mob)
return src.attack_hand(user)
attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
return src.attackby(user, user)
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(!src.requiresID())
user = null
if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
flick("door_spark", src)
sleep(6)
open()
operating = -1
return 1
if(src.allowed(user))
if(src.density)
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
open()
else
close()
return
if(src.density)
flick("door_deny", src)
return
blob_act()
if(prob(40))
del(src)
return
emp_act(severity)
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
open()
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
spawn(300)
secondsElectrified = 0
..()
ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if(prob(25))
del(src)
if(3.0)
if(prob(80))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
return
update_icon()
if(density)
icon_state = "door1"
else
icon_state = "door0"
return
animate(animation)
switch(animation)
if("opening")
if(p_open)
flick("o_doorc0", src)
else
flick("doorc0", src)
if("closing")
if(p_open)
flick("o_doorc1", src)
else
flick("doorc1", src)
if("deny")
flick("door_deny", src)
return
return
open()
if(!density) return 1
if(operating > 0) return
if(!ticker) return 0
if(!operating) operating = 1
animate("opening")
icon_state = "door0"
src.SetOpacity(0)
sleep(10)
src.layer = 2.7
src.density = 0
explosion_resistance = 0
update_icon()
SetOpacity(0)
update_nearby_tiles()
if(operating) operating = 0
if(autoclose && normalspeed)
spawn(150)
autoclose()
if(autoclose && !normalspeed)
spawn(5)
autoclose()
return 1
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
close()
if(density) return 1
if(operating) return
operating = 1
/obj/machinery/door/proc/bumpopen(mob/user as mob)
if(operating) return
src.add_fingerprint(user)
if(!src.requiresID())
user = null
animate("closing")
src.density = 1
explosion_resistance = initial(explosion_resistance)
src.layer = 3.1
sleep(10)
update_icon()
if(visible && !glass)
SetOpacity(1) //caaaaarn!
operating = 0
update_nearby_tiles()
if(density)
if(allowed(user)) open()
else flick("door_deny", src)
return
/obj/machinery/door/meteorhit(obj/M as obj)
src.open()
return
/obj/machinery/door/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door/attack_hand(mob/user as mob)
return src.attackby(user, user)
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(!src.requiresID())
user = null
if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
flick("door_spark", src)
sleep(6)
open()
operating = -1
return 1
if(src.allowed(user))
if(src.density)
open()
else
close()
return
if(src.density)
flick("door_deny", src)
return
update_nearby_tiles(need_rebuild)
if(!air_master) return 0
/obj/machinery/door/blob_act()
if(prob(40))
del(src)
return
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
var/turf/simulated/east = get_step(source,EAST)
var/turf/simulated/west = get_step(source,WEST)
/obj/machinery/door/emp_act(severity)
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
open()
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
spawn(300)
secondsElectrified = 0
..()
/obj/machinery/door/ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if(prob(25))
del(src)
if(3.0)
if(prob(80))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
return
/obj/machinery/door/update_icon()
if(density)
icon_state = "door1"
else
icon_state = "door0"
return
/obj/machinery/door/proc/animate(animation)
switch(animation)
if("opening")
if(p_open)
flick("o_doorc0", src)
else
flick("doorc0", src)
if("closing")
if(p_open)
flick("o_doorc1", src)
else
flick("doorc1", src)
if("deny")
flick("door_deny", src)
return
/obj/machinery/door/proc/open()
if(!density) return 1
if(operating > 0) return
if(!ticker) return 0
if(!operating) operating = 1
animate("opening")
icon_state = "door0"
src.SetOpacity(0)
sleep(10)
src.layer = 2.7
src.density = 0
explosion_resistance = 0
update_icon()
SetOpacity(0)
update_nearby_tiles()
if(operating) operating = 0
if(autoclose && normalspeed)
spawn(150)
autoclose()
if(autoclose && !normalspeed)
spawn(5)
autoclose()
return 1
/obj/machinery/door/proc/close()
if(density) return 1
if(operating) return
operating = 1
animate("closing")
src.density = 1
explosion_resistance = initial(explosion_resistance)
src.layer = 3.1
sleep(10)
update_icon()
if(visible && !glass)
SetOpacity(1) //caaaaarn!
operating = 0
update_nearby_tiles()
return
/obj/machinery/door/proc/requiresID()
return 1
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
var/turf/simulated/east = get_step(source,EAST)
var/turf/simulated/west = get_step(source,WEST)
update_heat_protection(loc)
if(istype(source)) air_master.tiles_to_update += source
if(istype(north)) air_master.tiles_to_update += north
if(istype(south)) air_master.tiles_to_update += south
if(istype(east)) air_master.tiles_to_update += east
if(istype(west)) air_master.tiles_to_update += west
return 1
/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
if(istype(source))
if(src.density && src.opacity)
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
else
source.thermal_conductivity = initial(source.thermal_conductivity)
//not sure what the equivalent in zas is
/*if(need_rebuild)
if(istype(source)) //Rebuild/update nearby group geometry
if(source.parent)
air_master.groups_to_rebuild += source.parent
else
air_master.tiles_to_update += source
if(istype(north))
if(north.parent)
air_master.groups_to_rebuild += north.parent
else
air_master.tiles_to_update += north
if(istype(south))
if(south.parent)
air_master.groups_to_rebuild += south.parent
else
air_master.tiles_to_update += south
if(istype(east))
if(east.parent)
air_master.groups_to_rebuild += east.parent
else
air_master.tiles_to_update += east
if(istype(west))
if(west.parent)
air_master.groups_to_rebuild += west.parent
else
air_master.tiles_to_update += west
else*/
if(istype(source)) air_master.tiles_to_update |= source
if(istype(north)) air_master.tiles_to_update |= north
if(istype(south)) air_master.tiles_to_update |= south
if(istype(east)) air_master.tiles_to_update |= east
if(istype(west)) air_master.tiles_to_update |= west
return 1
/obj/machinery/door/proc/autoclose()
var/obj/machinery/door/airlock/A = src
if(!A.density && !A.operating && !A.locked && !A.welded && A.autoclose)
@@ -306,33 +265,4 @@
return
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
/*
/obj/machinery/door/airlock/proc/ion_act()
if(src.z == 1 && src.density)
if(length(req_access) > 0 && !(12 in req_access))
if(prob(4))
world << "\red Airlock emagged in [src.loc.loc]"
src.operating = -1
flick("door_spark", src)
sleep(6)
open()
else
if(prob(8))
world << "\red non vital Airlock emagged in [src.loc.loc]"
src.operating = -1
flick("door_spark", src)
sleep(6)
open()
return
/obj/machinery/door/firedoor/proc/ion_act()
if(src.z == 1)
if(prob(15))
if(density)
open()
else
close()
return
*/
icon = 'icons/obj/doors/doormorgue.dmi'
+36 -2
View File
@@ -209,7 +209,7 @@
update_icon()
overlays = null
overlays.Cut()
if(density)
icon_state = "door_closed"
if(blocked)
@@ -221,4 +221,38 @@
return
/obj/machinery/door/firedoor/border_only
/obj/machinery/door/firedoor/border_only
icon = 'icons/obj/doors/edge_Doorfire.dmi'
glass = 1 //There is a glass window so you can see through the door
//This is needed due to BYOND limitations in controlling visibility
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
if(air_group) return 0
return !density
else
return 1
CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir)
return !density
else
return 1
update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/destination = get_step(source,dir)
update_heat_protection(loc)
if(istype(source)) air_master.tiles_to_update += source
if(istype(destination)) air_master.tiles_to_update += destination
return 1
+2 -1
View File
@@ -6,6 +6,7 @@
var/base_state = "left"
var/health = 150.0 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
visible = 0.0
use_power = 0
flags = ON_BORDER
opacity = 0
var/obj/item/weapon/airlock_electronics/electronics = null
@@ -157,7 +158,7 @@
return src.attack_hand(user)
/obj/machinery/door/window/attack_paw(mob/user as mob)
if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/metroid/adult))
if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/slime/adult))
if(src.operating)
return
src.health = max(0, src.health - 25)
+9 -1
View File
@@ -88,6 +88,14 @@
O.eye_stat += rand(0, 2)
/obj/machinery/flasher/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
if(prob(75/severity))
flash()
..(severity)
/obj/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj)
if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150))
return
@@ -104,7 +112,7 @@
if (!src.anchored)
user.show_message(text("\red [src] can now be moved."))
src.overlays = null
src.overlays.Cut()
else if (src.anchored)
user.show_message(text("\red [src] is now secured."))
+40 -1
View File
@@ -1,3 +1,10 @@
/* Holograms!
* Contains:
* Holopad
* Hologram
* Other stuff
*/
/*
Revised. Original based on space ninja hologram code. Which is also mine. /N
How it works:
@@ -12,11 +19,23 @@ Possible to do for anyone motivated enough:
Itegrate EMP effect to disable the unit.
*/
/*
* Holopad
*/
// HOLOPAD MODE
// 0 = RANGE BASED
// 1 = AREA BASED
var/const/HOLOPAD_MODE = 0
/obj/machinery/hologram/holopad
name = "\improper AI holopad"
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
icon_state = "holopad0"
var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
@@ -120,6 +139,17 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
return 1
/*
* Hologram
*/
/obj/machinery/hologram
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 100
var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
/obj/machinery/hologram/power_change()
if (powered())
stat &= ~NOPOWER
@@ -171,4 +201,13 @@ Holographic project of everything else.
world << "Your icon should appear now."
return
*/
*/
/*
* Other Stuff: Is this even used?
*/
/obj/machinery/hologram/projector
name = "hologram projector"
desc = "It makes a hologram appear...with magnets or something..."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "hologram0"
+18 -10
View File
@@ -151,7 +151,7 @@ obj/machinery/hydroponics/process()
obj/machinery/hydroponics/proc/updateicon()
//Refreshes the icon and sets the luminosity
overlays = null
overlays.Cut()
if(planted)
if(dead)
overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead")
@@ -729,15 +729,13 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
del(O)
updateicon()
else if (istype(O, /obj/item/weapon/plantbag))
else if (istype(O, /obj/item/weapon/storage/bag/plants))
attack_hand(user)
var/obj/item/weapon/plantbag/S = O
var/obj/item/weapon/storage/bag/plants/S = O
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(user.x,user.y,user.z))
if (S.contents.len < S.capacity)
S.contents += G;
else
user << "\blue The plant bag is full."
if(!S.can_be_inserted(G))
return
S.handle_item_insertion(G, 1)
else if ( istype(O, /obj/item/weapon/pestspray) )
var/obj/item/pestkiller/myPKiller = O
@@ -812,6 +810,16 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
parent.update_tray()
/obj/item/seeds/grassseed/harvest(mob/user = usr)
var/obj/machinery/hydroponics/parent = loc //for ease of access
var/t_yield = round(yield*parent.yieldmod)
if(t_yield > 0)
var/obj/item/stack/tile/grass/new_grass = new/obj/item/stack/tile/grass(user.loc)
new_grass.amount = t_yield
parent.update_tray()
/obj/item/seeds/gibtomato/harvest(mob/user = usr)
var/produce = text2path(productname)
var/obj/machinery/hydroponics/parent = loc //for ease of access
@@ -1005,10 +1013,10 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
icon = 'icons/obj/hydroponics.dmi'
icon_state = "soil"
density = 0
New()
..()
use_power = 0
updateicon() // Same as normal but with the overlays removed - Cheridan.
overlays = null
overlays.Cut()
if(planted)
if(dead)
overlays += image('icons/obj/hydroponics.dmi', icon_state="[myseed.species]-dead")
+18
View File
@@ -1,3 +1,15 @@
/obj/machinery/igniter
name = "igniter"
desc = "It's useful for igniting plasma."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "igniter1"
var/id = null
var/on = 1.0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 4
/obj/machinery/igniter/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -100,6 +112,12 @@
location.hotspot_expose(1000,500,1)
return 1
/obj/machinery/sparker/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
ignite()
..(severity)
/obj/machinery/ignition_switch/attack_ai(mob/user as mob)
return src.attack_hand(user)
+1 -1
View File
@@ -50,7 +50,7 @@
src.overlays += image('icons/obj/kitchen.dmi', "grjam")
/obj/machinery/gibber/update_icon()
overlays = null
overlays.Cut()
if (dirty)
src.overlays += image('icons/obj/kitchen.dmi', "grbloody")
if(stat & (NOPOWER|BROKEN))
+4 -4
View File
@@ -60,9 +60,9 @@
..()
metroid
input = /mob/living/carbon/metroid
output = /obj/item/weapon/reagent_containers/glass/beaker/roro
slime
input = /mob/living/carbon/slime
output = /obj/item/weapon/reagent_containers/glass/beaker/slime
monkey
process(loc, what)
@@ -82,7 +82,7 @@
for(var/datum/disease/D in O.viruses)
if(D.spread_type != SPECIAL)
B.data["viruses"] = D.Copy()
B.data["viruses"] += D.Copy()
B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0)
if(O.resistances&&O.resistances.len)

Some files were not shown because too many files have changed in this diff Show More