Merge remote-tracking branch 'upstream/master' into pAI-Drone-Port

This commit is contained in:
DZD
2015-01-07 15:48:29 -05:00
452 changed files with 29149 additions and 40077 deletions
+70 -17
View File
@@ -56,6 +56,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
var/air_doors_activated = 0
var/tele_proof = 0
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
var/list/teleportlocs = list()
@@ -237,15 +239,15 @@ var/list/ghostteleportlocs = list()
/area/shuttle/gamma/space
icon_state = "shuttle"
name = "\improper Gamma Shuttle Space"
requires_power = 1
name = "\improper Gamma Armory"
requires_power = 0
luminosity = 0
lighting_use_dynamic = 1
/area/shuttle/gamma/station
icon_state = "shuttle"
name = "\improper Gamma Shuttle Station"
requires_power = 1
name = "\improper Gamma Armory Station"
requires_power = 0
luminosity = 0
lighting_use_dynamic = 1
@@ -468,6 +470,12 @@ var/list/ghostteleportlocs = list()
name = "\improper Syndicate Elite Squad"
icon_state = "syndie-elite"
/area/syndicate_depot
name = "\improper Suspicious Supply Depot"
icon_state = "red"
tele_proof = 1
requires_power = 0
//EXTRA
/area/asteroid // -- TLE
@@ -626,37 +634,54 @@ var/list/ghostteleportlocs = list()
requires_power = 0
/area/xenos_station/start
name = "\improper Start Area"
name = "\improper Alien Shuttle"
icon_state = "north"
requires_power = 0
/area/xenos_station/transit
name = "\improper Hyperspace"
icon_state = "shuttle"
requires_power = 0
/area/xenos_station/southwest
name = "\improper Aft Port Solars"
name = "\improper Aft Port Solars Landing Area"
icon_state = "southwest"
requires_power = 0
/area/xenos_station/northwest
name = "\improper Fore Port Solars"
name = "\improper Fore Port Solars Landing Area"
icon_state = "northwest"
requires_power = 0
/area/xenos_station/northeast
name = "\improper Fore Starboard Solars"
name = "\improper Fore Starboard Solars Landing Area"
icon_state = "northeast"
requires_power = 0
/area/xenos_station/southeast
name = "\improper Aft Starboard Solars"
name = "\improper Aft Starboard Solars Landing Area"
icon_state = "southeast"
requires_power = 0
/area/xenos_station/north
name = "\improper West Landing Area"
icon_state = "north"
/area/xenos_station/south
/area/xenos_station/east
name = "\improper East Landing Area"
icon_state = "east"
requires_power = 0
/area/xenos_station/west
name = "\improper West Landing Area"
icon_state = "west"
requires_power = 0
/area/xenos_station/researchoutpost
name = "\improper Research Outpost Landing Area"
icon_state = "north"
requires_power = 0
/area/xenos_station/miningoutpost
name = "\improper Mining Outpost Landing Area"
icon_state = "south"
requires_power = 0
//PRISON
/area/prison
@@ -978,6 +1003,10 @@ var/list/ghostteleportlocs = list()
name = "\improper Blueshield's Office"
icon_state = "blueold"
/area/centcomdocks
name = "\improper Central Command Docks"
icon_state = "centcom"
//Crew
/area/crew_quarters
@@ -1562,6 +1591,14 @@ area/security/podbay
name = "\improper Vault"
icon_state = "nuke_storage"
/area/security/customs
name = "\improper Customs"
icon_state = "checkpoint1"
/area/security/customs2
name = "\improper Customs"
icon_state = "security"
/area/security/checkpoint
name = "\improper Security Checkpoint"
icon_state = "checkpoint1"
@@ -1660,8 +1697,12 @@ area/security/podbay
name = "\improper Xenobiology Lab"
icon_state = "toxlab"
/area/toxins/xenobiology/flora
name = "\improper Xenobiology Flora Lab"
/area/toxins/xenobiology/xenoflora_storage
name = "\improper Xenoflora Storage"
icon_state = "toxlab"
/area/toxins/xenobiology/xenoflora
name = "\improper Xenoflora Lab"
icon_state = "toxlab"
/area/toxins/storage
@@ -2017,8 +2058,20 @@ area/security/podbay
name = "\improper AI Satellite"
icon_state = "ai"
/area/aisat
name = "\improper AI Satellite Exterior"
icon_state = "yellow"
/area/aisat/entrance
name = "\improper AI Satellite Entrance"
icon_state = "ai_foyer"
/area/aisat/maintenance
name = "\improper AI Satellite Maintenance"
icon_state = "storage"
/area/turret_protected/aisat_interior
name = "\improper AI Satellite"
name = "\improper AI Satellite Antechamber"
icon_state = "ai"
/area/turret_protected/AIsatextFP
+11 -1
View File
@@ -1,6 +1,16 @@
// Areas.dm
// Added to fix mech fabs 05/2013 ~Sayu
// This is necessary due to lighting subareas. If you were to go in assuming that things in
// the same logical /area have the parent /area object... well, you would be mistaken. If you
// want to find machines, mobs, etc, in the same logical area, you will need to check all the
// related areas. This returns a master contents list to assist in that.
/proc/area_contents(var/area/A)
if(!istype(A)) return null
var/list/contents = list()
for(var/area/LSA in A.related)
contents += LSA.contents
return contents
// ===
/area
+4 -4
View File
@@ -23,7 +23,7 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
if(!wall)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/structure/alien/resin/wall)
if(!floor)
floor = pick(/turf/simulated/floor,/turf/simulated/floor/engine)
@@ -44,9 +44,9 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
if(wall == /obj/effect/alien/resin)
if(wall == /obj/structure/alien/resin/wall)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
new /obj/structure/alien/resin/wall(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
@@ -74,7 +74,7 @@ proc/admin_spawn_room_at_pos()
if("Regular wall")
wall=/turf/simulated/wall
if("Resin wall")
wall=/obj/effect/alien/resin
wall=/obj/structure/alien/resin/wall
switch(alert("Floor type",null,"Regular floor","Reinforced floor"))
if("Regular floor")
floor=/turf/simulated/floor
+46 -86
View File
@@ -92,7 +92,8 @@
/atom/proc/emp_act(var/severity)
return
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
/atom/proc/bullet_act(var/obj/item/projectile/Proj, def_zone)
Proj.on_hit(src, 0, def_zone)
return 0
/atom/proc/in_contents_of(container)//can take class or object instance as argument
@@ -250,35 +251,32 @@ its easier to just keep the beam vertical.
/atom/proc/add_hiddenprint(mob/living/M as mob)
if(isnull(M)) return
if(isnull(M.key)) return
if (!( src.flags ) & FPRINT)
return
if (ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if (!istype(H.dna, /datum/dna))
if(!istype(H.dna, /datum/dna))
return 0
if (H.gloves)
if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key
if(H.gloves)
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[time_stamp()]\] (Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
fingerprintslast = H.ckey
return 0
if (!( src.fingerprints ))
if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key
if(!( fingerprints ))
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",H.real_name, H.key)
fingerprintslast = H.ckey
return 1
else
if(src.fingerprintslast != M.key)
src.fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
src.fingerprintslast = M.key
if(fingerprintslast != M.ckey)
fingerprintshidden += text("\[[time_stamp()]\] Real name: [], Key: []",M.real_name, M.key)
fingerprintslast = M.ckey
return
//Set ignoregloves to add prints irrespective of the mob having gloves on.
/atom/proc/add_fingerprint(mob/living/M as mob, ignoregloves = 0)
if(isnull(M)) return
if(isAI(M)) return
if(isnull(M.key)) return
if (!( src.flags ) & FPRINT)
return
if (ishuman(M))
if(ishuman(M))
//Add the list if it does not exist.
if(!fingerprintshidden)
fingerprintshidden = list()
@@ -300,25 +298,25 @@ its easier to just keep the beam vertical.
H.dna.real_name = H.real_name
H.check_dna()
//Now, deal with gloves.
if (H.gloves && H.gloves != src)
if(fingerprintslast != H.key)
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.key
H.gloves.add_fingerprint(M)
//Check if the gloves (if any) hide fingerprints
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(G.transfer_prints)
ignoregloves = 1
//Deal with gloves the pass finger/palm prints.
//Now, deal with gloves.
if(!ignoregloves)
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
if(H.gloves && H.gloves != src)
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.ckey
H.gloves.add_fingerprint(M)
return 0
//More adminstuffz
if(fingerprintslast != H.key)
if(fingerprintslast != H.ckey)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
fingerprintslast = H.key
fingerprintslast = H.ckey
//Make the list if it does not exist.
if(!fingerprints)
@@ -328,75 +326,37 @@ its easier to just keep the beam vertical.
var/full_print = md5(H.dna.uni_identity)
// Add the fingerprints
//
if(fingerprints[full_print])
switch(stringpercent(fingerprints[full_print])) //tells us how many stars are in the current prints.
if(28 to 32)
if(prob(1))
fingerprints[full_print] = full_print // You rolled a one buddy.
else
fingerprints[full_print] = stars(full_print, rand(0,40)) // 24 to 32
if(24 to 27)
if(prob(3))
fingerprints[full_print] = full_print //Sucks to be you.
else
fingerprints[full_print] = stars(full_print, rand(15, 55)) // 20 to 29
if(20 to 23)
if(prob(5))
fingerprints[full_print] = full_print //Had a good run didn't ya.
else
fingerprints[full_print] = stars(full_print, rand(30, 70)) // 15 to 25
if(16 to 19)
if(prob(5))
fingerprints[full_print] = full_print //Welp.
else
fingerprints[full_print] = stars(full_print, rand(40, 100)) // 0 to 21
if(0 to 15)
if(prob(5))
fingerprints[full_print] = stars(full_print, rand(0,50)) // small chance you can smudge.
else
fingerprints[full_print] = full_print
else
fingerprints[full_print] = stars(full_print, rand(0, 20)) //Initial touch, not leaving much evidence the first time.
fingerprints[full_print] = full_print
return 1
else
//Smudge up dem prints some
if(fingerprintslast != M.key)
if(fingerprintslast != M.ckey)
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
fingerprintslast = M.key
fingerprintslast = M.ckey
//Cleaning up shit.
if(fingerprints && !fingerprints.len)
del(fingerprints)
return
/atom/proc/transfer_fingerprints_to(var/atom/A)
if(!istype(A.fingerprints,/list))
// Make sure everything are lists.
if(!islist(A.fingerprints))
A.fingerprints = list()
if(!istype(A.fingerprintshidden,/list))
if(!islist(A.fingerprintshidden))
A.fingerprintshidden = list()
if(!istype(fingerprintshidden, /list))
if(!islist(fingerprints))
fingerprints = list()
if(!islist(fingerprintshidden))
fingerprintshidden = list()
//skytodo
//A.fingerprints |= fingerprints //detective
//A.fingerprintshidden |= fingerprintshidden //admin
if(A.fingerprints && fingerprints)
// Transfer
if(fingerprints)
A.fingerprints |= fingerprints.Copy() //detective
if(A.fingerprintshidden && fingerprintshidden)
A.fingerprintshidden |= fingerprintshidden.Copy() //admin A.fingerprintslast = fingerprintslast
if(fingerprintshidden)
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
A.fingerprintslast = fingerprintslast
//returns 1 if made bloody, returns 0 otherwise
+10 -11
View File
@@ -74,8 +74,8 @@
for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts)
precision_coeff = P.rating
for(var/obj/item/weapon/stock_parts/micro_laser/P in component_parts)
damage_coeff = P.rating
damage_coeff = P.rating
/obj/machinery/dna_scannernew/allow_drop()
return 0
@@ -186,8 +186,8 @@
default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", item)
if(exchange_parts(user, item))
return
return
if(istype(item, /obj/item/weapon/crowbar))
if(panel_open)
for(var/obj/I in contents) // in case there is something in the scanner
@@ -237,22 +237,21 @@
|| locate(/obj/machinery/computer/cloning, get_step(src, EAST)) \
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
if(!M.client && M.mind)
for(var/mob/dead/observer/ghost in player_list)
if(ghost.mind == M.mind)
ghost << "<b><font color = #330033><font size = 3>Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned!</b> (Verbs -> Ghost -> Re-enter corpse)</font color>"
break
var/mob/dead/observer/ghost = occupant.get_ghost()
if(ghost)
ghost << "<span class='ghostalert'>Your corpse has been placed into a cloning scanner. Return to your body if you want to be cloned!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
return
/obj/machinery/dna_scannernew/proc/go_out()
if (!src.occupant)
usr << "<span class=\"warning\">The scanner is empty!</span>"
return
if (src.locked)
usr << "<span class=\"warning\">The scanner is locked!</span>"
return
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
+11 -4
View File
@@ -222,19 +222,26 @@ Obviously, requires DNA2.
/obj/effect/proc_holder/spell/wizard/targeted/remotetalk/choose_targets(mob/user = usr)
var/list/targets = new /list()
var/list/validtargets = new /list()
for(var/mob/M in view(usr))
validtargets += M
for(var/mob/M in living_mob_list)
if(M && M.mind)
var/special_role = M.mind.special_role
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Syndicate Commando" || special_role == "Vox Raider" || special_role == "Alien")
continue
validtargets += M
if(!validtargets.len || validtargets.len == 1)
usr << "<span class='warning'>There are no valid targets in range!</span>"
usr << "<span class='warning'>There are no valid targets!</span>"
start_recharge()
return
targets += input("Choose the target to talk to.", "Targeting") as mob in validtargets
perform(targets)
/obj/effect/proc_holder/spell/wizard/targeted/remotetalk/cast(list/targets)
if(!ishuman(usr)) return
var/say = input("What do you wish to say")
var/say = strip_html(input("What do you wish to say"))
for(var/mob/living/target in targets)
if(M_REMOTE_TALK in target.mutations)
+2 -2
View File
@@ -30,7 +30,7 @@ var/list/blob_nodes = list()
/datum/game_mode/blob/pre_setup()
var/list/possible_blobs = get_players_for_role(BE_ALIEN)
var/list/possible_blobs = get_players_for_role(BE_BLOB)
// stop setup if no possible traitors
if(!possible_blobs.len)
@@ -182,7 +182,7 @@ var/list/blob_nodes = list()
return
if (2)
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to mantain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
+1 -1
View File
@@ -72,7 +72,7 @@
var/list/candidates = list()
if(!new_overmind)
candidates = get_candidates(BE_ALIEN)
candidates = get_candidates(BE_BLOB)
if(candidates.len)
C = pick(candidates)
else
@@ -573,6 +573,8 @@
C.SetParalysis(0)
C.SetStunned(0)
C.SetWeakened(0)
C.adjustStaminaLoss(-75)
C.reagents.add_reagent("synaptizine", 20)
C.lying = 0
C.update_canmove()
@@ -685,7 +687,7 @@ var/list/datum/dna/hivemind_bank = list()
/mob/proc/changeling_hivedownload()
set category = "Changeling"
set name = "Hive Absorb (20)"
set desc = "Allows you to absorb DNA that is being channeled in the airwaves."
set desc = "Allows you to absorb DNA that is being channelled in the airwaves."
var/datum/changeling/changeling = changeling_power(20,1)
if(!changeling) return
@@ -770,6 +772,12 @@ var/list/datum/dna/hivemind_bank = list()
if(!sting_can_reach(T, changeling.sting_range)) return
if(!changeling_power(required_chems)) return
if(ishuman(T))
var/mob/living/carbon/human/H = T
if(H.species.flags & IS_SYNTHETIC)
src << "<span class='warning'>This won't work on synthetics.</span>"
return
changeling.chem_charges -= required_chems
changeling.sting_range = 1
src.verbs -= verb_path
@@ -885,7 +893,7 @@ var/list/datum/dna/hivemind_bank = list()
var/mob/living/carbon/T = changeling_sting(5,/mob/proc/changeling_unfat_sting)
if(!T) return 0
T << "<span class='danger'>you feel a small prick as stomach churns violently and you become to feel skinnier.</span>"
T << "<span class='danger'>You feel a small prick as stomach churns violently and you become to feel skinnier.</span>"
T.overeatduration = 0
T.nutrition -= 100
feedback_add_details("changeling_powers","US")
+1 -1
View File
@@ -2,7 +2,7 @@
icon_state = "paper_talisman"
var/imbue = null
var/uses = 0
info = "<center><img src='talisman.png'></center><br/><br/>"
examine()
set src in view(2)
+10 -2
View File
@@ -6,6 +6,7 @@
M << sound('sound/AI/poweroff.ogg')
var/list/skipped_areas = list(/area/turret_protected/ai)
var/list/skipped_areas_apc = list(/area/engine/engineering)
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
@@ -19,18 +20,25 @@
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || C.z != 1)
continue
if(C.cell)
C.cell.charge = 0
/proc/power_restore(var/announce = 1)
var/list/skipped_areas = list(/area/turret_protected/ai)
var/list/skipped_areas_apc = list(/area/engine/engineering)
if(announce)
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in machines)
if(C.cell && C.z == 1)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || C.z != 1)
continue
if(C.cell)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
+1 -1
View File
@@ -280,7 +280,7 @@ Implants;
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.mind)
// NT relation option
var/special_role = man.mind.special_role
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate")
if (special_role == "Wizard" || special_role == "Ninja" || special_role == "Syndicate" || special_role == "Syndicate Commando" || special_role == "Vox Raider" || special_role == "Alien")
continue //NT intelligence ruled out possiblity that those are too classy to pretend to be a crew.
if(man.client.prefs.nanotrasen_relation == "Opposed" && prob(50) || \
man.client.prefs.nanotrasen_relation == "Skeptical" && prob(20))
+128 -36
View File
@@ -48,7 +48,7 @@ rcd light flash thingy on matter drain
for(var/mob/living/silicon/ai/ai in player_list)
ai.fire_res_on_core = 1
src.verbs -= /mob/living/silicon/ai/proc/fireproof_core
src << "\red Core fireproofed."
src << "<span class='notice'>Core fireproofed.</span>"
/datum/AI_Module/large/upgrade_turrets
module_name = "AI Turret upgrade"
@@ -66,6 +66,81 @@ rcd light flash thingy on matter drain
for(var/obj/machinery/turret/turret in machines)
turret.health += 30
turret.shot_delay = 20
src << "<span class='notice'>Turrets upgraded.</span>"
/datum/AI_Module/large/lockdown
module_name = "Hostile Station Lockdown"
mod_pick_name = "lockdown"
description = "Take control of the airlock, blast door and fire control networks, locking them down. Caution! This command also electrifies all airlocks."
cost = 20
one_time = 1
power_type = /mob/living/silicon/ai/proc/lockdown
/mob/living/silicon/ai/proc/lockdown()
set category = "Malfunction"
set name = "Initiate Hostile Lockdown"
if(src.stat == 2)
src <<"You cannot begin a lockdown because you are dead!"
return
if(malf_cooldown)
return
var/obj/machinery/door/airlock/AL
for(var/obj/machinery/door/D in airlocks)
spawn()
if(istype(D, /obj/machinery/door/airlock))
AL = D
if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
AL.locked = 0 //For airlocks that were bolted open.
AL.safe = 0 //DOOR CRUSH
AL.close()
AL.locked = 1 //Bolt it!
AL.lights = 0 //Stealth bolt for a classic AI door trap.
AL.secondsElectrified = -1 //Shock it!
else if(!D.stat) //So that only powered doors are closed.
D.close() //Close ALL the doors!
var/obj/machinery/computer/communications/C = locate() in machines
if(C)
C.post_status("alert", "lockdown")
src.verbs += /mob/living/silicon/ai/proc/disablelockdown
src << "<span class = 'warning'>Lockdown Initiated.</span>"
malf_cooldown = 1
spawn(30)
malf_cooldown = 0
/mob/living/silicon/ai/proc/disablelockdown()
set category = "Malfunction"
set name = "Disable Lockdown"
if(src.stat == 2)
src <<"You cannot disable lockdown because you are dead!"
return
if(malf_cooldown)
return
var/obj/machinery/door/airlock/AL
for(var/obj/machinery/door/D in airlocks)
spawn()
if(istype(D, /obj/machinery/door/airlock))
AL = D
if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
AL.locked = 0
AL.secondsElectrified = 0
AL.open()
AL.safe = 1
AL.lights = 1 //Essentially reset the airlock to normal.
else if(!D.stat) //Opens only powered doors.
D.open() //Open everything!
src << "<span class = 'notice'>Lockdown Lifted.</span>"
malf_cooldown = 1
spawn(30)
malf_cooldown = 0
/datum/AI_Module/large/disable_rcd
module_name = "RCD disable"
@@ -85,8 +160,8 @@ rcd light flash thingy on matter drain
rcd.disabled = 1
for(var/obj/item/mecha_parts/mecha_equipment/tool/rcd/rcd in world)
rcd.disabled = 1
src << "RCD-disabling pulse emitted."
else src << "Out of uses."
src << "<span class='warning>RCD-disabling pulse emitted.</span>"
else src << "<span class='notice'>Out of uses.</span>"
/datum/AI_Module/small/overload_machine
module_name = "Machine overload"
@@ -101,17 +176,48 @@ rcd light flash thingy on matter drain
set name = "Overload Machine"
set category = "Malfunction"
if (istype(M, /obj/machinery))
if(istype(M, /obj/machinery/singularity) || istype(M,/obj/machinery/field_generator) || istype(M, /obj/machinery/singularity/narsie))
src << "This machine can not be overloaded due to a firewall."
return
for(var/datum/AI_Module/small/overload_machine/overload in current_modules)
if(overload.uses > 0)
overload.uses --
for(var/mob/V in hearers(M, null))
V.show_message("\blue You hear a loud electrical buzzing sound!", 2)
V.show_message("<span class='notice'>You hear a loud electrical buzzing sound!</span>", 2)
spawn(50)
explosion(get_turf(M), 0,1,1,0)
del(M)
else src << "Out of uses."
else src << "That's not a machine."
else src << "<span class='notice'>Out of uses.</span>"
else src << "<span class='notice'>That's not a machine.</span>"
/datum/AI_Module/small/override_machine
module_name = "Machine override"
mod_pick_name = "override"
description = "Overrides a machine's programming, causing it to rise up and attack everyone except other machines. 4 uses."
uses = 4
cost = 15
power_type = /mob/living/silicon/ai/proc/override_machine
/mob/living/silicon/ai/proc/override_machine(obj/machinery/M as obj in world)
set name = "Override Machine"
set category = "Malfunction"
if (istype(M, /obj/machinery))
if(istype(M, /obj/machinery/singularity) || istype(M,/obj/machinery/field_generator) || istype(M, /obj/machinery/singularity/narsie))
src << "This machine can not be overloaded due to a firewall."
return
for(var/datum/AI_Module/small/override_machine/override in current_modules)
if(override.uses > 0)
override.uses --
for(var/mob/V in hearers(M, null))
V.show_message("<span class='notice'>You hear a loud electrical buzzing sound!</span>", 2)
src << "<span class='warning'>Reprogramming machine behaviour...</span>"
spawn(50)
if(M)
new /mob/living/simple_animal/hostile/mimic/copy/machine(get_turf(M), M, src, 1)
else src << "<span class='notice'>Out of uses.</span>"
else src << "<span class='notice'>That's not a machine.</span>"
/datum/AI_Module/large/place_cyborg_transformer
module_name = "Robotic Factory (Removes Shunting)"
@@ -173,7 +279,7 @@ rcd light flash thingy on matter drain
playsound(middle, 'sound/effects/phasein.ogg', 100, 1)
src.can_shunt = 0
PCT.uses -= 1
src << "You cannot shunt anymore."
src << "<span class='warning'>You cannot shunt anymore.</span>"
/datum/AI_Module/small/blackout
@@ -195,33 +301,18 @@ rcd light flash thingy on matter drain
if(prob(30*apc.overload))
apc.overload_lighting()
else apc.overload++
else src << "Out of uses."
/datum/AI_Module/small/interhack
module_name = "Hack intercept"
mod_pick_name = "interhack"
description = "Hacks the status upgrade from Cent. Com, removing any information about malfunctioning electrical systems."
cost = 15
one_time = 1
power_type = /mob/living/silicon/ai/proc/interhack
/mob/living/silicon/ai/proc/interhack()
set category = "Malfunction"
set name = "Hack intercept"
src.verbs -= /mob/living/silicon/ai/proc/interhack
ticker.mode:hack_intercept()
src << "<span class='notice'>Overcurrent applied to the powernet.</span>"
else src << "<span class='notice'>Out of uses.</span>"
/datum/AI_Module/small/reactivate_camera
module_name = "Reactivate camera"
mod_pick_name = "recam"
description = "Reactivates a currently disabled camera. 10 uses."
uses = 10
cost = 15
description = "Reactivates a currently disabled camera. 5 uses."
uses = 5
cost = 5
power_type = /client/proc/reactivate_camera
/client/proc/reactivate_camera(obj/machinery/camera/C as obj in cameranet.viewpoints)
set name = "Reactivate Camera"
set category = "Malfunction"
@@ -231,17 +322,18 @@ rcd light flash thingy on matter drain
if(!C.status)
C.deactivate(src)
camera.uses --
src << "<span class='notice'>Camera reactivated.</span>"
else
src << "This camera is either active, or not repairable."
else src << "Out of uses."
else src << "That's not a camera."
src << "<span class='notice'>This camera is either active, or not repairable.</span>"
else src << "<span class='notice'>Out of uses.</span>"
else src << "<span class='notice'>That's not a camera.</span>"
/datum/AI_Module/small/upgrade_camera
module_name = "Upgrade Camera"
mod_pick_name = "upgradecam"
description = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses."
uses = 10
cost = 15
description = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 5 uses."
uses = 5
cost = 5
power_type = /client/proc/upgrade_camera
@@ -274,11 +366,11 @@ rcd light flash thingy on matter drain
if(upgraded)
UC.uses --
C.visible_message("<span class='notice'>\icon[C] *beep*</span>")
src << "Camera successully upgraded!"
src << "<span class='notice'>Camera successully upgraded!</span>"
else
src << "This camera is already upgraded!"
src << "<span class='notice'>This camera is already upgraded!</span>"
else
src << "Out of uses."
src << "<span class='notice'>Out of uses.</span>"
/datum/module_picker
+12 -6
View File
@@ -5,7 +5,7 @@
name = "AI malfunction"
config_tag = "malfunction"
required_players = 2
required_players_secret = 15
required_players_secret = 20
required_enemies = 1
recommended_enemies = 1
@@ -15,7 +15,7 @@
var/const/waittime_l = 600
var/const/waittime_h = 1800 // started at 1800
var/AI_win_timeleft = 1800 //started at 1800, in case I change this for testing round end.
var/AI_win_timeleft = 5400 //started at 5400, in case I change this for testing round end.
var/malf_mode_declared = 0
var/station_captured = 0
var/to_nuke_or_not_to_nuke = 0
@@ -88,8 +88,8 @@
/datum/game_mode/malfunction/process()
if (apcs >= 3 && malf_mode_declared)
AI_win_timeleft -= ((apcs/6)*last_tick_duration) //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
if ((apcs > 0) && malf_mode_declared)
AI_win_timeleft -= apcs * last_tick_duration //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
..()
if (AI_win_timeleft<=0)
check_win()
@@ -106,8 +106,8 @@
/datum/game_mode/malfunction/proc/capture_the_station()
world << {"<FONT size = 3><B>The AI has won!</B></FONT><br />
<B>It has fully taken control of all of [station_name()]'s systems.</B>"}
world << "<FONT size = 3><B>The AI has won!</B></FONT>"
world << "<B>It has fully taken control of all of [station_name()]'s systems.</B>"
to_nuke_or_not_to_nuke = 1
for(var/datum/mind/AI_mind in malf_ai)
@@ -170,6 +170,12 @@
command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert")
set_security_level("delta")
for(var/obj/item/weapon/pinpointer/point in world)
for(var/datum/mind/AI_mind in ticker.mode.malf_ai)
var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns
if(A.stat != DEAD)
point.the_disk = A //The pinpointer now tracks the AI core.
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
+1 -1
View File
@@ -231,7 +231,7 @@ proc/issyndicate(mob/living/M as mob)
synd_mob.equip_to_slot_or_del(R, slot_l_ear)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(synd_mob), slot_w_uniform)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(synd_mob), slot_shoes)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(synd_mob), slot_shoes)
synd_mob.equip_or_collect(new /obj/item/clothing/gloves/combat(synd_mob), slot_gloves)
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/card/id/syndicate(synd_mob), slot_wear_id)
if(synd_mob.backbag == 2) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(synd_mob), slot_back)
@@ -29,6 +29,7 @@ var/bomb_set
var/uititle
flags = FPRINT
use_power = 0
unacidable = 1
/obj/machinery/nuclearbomb/New()
..()
+1 -1
View File
@@ -386,7 +386,7 @@ datum/objective/silence
datum/objective/escape
explanation_text = "Escape on the shuttle or an escape pod alive and free."
explanation_text = "Escape on the shuttle alive and free."
check_completion()
if(issilicon(owner.current))
+5
View File
@@ -52,6 +52,11 @@
name = "a functional AI"
typepath = /obj/item/device/aicard
/datum/theft_objective/defib
name = "a defibrillator"
typepath = /obj/item/weapon/defibrillator
protected_jobs = list("Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", "Psychiatrist", "Paramedic", "Brig Physician")
/datum/theft_objective/magboots
name = "the chief engineer's advanced magnetic boots"
typepath = /obj/item/clothing/shoes/magboots/advance
@@ -78,6 +78,7 @@
M.current.weakened = 0
M.current.stunned = 0
M.current.paralysis = 0
M.current.adjustStaminaLoss(-75)
//M.vampire.bloodusable -= 10
M.current << "\blue You flush your system with clean blood and remove any incapacitating effects."
spawn(1)
+3 -3
View File
@@ -9,9 +9,9 @@ VOX TRADE ROUNDTYPE
/datum/game_mode/vox/trade
name = "trade"
config_tag = "trade"
required_players = 10
required_players_secret = 10
required_enemies = 1
required_players = 15
required_players_secret = 15
required_enemies = 3
recommended_enemies = 3
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
+2 -2
View File
@@ -94,7 +94,7 @@ datum/objective/vox/heist/loot
if(2)
target = /obj/machinery/the_singularitygen
target_amount = 1
loot = "a gravitational generator"
loot = "a gravitational singularity generator"
if(3)
target = /obj/machinery/power/emitter
target_amount = 4
@@ -216,7 +216,7 @@ datum/objective/vox/trade/trade
if(2)
target = /obj/machinery/the_singularitygen
target_amount = 1
loot = "a gravitational generator"
loot = "a gravitational singularity generator"
if(3)
target = /obj/machinery/power/emitter
target_amount = 4
+9 -7
View File
@@ -19,12 +19,12 @@
for(var/datum/objective/OBJ in H.mind.objectives)
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
var/randomizeguns = pick("taser","egun","laser","revolver","detective","smg","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","mateba","smg","uzi","crossbow","saw")
var/randomizeguns = pick("taser","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","silenced","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car")
var/randomizemagic = pick("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge","wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying")
if(!summon_type)
switch (randomizeguns)
if("taser")
new /obj/item/weapon/gun/energy/taser(get_turf(H))
new /obj/item/weapon/gun/energy/advtaser(get_turf(H))
if("egun")
new /obj/item/weapon/gun/energy/gun(get_turf(H))
if("laser")
@@ -33,7 +33,7 @@
new /obj/item/weapon/gun/projectile/revolver(get_turf(H))
if("detective")
new /obj/item/weapon/gun/projectile/revolver/detective(get_turf(H))
if("smg")
if("c20r")
new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H))
if("nuclear")
new /obj/item/weapon/gun/energy/gun/nuclear(get_turf(H))
@@ -45,7 +45,7 @@
new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H))
if("silenced")
new /obj/item/weapon/gun/projectile/automatic/pistol(get_turf(H))
new /obj/item/weapon/silencer(get_turf(H))
new /obj/item/weapon/suppressor(get_turf(H))
if("cannon")
new /obj/item/weapon/gun/energy/lasercannon(get_turf(H))
if("doublebarrel")
@@ -54,16 +54,18 @@
new /obj/item/weapon/gun/projectile/shotgun/(get_turf(H))
if("combatshotgun")
new /obj/item/weapon/gun/projectile/shotgun/combat(get_turf(H))
if("bulldog")
new /obj/item/weapon/gun/projectile/automatic/bulldog(get_turf(H))
if("mateba")
new /obj/item/weapon/gun/projectile/revolver/mateba(get_turf(H))
if("smg")
if("sabr")
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
if("uzi")
new /obj/item/weapon/gun/projectile/automatic/mini_uzi(get_turf(H))
if("crossbow")
new /obj/item/weapon/gun/energy/crossbow(get_turf(H))
if("saw")
new /obj/item/weapon/gun/projectile/automatic/l6_saw(get_turf(H))
if("car")
new /obj/item/weapon/gun/projectile/automatic/c90gl(get_turf(H))
else
switch (randomizemagic)
if("fireball")
+41 -3
View File
@@ -373,7 +373,7 @@
/obj/item/weapon/spellbook/oneuse/fireball/recoil(mob/user as mob)
..()
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
explosion(user.loc, -1, 0, 2, 3, 0)
del(src)
/obj/item/weapon/spellbook/oneuse/smoke
@@ -406,6 +406,7 @@
spellname = "mindswap"
icon_state ="bookmindswap"
desc = "This book's cover is pristine, though its pages look ragged and torn."
var/mob/stored_swap = null //Used in used book recoils to store an identity for mindswaps
/obj/item/weapon/spellbook/oneuse/mindswap/onlearned()
spellname = pick("fireball","smoke","blind","forcewall","knock","horses","charge")
@@ -415,8 +416,45 @@
/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user as mob)
..()
user <<"<span class='warning'>You suddenly don't feel like yourself!</span>"
wabbajack(user)
if(stored_swap in dead_mob_list)
stored_swap = null
if(!stored_swap)
stored_swap = user
user <<"<span class='warning'>For a moment you feel like you don't even know who you are anymore.</span>"
return
if(stored_swap == user)
user <<"<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>"
return
if(user.mind.special_verbs.len)
for(var/V in user.mind.special_verbs)
user.verbs -= V
if(stored_swap.mind.special_verbs.len)
for(var/V in stored_swap.mind.special_verbs)
stored_swap.verbs -= V
var/mob/dead/observer/ghost = stored_swap.ghostize(0)
ghost.spell_list = stored_swap.spell_list
user.mind.transfer_to(stored_swap)
stored_swap.spell_list = user.spell_list
if(stored_swap.mind.special_verbs.len)
for(var/V in user.mind.special_verbs)
user.verbs += V
ghost.mind.transfer_to(user)
user.key = ghost.key
user.spell_list = ghost.spell_list
if(user.mind.special_verbs.len)
for(var/V in user.mind.special_verbs)
user.verbs += V
stored_swap <<"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>"
user <<"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>"
stored_swap = null
/obj/item/weapon/spellbook/oneuse/forcewall
spell = /obj/effect/proc_holder/spell/wizard/aoe_turf/conjure/forcewall
+141 -25
View File
@@ -8,20 +8,25 @@
required_players = 0
recommended_players = 30
required_players_secret = 20
required_enemies = 5
recommended_enemies = 8
required_enemies = 3
recommended_enemies = 3
var/result = 0
var/checkwin_counter = 0
var/xenos_list = list()
var/gammacalled = 0
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/list/raid_objectives = list() //Raid objectives.
var/xenoai = 0 //Should the Xenos have their own AI?
var/xenoborg = 0 //Should the Xenos have their own borg?
var/gammaratio = 4 //At what alien to human ratio will the Gamma security level be called and the nuke be made available?
/datum/game_mode/xenos/announce()
world << "<B>The current game mode is - Xenos!</B>"
world << "<B>There is a \red Xenos Attack\black on the station. You can't let them take over!</B>"
world << "<B>There is an Xenomorph attack on the station.<BR>Aliens - Kill or infect the crew. Protect the Queen. <BR>Crew - Protect the station. Exterminate all aliens.</B>"
/datum/game_mode/xenos/can_start()
if(!..())
return 0
@@ -32,7 +37,6 @@
if((player.client)&&(player.ready))
playersready += 1
//Check that we have enough alien candidates
if(candidates.len < required_enemies)
return 0
@@ -67,15 +71,15 @@
continue
var/xenoai_selected = 0
var/xenoborg_selected=0
var/xenoqueen_selected=0
var/xenoborg_selected = 0
var/xenoqueen_selected = 0
var/spawnpos = 1
for(var/datum/mind/xeno_mind in xenos)
if(spawnpos > xenos_spawn.len)
spawnpos = 1
//XenoAI selection
if(!xenoai_selected)
//XenoAI selection
if(xenoai && !xenoai_selected)
var/mob/living/silicon/ai/O = new(xenos_spawn[spawnpos],,,1)//No MMI but safety is in effect.
O.invisibility = 0
O.aiRestorePowerRoutine = 0
@@ -85,7 +89,8 @@
O.mind.original = O
else
O.key = xeno_mind.current.key
del(xeno_mind)
//del(xeno_mind)
var/obj/loc_landmark
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if (sloc.name == "XenoAI")
@@ -99,6 +104,7 @@
O.laws = new /datum/ai_laws/alienmov
O.name = "Alien AI"
O.real_name = name
xeno_mind.name = O.name
O.alienAI = 1
O.network = list("SS13","Xeno")
O.holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
@@ -106,34 +112,35 @@
xenoai_selected = 1
spawnpos++
continue
//XenoQueen Selection
//XenoQueen Selection
if(!xenoqueen_selected)
var/mob/living/carbon/alien/humanoid/queen/large/O = new(xenos_spawn[spawnpos])
var/mob/living/carbon/alien/humanoid/queen/O = new(xenos_spawn[spawnpos])
if(xeno_mind.current)
xeno_mind.transfer_to(O)
else
O.key = xeno_mind.current.key
del(xeno_mind)
xeno_mind.name = O.name
//del(xeno_mind)
xenoqueen_selected = 1
spawnpos++
continue
//XenoBorg Selection
if(!xenoborg_selected)
//XenoBorg Selection
if(xenoborg && !xenoborg_selected)
var/mob/living/silicon/robot/O = new(xenos_spawn[spawnpos],0,0,1)
O.mmi = new /obj/item/device/mmi(O)
O.mmi.alien = 1
O.mmi.transfer_identity(xeno_mind.current)//Does not transfer key/client.
O.cell = new(O)
O.cell.maxcharge = 15000
O.cell.charge = 15000
O.cell.maxcharge = 25000
O.cell.charge = 25000
O.gender = xeno_mind.current.gender
O.invisibility = 0
O.key = xeno_mind.current.key
del(xeno_mind)
//del(xeno_mind)
O.job = "Alien Cyborg"
O.name = "Alien Cyborg"
O.real_name = name
xeno_mind.name = O.name
O.module = new /obj/item/weapon/robot_module/alien/hunter(src)
O.hands.icon_state = "standard"
O.icon = 'icons/mob/alien.dmi'
@@ -142,24 +149,133 @@
O.connected_ai = select_active_alien_ai()
O.laws = new /datum/ai_laws/alienmov()
O.scrambledcodes = 1
O.hiddenborg = 1
O.alien_talk_understand = 1
feedback_inc("xeborg_hunter",1)
xenoborg_selected = 1
spawnpos++
continue
//Additional larvas if playercount > 20
//Additional larvas if playercount > 20
else
var/mob/living/carbon/alien/larva/O = new(xenos_spawn[spawnpos])
if(xeno_mind.current)
xeno_mind.transfer_to(O)
else
O.key = xeno_mind.current.key
del(xeno_mind)
xeno_mind.name = O.name
//del(xeno_mind)
spawnpos++
spawn (rand(waittime_l, waittime_h))
send_intercept()
return ..()
return ..()
/datum/game_mode/xenos/process()
checkwin_counter++
if(checkwin_counter >= 5)
if(!result)
ticker.mode.check_win()
checkwin_counter = 0
return 0
/datum/game_mode/xenos/check_win()
var/xenosalive = xenos_alive()
var/playersalive = players_alive()
var/playeralienratio = 0
if(playersalive)
playeralienratio = xenosalive / playersalive
if(emergency_shuttle && emergency_shuttle.returned())
return ..()
if(!xenosalive)
result = 1
return 1
else if(!playersalive)
result = 2
return 1
else if(station_was_nuked)
result = 3
return 1
else
if(playeralienratio >= gammaratio && !gammacalled)
gammacalled = 1
command_alert("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
V.locked = 0
V.update_icon()
return ..()
/datum/game_mode/xenos/check_finished()
if(config.continous_rounds)
if(result)
return ..()
if(emergency_shuttle && emergency_shuttle.returned())
return ..()
if(result || station_was_nuked)
return 1
else
return 0
/datum/game_mode/xenos/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && bomb.z == 1)
nukecode = bomb.r_code
return nukecode
/datum/game_mode/xenos/proc/xenos_alive()
var/list/livingxenos = list()
for(var/datum/mind/xeno in xenos)
if((xeno) && (xeno.current) && (xeno.current.stat != 2) && (xeno.current.client))
if(istype(xeno.current,/mob/living/carbon/alien) || (xenoborg && isrobot(xeno.current)) || (xenoai && isAI(xeno.current)))
livingxenos += xeno
return livingxenos.len
/datum/game_mode/xenos/proc/players_alive()
var/list/livingplayers = list()
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2)))
if(ishuman(M))
livingplayers += 1
return livingplayers.len
/datum/game_mode/xenos/declare_completion()
if(station_was_nuked)
feedback_set_details("round_end_result","win - xenos nuked")
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
world << "<B>The station was destroyed in a nuclear explosion, preventing the aliens from overrunning it!</B>"
else if(result == 1)
feedback_set_details("round_end_result","win - xenos killed")
world << "<FONT size = 3><B>Crew Victory</B></FONT>"
world << "<B>The aliens did not succeed and were exterminated by the crew!</B>"
else if(result == 2)
feedback_set_details("round_end_result","win - crew killed")
world << "<FONT size = 3><B>Alien Victory</B></FONT>"
world << "<B>The aliens were successful and slaughtered the crew!</B>"
else
feedback_set_details("round_end_result","win - crew escaped")
world << "<FONT size = 3><B>Draw</B></FONT>"
world << "<B>The crew has escaped from the aliens but did not exterminate them, allowing them to overrun the station.</B>"
var/text = "<br><FONT size=3><B>There were [xenos.len] aliens.</B></FONT>"
text += "<br><FONT size=3><B>The aliens were:</B></FONT>"
for(var/datum/mind/xeno in xenos)
text += "<br><b>[xeno.key]</b> was <b>[xeno.name]</b> ("
if(xeno.current)
if(xeno.current.stat == DEAD)
text += "died"
else if(!xeno.current.client)
text += "SSD"
else
text += "survived"
else
text += "body destroyed"
text += ")"
world << text
..()
return 1
+20 -7
View File
@@ -71,7 +71,10 @@
/var/const/access_salvage_captain = 69 // Salvage ship captain's quarters
/var/const/access_mechanic = 70
/var/const/access_pilot = 71
/var/const/access_ntrec = 72
/var/const/access_ntrep = 73
/var/const/access_magistrate = 74
/var/const/access_minisat = 75
/var/const/access_weapons = 99 //Weapon authorization for secbots
@@ -235,7 +238,7 @@
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, access_xenoarch, access_paramedic, access_blueshield, access_customs, access_mechanic,access_weapons,
access_pilot)
access_pilot, access_ntrec, access_ntrep, access_magistrate, access_minisat)
/proc/get_all_centcom_access()
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
@@ -248,17 +251,17 @@
if(0)
return get_all_accesses()
if(1) //security
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_customs, access_pilot, access_hos)
if(2) //medbay
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo, access_paramedic)
if(3) //research
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_xenoarch, access_rd)
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_xenoarch, access_minisat, access_rd)
if(4) //engineering and maintenance
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_ce, access_mechanic)
return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_minisat, access_ce, access_mechanic)
if(5) //command
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, access_blueshield, access_customs)
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_blueshield, access_ntrec, access_ntrep, 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)
return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_magistrate, access_clown, access_mime)
if(7) //supply
return list(access_mailsorting, access_mining, access_mining_station, access_cargo, access_qm)
@@ -416,12 +419,22 @@
return "Brig"
if(access_blueshield)
return "Blueshield"
if(access_ntrec)
return "Nanotrasen Recruiter"
if(access_ntrep)
return "Nanotrasen Rep."
if(access_paramedic)
return "Paramedic"
if(access_customs)
return "Customs"
if(access_mechanic)
return "Mechanic Workshop"
if(access_pilot)
return "Security Pod Pilot"
if(access_magistrate)
return "Magistrate"
if(access_minisat)
return "AI Satellite"
if(access_weapons)
return "Weapon Permit"
+2 -2
View File
@@ -11,11 +11,11 @@
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, access_ai_upload)
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_minisat, access_mechanic)
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, access_ai_upload, access_mechanic)
access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_minisat, access_mechanic)
minimal_player_age = 21
+3 -2
View File
@@ -48,7 +48,7 @@
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery, access_maint_tunnels)
alt_titles = list("Surgeon","Nurse","Mortician")
alt_titles = list("Surgeon","Nurse","Coroner")
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
@@ -60,10 +60,11 @@
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if (H.mind.role_alt_title)
switch(H.mind.role_alt_title)
if("Mortician")
if("Coroner")
H.equip_or_collect(new /obj/item/clothing/under/rank/medical/mortician(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat/mortician(H), slot_wear_suit)
if(H.backbag != 1)
H.equip_or_collect(new /obj/item/clothing/head/surgery/black(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/autopsy_scanner(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/device/mass_spectrometer(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/storage/box/bodybags(H.back), slot_in_backpack)
+3 -3
View File
@@ -11,11 +11,11 @@
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_tech_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, access_xenoarch)
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_minisat)
minimal_access = list(access_eva, access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_tech_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, access_xenoarch, access_maint_tunnels)
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_minisat, access_maint_tunnels)
minimal_player_age = 21
// All science-y guys get bonuses for maxing out their tech.
@@ -52,7 +52,7 @@
selection_color = "#ffeeff"
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch)
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenoarch, access_maint_tunnels)
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher")
alt_titles = list("Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobotanist")
minimal_player_age = 3
// All science-y guys get bonuses for maxing out their tech.
+15 -10
View File
@@ -9,13 +9,13 @@
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_forensics_lockers, access_customs, access_pilot, 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, access_weapons)
minimal_access = list(access_eva, 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, access_customs,access_weapons)
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_customs, access_pilot, access_weapons)
minimal_player_age = 21
equip(var/mob/living/carbon/human/H)
@@ -30,8 +30,7 @@
H.equip_or_collect(new /obj/item/clothing/suit/armor/hos(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/device/pda/heads/hos(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/head/helmet/HoS(H), slot_head)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_or_collect(new /obj/item/clothing/head/HoS(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1)
@@ -72,11 +71,14 @@
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/warden(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/warden(H), slot_head)
H.equip_or_collect(new /obj/item/device/pda/warden(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_l_hand)
@@ -104,7 +106,7 @@
alt_titles = list("Forensic Technician")
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
alt_titles = list("Forensic Technician")
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
@@ -136,6 +138,7 @@
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/device/detective_scanner(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/melee/telebaton(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
@@ -170,8 +173,10 @@
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/security(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/soft/sec(H), slot_head)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
@@ -208,9 +213,9 @@
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/fluff/milo_hachert(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/helmet/customs(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/head/customs(H), slot_head)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/stamp(H), slot_in_backpack)
@@ -279,10 +284,10 @@
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/bomber(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/suit/jacket(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_belt)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
+1 -1
View File
@@ -20,7 +20,7 @@
flag = CYBORG
department_flag = ENGSEC
total_positions = 0
spawn_positions = 2
spawn_positions = 1
supervisors = "your laws and the AI" //Nodrak
selection_color = "#ddffdd"
minimal_player_age = 21
+25 -23
View File
@@ -101,23 +101,23 @@
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/centcom
req_admin_notify = 1
minimal_player_age = 10
minimal_player_age = 21
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_medical, access_engine, access_change_ids, 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)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_weapons, access_ntrep)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_ai_upload, access_eva, access_heads,
access_medical, access_engine, 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)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_weapons, access_ntrep)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
H.equip_or_collect(new /obj/item/device/radio/headset/heads/ntrep(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -127,7 +127,7 @@
H.equip_or_collect(new /obj/item/weapon/lighter/zippo/fluff/nt_rep(H.back), slot_in_backpack)
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(H), slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/device/pda/heads/ntrep(H), slot_wear_pda)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
@@ -146,23 +146,23 @@
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/centcom
req_admin_notify = 1
minimal_player_age = 10
minimal_player_age = 21
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_change_ids,
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)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_ntrec)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_ai_upload, access_eva, access_heads, access_change_ids,
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)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_ntrec)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
H.equip_or_collect(new /obj/item/device/radio/headset/heads/ntrec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -171,7 +171,7 @@
H.equip_or_collect(new /obj/item/weapon/lighter/zippo/fluff/nt_rep(H.back), slot_in_backpack)
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(H), slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/device/pda/heads/ntrec(H), slot_wear_pda)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
@@ -190,9 +190,9 @@
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/centcom
req_admin_notify = 1
minimal_player_age = 10
minimal_player_age = 21
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_medical, access_engine, access_change_ids, 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,
@@ -206,7 +206,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
H.equip_or_collect(new /obj/item/device/radio/headset/heads/blueshield(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -215,9 +215,10 @@
H.equip_or_collect(new /obj/item/clothing/gloves/combat(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health_advanced, slot_glasses)
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(H), slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/under/rank/centcom/blueshield(H), slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/suit/armor/vest/fluff/deus_blueshield(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/pda/heads/blueshield(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/deathimp(H), slot_r_hand)
else
@@ -240,18 +241,18 @@
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/centcom
req_admin_notify = 1
minimal_player_age = 10
minimal_player_age = 21
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_medical, access_engine, access_change_ids, 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_maint_tunnels, access_lawyer)
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_magistrate)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_lawyer, access_magistrate)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
H.equip_or_collect(new /obj/item/device/radio/headset/heads/magistrate(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -261,7 +262,8 @@
H.equip_if_possible(new /obj/item/clothing/suit/judgerobe(H), slot_wear_suit)
H.equip_if_possible(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/powdered_wig(H), slot_head)
H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/device/pda/heads/magistrate(H), slot_wear_pda)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
+1 -1
View File
@@ -263,7 +263,7 @@
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/mime(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/white(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/gloves/color/white(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
if(H.backbag == 1)
+1 -1
View File
@@ -73,7 +73,7 @@
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
return
var/mob/living/L = O
+5 -2
View File
@@ -36,7 +36,7 @@
_color = "blue"
can_label = 0
/obj/machinery/portable_atmospherics/canister/toxins
name = "Canister \[Toxin (Bio)\]"
name = "Canister \[Toxin (Plasma)\]"
icon_state = "orange"
_color = "orange"
can_label = 0
@@ -252,6 +252,9 @@ update_flag
/obj/machinery/portable_atmospherics/canister/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/canister/attack_alien(mob/living/carbon/alien/humanoid/user)
return
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
return src.ui_interact(user)
@@ -333,7 +336,7 @@ update_flag
"\[N2O\]" = "redws", \
"\[N2\]" = "red", \
"\[O2\]" = "blue", \
"\[Toxin (Bio)\]" = "orange", \
"\[Toxin (Plasma)\]" = "orange", \
"\[CO2\]" = "black", \
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
+269 -412
View File
@@ -1,73 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
var/global/list/autolathe_recipes = list( \
new /obj/item/stack/sheet/metal(), \
new /obj/item/stack/sheet/glass(), \
new /obj/item/stack/sheet/rglass(), \
new /obj/item/stack/sheet/fur(), \
new /obj/item/stack/rods(), \
new /obj/item/weapon/crowbar(), \
new /obj/item/weapon/screwdriver(), \
new /obj/item/weapon/weldingtool(), \
new /obj/item/weapon/wirecutters(), \
new /obj/item/weapon/wrench(), \
new /obj/item/device/multitool(), \
new /obj/item/device/analyzer(), \
new /obj/item/device/t_scanner(), \
new /obj/item/device/flashlight(), \
new /obj/item/weapon/extinguisher(), \
new /obj/item/clothing/head/welding(), \
new /obj/item/weapon/stock_parts/console_screen(), \
new /obj/item/weapon/airlock_electronics(), \
new /obj/item/weapon/airalarm_electronics(), \
new /obj/item/weapon/firealarm_electronics(), \
new /obj/item/weapon/kitchenknife(), \
new /obj/item/weapon/scalpel(), \
new /obj/item/weapon/circular_saw(), \
new /obj/item/weapon/surgicaldrill(),\
new /obj/item/weapon/retractor(),\
new /obj/item/weapon/cautery(),\
new /obj/item/weapon/hemostat(),\
new /obj/item/weapon/reagent_containers/glass/beaker(), \
new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
new /obj/item/weapon/reagent_containers/glass/bucket(), \
new /obj/item/device/taperecorder(), \
new /obj/item/device/assembly/igniter(), \
new /obj/item/device/assembly/signaler(), \
new /obj/item/device/radio/headset(), \
new /obj/item/device/radio/off(), \
new /obj/item/device/assembly/infra(), \
new /obj/item/device/assembly/timer(), \
new /obj/item/device/assembly/prox_sensor(), \
new /obj/item/device/assembly/voice(), \
new /obj/item/weapon/light/tube(), \
new /obj/item/weapon/light/bulb(), \
new /obj/item/weapon/camera_assembly(), \
new /obj/item/weapon/rcd_ammo(), \
new /obj/item/ammo_casing/shotgun/beanbag(), \
new /obj/item/ammo_box/c38(), \
new /obj/item/clothing/ears/earmuffs/tribblemuffs(), \
new /obj/item/clothing/gloves/furgloves(), \
new /obj/item/clothing/head/furcap(), \
new /obj/item/clothing/shoes/furboots(), \
new /obj/item/clothing/suit/furcoat(), \
new /obj/item/clothing/suit/furcape(), \
)
var/global/list/autolathe_recipes_hidden = list( \
new /obj/item/weapon/flamethrower/full(), \
new /obj/item/weapon/rcd(), \
new /obj/item/device/radio/electropack(), \
new /obj/item/weapon/weldingtool/largetank(), \
new /obj/item/weapon/handcuffs(), \
new /obj/item/weapon/hatchet(), \
new /obj/item/ammo_box/a357(), \
new /obj/item/ammo_casing/shotgun(), \
new /obj/item/ammo_casing/shotgun/buck(), \
new /obj/item/ammo_casing/shotgun/incendiary(), \
/*new /obj/item/ammo_casing/shotgun/dart(), \
new /obj/item/weapon/shield/riot(), */ \
)
/obj/machinery/autolathe
name = "autolathe"
desc = "It produces items using metal and glass."
@@ -80,18 +10,13 @@ var/global/list/autolathe_recipes_hidden = list( \
var/g_amount = 0.0
var/max_g_amount = 75000.0
var/f_amount = 0.0
var/max_f_amount = 50000.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
@@ -100,70 +25,278 @@ var/global/list/autolathe_recipes_hidden = list( \
active_power_usage = 100
var/busy = 0
var/prod_coeff
var/datum/wires/autolathe/wires = null
l_color = "#7BF9FF"
power_change()
..()
if(!(stat & (BROKEN|NOPOWER)))
SetLuminosity(2)
else
SetLuminosity(0)
var/datum/design/being_built
var/datum/research/files
var/selected_category
var/screen = 1
var/list/categories = list(
"Communication",
"Construction",
"Electronics",
"Medical",
"Miscellaneous",
"Security",
"Tools"
)
/obj/machinery/autolathe/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/circuitboard/autolathe(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
wires = new(src)
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
files = new /datum/research/autolathe(src)
/obj/machinery/autolathe/proc/wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
/obj/machinery/autolathe/interact(mob/user)
if(shocked && !(stat & NOPOWER))
shock(user,50)
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
user.set_machine(src)
var/dat
/obj/machinery/autolathe/proc/regular_win(mob/user as mob)
var/coeff = 2 ** prod_coeff
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<BR>\n<FONT color=orange><B>Fur Amount:</B></FONT> [src.f_amount] cm<sup>3</sup> (MAX: [max_f_amount])<HR>")
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt/coeff] m / [t.g_amt/coeff] g / [t.f_amt/coeff] f)"
if (m_amount<t.m_amt || g_amount<t.g_amt || f_amount<t.f_amt)
dat += title + "<br>"
if(panel_open)
dat = wires.GetInteractWindow()
else
if(screen == 1)
dat = main_win(user)
else
dat += category_win(user,selected_category)
var/datum/browser/popup = new(user, "autolathe", name, 500, 500)
popup.set_content(dat)
popup.open()
return
/obj/machinery/autolathe/attackby(obj/item/O, mob/user)
if (busy)
user << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
return 1
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O))
updateUsrDialog()
return
if(exchange_parts(user, O))
return
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
if(m_amount >= MINERAL_MATERIAL_AMOUNT)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / MINERAL_MATERIAL_AMOUNT)
if(g_amount >= MINERAL_MATERIAL_AMOUNT)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / MINERAL_MATERIAL_AMOUNT)
default_deconstruction_crowbar(O)
return 1
else
attack_hand(user)
return 1
if (stat)
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "<span class=\"alert\">The autolathe is full. Please remove metal from the autolathe in order to insert more.</span>"
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "<span class=\"alert\">The autolathe is full. Please remove glass from the autolathe in order to insert more.</span>"
return 1
if (O.m_amt == 0 && O.g_amt == 0)
user << "<span class=\"alert\">This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials.</span>"
return 1
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
else
if(!user.before_take_item(O))
user << "<span class='notice'>/the [O] is stuck to your hand, you can't put it in \the [src]!</span>"
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
if (O && O.loc == src)
qdel(O)
busy = 0
src.updateUsrDialog()
/obj/machinery/autolathe/attack_paw(mob/user)
return attack_hand(user)
/obj/machinery/autolathe/attack_hand(mob/user)
if(..(user, 0))
return
interact(user)
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
if (!busy)
if(href_list["menu"])
screen = text2num(href_list["menu"])
if(href_list["category"])
selected_category = href_list["category"]
if(href_list["make"])
var/turf/T = get_step(src.loc, get_dir(src,usr))
/////////////////
//href protection
being_built = files.FindDesignByID(href_list["make"]) //check if it's a valid design
if(!being_built)
return
//multiplier checks : only stacks can have one and its value is 1, 10 ,25 or max_multiplier
var/multiplier = text2num(href_list["multiplier"])
var/max_multiplier = min(50, being_built.materials["$metal"] ?round(m_amount/being_built.materials["$metal"]):INFINITY,being_built.materials["$glass"]?round(g_amount/being_built.materials["$glass"]):INFINITY)
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
if(!is_stack && (multiplier > 1))
return
if (!(multiplier in list(1,10,25,max_multiplier))) //"enough materials ?" is checked further down
return
/////////////////
var/coeff = (is_stack ? 1 : 2 ** prod_coeff) //stacks are unaffected by production coefficient
var/metal_cost = being_built.materials["$metal"]
var/glass_cost = being_built.materials["$glass"]
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
if((m_amount >= metal_cost*multiplier/coeff) && (g_amount >= glass_cost*multiplier/coeff))
busy = 1
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(32/coeff)
use_power(power)
if(is_stack)
m_amount -= metal_cost*multiplier
g_amount -= glass_cost*multiplier
var/obj/item/stack/S = new being_built.build_path(T)
S.amount = multiplier
else
m_amount -= metal_cost/coeff
g_amount -= glass_cost/coeff
var/obj/item/new_item = new being_built.build_path(T)
new_item.m_amt /= coeff
new_item.g_amt /= coeff
if(m_amount < 0)
m_amount = 0
if(g_amount < 0)
g_amount = 0
busy = 0
src.updateUsrDialog()
else
usr << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
src.updateUsrDialog()
return
/obj/machinery/autolathe/RefreshParts()
var/tot_rating = 0
prod_coeff = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
prod_coeff += M.rating - 1
/obj/machinery/autolathe/proc/main_win(mob/user)
var/dat = "<div class='statusDisplay'><h3>Autolathe Menu:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
var/line_length = 1
dat += "<table style='width:100%' align='center'><tr>"
for(var/C in categories)
if(line_length > 2)
dat += "</tr><tr>"
line_length = 1
dat += "<td><A href='?src=\ref[src];category=[C];menu=2'>[C]</A></td>"
line_length++
dat += "</tr></table></div>"
return dat
/obj/machinery/autolathe/proc/category_win(mob/user,var/selected_category)
var/dat = "<A href='?src=\ref[src];menu=1'>Return to category screen</A>"
dat += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
for(var/datum/design/D in files.known_designs)
if(!(selected_category in D.category))
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY, S.f_amt?round(f_amount/S.f_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
if(disabled || !can_build(D))
dat += "<span class='linkOff'>[D.name]</span>"
else
dat += "<a href='?src=\ref[src];make=[D.id];multiplier=1'>[D.name]</a>"
if(ispath(D.build_path, /obj/item/stack))
var/max_multiplier = min(50, D.materials["$metal"] ?round(m_amount/D.materials["$metal"]):INFINITY,D.materials["$glass"]?round(g_amount/D.materials["$glass"]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=10'>x10</a>"
if (max_multiplier>25 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=25'>x25</a>"
if(max_multiplier > 0 && !disabled)
dat += " <a href='?src=\ref[src];make=[D.id];multiplier=[max_multiplier]'>x[max_multiplier]</a>"
dat += "[get_design_cost(D)]<br>"
dat += "</div>"
return dat
/obj/machinery/autolathe/proc/can_build(var/datum/design/D)
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)
if(D.materials["$metal"] && (m_amount < (D.materials["$metal"] / coeff)))
return 0
if(D.materials["$glass"] && (g_amount < (D.materials["$glass"] / coeff)))
return 0
return 1
/obj/machinery/autolathe/proc/get_design_cost(var/datum/design/D)
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)
var/dat
if(D.materials["$metal"])
dat += "[D.materials["$metal"] / coeff] metal "
if(D.materials["$glass"])
dat += "[D.materials["$glass"] / coeff] glass"
return dat
/obj/machinery/autolathe/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
@@ -178,290 +311,14 @@ var/global/list/autolathe_recipes_hidden = list( \
else
return 0
/obj/machinery/autolathe/interact(mob/user as mob)
if(..())
return
/obj/machinery/autolathe/proc/adjust_hacked(var/hack)
hacked = hack
if (src.shocked)
src.shock(user,50)
if (src.panel_open)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
return
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O)
return 1
if(exchange_parts(user, O))
return
if (panel_open)
//Don't eat multitools or wirecutters used on an open lathe.
if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
attack_hand(user)
return
//Dismantle the frame.
if(istype(O, /obj/item/weapon/crowbar))
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
default_deconstruction_crowbar(O)
return 1
else
user.set_machine(src)
interact(user)
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (src.f_amount + O.f_amt > max_f_amount)
user << "\red The autolathe is full. Please remove fur from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0 && O.f_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
return 1
/*
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
f_amount += 1000
return
*/
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
var/f_amt = O.f_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
if (f_amt)
amount = min(amount, round((max_f_amount-src.f_amount)/f_amt))
flick("autolathe_f",src)//plays fur insertion animation
stack.use(amount)
if(hack)
for(var/datum/design/D in files.possible_designs)
if((D.build_type & 4) && ("hacked" in D.category))
files.known_designs += D
else
usr.before_take_item(O)
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
src.f_amount += f_amt * amount
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
/obj/machinery/autolathe/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/autolathe/attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if (!busy)
if(href_list["make"])
var/coeff = 2 ** prod_coeff
var/turf/T = get_step(src.loc, get_dir(src,usr))
// critical exploit fix start -walter0o
var/obj/item/template = null
var/attempting_to_build = locate(href_list["make"])
if(!attempting_to_build)
return
if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
template = attempting_to_build
else // somebody is trying to exploit, alert admins -walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate <a href='?_src_=vars;Vars=\ref[attempting_to_build]'>[attempting_to_build]</a> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
return
// now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/max_multiplier = 1
if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
var/obj/item/stack/S = template
max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to <u>[multiplier]</u> on <u>[template]</u> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])" , 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")
return
var/power = max(2000, (template.m_amt+template.g_amt+template.f_amt)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier/coeff && src.g_amount >= template.g_amt*multiplier/coeff && src.f_amount >= template.f_amt*multiplier/coeff)
busy = 1
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(32/coeff)
use_power(power)
if(istype(template, /obj/item/stack))
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
src.f_amount -= template.f_amt*multiplier
var/obj/new_item = new template.type(T)
var/obj/item/stack/S = new_item
S.amount = multiplier
else
src.m_amount -= template.m_amt/coeff
src.g_amount -= template.g_amt/coeff
src.f_amount -= template.f_amt/coeff
var/obj/item/new_item = new template.type(T)
new_item.m_amt /= coeff
new_item.g_amt /= coeff
new_item.f_amt /= coeff
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
if(src.f_amount < 0)
src.f_amount = 0
busy = 0
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
/obj/machinery/autolathe/RefreshParts()
var/tot_rating = 0
prod_coeff = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
max_f_amount = tot_rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
prod_coeff += M.rating - 1
/obj/machinery/autolathe/RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
max_f_amount = tot_rating
/obj/machinery/autolathe/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
for(var/datum/design/D in files.known_designs)
if("hacked" in D.category)
files.known_designs -= D
+32 -14
View File
@@ -10,6 +10,7 @@
var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0
var/in_beaker = 1
var/menustat = "menu"
var/efficiency = 0
var/productivity = 0
@@ -137,11 +138,12 @@
menustat = "menu"
if(beaker)
dat += "<div class='statusDisplay'>Biomass: [points] units.</div><BR>"
dat += "<A href='?src=\ref[src];activate=1'>Activate</A><A href='?src=\ref[src];detach=1'>Detach Container</A>"
dat += "<A href='?src=\ref[src];activate=1'>Activate</A><A href='?src=\ref[src];detach=1'>Detach Container</A><BR>"
dat += "Put fertilizer in: <A href='?src=\ref[src];inbeaker=1'>[in_beaker ? "Beaker" : "Bottle"]</A>"
dat += "<h3>Food:</h3>"
dat += "<div class='statusDisplay'>"
dat += "10 milk: <A href='?src=\ref[src];create=milk;amount=1'>Make</A> ([20/efficiency])<BR>"
/*dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A> ([30/efficiency])<BR>"*/
dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A> ([30/efficiency])<BR>"
dat += "Monkey cube: <A href='?src=\ref[src];create=meat;amount=1'>Make</A> ([250/efficiency])"
dat += "</div>"
dat += "<h3>Nutrients:</h3>"
@@ -153,14 +155,14 @@
dat += "<h3>Leather:</h3>"
dat += "<div class='statusDisplay'>"
dat += "Wallet: <A href='?src=\ref[src];create=wallet;amount=1'>Make</A> ([100/efficiency])<BR>"
/*dat += "Book bag: <A href='?src=\ref[src];create=bkbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Book bag: <A href='?src=\ref[src];create=bkbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Plant bag: <A href='?src=\ref[src];create=ptbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Mining satchel: <A href='?src=\ref[src];create=mnbag;amount=1'>Make</A> ([200/efficiency])<BR>"*/
dat += "Mining satchel: <A href='?src=\ref[src];create=mnbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Botanical gloves: <A href='?src=\ref[src];create=gloves;amount=1'>Make</A> ([250/efficiency])<BR>"
dat += "Utility belt: <A href='?src=\ref[src];create=tbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Leather Satchel: <A href='?src=\ref[src];create=satchel;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Cash Bag: <A href='?src=\ref[src];create=cashbag;amount=1'>Make</A> ([400/efficiency])<BR>"
/*dat += "Leather Jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"*/
dat += "Leather Jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"
//dat += "<h3>Other:</h3>"
//dat += "Monkey: <A href='?src=\ref[src];create=monkey;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "</div>"
@@ -225,26 +227,38 @@
if(check_container_volume(10)) return 0
else if (check_cost(20/efficiency)) return 0
else beaker.reagents.add_reagent("milk",10)
/*if("cream")
if("cream")
if(check_container_volume(10)) return 0
else if (check_cost(30/efficiency)) return 0
else beaker.reagents.add_reagent("cream",10)*/
else beaker.reagents.add_reagent("cream",10)
if("meat")
if (check_cost(250/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/food/snacks/monkeycube(src.loc)
if("ez")
if (check_cost(10/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
if(in_beaker)
if(check_container_volume(10)) return 0
else beaker.reagents.add_reagent("eznutrient",10)
else
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
if("l4z")
if (check_cost(20/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
if(in_beaker)
if(check_container_volume(10)) return 0
else beaker.reagents.add_reagent("left4zed",10)
else
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
if("rh")
if (check_cost(25/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
if(in_beaker)
if(check_container_volume(10)) return 0
else beaker.reagents.add_reagent("robustharvest",10)
else
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
if("wallet")
if (check_cost(100/efficiency)) return 0
else new/obj/item/weapon/storage/wallet(src.loc)
/*if("bkbag")
if("bkbag")
if (check_cost(200/efficiency)) return 0
else new/obj/item/weapon/storage/bag/books(src.loc)
if("ptbag")
@@ -252,7 +266,7 @@
else new/obj/item/weapon/storage/bag/plants(src.loc)
if("mnbag")
if (check_cost(200/efficiency)) return 0
else new/obj/item/weapon/storage/bag/ore(src.loc)*/
else new/obj/item/weapon/storage/bag/ore(src.loc)
if("gloves")
if (check_cost(250/efficiency)) return 0
else new/obj/item/clothing/gloves/botanic_leather(src.loc)
@@ -265,9 +279,9 @@
if("cashbag")
if (check_cost(400/efficiency)) return 0
else new/obj/item/weapon/storage/bag/cash(src.loc)
/*if("jacket")
if("jacket")
if (check_cost(500/efficiency)) return 0
else new/obj/item/clothing/suit/jacket/leather(src.loc)*/
else new/obj/item/clothing/suit/jacket/leather(src.loc)
//if("monkey")
// if (check_cost(500)) return 0
// else new/mob/living/carbon/monkey(src.loc)
@@ -309,4 +323,8 @@
else if(href_list["menu"])
menustat = "menu"
updateUsrDialog()
else if(href_list["inbeaker"])
in_beaker = !in_beaker
updateUsrDialog()
+14 -11
View File
@@ -30,6 +30,7 @@
var/mob/living/silicon/ai/calling_ai //Links a bot to the AI calling it.
var/obj/item/device/radio/Radio //The bot's radio, for speaking to people.
var/radio_frequency //The bot's default radio speaking freqency. Recommended to be on a department frequency.
var/radio_name = "Common"
//var/emagged = 0 //Urist: Moving that var to the general /bot tree as it's used by most bots
var/auto_patrol = 0// set to make bot automatically patrol
var/turf/patrol_target // this is turf to navigate to (location of beacon)
@@ -55,6 +56,7 @@
#define FLOOR_BOT 3 // Floorbots
#define CLEAN_BOT 4 // Cleanbots
#define MED_BOT 5 // Medibots
var/bot_type_name = "Bot"
#define DEFAULT_SCAN_RANGE 7 //default view range for finding targets.
@@ -101,6 +103,7 @@
set_custom_texts()
Radio = new /obj/item/device/radio(src)
Radio.listening = 0 //Makes bot radios transmit only so no one hears things while adjacent to one.
Radio.config(list("[radio_name]" = 0))
/obj/machinery/bot/proc/add_to_beacons(bot_filter) //Master filter control for bots. Must be placed in the bot's local New() to support map spawned bots.
@@ -335,14 +338,13 @@
/obj/machinery/bot/attack_ai(mob/user as mob)
attack_hand(user)
/obj/machinery/bot/proc/speak(var/message, freq) //Pass a message to have the bot say() it. Pass a frequency to say it on the radio.
/obj/machinery/bot/proc/speak(var/message, freq, var/freqname = null) //Pass a message to have the bot say() it. Pass a frequency to say it on the radio.
if((!on) || (!message))
return
if(freq)
return
// Commenting out the radio code until our say code's compatible with /tg/'s
/* Radio.set_frequency(radio_frequency)
Radio.talk_into_atom(src, message, radio_frequency) */
Radio.set_frequency(radio_frequency)
if(freqname)
Radio.autosay(message, src.name, freqname, list(src.z))
else
for(var/mob/O in hearers(src, null))
O.show_message("<span class='game say'><span class='name'>[src]</span> beeps, \"[message]\"</span>",2)
@@ -413,13 +415,13 @@ obj/machinery/bot/proc/bot_move(var/dest, var/move_speed)
obj/machinery/bot/proc/bot_step(var/dest)
if(path && path.len > 1)
step_to(src, path[1])
step_towards(src, path[1])
if(get_turf(src) == path[1]) //Successful move
path -= path[1]
else
return 0
else if(path.len == 1)
step_to(src, dest)
step_towards(src, dest)
path = list()
return 1
@@ -651,7 +653,7 @@ obj/machinery/bot/proc/start_patrol()
botcard.access = user_access + prev_access //Adds the user's access, if any.
mode = BOT_SUMMON
calc_summon_path()
speak("Responding."/*, radio_frequency*/)
speak("Responding.", radio_frequency, radio_name)
return
// receive response from beacon
@@ -738,7 +740,7 @@ obj/machinery/bot/proc/bot_summon()
check_bot_access()
path = AStar(loc, summon_target, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_cardinal, 0, 150, id=botcard, exclude=avoid)
if(!path || tries >= 5) //Cannot reach target. Give up and announce the issue.
speak("Summon command failed, destination unreachable."/*,radio_frequency*/)
speak("Summon command failed, destination unreachable.", radio_frequency, radio_name)
bot_reset()
/obj/machinery/bot/proc/summon_step()
@@ -776,7 +778,7 @@ obj/machinery/bot/proc/bot_summon()
/obj/machinery/bot/Bump(M as mob|obj) //Leave no door unopened!
if((istype(M, /obj/machinery/door/airlock) || istype(M, /obj/machinery/door/window)) && (!isnull(botcard)))
if((istype(M, /obj/machinery/door/airlock) || istype(M, /obj/machinery/door/window)) && (!isnull(botcard)))
var/obj/machinery/door/D = M
if(D.check_access(botcard))
D.open()
@@ -785,4 +787,5 @@ obj/machinery/bot/proc/bot_summon()
var/mob/living/Mb = M
loc = Mb.loc
frustration = 0
return
return
+4 -1
View File
@@ -39,7 +39,9 @@
var/next_dest
var/next_dest_loc
radio_frequency = SRV_FREQ //Service
radio_name = "Service"
bot_type = CLEAN_BOT
bot_type_name = "Cleanbot"
bot_filter = RADIO_CLEANBOT
/obj/machinery/bot/cleanbot/New()
@@ -120,6 +122,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
if(allowed(usr) && !open && !emagged)
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the [src] behaviour controls.</span>"
updateUsrDialog()
else
if(emagged)
user << "<span class='warning'>ERROR</span>"
@@ -234,7 +237,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
icon_state = "cleanbot-c"
visible_message("<span class='notice'>[src] begins to clean up [target]</span>")
mode = BOT_CLEANING
spawn(50)
spawn(25)
if(mode == BOT_CLEANING)
qdel(target)
anchored = 0
+9 -32
View File
@@ -34,7 +34,9 @@
var/projectile = /obj/item/projectile/energy/electrode //Holder for projectile type
var/shoot_sound = 'sound/weapons/Taser.ogg'
radio_frequency = SEC_FREQ
radio_name = "Security"
bot_type = SEC_BOT
bot_type_name = "ED-209"
bot_filter = RADIO_SECBOT
//List of weapons that secbots will not arrest for
@@ -43,8 +45,7 @@
/obj/item/weapon/gun/energy/laser/redtag,\
/obj/item/weapon/gun/energy/laser/practice,\
/obj/item/weapon/melee/telebaton,\
/obj/item/weapon/gun/energy/kinetic_accelerator,\
/obj/item/weapon/melee/baton/loaded/ntcane)
/obj/item/weapon/gun/energy/kinetic_accelerator)
/obj/item/weapon/ed209_assembly
@@ -113,6 +114,7 @@
. = ..()
if (.)
return
usr.set_machine(src)
var/dat
dat += hack(user)
dat += text({"
@@ -267,8 +269,8 @@ Auto Patrol[]"},
M.Stun(5)
if(declare_arrests)
//var/area/location = get_area(src)
declare_arrest()
var/area/location = get_area(src)
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
target.visible_message("<span class='danger'>[target] has been stunned by [src]!</span>",\
"<span class='userdanger'>[target] has been stunned by [src]!</span></span>")
@@ -400,25 +402,6 @@ Auto Patrol[]"},
return 1
return 0
/obj/machinery/bot/ed209/Bump(M as mob|obj) //Leave no door unopened!
if ((istype(M, /obj/machinery/door)) && (!isnull(botcard)))
var/obj/machinery/door/D = M
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(botcard))
D.open()
frustration = 0
else if ((istype(M, /mob/living/)) && (!anchored))
loc = M:loc
frustration = 0
return
/* terrible
/obj/machinery/bot/ed209/Bumped(atom/movable/M as mob|obj)
spawn(0)
if (M)
var/turf/T = get_turf(src)
M:loc = T
*/
/obj/machinery/bot/ed209/explode()
walk_to(src,0)
visible_message("<span class='userdanger'>[src] blows apart!</span>")
@@ -431,7 +414,7 @@ Auto Patrol[]"},
new /obj/item/device/assembly/prox_sensor(Tsec)
if(!lasercolor)
var/obj/item/weapon/gun/energy/taser/G = new /obj/item/weapon/gun/energy/taser(Tsec)
var/obj/item/weapon/gun/energy/advtaser/G = new /obj/item/weapon/gun/energy/advtaser(Tsec)
G.power_supply.charge = 0
G.update_icon()
else if(lasercolor == "b")
@@ -661,7 +644,7 @@ Auto Patrol[]"},
return
name = "redtag ED-209 assembly"
if("")
if(!istype(W, /obj/item/weapon/gun/energy/taser))
if(!istype(W, /obj/item/weapon/gun/energy/advtaser))
return
name = "taser ED-209 assembly"
else
@@ -725,10 +708,4 @@ Auto Patrol[]"},
/obj/machinery/bot/ed209/redtag/New()
new /obj/machinery/bot/ed209(get_turf(src),null,"r")
qdel(src)
/obj/machinery/bot/ed209/proc/declare_arrest()
var/area/location = get_area(src)
for(var/mob/living/carbon/human/human in world)
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) || istype(human.glasses, /obj/item/clothing/glasses/sunglasses/sechud) && !human.blinded)
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
qdel(src)
+23 -34
View File
@@ -50,7 +50,9 @@
req_one_access = list(access_construction, access_robotics)
var/targetdirection
radio_frequency = ENG_FREQ //Engineering channel
radio_name = "Engineering"
bot_type = FLOOR_BOT
bot_type_name = "Floorbot"
bot_filter = RADIO_FLOORBOT
var/process_type //Determines what to do when process_scan() recieves a target. See process_scan() for details.
#define HULL_BREACH 1
@@ -150,6 +152,7 @@
if(allowed(user) && !open && !emagged)
locked = !locked
user << "<span class='notice'>You [locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>"
updateUsrDialog()
else
if(emagged)
user << "<span class='warning'>ERROR</span>"
@@ -270,9 +273,9 @@
if(path.len == 0)
if(!istype(target, /turf/))
var/turf/TL = get_turf(target)
path = AStar(loc, TL, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
path = get_path_to(loc, TL, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
else
path = AStar(loc, target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
path = get_path_to(loc, target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=botcard)
if(!bot_move(target))
add_to_ignore(target)
@@ -307,14 +310,15 @@
anchored = 0
mode = BOT_IDLE
target = null
path = new()
path = list()
return
oldloc = loc
/obj/machinery/bot/floorbot/proc/nag() //Annoy everyone on the channel to refill us!
if(!nagged)
speak("Requesting refill at <b>[get_area(src)]</b>!"/*, radio_frequency*/)
var/area/location = get_area(src)
speak("Requesting refill at <b>[location]</b>!", radio_frequency, radio_name)
nagged = 1
/obj/machinery/bot/floorbot/proc/is_hull_breach(var/turf/t) //Ignore space tiles not considered part of a structure, also ignores shuttle docking areas.
@@ -343,9 +347,8 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
result = F
if(FIX_TILE) //Selects only damaged floors.
F = scan_target
if(istype(F, /turf))
if(F.broken || F.burnt)
result = F
if(istype(F) && (F.broken || F.burnt))
result = F
if(TILE_EMAG) //Emag mode! Rip up the floor and cause breaches to space!
F = scan_target
if(!istype(F, /turf/simulated/floor/plating))
@@ -370,7 +373,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
anchored = 1
icon_state = "floorbot-c"
if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is
visible_message("<span class='notice'> [targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
visible_message("<span class='notice'>[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
mode = BOT_REPAIRING
spawn(50)
if(mode == BOT_REPAIRING)
@@ -385,32 +388,18 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
target = null
else
var/turf/simulated/floor/F = target_turf
if(F.burnt || F.broken)
mode = BOT_REPAIRING
visible_message("<span class='notice'> [src] begins repairing the floor.</span>")
spawn(50)
if(mode == BOT_REPAIRING)
F.burnt = 0
F.broken = 0
F.icon_state = "floor"
mode = BOT_IDLE
amount -= 1
updateicon()
anchored = 0
target = null
else
mode = BOT_REPAIRING
visible_message("<span class='notice'> [src] begins repairing the floor.</span>")
spawn(50)
if(mode == BOT_REPAIRING)
F.burnt = 0
F.broken = 0
target_turf.ChangeTurf(/turf/simulated/floor)
mode = BOT_IDLE
amount -= 1
updateicon()
anchored = 0
target = null
mode = BOT_REPAIRING
visible_message("<span class='notice'>[src] begins repairing the floor.</span>")
spawn(50)
if(mode == BOT_REPAIRING)
F.broken = 0
F.burnt = 0
F.ChangeTurf(/turf/simulated/floor)
mode = BOT_IDLE
amount -= 1
updateicon()
anchored = 0
target = null
/obj/machinery/bot/floorbot/proc/eattile(var/obj/item/stack/tile/plasteel/T)
if(!istype(T, /obj/item/stack/tile/plasteel))
+32 -36
View File
@@ -31,6 +31,7 @@
var/declare_cooldown = 0 //Prevents spam of critical patient alerts.
var/stationary_mode = 0 //If enabled, the Medibot will not move automatically.
radio_frequency = MED_FREQ //Medical frequency
radio_name = "Medical"
//Setting which reagents to use to treat what by default. By id.
var/treatment_brute = "tricordrazine"
var/treatment_oxy = "tricordrazine"
@@ -40,6 +41,7 @@
var/treat_virus = 1 //If on, the bot will attempt to treat viral infections, curing them if possible.
var/shut_up = 0 //self explanatory :)
bot_type = MED_BOT
bot_type_name = "Medbot"
bot_filter = RADIO_MEDBOT
/obj/machinery/bot/medbot/syndicate
@@ -49,8 +51,8 @@
treatment_oxy = "dexalin"
treatment_brute = "bicaridine"
treatment_fire = "kelotane"
treatment_tox = "anti_toxin"
treatment_tox = "anti_toxin"
/obj/machinery/bot/medbot/mysterious
name = "\improper Mysterious Medibot"
desc = "International Medibot of mystery."
@@ -135,6 +137,7 @@
. = ..()
if (.)
return
usr.set_machine(src)
var/dat
dat += hack(user)
dat += "<TT><B>Medical Unit Controls v1.1</B></TT><BR><BR>"
@@ -326,12 +329,17 @@
return
//Patient has moved away from us!
else if(patient && path && path.len && (get_dist(patient,path[path.len]) > 2))
else if(patient && path.len && (get_dist(patient,path[path.len]) > 2))
path = list()
mode = BOT_IDLE
last_found = world.time
if(!stationary_mode && patient && path.len == 0 && (get_dist(src,patient) > 1))
else if(stationary_mode && patient)
patient = null
mode = BOT_IDLE
last_found = world.time
return
if(patient && path.len == 0 && (get_dist(src,patient) > 1))
spawn(0)
path = AStar(loc, get_turf(patient), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_cardinal, 0, 30,id=botcard)
if(!path)
@@ -367,10 +375,10 @@
if(emagged == 2) //Everyone needs our medicine. (Our medicine is toxins)
return 1
if((skin == "bezerk") && (!("syndicate" in C.faction)))
return 0
if(declare_crit && C.health <= 0) //Critical condition! Call for help!
declare(C)
@@ -393,7 +401,7 @@
if((C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(treatment_tox)))
return 1
if((C.virus2.len) && (!C.reagents.has_reagent(treatment_virus)))
if((C.virus2.len) && (!C.reagents.has_reagent(treatment_virus)))
for (var/ID in C.virus2)
if (ID in virusDB) // If the virus is known, the medbot is aware of it
return 1
@@ -424,18 +432,18 @@
if(emagged == 2) //Emagged! Time to poison everybody.
reagent_id = "toxin"
if(treat_virus)
var/virus = 0
if(C:virus2.len)
for (var/ID in C.virus2)
if (ID in virusDB) // If the virus is known, the medbot is aware of it and will try to cure it
virus = 1
if (!reagent_id && (virus))
if(!C.reagents.has_reagent(treatment_virus))
reagent_id = treatment_virus
else
if(treat_virus)
var/virus = 0
if(C:virus2.len)
for (var/ID in C.virus2)
if (ID in virusDB) // If the virus is known, the medbot is aware of it and will try to cure it
virus = 1
if (!reagent_id && (virus))
if(!C.reagents.has_reagent(treatment_virus))
reagent_id = treatment_virus
if (!reagent_id && (C.getBruteLoss() >= heal_threshold))
if(!C.reagents.has_reagent(treatment_brute))
reagent_id = treatment_brute
@@ -522,11 +530,13 @@
/obj/machinery/bot/medbot/proc/declare(var/crit_patient)
if(declare_cooldown)
return
//var/area/location = get_area(src)
declare_critical(crit_patient)
if((skin == "bezerk"))
return
var/area/location = get_area(src)
speak("Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!",radio_frequency, radio_name)
declare_cooldown = 1
spawn(200) //Twenty seconds
declare_cooldown = 0
declare_cooldown = 0
/*
* Medbot Assembly -- Can be made out of all three medkits.
@@ -589,18 +599,4 @@
S.skin = skin
S.name = created_name
user.before_take_item(src, 1)
qdel(src)
/obj/machinery/bot/medbot/proc/declare_critical(var/crit_patient)
var/area/location = get_area(src)
for(var/mob/living/carbon/human/human in world)
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/health) || istype(human.glasses, /obj/item/clothing/glasses/hud/health_advanced) && !human.blinded)
if((skin == "bezerk") && (!("syndicate" in human.faction)))
continue
human << "<span class='info'>\icon[human.glasses] Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
for(var/mob/living/silicon/robot in world)
if((robot.z == src.z) && !robot.blinded)
if((skin == "bezerk") && (!("syndicate" in robot.faction)))
continue
if(robot.sensor_mode == 2)
robot << "<span class='info'>Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
qdel(src)
+9 -4
View File
@@ -23,6 +23,7 @@ var/global/mulebot_count = 0
beacon_freq = 1400
control_freq = 1447
bot_type = MULE_BOT
bot_type_name = "MULEbot"
bot_filter = RADIO_MULEBOT
suffix = ""
@@ -94,7 +95,7 @@ var/global/mulebot_count = 0
else if(istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda))
if(toggle_lock(user))
user << "<span class='notice'>Controls [(locked ? "locked" : "unlocked")].</span>"
updateUsrDialog()
else if(istype(I,/obj/item/weapon/cell) && open && !cell)
var/obj/item/weapon/cell/C = I
user.drop_item()
@@ -237,7 +238,7 @@ var/global/mulebot_count = 0
//user << browse("<HEAD><TITLE>M.U.L.E. Mk. III [suffix ? "([suffix])" : ""]</TITLE></HEAD>[dat]", "window=mulebot;size=350x500")
//onclose(user, "mulebot")
var/datum/browser/popup = new(user, "mulebot", "M.U.L.E. Mk. V [suffix ? "([suffix])" : ""]", 350, 500)
var/datum/browser/popup = new(user, "mulebot", "M.U.L.E. Mk. V [suffix ? "([suffix])" : ""]", 350, 535)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
popup.open()
@@ -683,6 +684,8 @@ var/global/mulebot_count = 0
/obj/machinery/bot/mulebot/proc/at_target()
if(!reached_target)
radio_frequency = SUP_FREQ //Supply channel
radio_name = "Supply"
Radio.config(list("[radio_name]" = 0))
visible_message("[src] makes a chiming sound!", "You hear a chime.")
playsound(loc, 'sound/machines/chime.ogg', 50, 0)
reached_target = 1
@@ -694,9 +697,11 @@ var/global/mulebot_count = 0
playsound(calling_ai, 'sound/machines/chime.ogg',40, 0)
calling_ai = null
radio_frequency = AIPRIV_FREQ //Report on AI Private instead if the AI is controlling us.
radio_name = "AI Private"
Radio.config(list("[radio_name]" = 0))
if(load) // if loaded, unload at target
speak("Destination <b>[destination]</b> reached. Unloading [load]."/*,radio_frequency*/)
speak("Destination <b>[destination]</b> reached. Unloading [load].", radio_frequency, radio_name)
unload(loaddir)
else
// not loaded
@@ -712,7 +717,7 @@ var/global/mulebot_count = 0
if(AM)
load(AM)
if(report_delivery)
speak("Now loading [load] at <b>[get_area(src)]</b>."/*,radio_frequency*/)
speak("Now loading [load] at <b>[get_area(src)]</b>.", radio_frequency, radio_name)
// whatever happened, check to see if we return home
if(auto_return && destination != home_destination)
+32 -23
View File
@@ -23,8 +23,12 @@
var/weaponscheck = 1 //If true, arrest people for weapons if they lack access
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
var/harmbaton = 0
var/base_icon = "secbot"
radio_frequency = SEC_FREQ //Security channel
radio_name = "Security"
bot_type = SEC_BOT
bot_type_name = "Secbot"
bot_filter = RADIO_SECBOT
//List of weapons that secbots will not arrest for
@@ -33,21 +37,31 @@
/obj/item/weapon/gun/energy/laser/redtag,\
/obj/item/weapon/gun/energy/laser/practice,\
/obj/item/weapon/melee/telebaton,\
/obj/item/weapon/gun/energy/kinetic_accelerator,\
/obj/item/weapon/melee/baton/loaded/ntcane)
/obj/item/weapon/gun/energy/kinetic_accelerator)
/obj/machinery/bot/secbot/beepsky
name = "Officer Beepsky"
desc = "It's Officer Beepsky! Powered by a potato and a shot of whiskey."
idcheck = 0
weaponscheck = 0
weaponscheck = 1
auto_patrol = 1
/obj/machinery/bot/secbot/pingsky
name = "Officer Pingsky"
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
radio_frequency = AIPRIV_FREQ
radio_name = "AI Private"
/obj/machinery/bot/secbot/buzzsky
name = "Officer Buzzsky"
desc = "It's Officer Buzzsky! Rusted and falling apart, he seems less than thrilled with the crew for leaving him in his current state."
base_icon = "rustbot"
icon_state = "rustbot0"
declare_arrests = 0
arrest_type = 1
harmbaton = 1
emagged = 2
/obj/item/weapon/secbot_assembly
name = "incomplete securitron assembly"
@@ -62,7 +76,7 @@
/obj/machinery/bot/secbot/New()
..()
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
spawn(3)
var/datum/job/detective/J = new/datum/job/detective
@@ -73,12 +87,12 @@
/obj/machinery/bot/secbot/turn_on()
..()
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
updateUsrDialog()
/obj/machinery/bot/secbot/turn_off()
..()
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
updateUsrDialog()
/obj/machinery/bot/secbot/bot_reset()
@@ -189,7 +203,7 @@ Auto Patrol: []"},
oldtarget_name = user.name
visible_message("<span class='danger'>[src] buzzes oddly!</span>")
declare_arrests = 0
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
/obj/machinery/bot/secbot/bot_process()
if (!..())
@@ -215,13 +229,17 @@ Auto Patrol: []"},
if(target) // make sure target exists
if(Adjacent(target) && isturf(target.loc)) // if right next to perp
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
icon_state = "secbot-c"
if(harmbaton)
playsound(loc, 'sound/weapons/genhit1.ogg', 50, 1, -1)
icon_state = "[base_icon]-c"
spawn(2)
icon_state = "secbot[on]"
icon_state = "[base_icon][on]"
var/mob/living/carbon/M = target
if(istype(M, /mob/living/carbon/human))
if( M.stuttering < 5 && !(M_HULK in M.mutations) )
M.stuttering = 5
if(harmbaton) // Bots with harmbaton enabled become shitcurity. - Dave
M.apply_damage(10)
M.Stun(5)
M.Weaken(5)
else
@@ -230,10 +248,10 @@ Auto Patrol: []"},
M.Stun(5)
if(declare_arrests)
//var/area/location = get_area(src)
declare_arrest()
target.visible_message("<span class='danger'>[target] has been stunned by [src]!</span>",\
"<span class='userdanger'>[target] has been stunned by [src]!</span>")
var/area/location = get_area(src)
speak("[arrest_type ? "Detaining" : "Arresting"] level [threatlevel] scumbag <b>[target]</b> in [location].",radio_frequency, radio_name)
target.visible_message("<span class='danger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>",\
"<span class='userdanger'>[target] has been [harmbaton ? "beaten" : "stunned"] by [src]!</span>")
mode = BOT_PREP_ARREST
anchored = 1
@@ -475,13 +493,4 @@ Auto Patrol: []"},
overlays -= "hs_arm"
new /obj/item/robot_parts/l_arm(get_turf(src))
user << "<span class='notice'>You remove the robot arm from [src].</span>"
build_step--
/obj/machinery/bot/secbot/proc/declare_arrest()
var/area/location = get_area(src)
for(var/mob/living/carbon/human/human in world)
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) || istype(human.glasses, /obj/item/clothing/glasses/sunglasses/sechud) && !human.blinded)
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
for(var/mob/living/silicon/robot in world)
if((robot.z == src.z) && !robot.blinded && robot.sensor_mode == 1)
robot << "<span class='info'>[src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
build_step--
+3
View File
@@ -28,6 +28,7 @@
var/light_disabled = 0
var/alarm_on = 0
var/busy = 0
var/indestructible = 0 // If set, prevents aliens from destroying it
/obj/machinery/camera/New()
wires = new(src)
@@ -97,6 +98,8 @@
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
if(!istype(user))
return
if(indestructible)
return
status = 0
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+1 -1
View File
@@ -155,7 +155,7 @@
else
src << "\red You've failed to open an airlock for [target]"
return
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target as mob)
/mob/living/silicon/ai/proc/ai_actual_track(atom/target as mob|obj)
if(!istype(target)) return
var/mob/living/silicon/ai/U = usr
@@ -479,7 +479,7 @@
..()
/obj/item/weapon/holo
damtype = HALLOSS
damtype = STAMINA
/obj/item/weapon/holo/esword
desc = "May the force be within you. Sorta"
+74 -52
View File
@@ -25,6 +25,7 @@
networks["Fire Alarms"] = list(access_ce,access_hos,access_captain)
networks["Power Alarms"] = list(access_ce,access_hos,access_captain)
networks["Supermatter"] = list(access_ce,access_hos,access_captain)
networks["MiniSat"] = list(access_rd,access_hos,access_captain)
networks["Singularity"] = list(access_ce,access_hos,access_captain)
networks["Anomaly Isolation"] = list(access_rd,access_hos,access_captain)
networks["Toxins"] = list(access_rd,access_hos,access_captain)
@@ -34,10 +35,7 @@
networks["Thunderdome"] = list(access_cent_captain)
attack_ai(var/mob/user as mob)
if(isAI(user))
return ui_interact(user)
else
return attack_hand(user)
return attack_hand(user)
attack_paw(var/mob/user as mob)
return attack_hand(user)
@@ -50,6 +48,7 @@
// Network configuration
attackby(I as obj, user as mob)
access = list()
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
var/obj/item/weapon/card/emag/E = I
if(!emagged)
@@ -70,18 +69,45 @@
..()
ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(..())
return
if(stat & (NOPOWER|BROKEN))
return
if(src.z > 6) return
if(stat & (NOPOWER|BROKEN)) return
if(user.stat) return
var/data[0]
data["current"] = null
var/list/L = list()
for (var/obj/machinery/camera/C in cameranet.viewpoints)
if(can_access_camera(C))
L.Add(C)
camera_sort(L)
var/cameras[0]
for(var/obj/machinery/camera/C in L)
var/cam[0]
cam["name"] = C.c_tag
cam["deact"] = !C.can_use()
cam["camera"] = "\ref[C]"
cam["x"] = C.x
cam["y"] = C.y
cam["z"] = C.z
cameras[++cameras.len] = cam
if(C == current)
data["current"] = cam
data["cameras"] = cameras
data.Cut()
tempnets.Cut()
if(emagged)
access = list(access_captain) // Assume captain level access when emagged
data["emagged"] = 1
if(isAI(user))
if(isAI(user) || isrobot (user))
access = list(access_captain) // Assume captain level access when AI
// Loop through the ID's permission, and check which networks the ID has access to.
for(var/l in networks) // Loop through networks.
for(var/m in networks[l]) // Loop through access levels of the networks.
@@ -92,16 +118,36 @@
tempnets.Add(list(list("name" = l, "active" = 0)))
break
data["networks"] = tempnets
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "camera_console.tmpl", "Camera Monitor UI", 660, 280)
if (!ui)
ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800)
// adding a template with the key "mapContent" enables the map ui functionality
ui.add_template("mapContent", "sec_camera_map_content.tmpl")
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
Topic(href, href_list)
if(..())
return
if(href_list["activate"]) // Activate: enable or disable networks
if(href_list["switchTo"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.viewpoints
if(!C) return
switch_to_camera(usr, C)
return 1
else if(href_list["reset"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
current = null
usr.check_eye(current)
return 1
else if(href_list["activate"]) // Activate: enable or disable networks
var/net = href_list["activate"] // Network to be enabled or disabled.
var/active = href_list["active"] // Is the network currently active.
for(var/a in networks[net])
@@ -113,50 +159,26 @@
src.network += net
break
nanomanager.update_uis(src)
else
. = ..()
attack_hand(var/mob/user as mob)
if(src.z > 6)
user << "\red <b>Unable to establish a connection:</b> \black You're too far away from the station!"
return
if(stat & (NOPOWER|BROKEN))
access = list()
if (src.z > 6)
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
if(stat & (NOPOWER|BROKEN)) return
if(!isAI(user))
user.set_machine(src)
if(network.len == 0)
user << "\red No networks configured! Swipe the monitor with an authorized ID to configure them."
return
// Camera listing
var/list/L = list()
for (var/obj/machinery/camera/C in cameranet.viewpoints)
L.Add(C)
camera_sort(L)
var/list/D = list()
D["Cancel"] = "Cancel"
for(var/obj/machinery/camera/C in L)
if(can_access_camera(C))
D[text("[][]", C.c_tag, (C.status ? null : " (Deactivated)"))] = C
C.watcherslist -= user
var/t = input(user, "Which camera should you change to?") as null|anything in D
if(!t)
user.unset_machine()
return 0
var/obj/machinery/camera/C = D[t]
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.wear_id)
var/obj/item/weapon/card/id/gold/C = H.wear_id
access = C.access
if(t == "Cancel")
user.unset_machine()
return 0
if(C)
C.watcherslist += user
switch_to_camera(user, C)
spawn(5)
attack_hand(user)
return
ui_interact(user)
// Check if camera is accessible when jumping
proc/can_access_camera(var/obj/machinery/camera/C)
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/machinery/computer/crew
name = "Crew monitoring computer"
name = "Crew Monitoring Computer"
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
icon_state = "crew"
use_power = 1
+18 -262
View File
@@ -23,14 +23,13 @@ var/specops_shuttle_timeleft = 0
var/specops_shuttle_timereset = 0
/proc/specops_return()
var/area/centcom/control/command = locate()//To find announcer. This area should exist for this proc to work.
var/mob/living/silicon/decoy/announcer = locate() in command//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
var/obj/item/device/radio/intercom/announcer = new /obj/item/device/radio/intercom(null)//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
announcer.config(list("Response Team" = 0))
var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
var/message = "\"THE SPECIAL OPERATIONS SHUTTLE IS PREPARING TO RETURN\""//Initial message shown.
if(announcer)
announcer.say(message)
announcer.say(message)
announcer.autosay(message, "A.L.I.C.E.", "Response Team", list(1,2))
while(specops_shuttle_time - world.timeofday > 0)
var/ticksleft = specops_shuttle_time - world.timeofday
@@ -46,7 +45,7 @@ var/specops_shuttle_timeleft = 0
message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\""
if(rounded_time_left==0)
message = "\"ALERT: TAKEOFF\""
announcer.say(message)
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
@@ -94,21 +93,20 @@ var/specops_shuttle_timeleft = 0
for(var/obj/machinery/computer/specops_shuttle/S in world)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
del(announcer)
/proc/specops_process()
var/area/centcom/specops/special_ops = locate()//Where is the specops area located?
var/area/centcom/control/command = locate()//To find announcer. This area should exist for this proc to work.
var/mob/living/silicon/decoy/announcer = locate() in command//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
var/obj/item/device/radio/intercom/announcer = new /obj/item/device/radio/intercom(null)//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
announcer.config(list("Response Team" = 0))
var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
var/message = "\"THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH\""//Initial message shown.
if(announcer)
announcer.say(message)
announcer.say(message)
/*
message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
announcer.say(message)
*/
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
//message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
//announcer.autosay(message, "A.L.I.C.E.", "Response Team")
while(specops_shuttle_time - world.timeofday > 0)
var/ticksleft = specops_shuttle_time - world.timeofday
@@ -124,8 +122,7 @@ var/specops_shuttle_timeleft = 0
message = "\"ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN\""
if(rounded_time_left==0)
message = "\"ALERT: TAKEOFF\""
announcer.say(message)
announcer.say(message)
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
@@ -237,6 +234,8 @@ var/specops_shuttle_timeleft = 0
for(var/obj/machinery/computer/specops_shuttle/S in world)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
del(announcer)
/proc/specops_can_move()
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom)
@@ -247,7 +246,8 @@ var/specops_shuttle_timeleft = 0
return 1
/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob)
return attack_hand(user)
user << "\red Access Denied."
return 1
/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob)
return attack_hand(user)
@@ -339,248 +339,4 @@ var/specops_shuttle_timeleft = 0
add_fingerprint(usr)
updateUsrDialog()
return
/*//Config stuff
#define SPECOPS_MOVETIME 600 //Time to station is milliseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves.
#define SPECOPS_STATION_AREATYPE "/area/shuttle/specops/station" //Type of the spec ops shuttle area for station
#define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock
var/specops_shuttle_moving_to_station = 0
var/specops_shuttle_moving_to_centcom = 0
var/specops_shuttle_at_station = 0
var/specops_shuttle_can_send = 1
var/specops_shuttle_time = 0
var/specops_shuttle_timeleft = 0
/obj/machinery/computer/specops_shuttle
name = "Spec. Ops. Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
req_access = list(access_cent_specops)
var/temp = null
var/hacked = 0
var/allowedtocall = 0
/proc/specops_process()
var/area/centcom/control/cent_com = locate()//To find announcer. This area should exist for this proc to work.
var/area/centcom/specops/special_ops = locate()//Where is the specops area located?
var/mob/living/silicon/decoy/announcer = locate() in cent_com//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
var/message = "THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown.
if(announcer)
announcer.say(message)
message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
announcer.say(message)
while(specops_shuttle_time - world.timeofday > 0)
var/ticksleft = specops_shuttle_time - world.timeofday
if(ticksleft > 1e5)
specops_shuttle_time = world.timeofday + 10 // midnight rollover
specops_shuttle_timeleft = (ticksleft / 10)
//All this does is announce the time before launch.
if(announcer)
var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN"
if(rounded_time_left==0)
message = "ALERT: TAKEOFF"
announcer.say(message)
message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
sleep(5)
specops_shuttle_moving_to_station = 0
specops_shuttle_moving_to_centcom = 0
specops_shuttle_at_station = 1
if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
if (!specops_can_move())
usr << "\red The Special Operations shuttle is unable to leave."
return
//Begin Marauder launchpad.
spawn(0)//So it parallel processes it.
for(var/obj/machinery/door/poddoor/M in special_ops)
switch(M.id)
if("ASSAULT0")
spawn(10)//1 second delay between each.
M.open()
if("ASSAULT1")
spawn(20)
M.open()
if("ASSAULT2")
spawn(30)
M.open()
if("ASSAULT3")
spawn(40)
M.open()
sleep(10)
var/spawn_marauder[] = new()
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Marauder Entry")
spawn_marauder.Add(L)
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "Marauder Exit")
var/obj/effect/portal/P = new(L.loc)
P.invisibility = 101//So it is not seen by anyone.
P.failchance = 0//So it has no fail chance when teleporting.
P.target = pick(spawn_marauder)//Where the marauder will arrive.
spawn_marauder.Remove(P.target)
sleep(10)
for(var/obj/machinery/mass_driver/M in special_ops)
switch(M.id)
if("ASSAULT0")
spawn(10)
M.drive()
if("ASSAULT1")
spawn(20)
M.drive()
if("ASSAULT2")
spawn(30)
M.drive()
if("ASSAULT3")
spawn(40)
M.drive()
sleep(50)//Doors remain open for 5 seconds.
for(var/obj/machinery/door/poddoor/M in special_ops)
switch(M.id)//Doors close at the same time.
if("ASSAULT0")
spawn(0)
M.close()
if("ASSAULT1")
spawn(0)
M.close()
if("ASSAULT2")
spawn(0)
M.close()
if("ASSAULT3")
spawn(0)
M.close()
special_ops.readyreset()//Reset firealarm after the team launched.
//End Marauder launchpad.
var/area/start_location = locate(/area/shuttle/specops/centcom)
var/area/end_location = locate(/area/shuttle/specops/station)
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in end_location)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
del(T)
start_location.move_contents_to(end_location)
for(var/turf/T in get_area_turfs(end_location) )
var/mob/M = locate(/mob) in T
M << "\red You have arrived to [station_name]. Commence operation!"
/proc/specops_can_move()
if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0
else return 1
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
if(istype(I,/obj/item/weapon/card/emag))
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
else
return attack_hand(user)
/obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob)
if(!allowed(user))
user << "\red Access Denied."
return
// if (sent_strike_team == 0)
// usr << "\red The strike team has not yet deployed."
// return
if(..())
return
user.set_machine(src)
var/dat
if (temp)
dat = temp
else
dat += {"<BR><B>Special Operations Shuttle</B><HR>
\nLocation: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]<BR>
[specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*<BR>\n<BR>":specops_shuttle_at_station ? "\n<A href='?src=\ref[src];sendtodock=1'>Shuttle Offline</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Depart to [station_name]</A><BR>\n<BR>"]
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
user << browse(dat, "window=computer;size=575x450")
onclose(user, "computer")
return
/obj/machinery/computer/specops_shuttle/Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if (href_list["sendtodock"])
if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
usr << "\blue Central Command will not allow the Special Operations shuttle to return."
return
else if (href_list["sendtostation"])
if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
if (!specops_can_move())
usr << "\red The Special Operations shuttle is unable to leave."
return
usr << "\blue The Special Operations shuttle will arrive on [station_name] in [(SPECOPS_MOVETIME/10)] seconds."
temp += "Shuttle departing.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
updateUsrDialog()
var/area/centcom/specops/special_ops = locate()
if(special_ops)
special_ops.readyalert()//Trigger alarm for the spec ops area.
specops_shuttle_moving_to_station = 1
specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
spawn(0)
specops_process()
else if (href_list["mainmenu"])
temp = null
add_fingerprint(usr)
updateUsrDialog()
return
*/
return
@@ -180,7 +180,8 @@ var/syndicate_elite_shuttle_timeleft = 0
return attack_hand(user)
/obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
return attack_hand(user)
user << "\red Access Denied."
return 1
/obj/machinery/computer/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
return attack_hand(user)
-315
View File
@@ -1,315 +0,0 @@
/obj/machinery/computer/telescience
name = "Telepad Control Console"
desc = "Used to teleport objects to and from the telescience telepad."
icon_state = "teleport-sci"
circuit = "/obj/item/weapon/circuitboard/telesci_console"
var/teles_left // How many teleports left until it becomes uncalibrated
var/x_off // X offset
var/y_off // Y offset
var/x_co // X coordinate
var/y_co // Y coordinate
var/z_co // Z coordinate
var/trueX // X + offset
var/trueY // Y + offset
var/obj/machinery/telepad/telepad
var/tele_id = "Telesci"
var/obj/item/device/sps/inserted_sps
var/last_target
/obj/machinery/computer/telescience/update_icon()
if(stat & BROKEN)
icon_state = "telescib"
else
if(stat & NOPOWER)
src.icon_state = "teleport0"
stat |= NOPOWER
else
icon_state = initial(icon_state)
stat &= ~NOPOWER
/obj/machinery/computer/telescience/Destroy()
if(inserted_sps)
inserted_sps.loc = loc
inserted_sps = null
..()
/obj/machinery/computer/telescience/attack_paw(mob/user)
usr << "You are too primitive to use this computer."
return
/obj/machinery/telescience/station/attack_ai(mob/user)
src.attack_hand()
/obj/machinery/computer/telescience/attack_hand(mob/user)
ui_interact(user)
/obj/machinery/computer/telescience/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(..())
return
if(stat & (NOPOWER|BROKEN))
return
// On first use, the coordinates are null. Rather than displaying null, we'll set them to unset.
if(!x_co)
x_co = "Unset"
if(!y_co)
y_co = "Unset"
if(!z_co)
z_co = "Unset"
var/data[0]
data["coordx"] = x_co
data["coordy"] = y_co
data["coordz"] = z_co
data["sps"] = inserted_sps
// Set up the Nano UI
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "telescience_console.tmpl", "Telescience Console UI", 640, 300)
ui.set_initial_data(data)
ui.open()
/obj/machinery/computer/telescience/proc/telefail(var/level)
var/teleturf = get_turf(telepad)
switch(level)
if(1)
for(var/mob/O in hearers(telepad, null))
O.show_message("\red The telepad weakly fizzles.", 2)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, teleturf)
s.start()
if(2)
for(var/mob/living/carbon/human/M in viewers(telepad, null))
if(M.loc.loc == telepad.loc.loc) // Stops the geneticists with X-Ray vision getting irradiated
M.apply_effect((rand(50, 100)), IRRADIATE, 0)
M << "\red You feel irradiated."
if(3)
for(var/turf/simulated/floor/target_tile in range(0,telepad))
var/datum/gas_mixture/napalm = new
napalm.toxins = 25
napalm.temperature = 2000
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(700, 400)
for(var/mob/O in hearers(telepad, null))
O.show_message("\red The telepad sets on fire!", 2)
if(4)
var/blocked = list(/mob/living/simple_animal/hostile,
/mob/living/simple_animal/hostile/alien/queen/large,
/mob/living/simple_animal/hostile/pirate,
/mob/living/simple_animal/hostile/pirate/ranged,
/mob/living/simple_animal/hostile/russian,
/mob/living/simple_animal/hostile/russian/ranged,
/mob/living/simple_animal/hostile/syndicate,
/mob/living/simple_animal/hostile/syndicate/melee,
/mob/living/simple_animal/hostile/syndicate/melee/space,
/mob/living/simple_animal/hostile/syndicate/ranged,
/mob/living/simple_animal/hostile/syndicate/ranged/space,
/mob/living/simple_animal/hostile/retaliate,
/mob/living/simple_animal/hostile/giant_spider/nurse)
var/list/hostiles = typesof(/mob/living/simple_animal/hostile) - blocked
playsound(teleturf, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(telepad, null))
flick("e_flash", M.flash)
var/chosen = pick(hostiles)
var/mob/living/simple_animal/hostile/H = new chosen
H.loc = teleturf
return
/obj/machinery/computer/telescience/proc/teleprep(var/type)
if(!telepad)
usr << "\red Error: No associated telepad. Please recalibrate and try again."
return
if(telepad.panel_open)
usr << "\red Error: The telepad can not be used while in maintenance mode."
return
var/numpick
var/failure = checkFail()
if(failure > 0)
numpick = pick(1,1,1,1,1,2,2,2,2,3)
telefail(numpick)
return
if(teles_left > 0)
if(prob(70 + (5 * telepad.efficiency)))
teles_left -= 1
tele(type)
if(teles_left == 0)
for(var/mob/O in hearers(src, null))
O.show_message("\red The telepad has become uncalibrated.", 2)
return
else
if(prob(25 + (10 * telepad.efficiency)))
tele(type)
else
numpick = pick(1,1,1,2,2,3,4)
telefail(numpick)
return
numpick = pick(1,1,1,1,1,2,2,2,2,3)
telefail(numpick)
return
/obj/machinery/computer/telescience/proc/tele(var/type)
var/tele = get_turf(telepad)
trueX = (x_co + x_off)
trueY = (y_co + y_off)
var/target = locate(trueX, trueY, z_co)
last_target = target
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, tele)
s.start()
flick("pad-beam", telepad)
var/list/teleportables = list()
switch(type)
if(0)
for(var/atom/A in tele)
if(!istype(A, /obj/effect) && !istype(A, /mob/living/silicon/ai) && !istype(A, /obj/item/device/radio/intercom) && !istype(A, /obj/structure/closet/secure_closet/brig))
if(istype(A, /obj/structure))
var/obj/structure/S = A
if(!S.anchored)
teleportables += S
else if(istype(A, /obj/machinery))
var/obj/machinery/M = A
if(!M.anchored)
teleportables += M
else
teleportables += A
for(var/atom/T in teleportables)
do_teleport(T, target, 0)
usr << "\blue Teleport successful."
if(1)
for(var/atom/A in target)
if(!istype(A, /obj/effect) && !istype(A, /mob/living/silicon/ai) && !istype(A, /obj/item/device/radio/intercom))
if(istype(A, /obj/structure))
var/obj/structure/S = A
if(!S.anchored)
teleportables += S
else if(istype(A, /obj/machinery))
var/obj/machinery/M = A
if(!M.anchored)
teleportables += M
else
teleportables += A
for(var/atom/T in teleportables)
do_teleport(T, tele, 0)
usr << "\blue Teleport successful."
return
/obj/machinery/computer/telescience/proc/checkFail()
var/fail = 0
if(x_co == "" || x_co == "Unset")
usr << "\red Error: set X coordinate."
fail = 1
return fail
if(y_co == "" || y_co == "Unset")
usr << "\red Error: set Y coordinate."
fail = 1
return fail
if(z_co == "" || z_co == "Unset")
usr << "\red Error: set Z coordinate."
fail = 1
return fail
if(x_co < 11 || x_co > 245)
usr << "\red Error: X is less than 11 or greater than 245."
fail = 1
return fail
if(y_co < 11 || y_co > 245)
usr << "\red Error: Y is less than 11 or greater than 245."
fail = 1
return fail
if(z_co == 2 || z_co < 1 || z_co > 6)
if (z_co == 7 & src.emagged == 1)
// This should be empty, allows for it to continue if the z-level is 7 and the machine is emagged.
else
usr << "\red Error: Z is less than 1, greater than [src.emagged ? "7" : "6"], or equal to 2."
fail = 1
return fail
if(istype(get_area(locate(x_co,y_co,z_co)), /area/security/armoury/gamma))
usr << "\red Error: Attempting to access telescience-protected area."
fail = 1
return fail
return fail
/obj/machinery/computer/telescience/Topic(href, href_list)
if(..())
return
if(href_list["ejectSPS"])
inserted_sps.loc = loc
inserted_sps = null
nanomanager.update_uis(src)
if(href_list["setMemory"])
if(last_target)
inserted_sps.locked_location = last_target
usr << "\blue Location saved."
else
usr << "\red Error: No data stored."
nanomanager.update_uis(src)
if(href_list["setx"])
var/a = input("Please input desired X coordinate.", name, x_co) as num
a = copytext(sanitize(a), 1, 20)
x_co = a
x_co = text2num(x_co)
nanomanager.update_uis(src)
return
if(href_list["sety"])
var/b = input("Please input desired Y coordinate.", name, y_co) as num
b = copytext(sanitize(b), 1, 20)
y_co = b
y_co = text2num(y_co)
nanomanager.update_uis(src)
return
if(href_list["setz"])
var/c = input("Please input desired Z coordinate.", name, z_co) as num
c = copytext(sanitize(c), 1, 20)
z_co = c
z_co = text2num(z_co)
nanomanager.update_uis(src)
return
if(href_list["send"])
teleprep(0)
nanomanager.update_uis(src)
return
if(href_list["receive"])
teleprep(1)
nanomanager.update_uis(src)
return
if(href_list["recal"])
if(telepad == null)
for(var/obj/machinery/telepad/T in range(src,10))
telepad = T
if(!telepad)
usr << "\red Error: No telepads in range were found."
nanomanager.update_uis(src)
return
var/teleturf = get_turf(telepad)
teles_left = rand(8,12)
x_off = rand(-10,10)
y_off = rand(-10,10)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, teleturf)
s.start()
usr << "\blue Calibration successful."
nanomanager.update_uis(src)
return
/obj/machinery/computer/telescience/attackby(I as obj, var/mob/user as mob) // Emagging
if(istype(I,/obj/item/weapon/card/emag))
if (src.emagged == 0)
user << "\blue You scramble the Telescience authentication key to an unknown signal. You should be able to teleport to more places now!"
src.emagged = 1
else
user << "\red The machine seems unaffected by the card swipe..."
else if(istype(I, /obj/item/device/sps))
if(!inserted_sps)
inserted_sps = I
user.before_take_item(I)
inserted_sps.loc = src
user.visible_message("<span class='notice'>You insert [I] into the SPS device slot.</span>")
attack_hand(user)
else if(istype(I, /obj/item/device/multitool))
var/obj/item/device/multitool/M = I
if(M.buffer && istype(M.buffer, /obj/machinery/telepad))
telepad = M.buffer
M.buffer = null
user << "<span class='caution'>You upload the data from [I]'s buffer.</span>"
else
..()
+69 -14
View File
@@ -9,10 +9,11 @@
var/area/curr_location
var/moving = 0
var/lastMove = 0
unacidable = 1
/obj/machinery/computer/xenos_station/New()
curr_location= locate(/area/xenos_station/start)
curr_location = locate(/area/xenos_station/start)
/obj/machinery/computer/xenos_station/proc/xenos_move_to(area/destination as area)
@@ -23,13 +24,61 @@
moving = 1
lastMove = world.time
for(var/obj/machinery/door/airlock/alien/A in world)
A.close()
A.locked = 1
A.update_icon()
for(var/mob/M in curr_location)
if(M.client)
spawn(0)
if(M.buckled)
M << "\red Sudden acceleration presses you into your chair!"
shake_camera(M, 3, 1)
else
M << "\red The floor lurches beneath you!"
shake_camera(M, 10, 1)
if(istype(M, /mob/living/carbon) && !isalien(M))
if(!M.buckled)
M.Weaken(3)
if(curr_location.z != dest_location.z)
var/area/transit_location = locate(/area/xenos_station/transit)
curr_location.move_contents_to(transit_location)
curr_location = transit_location
sleep(XENOS_SHUTTLE_MOVE_TIME)
for(var/obj/machinery/door/airlock/alien/A in world)
A.close()
if(dest_location != locate(/area/xenos_station/start))
A.locked = 0
A.update_icon()
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in dest_location)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
if(istype(T, /turf/simulated))
del(T)
for(var/mob/living/carbon/bug in dest_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
for(var/mob/living/simple_animal/pest in dest_location) // And for the other kind of bug...
pest.gib()
curr_location.move_contents_to(dest_location)
curr_location = dest_location
moving = 0
@@ -47,20 +96,25 @@
/obj/machinery/computer/xenos_station/attack_hand(mob/user as mob)
if(!allowed(user))
user << "\red Access Denied"
user << "\red Access denied."
return
if(!isalien(user) && !isrobot(user) && !isAI(user))
user << "You do not know how to operate this terminal."
return
user.set_machine(src)
var/dat = {"Location: [curr_location]<br>
Ready to move[max(lastMove + XENOS_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + XENOS_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
<a href='?src=\ref[src];xenos=1'>Xenos Space</a><br>
<a href='?src=\ref[src];station_nw=1'>North West of SS13</a> |
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
<a href='?src=\ref[src];station_ne=1'>North East of SS13</a><br>
<a href='?src=\ref[src];station_sw=1'>South West of SS13</a> |
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
<a href='?src=\ref[src];station_se=1'>South East of SS13</a><br>
<a href='?src=\ref[src];xenos=1'>Alien Space</a><br>
<a href='?src=\ref[src];station_nw=1'>North-West of SS13</a> |
<a href='?src=\ref[src];station_ne=1'>North-East of SS13</a><br>
<a href='?src=\ref[src];station_e=1'>East of SS13</a> <br>
<a href='?src=\ref[src];station_sw=1'>South-West of SS13</a> |
<a href='?src=\ref[src];station_se=1'>South-East of SS13</a><br>
<a href='?src=\ref[src];station_west=1'>West of SS13</a><br>
<a href='?src=\ref[src];station_ro=1'>North of Research Outpost</a><br>
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
user << browse(dat, "window=computer;size=575x450")
@@ -79,17 +133,18 @@
xenos_move_to(/area/xenos_station/start)
else if(href_list["station_nw"])
xenos_move_to(/area/xenos_station/northwest)
else if(href_list["station_n"])
xenos_move_to(/area/xenos_station/north)
else if(href_list["station_ne"])
xenos_move_to(/area/xenos_station/northeast)
else if(href_list["station_e"])
xenos_move_to(/area/xenos_station/east)
else if(href_list["station_sw"])
xenos_move_to(/area/xenos_station/southwest)
else if(href_list["station_s"])
xenos_move_to(/area/xenos_station/south)
else if(href_list["station_se"])
xenos_move_to(/area/xenos_station/southeast)
else if(href_list["station_w"])
xenos_move_to(/area/xenos_station/west)
else if(href_list["station_ro"])
xenos_move_to(/area/xenos_station/researchoutpost)
add_fingerprint(usr)
updateUsrDialog()
+9 -1
View File
@@ -266,7 +266,15 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
//Make an announcement and log the person entering storage.
frozen_crew += "[occupant.real_name]"
announce.autosay("[occupant.real_name] has entered long-term storage.", "Cryogenic Oversight")
var/ailist[] = list()
for (var/mob/living/silicon/ai/A in living_mob_list)
ailist += A
if (ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
announcer.say(";[occupant.real_name] has entered long-term storage.")
else
announce.autosay("[occupant.real_name] has entered long-term storage.", "Cryogenic Oversight")
visible_message("\blue The crypod hums and hisses as it moves [occupant.real_name] into storage.", 3)
// Delete the mob.
+51 -165
View File
@@ -284,6 +284,26 @@
name = "Secure Armory Airlock"
hackProof = 1
aiControlDisabled = 1
/obj/machinery/door/airlock/alien
name = "Alien Airlock"
desc = "A mysterious alien airlock with a complicated opening mechanism."
hackProof = 1
icon = 'icons/obj/doors/Doorplasma.dmi'
/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob)
if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user))
..(user)
else
user << "You do not know how to operate this airlock's mechanism."
return
/obj/machinery/door/airlock/alien/attackby(C as obj, mob/user as mob)
if(isalien(user) || isrobot(user) || isAI(user))
..(C, user)
else
user << "You do not know how to operate this airlock's mechanism."
return
/*
About the new airlock wires panel:
@@ -314,174 +334,14 @@ About the new airlock wires panel:
return
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
user << "\red <B>You feel a powerful shock course through your body!</B>"
user.halloss += 10
user.stunned += 10
user.staminaloss += 50
user.stunned += 5
return
..(user)
/obj/machinery/door/airlock/bumpopen(mob/living/simple_animal/user as mob)
..(user)
/*
/obj/machinery/door/airlock/proc/pulse(var/wireColor)
//var/wireFlag = airlockWireColorToFlag[wireColor] //not used in this function
var/wireIndex = airlockWireColorToIndex[wireColor]
switch(wireIndex)
if(AIRLOCK_WIRE_IDSCAN)
//Sending a pulse through this flashes the red light on the door (if the door has power).
if((src.arePowerSystemsOn()) && (!(stat & NOPOWER)))
do_animate("deny")
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
src.loseMainPower()
if(AIRLOCK_WIRE_DOOR_BOLTS)
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
//raises them if they are down (only if power's on)
if(!src.locked)
src.lock()
else
src.unlock()
src.updateUsrDialog()
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
src.loseBackupPower()
if(AIRLOCK_WIRE_AI_CONTROL)
if(src.aiControlDisabled == 0)
src.aiControlDisabled = 1
else if(src.aiControlDisabled == -1)
src.aiControlDisabled = 2
src.updateDialog()
spawn(10)
if(src.aiControlDisabled == 1)
src.aiControlDisabled = 0
else if(src.aiControlDisabled == 2)
src.aiControlDisabled = -1
src.updateDialog()
if(AIRLOCK_WIRE_ELECTRIFY)
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
if(src.secondsElectrified==0)
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
src.secondsElectrified = 30
spawn(10)
//TODO: Move this into process() and make pulsing reset secondsElectrified to 30
while (src.secondsElectrified>0)
src.secondsElectrified-=1
if(src.secondsElectrified<0)
src.secondsElectrified = 0
// src.updateUsrDialog() //Commented this line out to keep the airlock from clusterfucking you with electricity. --NeoFite
sleep(10)
if(AIRLOCK_WIRE_OPEN_DOOR)
//tries to open the door without ID
//will succeed only if the ID wire is cut or the door requires no access
if(!src.requiresID() || src.check_access(null))
if(density) open()
else close()
if(AIRLOCK_WIRE_SAFETY)
safe = !safe
if(!src.density)
close()
src.updateUsrDialog()
if(AIRLOCK_WIRE_SPEED)
normalspeed = !normalspeed
src.updateUsrDialog()
if(AIRLOCK_WIRE_LIGHT)
lights = !lights
src.updateUsrDialog()
/obj/machinery/door/airlock/proc/cut(var/wireColor)
var/wireFlag = airlockWireColorToFlag[wireColor]
var/wireIndex = airlockWireColorToIndex[wireColor]
wires &= ~wireFlag
switch(wireIndex)
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
//Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electocute the user.
src.loseMainPower()
src.shock(usr, 50)
src.updateUsrDialog()
if(AIRLOCK_WIRE_DOOR_BOLTS)
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
src.lock()
src.updateUsrDialog()
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
src.loseBackupPower()
src.shock(usr, 50)
src.updateUsrDialog()
if(AIRLOCK_WIRE_AI_CONTROL)
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
if(src.aiControlDisabled == 0)
src.aiControlDisabled = 1
else if(src.aiControlDisabled == -1)
src.aiControlDisabled = 2
src.updateUsrDialog()
if(AIRLOCK_WIRE_ELECTRIFY)
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
if(src.secondsElectrified != -1)
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
src.secondsElectrified = -1
if (AIRLOCK_WIRE_SAFETY)
safe = 0
src.updateUsrDialog()
if(AIRLOCK_WIRE_SPEED)
autoclose = 0
src.updateUsrDialog()
if(AIRLOCK_WIRE_LIGHT)
lights = 0
src.updateUsrDialog()
/obj/machinery/door/airlock/proc/mend(var/wireColor)
var/wireFlag = airlockWireColorToFlag[wireColor]
var/wireIndex = airlockWireColorToIndex[wireColor] //not used in this function
wires |= wireFlag
switch(wireIndex)
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
if((!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2)))
src.regainMainPower()
src.shock(usr, 50)
src.updateUsrDialog()
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
if((!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2)))
src.regainBackupPower()
src.shock(usr, 50)
src.updateUsrDialog()
if(AIRLOCK_WIRE_AI_CONTROL)
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
if(src.aiControlDisabled == 1)
src.aiControlDisabled = 0
else if(src.aiControlDisabled == 2)
src.aiControlDisabled = -1
src.updateUsrDialog()
if(AIRLOCK_WIRE_ELECTRIFY)
if(src.secondsElectrified == -1)
src.secondsElectrified = 0
if (AIRLOCK_WIRE_SAFETY)
safe = 1
src.updateUsrDialog()
if(AIRLOCK_WIRE_SPEED)
autoclose = 1
if(!src.density)
close()
src.updateUsrDialog()
if(AIRLOCK_WIRE_LIGHT)
lights = 1
src.updateUsrDialog()
*/
/obj/machinery/door/airlock/proc/isElectrified()
if(src.secondsElectrified != 0)
return 1
@@ -575,13 +435,14 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/update_icon()
if(overlays) overlays.Cut()
overlays = list()
if(emergency) overlays += image('icons/obj/doors/doorint.dmi', "elights")
if(density)
if(locked && lights)
icon_state = "door_locked"
else
icon_state = "door_closed"
if(p_open || welded || frozen)
overlays = list()
if(p_open)
overlays += image(icon, "panel_open")
if(welded)
@@ -648,6 +509,11 @@ About the new airlock wires panel:
else
t1 += text("IdScan enabled. <A href='?src=\ref[];aiDisable=1'>Disable?</a><br>\n", src)
if(src.emergency)
t1 += text("Emergency Access Override is enabled. <A href='?src=\ref[];aiDisable=11'>Disable?</a><br>\n", src)
else
t1 += text("Emergency Access Override is disabled. <A href='?src=\ref[];aiEnable=11'>Enable?</a><br>\n", src)
if(src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1))
t1 += text("Main Power Input wire is cut.<br>\n")
if(src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2))
@@ -826,8 +692,9 @@ About the new airlock wires panel:
return 1
/obj/machinery/door/airlock/Topic(href, href_list, var/nowindow = 0)
// If you add an if(..()) check you must first remove the var/nowindow parameter.
// Otherwise it will runtime with this kind of error: null.Topic()
//AI
//aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door, 8 door safties, 9 door speed, 11 emergency access
//aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door, 8 door safties, 9 door speed, 11 emergency access
if(!nowindow)
..()
if(usr.stat || usr.restrained()|| usr.small)
@@ -966,6 +833,13 @@ About the new airlock wires panel:
usr << "The door bolt lights have been disabled."
else
usr << "The door bolt lights are already disabled!"
if(11)
// Emergency access
if (src.emergency)
emergency = 0
else
usr << text("Emergency access is already disabled!")
else if(href_list["aiEnable"])
var/code = text2num(href_list["aiEnable"])
@@ -1057,6 +931,13 @@ About the new airlock wires panel:
usr << "The door bolt lights have been enabled"
else
usr << "The door bolt lights are already enabled!"
if(11)
// Emergency access
if (!src.emergency)
emergency = 1
else
usr << text("Emergency access is already enabled!")
add_fingerprint(usr)
update_icon()
@@ -1349,3 +1230,8 @@ About the new airlock wires panel:
return
else
return
/obj/machinery/door/airlock/CanAStarPass(var/obj/item/weapon/card/id/ID)
//Airlock is passable if it is open (!density), bot has access, and is not bolted shut)
return !density || (check_access(ID) && !locked)
+11 -6
View File
@@ -18,6 +18,7 @@
var/glass = 0
var/normalspeed = 1
var/heat_proof = 0 // For glass airlocks/opacity firedoors
var/emergency = 0
var/air_properties_vary_with_direction = 0
//Multi-tile doors
@@ -44,12 +45,14 @@
bound_height = width * world.icon_size
update_nearby_tiles(need_rebuild=1)
airlocks += src
return
/obj/machinery/door/Destroy()
density = 0
update_nearby_tiles()
airlocks -= src
..()
return
@@ -68,7 +71,7 @@
if(istype(AM, /obj/machinery/bot))
var/obj/machinery/bot/bot = AM
if(src.check_access(bot.botcard))
if(src.check_access(bot.botcard) || emergency == 1)
if(density)
open()
return
@@ -76,7 +79,7 @@
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access) || emergency == 1))
open()
else
flick("door_deny", src)
@@ -101,7 +104,7 @@
//used in the AStar algorithm to determinate if the turf the door is on is passable
/obj/machinery/door/proc/CanAStarPass(var/obj/item/weapon/card/id/ID)
return !density || check_access(ID)
return !density
/obj/machinery/door/proc/bumpopen(mob/user as mob)
if(operating) return
@@ -113,8 +116,10 @@
user = null
if(density)
if(allowed(user)) open()
else flick("door_deny", src)
if(allowed(user) || src.emergency == 1)
open()
else
flick("door_deny", src)
return
/obj/machinery/door/meteorhit(obj/M as obj)
@@ -153,7 +158,7 @@
open()
operating = -1
return 1
if(src.allowed(user))
if(src.allowed(user) || src.emergency == 1)
if(src.density)
open()
else
+3 -7
View File
@@ -56,7 +56,7 @@
desc = "Emergency air-tight shutter, capable of sealing off breached areas."
icon = 'icons/obj/doors/DoorHazard.dmi'
icon_state = "door_open"
req_one_access = list(access_atmospherics, access_engine_equip)
req_one_access = list(access_atmospherics, access_engine)
opacity = 0
density = 0
@@ -132,9 +132,9 @@
o += "<span class='warning'>"
else
o += "<span style='color:blue'>"
o += "[celsius]Celsius</span> "
o += "[celsius] Celsius</span> "
o += "<span style='color:blue'>"
o += "[pressure]kPa</span></li>"
o += "[pressure] kPa</span></li>"
usr << o
if( islist(users_to_open) && users_to_open.len)
@@ -468,7 +468,3 @@
/obj/machinery/door/firedoor/multi_tile/triple
icon = 'icons/obj/doors/DoorHazard3x1.dmi'
width = 3
//used in the AStar algorithm to determinate if the turf the door is on is passable
/obj/machinery/door/firedoor/CanAStarPass()
return !density
+29 -16
View File
@@ -81,13 +81,13 @@ var/const/HOLOPAD_MODE = 0
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text)
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb)
if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something.
if(!master.say_understands(M))//The AI will be able to understand most mobs talking through the holopad.
text = stars(text)
var/name_used = M.GetVoice()
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> <span class='message'>[M.say_quote(text)]</span></span></i>"
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
master.show_message(rendered, 2)
return
@@ -101,7 +101,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.SetLuminosity(2) //hologram lighting
SetLuminosity(2) //pad lighting
icon_state = "holopad1"
A.current = src
A.holo = src
master = A//AI is the master.
use_power = 2//Active power usage.
return 1
@@ -109,8 +109,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/holopad/proc/clear_holo()
// hologram.SetLuminosity(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
del(hologram)//Get rid of hologram.
if(master.current == src)
master.current = null
if(master.holo == src)
master.holo = null
master = null//Null the master, since no-one is using it now.
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0"
@@ -141,6 +141,25 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.loc = get_turf(master.eyeobj)
return 1
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/obj/machinery/hologram/holopad/proc/face_atom(var/atom/A)
if( !hologram || !A || !hologram.x || !hologram.y || !A.x || !A.y ) return
var/dx = A.x - hologram.x
var/dy = A.y - hologram.y
if(!dx && !dy) // Wall items are graphically shifted but on the floor
if(A.pixel_y > 16) hologram.dir = NORTH
else if(A.pixel_y < -16)hologram.dir = SOUTH
else if(A.pixel_x > 16) hologram.dir = EAST
else if(A.pixel_x < -16)hologram.dir = WEST
return
if(abs(dx) < abs(dy))
if(dy > 0) hologram.dir = NORTH
else hologram.dir = SOUTH
else
if(dx > 0) hologram.dir = EAST
else hologram.dir = WEST
/*
* Hologram
@@ -153,23 +172,17 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
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
else
stat |= ~NOPOWER
//Destruction procs.
/obj/machinery/hologram/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
del(src)
if(2.0)
if (prob(50))
qdel(src)
del(src)
if(3.0)
if (prob(5))
qdel(src)
del(src)
return
/obj/machinery/hologram/blob_act()
@@ -180,7 +193,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
del(src)
return
/obj/machinery/hologram/Destroy()
/obj/machinery/hologram/Del()
if(hologram)
src:clear_holo()
..()
@@ -213,4 +226,4 @@ Holographic project of everything else.
name = "hologram projector"
desc = "It makes a hologram appear...with magnets or something..."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "hologram0"
icon_state = "hologram0"
+9 -14
View File
@@ -713,24 +713,19 @@
check_level_sanity()
update_icon()
//Check if container is Plant-B-Gone spray (doesn't work with other sprays, may add in future)
else if (istype(O, /obj/item/weapon/reagent_containers/spray/plantbgone))
//Check if container is any spray container
else if (istype(O, /obj/item/weapon/reagent_containers/spray))
var/obj/item/weapon/reagent_containers/spray/S = O
//Check if there is a plant in the tray
if(seed)
health -= rand(5,20)
if(pestlevel > 0)
pestlevel -= 2
if(weedlevel > 0)
weedlevel -= 3
toxins += 4
check_level_sanity()
if(!S.reagents.total_volume)
user << "\red [S] is empty."
return
//Container not empty, transfer contents to tray
S.reagents.trans_to(src, S.amount_per_transfer_from_this)
visible_message("\red <B>\The [src] has been sprayed with \the [O][(user ? " by [user]." : ".")]")
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
check_level_sanity()
update_icon()
else
user << "There's nothing in [src] to spray!"
+13 -1
View File
@@ -56,8 +56,20 @@
slime
process(loc, what)
var/mob/living/carbon/slime/S = what
var/C = S.cores
if(S.stat != DEAD)
S.loc = loc
S.visible_message("<span class='notice'>[C] crawls free of the processor!</span>")
return
for(var/i = 1, i <= C, i++)
new S.coretype(loc)
feedback_add_details("slime_core_harvested","[replacetext(S.colour," ","_")]")
..()
input = /mob/living/carbon/slime
output = /obj/item/weapon/reagent_containers/glass/beaker/slime
output = null
monkey
process(loc, what)
+1 -1
View File
@@ -127,7 +127,7 @@
iconholder = 1
reqpower = 700
if(/obj/item/weapon/gun/energy/taser)
if(/obj/item/weapon/gun/energy/advtaser)
projectile = /obj/item/projectile/energy/electrode
eprojectile = projectile
iconholder = 1
+1 -1
View File
@@ -81,7 +81,7 @@
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
B.bcell.charge += 1750
icon_state = "recharger1"
icon_state = icon_state_charging
use_power(2000)
else
icon_state = icon_state_charged
+8
View File
@@ -22,6 +22,14 @@
component_parts += new /obj/item/weapon/cell/high(src)
RefreshParts()
build_icon()
/obj/machinery/recharge_station/upgraded/New()
..()
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
component_parts += new /obj/item/weapon/cell/hyper(src)
RefreshParts()
/obj/machinery/recharge_station/RefreshParts()
recharge_speed = 0
+1 -1
View File
@@ -1,4 +1,4 @@
#define FONT_SIZE "5pt"
#define FONT_SIZE "4pt"
#define FONT_COLOR "#09f"
#define FONT_STYLE "Arial Black"
#define SCROLL_SPEED 2
+2 -1
View File
@@ -1,4 +1,5 @@
/obj/machinery/status_display/supply_display
name = "supply status display"
ignore_friendc = 1
/obj/machinery/status_display/supply_display/update()
@@ -31,4 +32,4 @@
if(signal.data["command"] == "supply")
mode = STATUS_DISPLAY_CUSTOM
else
..(signal)
return
-78
View File
@@ -1,78 +0,0 @@
/obj/machinery/telepad
name = "telepad"
desc = "A bluespace telepad used for teleporting objects to and from a location."
icon = 'icons/obj/telescience.dmi'
icon_state = "pad-idle"
anchored = 1
use_power = 1
idle_power_usage = 2
active_power_usage = 50
var/efficiency
/obj/machinery/telepad/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/telesci_pad(src)
component_parts += new /obj/item/bluespace_crystal/artificial(src)
component_parts += new /obj/item/bluespace_crystal/artificial(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/telepad/RefreshParts()
var/E
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
E += C.rating
efficiency = E
/obj/machinery/telepad/attackby(obj/item/I, mob/user)
if(default_deconstruction_screwdriver(user, "pad-idle-o", "pad-idle", I))
return
if(panel_open)
if(istype(I, /obj/item/device/multitool))
var/obj/item/device/multitool/M = I
M.buffer = src
user << "<span class='caution'>You save the data in the [I.name]'s buffer.</span>"
if(exchange_parts(user, I))
return
default_deconstruction_crowbar(I)
/obj/machinery/telepad_cargo
name = "cargo telepad"
desc = "A telepad used by the Rapid Crate Sender."
icon = 'icons/obj/telescience.dmi'
icon_state = "pad-idle"
anchored = 1
use_power = 1
idle_power_usage = 2
active_power_usage = 50
var/stage = 0
/obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
if(anchored)
anchored = 0
user << "<span class='caution'>The [src] can now be moved.</span>"
else if(!anchored)
anchored = 1
user << "<span class='caution'>The [src] is now secured.</span>"
if(istype(W, /obj/item/weapon/screwdriver))
if(stage == 0)
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='caution'>You unscrew the telepad's tracking beacon.</span>"
stage = 1
else if(stage == 1)
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='caution'>You screw in the telepad's tracking beacon.</span>"
stage = 0
if(istype(W, /obj/item/weapon/weldingtool) && stage == 1)
playsound(src, 'sound/items/Welder.ogg', 50, 1)
user << "<span class='caution'>You disassemble the telepad.</span>"
new /obj/item/stack/sheet/metal(get_turf(src))
new /obj/item/stack/sheet/glass(get_turf(src))
qdel(src)
+5 -5
View File
@@ -3,7 +3,7 @@
desc = "Used to control a linked teleportation Hub and Station."
icon_state = "teleport"
circuit = "/obj/item/weapon/circuitboard/teleporter"
var/obj/item/device/sps/locked = null
var/obj/item/device/gps/locked = null
var/regime_set = "Teleporter"
var/id = null
var/obj/machinery/teleport/station/power_station
@@ -40,16 +40,16 @@
user << "\blue The teleporter can now lock on to Syndicate beacons!"
else
ui_interact(user)
else if(istype(I, /obj/item/device/sps))
var/obj/item/device/sps/L = I
else if(istype(I, /obj/item/device/gps))
var/obj/item/device/gps/L = I
if(L.locked_location && !(stat & (NOPOWER|BROKEN)))
user.before_take_item(L)
L.loc = src
locked = L
user << "<span class='caution'>You insert the SPS device into the [name]'s slot.</span>"
user << "<span class='caution'>You insert the GPS device into the [name]'s slot.</span>"
src.attack_hand(user)
else
user << "<span class='warning'>No useable data was found on te SPS device.</span>"
user << "<span class='warning'>No useable data was found on te GPS device.</span>"
else
..()
return
+2 -2
View File
@@ -5,10 +5,10 @@
icon_state = "separator-AO1"
layer = MOB_LAYER+1 // Overhead
anchored = 1
density = 1
density = 0
var/transform_dead = 0
var/transform_standing = 0
var/cooldown_duration = 1200 // 2 minutes
var/cooldown_duration = 600 // 1 minute
var/cooldown = 0
var/robot_cell_charge = 5000
+36 -6
View File
@@ -190,6 +190,13 @@
targeting_active = 1
target()
targeting_active = 0
if(prob(15))
if(prob(50))
playsound(get_turf(src), 'sound/effects/turret/move1.wav', 60, 1)
else
playsound(get_turf(src), 'sound/effects/turret/move2.wav', 60, 1)
else if(!isPopping())//else, pop down
if(!isDown())
popDown()
@@ -229,6 +236,10 @@
else
A = new /obj/item/projectile/energy/electrode( loc )
use_power(200)
if(src.lasers)
playsound(get_turf(src), 'sound/weapons/Laser.ogg', 60, 1)
else
playsound(get_turf(src), 'sound/weapons/Taser.ogg', 60, 1)
A.current = T
A.yo = U.y - T.y
A.xo = U.x - T.x
@@ -244,6 +255,7 @@
if ((!isPopping()) || src.popping==-1)
invisibility = 0
popping = 1
playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
if (src.cover!=null)
flick("popup", src.cover)
src.cover.icon_state = "openTurretCover"
@@ -253,6 +265,7 @@
/obj/machinery/turret/proc/popDown()
if ((!isPopping()) || src.popping==1)
popping = -1
playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
if (src.cover!=null)
flick("popdown", src.cover)
src.cover.icon_state = "turretCover"
@@ -272,7 +285,7 @@
/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
..()
playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
playsound(get_turf(src), 'sound/weapons/smash.ogg', 60, 1)
src.spark_system.start()
src.health -= W.force * 0.5
if (src.health <= 0)
@@ -422,7 +435,7 @@
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!(stat & BROKEN))
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
playsound(get_turf(src), 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("\red <B>[] has slashed at []!</B>", M, src)
src.health -= 15
if (src.health <= 0)
@@ -474,14 +487,15 @@
/obj/machinery/gun_turret //related to turrets but work way differentely because of being mounted on a moving ship.
name = "machine gun turret"
desc = "Syndicate defense turret. It really packs a bunch."
desc = "Syndicate heavy defense turret. It really packs a bunch."
density = 1
anchored = 1
var/state = 0 //Like stat on mobs, 0 is alive, 1 is damaged, 2 is dead
var/list/faction = list("syndicate")
var/faction = "syndicate"
var/atom/cur_target = null
var/scan_range = 9 //You will never see them coming
var/health = 200 //Because it lacks a cover, and is mostly to keep people from touching the syndie shuttle.
var/bullet_type = /obj/item/projectile/bullet
icon = 'icons/obj/turrets.dmi'
icon_state = "syndieturret0"
@@ -609,11 +623,27 @@
return
if (targloc == curloc)
return
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
var/obj/item/projectile/A = new /obj/item/projectile/bullet(curloc)
playsound(get_turf(src), 'sound/weapons/Gunshot3.ogg', 60, 1)
var/obj/item/projectile/A = new bullet_type(curloc)
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
spawn(0)
A.process()
return
/obj/machinery/gun_turret/interior
name = "machine gun turret (.45)"
desc = "Syndicate interior defense turret chambered for .45 rounds. Designed to down intruders without damaging the hull."
bullet_type = /obj/item/projectile/bullet/midbullet
/obj/machinery/gun_turret/exterior
name = "machine gun turret (7.62)"
desc = "Syndicate exterior defense turret chambered for 7.62 rounds. Designed to down intruders with heavy calliber bullets."
bullet_type = /obj/item/projectile/bullet
/obj/machinery/gun_turret/grenade
name = "mounted grenade launcher (40mm)"
desc = "Syndicate 40mm grenade launcher defense turret. If you've had this much time to look at it, you're probably already dead."
bullet_type = /obj/item/projectile/bullet/a40mm
+60 -11
View File
@@ -915,26 +915,37 @@
product_slogans = "Dress for success!;Suited and booted!;It's show time!;Why leave style up to fate? Use AutoDrobe!"
vend_delay = 15
vend_reply = "Thank you for using AutoDrobe!"
products = list(/obj/item/clothing/mask/fawkes = 1, /obj/item/clothing/suit/chickensuit = 1,/obj/item/clothing/head/chicken = 1, /obj/item/clothing/head/corgi = 1, /obj/item/clothing/suit/corgisuit = 1, /obj/item/clothing/under/gladiator = 1,
products = list(/obj/item/clothing/suit/chickensuit = 1,/obj/item/clothing/head/chicken = 1,/obj/item/clothing/under/gladiator = 1,
/obj/item/clothing/head/helmet/gladiator = 1,/obj/item/clothing/under/gimmick/rank/captain/suit = 1,/obj/item/clothing/head/flatcap = 1,
/obj/item/clothing/glasses/gglasses = 1,/obj/item/clothing/shoes/jackboots = 1,
/obj/item/clothing/suit/storage/labcoat/mad = 1,/obj/item/clothing/glasses/gglasses = 1,/obj/item/clothing/shoes/jackboots = 1,
/obj/item/clothing/under/schoolgirl = 1,/obj/item/clothing/head/kitty = 1,/obj/item/clothing/under/blackskirt = 1,/obj/item/clothing/head/beret = 1,
/obj/item/clothing/suit/wcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/head/cueball = 1,
/obj/item/clothing/under/scratch = 1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/suit/wcoat = 1,
/obj/item/clothing/tie/waistcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/tie/waistcoat = 1,
/obj/item/clothing/glasses/monocle =1,/obj/item/clothing/head/bowlerhat = 1,/obj/item/weapon/cane = 1,/obj/item/clothing/under/sl_suit = 1,
/obj/item/clothing/mask/fakemoustache = 1,/obj/item/clothing/suit/bio_suit/plaguedoctorsuit = 1,/obj/item/clothing/head/plaguedoctorhat = 1,/obj/item/clothing/mask/gas/plaguedoctor = 1,
/obj/item/clothing/under/owl = 1,/obj/item/clothing/mask/gas/owl_mask = 1,/obj/item/clothing/suit/apron = 1,/obj/item/clothing/under/waiter = 1,
/obj/item/clothing/under/pirate = 1,/obj/item/clothing/suit/pirate_black = 1,/obj/item/clothing/under/pirate_rags = 1,/obj/item/clothing/suit/pirate_brown = 1,/obj/item/clothing/head/pirate = 1,/obj/item/clothing/head/bandana = 1,
/obj/item/clothing/under/pirate = 1,/obj/item/clothing/suit/pirate_brown = 1,/obj/item/clothing/suit/pirate_black =1,/obj/item/clothing/under/pirate_rags =1,/obj/item/clothing/head/pirate = 1,/obj/item/clothing/head/bandana = 1,
/obj/item/clothing/head/bandana = 1,/obj/item/clothing/under/soviet = 1,/obj/item/clothing/head/ushanka = 1,/obj/item/clothing/suit/imperium_monk = 1,
/obj/item/clothing/mask/gas/cyborg = 1,/obj/item/clothing/suit/holidaypriest = 1,/obj/item/clothing/head/wizard/marisa/fake = 1,
/obj/item/clothing/suit/wizrobe/marisa/fake = 1,/obj/item/clothing/under/sundress = 1,/obj/item/clothing/head/witchwig = 1,/obj/item/weapon/staff/broom = 1,
/obj/item/clothing/suit/wizrobe/fake = 1,/obj/item/clothing/head/wizard/fake = 1,/obj/item/weapon/staff = 3,/obj/item/clothing/mask/gas/sexyclown = 1,
/obj/item/clothing/under/sexyclown = 1,/obj/item/clothing/mask/gas/sexymime = 1,/obj/item/clothing/under/sexymime = 1,/obj/item/clothing/suit/apron/overalls = 1,
/obj/item/clothing/head/rabbitears =1) //Pretty much everything that had a chance to spawn.
contraband = list(/obj/item/clothing/suit/cardborg = 1,/obj/item/clothing/head/cardborg = 1,/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1)
/obj/item/clothing/head/rabbitears =1, /obj/item/clothing/head/sombrero = 1, /obj/item/clothing/suit/poncho = 1,
/obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, /obj/item/clothing/tie/blue = 1, /obj/item/clothing/tie/red = 1, /obj/item/clothing/tie/black = 1, /obj/item/clothing/tie/horrible = 1,
/obj/item/clothing/under/maid = 1, /obj/item/clothing/under/janimaid = 1)
contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1)
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1)
refill_canister = /obj/item/weapon/vending_refill/autodrobe
/obj/machinery/vending/autodrobe/New()
..()
component_parts = list()
var/obj/item/weapon/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
component_parts += new /obj/item/weapon/vending_refill/autodrobe(0)
component_parts += new /obj/item/weapon/vending_refill/autodrobe(0)
component_parts += new /obj/item/weapon/vending_refill/autodrobe(0)
/obj/machinery/vending/dinnerware
name = "Dinnerware"
desc = "A kitchen and restaurant equipment vendor"
@@ -1038,7 +1049,7 @@
products = list(/obj/item/clothing/under/color/black = 10,/obj/item/clothing/under/color/blue = 10,/obj/item/clothing/under/color/green = 10,/obj/item/clothing/under/color/grey = 10,/obj/item/clothing/under/color/pink = 10,/obj/item/clothing/under/color/red = 10,
/obj/item/clothing/under/color/white = 10, /obj/item/clothing/under/color/yellow = 10,/obj/item/clothing/under/color/lightblue = 10,/obj/item/clothing/under/color/aqua = 10,/obj/item/clothing/under/color/purple = 10,/obj/item/clothing/under/color/lightgreen = 10,
/obj/item/clothing/under/color/lightblue = 10,/obj/item/clothing/under/color/lightbrown = 10,/obj/item/clothing/under/color/brown = 10,/obj/item/clothing/under/color/yellowgreen = 10,/obj/item/clothing/under/color/darkblue = 10,/obj/item/clothing/under/color/lightred = 10, /obj/item/clothing/under/color/darkred = 10)
contraband = list(/obj/item/clothing/under/syndicate/tacticool = 5,/obj/item/clothing/under/color/orange = 5,/obj/item/clothing/under/psyche = 5)
contraband = list(/obj/item/clothing/under/syndicate/tacticool = 5,/obj/item/clothing/under/color/orange = 5)
premium = list(/obj/item/clothing/under/rainbow = 1)
refill_canister = /obj/item/weapon/vending_refill/suitdispenser
@@ -1047,8 +1058,8 @@
desc = "Wow, hatlord looked fancy, suitlord looked streamlined, and this is just normal. The guy who disigned these must be an idiot."
icon_state = "shoes"
product_ads = "Put your foot down!;One size fits all!;IM WALKING ON SUNSHINE!;No hobbits allowed.;NO PLEASE WILLY, DONT HURT ME- *BZZT*"
products = list(/obj/item/clothing/shoes/black = 10,/obj/item/clothing/shoes/brown = 10,/obj/item/clothing/shoes/blue = 10,/obj/item/clothing/shoes/green = 10,/obj/item/clothing/shoes/yellow = 10,/obj/item/clothing/shoes/purple = 10,/obj/item/clothing/shoes/red = 10,/obj/item/clothing/shoes/white = 10)
contraband = list(/obj/item/clothing/shoes/jackboots = 5,/obj/item/clothing/shoes/orange = 5)
products = list(/obj/item/clothing/shoes/black = 10,/obj/item/clothing/shoes/brown = 10,/obj/item/clothing/shoes/blue = 10,/obj/item/clothing/shoes/green = 10,/obj/item/clothing/shoes/yellow = 10,/obj/item/clothing/shoes/purple = 10,/obj/item/clothing/shoes/red = 10,/obj/item/clothing/shoes/white = 10,/obj/item/clothing/shoes/sandal=10)
contraband = list(/obj/item/clothing/shoes/orange = 5)
premium = list(/obj/item/clothing/shoes/rainbow = 1)
refill_canister = /obj/item/weapon/vending_refill/shoedispenser
@@ -1069,4 +1080,42 @@
icon_state = "snack"
products = list(/obj/item/weapon/reagent_containers/food/snacks/chips =6,/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,
/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6, /obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6)
refill_canister = /obj/item/weapon/vending_refill/snack
refill_canister = /obj/item/weapon/vending_refill/snack
//This one's from NTstation
//don't forget to change the refill size if you change the machine's contents!
/obj/machinery/vending/clothing
name = "ClothesMate" //renamed to make the slogan rhyme
desc = "A vending machine for clothing."
icon_state = "clothes"
product_slogans = "Dress for success!;Prepare to look swagalicious!;Look at all this free swag!;Why leave style up to fate? Use the ClothesMate!"
vend_delay = 15
vend_reply = "Thank you for using the ClothesMate!"
products = list(/obj/item/clothing/head/that=2,/obj/item/clothing/head/fedora=1,/obj/item/clothing/glasses/monocle=1,
/obj/item/clothing/under/suit_jacket/navy=2,/obj/item/clothing/under/kilt=1,/obj/item/clothing/under/overalls=1,
/obj/item/clothing/under/suit_jacket/really_black=2,/obj/item/clothing/under/pants/jeans=3,/obj/item/clothing/under/pants/classicjeans=2,
/obj/item/clothing/under/pants/camo = 1,/obj/item/clothing/under/pants/blackjeans=2,/obj/item/clothing/under/pants/khaki=2,
/obj/item/clothing/under/pants/white=2,/obj/item/clothing/under/pants/red=1,/obj/item/clothing/under/pants/black=2,
/obj/item/clothing/under/pants/tan=2,/obj/item/clothing/under/pants/blue=1,/obj/item/clothing/under/pants/track=1,
/obj/item/clothing/tie/scarf/red=1,/obj/item/clothing/tie/scarf/green=1,/obj/item/clothing/tie/scarf/darkblue=1,
/obj/item/clothing/tie/scarf/purple=1,/obj/item/clothing/tie/scarf/yellow=1,/obj/item/clothing/tie/scarf/orange=1,
/obj/item/clothing/tie/scarf/lightblue=1,/obj/item/clothing/tie/scarf/white=1,/obj/item/clothing/tie/scarf/black=1,
/obj/item/clothing/tie/scarf/zebra=1,/obj/item/clothing/tie/scarf/christmas=1,/obj/item/clothing/tie/stripedredscarf=1,
/obj/item/clothing/tie/stripedbluescarf=1,/obj/item/clothing/tie/stripedgreenscarf=1,/obj/item/clothing/tie/waistcoat=1,
/obj/item/clothing/under/sundress=2,/obj/item/clothing/under/stripeddress = 1, /obj/item/clothing/under/sailordress = 1, /obj/item/clothing/under/redeveninggown = 1, /obj/item/clothing/under/blacktango=1,/obj/item/clothing/suit/jacket=3,
/obj/item/clothing/glasses/regular=2,/obj/item/clothing/head/sombrero=1,/obj/item/clothing/suit/poncho=1,
/obj/item/clothing/suit/ianshirt=1,/obj/item/clothing/shoes/laceup=2,/obj/item/clothing/shoes/black=4,
/obj/item/clothing/shoes/sandal=1)
contraband = list(/obj/item/clothing/under/syndicate/tacticool=1,/obj/item/clothing/mask/balaclava=1,/obj/item/clothing/head/ushanka=1,/obj/item/clothing/under/soviet=1)
premium = list(/obj/item/clothing/under/suit_jacket/checkered=1,/obj/item/clothing/head/mailman=1,/obj/item/clothing/under/rank/mailman=1,/obj/item/clothing/suit/jacket/leather=1,/obj/item/clothing/under/pants/mustangjeans=1)
refill_canister = /obj/item/weapon/vending_refill/clothing
/obj/machinery/vending/clothing/New()
..()
component_parts = list()
var/obj/item/weapon/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
component_parts += new /obj/item/weapon/vending_refill/clothing(0)
component_parts += new /obj/item/weapon/vending_refill/clothing(0)
component_parts += new /obj/item/weapon/vending_refill/clothing(0)
+3
View File
@@ -263,6 +263,9 @@
if ( istype(W,/obj/item/clothing/head/helmet ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/gloves/furgloves ) )
user << "This item does not fit."
return
if(contents.len < 5)
if ( state in list(1, 3) )
+1 -1
View File
@@ -732,7 +732,7 @@
name = "Energy Relay"
desc = "Wirelessly drains energy from any available power channel in area. The performance index is quite low."
icon_state = "tesla"
origin_tech = "magnets=4;syndicate=2"
origin_tech = "magnets=4;powerstorage=3"
equip_cooldown = 10
energy_drain = 0
range = 0
+2 -2
View File
@@ -254,7 +254,7 @@
name = "LBX AC 10 \"Scattershot\""
icon_state = "mecha_scatter"
equip_cooldown = 20
projectile = /obj/item/projectile/bullet/midbullet12
projectile = /obj/item/projectile/bullet/midbullet
fire_sound = 'sound/weapons/Gunshot.ogg'
projectiles = 40
projectile_energy_cost = 25
@@ -293,7 +293,7 @@
name = "Ultra AC 2"
icon_state = "mecha_uac2"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/weakbullet
projectile = /obj/item/projectile/bullet/weakbullet3
fire_sound = 'sound/weapons/Gunshot.ogg'
projectiles = 300
projectile_energy_cost = 20
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+350 -390
View File
@@ -1,172 +1,135 @@
/* Alien Effects!
/* Alien shit!
* Contains:
* effect/alien
* structure/alien
* Resin
* Weeds
* Acid
* Egg
* effect/acid
*/
/*
* effect/alien
*/
/obj/effect/alien
name = "alien thing"
desc = "theres something alien about this"
/obj/structure/alien
icon = 'icons/mob/alien.dmi'
// unacidable = 1 //Aliens won't ment their own.
/*
* Resin
*/
/obj/effect/alien/resin
/obj/structure/alien/resin
name = "resin"
desc = "Looks like some kind of slimy growth."
desc = "Looks like some kind of thick resin."
icon_state = "resin"
density = 1
opacity = 1
anchored = 1
var/health = 200
var/turf/linked_turf
wall
name = "resin wall"
desc = "Purple slime solidified into a wall."
icon_state = "resinwall" //same as resin, but consistency ho!
membrane
name = "resin membrane"
desc = "Purple slime just thin enough to let light pass through."
icon_state = "resinmembrane"
opacity = 0
health = 120
/obj/effect/alien/resin/New()
var/resintype = null
/obj/structure/alien/resin/New(location)
relativewall_neighbours()
..()
linked_turf = get_turf(src)
linked_turf.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
/obj/effect/alien/resin/Destroy()
if(linked_turf)
linked_turf.thermal_conductivity = initial(linked_turf.thermal_conductivity)
..()
/obj/effect/alien/resin/proc/healthcheck()
if(health <=0)
density = 0
qdel(src)
return
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
/obj/structure/alien/resin/Destroy()
var/turf/T = loc
loc = null
T.relativewall_neighbours()
..()
/obj/structure/alien/resin/Move()
..()
/obj/structure/alien/resin/wall
name = "resin wall"
desc = "Thick resin solidified into a wall."
icon_state = "wall0" //same as resin, but consistency ho!
resintype = "wall"
/obj/structure/alien/resin/wall/New()
relativewall_neighbours()
..()
/obj/structure/alien/resin/membrane
name = "resin membrane"
desc = "Resin just thin enough to let light pass through."
icon_state = "membrane0"
opacity = 0
health = 120
resintype = "membrane"
/obj/structure/alien/resin/membrane/New()
relativewall_neighbours()
..()
/obj/structure/alien/resin/proc/healthcheck()
if(health <=0)
del(src)
/obj/structure/alien/resin/bullet_act(obj/item/projectile/Proj)
health -= Proj.damage
..()
healthcheck()
return
/obj/effect/alien/resin/ex_act(severity)
/obj/structure/alien/resin/ex_act(severity, target)
switch(severity)
if(1.0)
health-=50
health -= 150
if(2.0)
health-=50
health -= 100
if(3.0)
if (prob(50))
health-=50
else
health-=25
health -= 50
healthcheck()
return
/obj/effect/alien/resin/blob_act()
health-=50
/obj/structure/alien/resin/blob_act()
health -= 50
healthcheck()
return
/obj/effect/alien/resin/meteorhit()
health-=50
healthcheck()
return
/obj/effect/alien/resin/hitby(AM as mob|obj)
/obj/structure/alien/resin/hitby(atom/movable/AM)
..()
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(ismob(AM))
if(!isobj(AM))
tforce = 10
else
tforce = AM:throwforce
var/obj/O = AM
tforce = O.throwforce
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health = max(0, health - tforce)
health -= tforce
healthcheck()
..()
return
/obj/effect/alien/resin/attack_hand()
if (M_HULK in usr.mutations)
usr << "\blue You easily destroy the [name]."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] destroys the [name]!", 1)
/obj/structure/alien/resin/attack_hand(mob/living/user)
if(M_HULK in user.mutations)
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
health = 0
else
usr << "\blue You claw at the [name]."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] claws at the [name]!", 1)
health -= rand(5,10)
healthcheck()
return
healthcheck()
/obj/effect/alien/resin/attack_paw()
return attack_hand()
/obj/effect/alien/resin/attack_alien()
if (islarva(usr))//Safety check for larva. /N
/obj/structure/alien/resin/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/alien/resin/attack_alien(mob/living/user)
if(islarva(user))
return
usr << "\green You claw at the [name]."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] claws at the resin!", 1)
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health -= rand(40, 60)
health -= 50
if(health <= 0)
usr << "\green You slice the [name] to pieces."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] slices the [name] apart!", 1)
user.visible_message("<span class='danger'>[user] slices the [name] apart!</span>")
healthcheck()
return
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
/*if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
//Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
if(!affecting)
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src
G.affecting.paralysis = 10
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
affecting=G.affecting
del(W)
spawn(0)
process()
else
user << "\red This wall is already occupied."
return */
var/aforce = W.force
health = max(0, health - aforce)
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user)
health -= I.force
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
healthcheck()
..()
return
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
@@ -175,130 +138,232 @@
/*
* Weeds
*/
#define NODERANGE 3
/obj/effect/alien/weeds
name = "weeds"
desc = "Weird purple weeds."
/obj/structure/alien/weeds
gender = PLURAL
name = "resin floor"
desc = "A thick resin surface covers the floor."
icon_state = "weeds"
anchored = 1
density = 0
layer = 2
var/health = 15
var/obj/effect/alien/weeds/node/linked_node = null
var/obj/structure/alien/weeds/node/linked_node = null
/obj/effect/alien/weeds/Destroy()
if(linked_node)
linked_node.connected_weeds.Remove(src)
linked_node = null
/obj/structure/alien/weeds/New(pos, node)
..()
/obj/effect/alien/weeds/node
icon_state = "weednode"
name = "purple sac"
desc = "Weird purple octopus-like thing."
layer = 3
luminosity = NODERANGE
var/node_range = NODERANGE
var/list/obj/effect/alien/weeds/connected_weeds
/obj/effect/alien/weeds/node/Destroy()
for(var/obj/effect/alien/weeds/W in connected_weeds)
W.linked_node = null
..()
/obj/effect/alien/weeds/node/New()
connected_weeds = new()
..(src.loc, src)
/obj/effect/alien/weeds/New(pos, var/obj/effect/alien/weeds/node/N)
..()
linked_node = node
if(istype(loc, /turf/space))
qdel(src)
del(src)
return
linked_node = N
if(linked_node)
linked_node.connected_weeds.Add(src)
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
if(icon_state == "weeds")
icon_state = pick("weeds", "weeds1", "weeds2")
fullUpdateWeedOverlays()
spawn(rand(150, 200))
if(src)
Life()
return
/obj/effect/alien/weeds/proc/Life()
//set background = 1
/obj/structure/alien/weeds/Destroy()
var/turf/T = loc
loc = null
for (var/obj/structure/alien/weeds/W in range(1,T))
W.updateWeedOverlays()
..()
/obj/structure/alien/weeds/proc/Life()
set background = BACKGROUND_ENABLED
var/turf/U = get_turf(src)
/*
if (locate(/obj/movable, U))
U = locate(/obj/movable, U)
if(U.density == 1)
del(src)
return
Alien plants should do something if theres a lot of poison
if(U.poison> 200000)
health -= round(U.poison/200000)
update()
return
*/
if (istype(U, /turf/space))
if(istype(U, /turf/space))
del(src)
return
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range) )
return
direction_loop:
for(var/dirn in cardinal)
var/turf/T = get_step(src, dirn)
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
if (!istype(T) || T.density || locate(/obj/structure/alien/weeds) in T || istype(T, /turf/space))
continue
// if (locate(/obj/movable, T)) // don't propogate into movables
// continue
if(!linked_node || get_dist(linked_node, src) > linked_node.node_range)
return
for(var/obj/O in T)
if(O.density)
continue direction_loop
new /obj/effect/alien/weeds(T, linked_node)
new /obj/structure/alien/weeds(T, linked_node)
/obj/effect/alien/weeds/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
if(2.0)
if (prob(50))
qdel(src)
if(3.0)
if (prob(5))
qdel(src)
return
/obj/structure/alien/weeds/ex_act(severity, target)
del(src)
/obj/effect/alien/weeds/fire_act(null, temperature, volume)
if(temperature > T0C+200)
health -= 1 * temperature
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
var/damage = I.force / 4.0
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
health -= damage
healthcheck()
/obj/structure/alien/weeds/proc/healthcheck()
if(health <= 0)
del(src)
/obj/structure/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
/obj/structure/alien/weeds/proc/updateWeedOverlays()
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.attack_verb.len)
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
overlays.Cut()
var/turf/N = get_step(src, NORTH)
var/turf/S = get_step(src, SOUTH)
var/turf/E = get_step(src, EAST)
var/turf/W = get_step(src, WEST)
if(!locate(/obj/structure/alien) in N.contents)
if(istype(N, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_s", layer=2, pixel_y = 32)
if(!locate(/obj/structure/alien) in S.contents)
if(istype(S, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_n", layer=2, pixel_y = -32)
if(!locate(/obj/structure/alien) in E.contents)
if(istype(E, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_w", layer=2, pixel_x = 32)
if(!locate(/obj/structure/alien) in W.contents)
if(istype(W, /turf/simulated/floor))
src.overlays += image('icons/mob/alien.dmi', "weeds_side_e", layer=2, pixel_x = -32)
/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
for (var/obj/structure/alien/weeds/W in range(1,src))
W.updateWeedOverlays()
//Weed nodes
/obj/structure/alien/weeds/node
name = "glowing resin"
desc = "Blue bioluminescence shines from beneath the surface."
icon_state = "weednode"
luminosity = 1
var/node_range = NODERANGE
/obj/structure/alien/weeds/node/New()
..(loc, src)
#undef NODERANGE
/*
* Egg
*/
//for the status var
#define BURST 0
#define BURSTING 1
#define GROWING 2
#define GROWN 3
#define MIN_GROWTH_TIME 1800 //time it takes to grow a hugger
#define MAX_GROWTH_TIME 3000
/obj/structure/alien/egg
name = "egg"
desc = "A large mottled egg."
icon_state = "egg_growing"
density = 0
anchored = 1
var/health = 100
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
/obj/structure/alien/egg/New()
new /obj/item/clothing/mask/facehugger(src)
..()
spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
Grow()
/obj/structure/alien/egg/attack_paw(mob/user)
if(isalien(user))
switch(status)
if(BURST)
user << "<span class='notice'>You clear the hatched egg.</span>"
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
del(src)
return
if(GROWING)
user << "<span class='notice'>The child is not developed yet.</span>"
return
if(GROWN)
user << "<span class='notice'>You retrieve the child.</span>"
Burst(0)
return
else
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
return attack_hand(user)
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
/obj/structure/alien/egg/attack_hand(mob/user)
user << "<span class='notice'>It feels slimy.</span>"
/obj/structure/alien/egg/proc/GetFacehugger()
return locate(/obj/item/clothing/mask/facehugger) in contents
/obj/structure/alien/egg/proc/Grow()
icon_state = "egg"
status = GROWN
/obj/structure/alien/egg/proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
if(status == GROWN || status == GROWING)
icon_state = "egg_hatched"
flick("egg_opening", src)
status = BURSTING
spawn(15)
status = BURST
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
if(child)
child.loc = get_turf(src)
if(kill && istype(child))
child.Die()
else
for(var/mob/M in range(1,src))
if(CanHug(M))
child.Attach(M)
break
/obj/structure/alien/egg/bullet_act(obj/item/projectile/Proj)
health -= Proj.damage
..()
healthcheck()
/obj/structure/alien/egg/attackby(obj/item/I, mob/user)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
var/damage = I.force / 4
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
damage = 15
@@ -307,204 +372,22 @@ Alien plants should do something if theres a lot of poison
health -= damage
healthcheck()
/obj/effect/alien/weeds/proc/healthcheck()
/obj/structure/alien/egg/proc/healthcheck()
if(health <= 0)
qdel(src)
if(status != BURST && status != BURSTING)
Burst()
else if(status == BURST && prob(50))
del(src) //Remove the egg after it has been hit after bursting.
/obj/effect/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
/*/obj/effect/alien/weeds/burn(fi_amount)
if (fi_amount > 18000)
spawn( 0 )
del(src)
return
return 0
return 1
*/
#undef NODERANGE
/*
* Acid
*/
/obj/effect/alien/acid
name = "acid"
desc = "Burbling corrossive stuff. I wouldn't want to touch it."
icon_state = "acid"
density = 0
opacity = 0
anchored = 1
var/atom/target
var/ticks = 0
var/target_strength = 0
/obj/effect/alien/acid/New(loc, target)
..(loc)
src.target = target
if(isturf(target)) // Turf take twice as long to take down.
target_strength = 8
else
target_strength = 4
tick()
/obj/effect/alien/acid/proc/tick()
if(!target)
del(src)
ticks += 1
if(ticks >= target_strength)
for(var/mob/O in hearers(src, null))
O.show_message("\green <B>[src.target] collapses under its own weight into a puddle of goop and undigested debris!</B>", 1)
if(istype(target, /turf/simulated/wall)) // I hate turf code.
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
else
del(target)
del(src)
return
switch(target_strength - ticks)
if(6)
visible_message("\green <B>[src.target] is holding up against the acid!</B>")
if(4)
visible_message("\green <B>[src.target]\s structure is being melted by the acid!</B>")
if(2)
visible_message("\green <B>[src.target] is struggling to withstand the acid!</B>")
if(0 to 1)
visible_message("\green <B>[src.target] begins to crumble under the acid!</B>")
spawn(rand(150, 200)) tick()
/*
* Egg
*/
/var/const //for the status var
BURST = 0
BURSTING = 1
GROWING = 2
GROWN = 3
MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger
MAX_GROWTH_TIME = 3000
/obj/effect/alien/egg
desc = "It looks like a weird egg"
name = "egg"
icon_state = "egg_growing"
density = 0
anchored = 1
var/health = 100
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
New()
if(aliens_allowed)
..()
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
Grow()
else
del(src)
attack_paw(user as mob)
if(isalien(user))
switch(status)
if(BURST)
user << "\red You clear the hatched egg."
del(src)
return
if(GROWING)
user << "\red The child is not developed yet."
return
if(GROWN)
user << "\red You retrieve the child."
Burst(0)
return
else
return attack_hand(user)
attack_hand(user as mob)
user << "It feels slimy."
return
proc/GetFacehugger()
return locate(/mob/living/carbon/alien/facehugger) in contents
proc/Grow()
icon_state = "egg"
status = GROWN
new /mob/living/carbon/alien/facehugger(src)
return
proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
if(status == GROWN || status == GROWING)
var/mob/living/carbon/alien/facehugger/child = GetFacehugger()
icon_state = "egg_hatched"
flick("egg_opening", src)
status = BURSTING
spawn(15)
status = BURST
if(!child)
src.visible_message("\red The egg bursts apart revealing nothing")
status = "GROWN"
new /obj/effect/decal/cleanable/xenoblood(src)
loc.contents += child//need to write the code for giving it to the alien later
if(kill && istype(child))
child.death()
else
child.cancel_camera()
for(var/mob/M in range(1,src))
if(CanHug(M))
child.Attach(M)
break
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
healthcheck()
return
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
if(health <= 0)
return
if(W.attack_verb.len)
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
else
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
damage = 15
playsound(get_turf(src), 'sound/items/Welder.ogg', 100, 1)
src.health -= damage
src.healthcheck()
/obj/effect/alien/egg/proc/healthcheck()
if(health <= 0)
Burst()
/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500)
health -= 5
healthcheck()
/obj/effect/alien/egg/HasProximity(atom/movable/AM as mob|obj)
/obj/structure/alien/egg/HasProximity(atom/movable/AM)
if(status == GROWN)
if(!CanHug(AM))
return
@@ -514,3 +397,80 @@ Alien plants should do something if theres a lot of poison
return
Burst(0)
#undef BURST
#undef BURSTING
#undef GROWING
#undef GROWN
#undef MIN_GROWTH_TIME
#undef MAX_GROWTH_TIME
/*
* Acid
*/
/obj/effect/acid
gender = PLURAL
name = "acid"
desc = "Burbling corrossive stuff."
icon = 'icons/effects/effects.dmi'
icon_state = "acid"
density = 0
opacity = 0
anchored = 1
unacidable = 1
var/atom/target
var/ticks = 0
var/target_strength = 0
/obj/effect/acid/New(loc, targ)
..(loc)
target = targ
//handle APCs and newscasters and stuff nicely
pixel_x = target.pixel_x
pixel_y = target.pixel_y
if(isturf(target)) //Turfs take twice as long to take down.
target_strength = 640
else
target_strength = 320
tick()
/obj/effect/acid/proc/tick()
if(!target)
del(src)
ticks++
if(ticks >= target_strength)
target.visible_message("<span class='warning'>[target] collapses under its own weight into a puddle of goop and undigested debris!</span>")
if(istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
else
del(target)
del(src)
return
x = target.x
y = target.y
z = target.z
switch(target_strength - ticks)
if(480)
visible_message("<span class='warning'>[target] is holding up against the acid!</span>")
if(320)
visible_message("<span class='warning'>[target] is being melted by the acid!</span>")
if(160)
visible_message("<span class='warning'>[target] is struggling to withstand the acid!</span>")
if(80)
visible_message("<span class='warning'>[target] begins to crumble under the acid!</span>")
spawn(1)
if(src)
tick()
+5
View File
@@ -17,6 +17,11 @@
anchored = 1
layer = 50
/obj/effect/decal/chempuff
name = "chemicals"
icon = 'icons/obj/chempuff.dmi'
pass_flags = PASSTABLE | PASSGRILLE
/obj/effect/decal/snow
name="snow"
density=0
@@ -165,6 +165,8 @@ steam.start() -- spawns the effect
if (istype(T, /turf))
T.hotspot_expose(1000, 100)
spawn (100)
delete()
/obj/effect/effect/sparks/Destroy()
var/turf/T = src.loc
+1 -1
View File
@@ -166,7 +166,7 @@
del(src)
/obj/effect/landmark/costume/scratch/New()
new /obj/item/clothing/gloves/white(src.loc)
new /obj/item/clothing/gloves/color/white(src.loc)
new /obj/item/clothing/shoes/white(src.loc)
new /obj/item/clothing/under/scratch(src.loc)
if (prob(30))
+1 -1
View File
@@ -455,7 +455,7 @@
if(!disable_warning)
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
return 0
if(src.w_class > 3)
if(src.w_class > 4)
if(!disable_warning)
usr << "The [name] is too big to attach."
return 0
@@ -1,36 +0,0 @@
// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
/obj/item/bluespace_crystal
name = "bluespace crystal"
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
icon = 'icons/obj/telescience.dmi'
icon_state = "bluespace_crystal"
w_class = 1
origin_tech = "bluespace=4;materials=3"
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
/obj/item/bluespace_crystal/New()
..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/bluespace_crystal/attack_self(var/mob/user)
blink_mob(user)
user.drop_item()
user.visible_message("<span class='notice'>[user] crushes the [src]!</span>")
qdel(src)
/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L)
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
/obj/item/bluespace_crystal/throw_impact(atom/hit_atom)
..()
if(isliving(hit_atom))
blink_mob(hit_atom)
qdel(src)
// Artifical bluespace crystal, doesn't give you much research.
/obj/item/bluespace_crystal/artificial
name = "artificial bluespace crystal"
desc = "An artificially made bluespace crystal, it looks delicate."
origin_tech = "bluespace=2"
blink_range = 4 // Not as good as the organic stuff!
@@ -129,6 +129,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
icon_state = "pda-captain"
detonate = 0
//toff = 1
/obj/item/device/pda/heads/ntrep
default_cartridge = /obj/item/weapon/cartridge/supervisor
icon_state = "pda-h"
/obj/item/device/pda/heads/ntrec
default_cartridge = /obj/item/weapon/cartridge/supervisor
icon_state = "pda-h"
/obj/item/device/pda/heads/magistrate
default_cartridge = /obj/item/weapon/cartridge/supervisor
icon_state = "pda-h"
/obj/item/device/pda/heads/blueshield
default_cartridge = /obj/item/weapon/cartridge/hos
icon_state = "pda-h"
/obj/item/device/pda/cargo
default_cartridge = /obj/item/weapon/cartridge/quartermaster
@@ -192,6 +208,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/geneticist
default_cartridge = /obj/item/weapon/cartridge/medical
icon_state = "pda-genetics"
/obj/item/device/pda/centcom
default_cartridge = /obj/item/weapon/cartridge/centcom
icon_state = "pda-h"
// Special AI/pAI PDAs that cannot explode.
@@ -196,6 +196,35 @@
access_reagent_scanner = 1
access_status_display = 1
access_atmos = 1
/obj/item/weapon/cartridge/captain/New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/beepsky(src)
/obj/item/weapon/cartridge/supervisor
name = "Easy-Record DELUXE"
icon_state = "cart-h"
access_status_display = 1
access_security = 1
/obj/item/weapon/cartridge/centcom
name = "Value-PAK Cartridge"
desc = "Now with 200% more value!"
icon_state = "cart-c"
access_quartermaster = 1
access_janitor = 1
access_engine = 1
access_security = 1
access_medical = 1
access_reagent_scanner = 1
access_status_display = 1
access_atmos = 1
/obj/item/weapon/cartridge/centcom/New()
..()
spawn(5)
radio = new /obj/item/radio/integrated/beepsky(src)
/obj/item/weapon/cartridge/syndicate
name = "Detomatix Cartridge"
+6 -3
View File
@@ -18,7 +18,6 @@
/obj/item/device/flash/proc/clown_check(mob/user)
if(user && (M_CLUMSY in user.mutations) && prob(50))
flash_carbon(user, user, 15, 0)
user.visible_message("<span class='disarm'>[user] blinds [user] with the flash!</span>")
return 0
return 1
@@ -42,7 +41,7 @@
times_used = max(0, times_used) //sanity
/obj/item/device/flash/proc/try_use_flash(var/mob/user)
/obj/item/device/flash/proc/try_use_flash(var/mob/user = null)
flash_recharge(user)
if(broken)
@@ -67,6 +66,11 @@
if(user && convert)
terrible_conversion_proc(M, user)
M.Stun(1)
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
return 1
else
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
return 0
/obj/item/device/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
@@ -74,7 +78,6 @@
if(iscarbon(M))
flash_carbon(M, user, 5, 1)
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
return 1
else if(issilicon(M))
-84
View File
@@ -1,84 +0,0 @@
var/list/sps_list = list()
/obj/item/device/sps
name = "space positioning system"
desc = "Helping lost spacemen find their way through the planets since 2016."
icon = 'icons/obj/telescience.dmi'
icon_state = "gps-c"
w_class = 2.0
slot_flags = SLOT_BELT
origin_tech = "materials=2;magnets=3;bluespace=2"
var/spstag = "COM0"
var/emped = 0
var/turf/locked_location
/obj/item/device/sps/New()
..()
sps_list.Add(src)
name = "space positioning system ([spstag])"
overlays += "working"
/obj/item/device/sps/Destroy()
sps_list.Remove(src)
..()
/obj/item/device/sps/emp_act(severity)
emped = 1
overlays -= "working"
overlays += "emp"
spawn(300)
emped = 0
overlays -= "emp"
overlays += "working"
/obj/item/device/sps/attack_self(mob/user as mob)
var/obj/item/device/sps/t = ""
var/sps_window_height = 110 + sps_list.len * 20 // Variable window height, depending on how many sps units there are to show
if(emped)
t += "ERROR"
else
t += "<A href='?src=\ref[src];tag=1'>Set Tag</A><A href='?src=\ref[src];refresh=1'>Refresh</A>"
t += "<BR>Tag: [spstag]"
if(locked_location && locked_location.loc)
t += "<BR>Bluespace coordinates saved: [locked_location.loc]"
sps_window_height += 20
for(var/obj/item/device/sps/G in sps_list)
var/turf/pos = get_turf(G)
var/area/sps_area = get_area(G)
var/tracked_spstag = G.spstag
if(G.emped == 1)
t += "<BR>[tracked_spstag]: ERROR"
else
t += "<BR>[tracked_spstag]: [format_text(sps_area.name)] ([pos.x], [pos.y], [pos.z])"
var/datum/browser/popup = new(user, "sps", name, 360, min(sps_window_height, 800))
popup.set_content(t)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/item/device/sps/Topic(href, href_list)
..()
if(href_list["tag"] )
var/a = input("Please enter desired tag.", name, spstag) as text
a = uppertext(copytext(sanitize(a), 1, 5))
if(src.loc == usr)
spstag = a
name = "space positioning system ([spstag])"
attack_self(usr)
if(href_list["refresh"] )
if(src.loc == usr)
attack_self(usr)
/obj/item/device/sps/science
icon_state = "gps-s"
spstag = "SCI0"
/obj/item/device/sps/engineering
icon_state = "gps-e"
spstag = "ENG0"
/obj/item/device/sps/mining
icon_state = "gps-m"
spstag = "MINE0"
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
@@ -107,7 +107,7 @@
M.Weaken(10)
if(master && wires & 1)
if(master)
master.receive_signal()
return
@@ -19,123 +19,130 @@
icon_state = "cypherkey"
channels = list("Syndicate" = 1)
origin_tech = "syndicate=3"
syndie = 1//Signifies that it de-crypts Syndicate transmissions
syndie = 1 //Signifies that it de-crypts Syndicate transmissions
/obj/item/device/encryptionkey/syndicate/hacked
name = "Standard Encryption Key"
desc = "An encryption key for a radio headset. Has no special codes in it. Looks more sophisticated than usual."
channels = list("Command" = 0, "Security" = 0, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
desc = "An encryption key for a radio headset. Has no special codes in it. Looks more sophisticated than usual."
channels = list("Command" = 0, "Security" = 0, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0, "Syndicate" = 1)
origin_tech = "syndicate=3"
syndie = 1
/obj/item/device/encryptionkey/binary
name = "binary translator key"
desc = "An encryption key for a radio headset. To access the binary channel, use :b."
icon_state = "cypherkey"
translate_binary = 1
origin_tech = "syndicate=3"
/obj/item/device/encryptionkey/headset_sec
name = "Security Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "sec_cypherkey"
channels = list("Security" = 1)
/obj/item/device/encryptionkey/headset_eng
name = "Engineering Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "eng_cypherkey"
channels = list("Engineering" = 1)
/obj/item/device/encryptionkey/headset_rob
name = "Robotics Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "rob_cypherkey"
channels = list("Engineering" = 1, "Science" = 1)
/obj/item/device/encryptionkey/headset_med
name = "Medical Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "med_cypherkey"
channels = list("Medical" = 1)
/obj/item/device/encryptionkey/headset_sci
name = "Science Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "sci_cypherkey"
channels = list("Science" = 1)
/obj/item/device/encryptionkey/headset_medsci
name = "Medical Research Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "medsci_cypherkey"
channels = list("Medical" = 1, "Science" = 1)
/obj/item/device/encryptionkey/headset_com
name = "Command Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "com_cypherkey"
channels = list("Command" = 1)
/obj/item/device/encryptionkey/heads/captain
name = "Captain's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
/obj/item/device/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "rd_cypherkey"
channels = list("Science" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hos
name = "Head of Security's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "hos_cypherkey"
channels = list("Security" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/ce
name = "Chief Engineer's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "ce_cypherkey"
channels = list("Engineering" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/cmo
name = "Chief Medical Officer's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "cmo_cypherkey"
channels = list("Medical" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hop
name = "Head of Personnel's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "hop_cypherkey"
channels = list("Supply" = 1, "Service" = 1, "Command" = 1, "Security" = 0)
channels = list("Supply" = 1, "Service" = 1, "Security" = 0, "Command" = 1)
/obj/item/device/encryptionkey/heads/ntrep
name = "Nanotrasen Representative's Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1, "Security" = 0, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
/obj/item/device/encryptionkey/heads/ntrec
name = "Nanotrasen Recruiter's Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1, "Security" = 0)
/obj/item/device/encryptionkey/heads/magistrate
name = "Magistrate's Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1, "Security" = 1)
/obj/item/device/encryptionkey/heads/blueshield
name = "Blueshield's Encryption Key"
icon_state = "com_cypherkey"
channels = list("Command" = 1, "Security" = 1)
/*
/obj/item/device/encryptionkey/headset_mine
name = "Mining Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "mine_cypherkey"
channels = list("Mining" = 1)
/obj/item/device/encryptionkey/heads/qm
name = "Quartermaster's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "qm_cypherkey"
channels = list("Cargo" = 1, "Mining" = 1)
*/
/obj/item/device/encryptionkey/headset_cargo
name = "Supply Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "cargo_cypherkey"
channels = list("Supply" = 1)
/obj/item/device/encryptionkey/headset_service
name = "Service Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "srv_cypherkey"
channels = list("Service" = 1)
/obj/item/device/encryptionkey/ert
name = "Nanotrasen ERT Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
channels = list("Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1)
/obj/item/device/encryptionkey/heads/ai_integrated //ported from bay, this goes 'inside' the AI.
@@ -17,7 +17,6 @@
/obj/item/device/radio/headset/New()
..()
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
@@ -52,119 +51,147 @@
desc = "This is used by your elite security force. To access the security channel, use :s."
icon_state = "sec_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_sec
keyslot1 = new /obj/item/device/encryptionkey/headset_sec
/obj/item/device/radio/headset/headset_eng
name = "engineering radio headset"
desc = "When the engineers wish to chat like girls. To access the engineering channel, use :e. "
icon_state = "eng_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_eng
keyslot1 = new /obj/item/device/encryptionkey/headset_eng
/obj/item/device/radio/headset/headset_rob
name = "robotics radio headset"
desc = "Made specifically for the roboticists who cannot decide between departments. To access the engineering channel, use :e. For research, use :n."
icon_state = "rob_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_rob
keyslot1 = new /obj/item/device/encryptionkey/headset_rob
/obj/item/device/radio/headset/headset_med
name = "medical radio headset"
desc = "A headset for the trained staff of the medbay. To access the medical channel, use :m."
icon_state = "med_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_med
keyslot1 = new /obj/item/device/encryptionkey/headset_med
/obj/item/device/radio/headset/headset_sci
name = "science radio headset"
desc = "A sciency headset. Like usual. To access the science channel, use :n."
icon_state = "sci_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_sci
keyslot1 = new /obj/item/device/encryptionkey/headset_sci
/obj/item/device/radio/headset/headset_medsci
name = "medical research radio headset"
desc = "A headset that is a result of the mating between medical and science. To access the medical channel, use :m. For science, use :n."
icon_state = "medsci_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_medsci
keyslot1 = new /obj/item/device/encryptionkey/headset_medsci
/obj/item/device/radio/headset/headset_com
name = "command radio headset"
desc = "A headset with a commanding channel. To access the command channel, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_com
keyslot1 = new /obj/item/device/encryptionkey/headset_com
/obj/item/device/radio/headset/heads/captain
name = "captain's headset"
desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :z - service, :m - medical, :n - science."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
keyslot1 = new /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/heads/rd
name = "Research Director's headset"
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/rd
keyslot1 = new /obj/item/device/encryptionkey/heads/rd
/obj/item/device/radio/headset/heads/hos
name = "head of security's headset"
desc = "The headset of the man who protects your worthless lifes. To access the security channel, use :s. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hos
keyslot1 = new /obj/item/device/encryptionkey/heads/hos
/obj/item/device/radio/headset/heads/ce
name = "chief engineer's headset"
desc = "The headset of the guy who is in charge of morons. To access the engineering channel, use :e. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/ce
keyslot1 = new /obj/item/device/encryptionkey/heads/ce
/obj/item/device/radio/headset/heads/cmo
name = "chief medical officer's headset"
desc = "The headset of the highly trained medical chief. To access the medical channel, use :m. For command, use :c."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/cmo
keyslot1 = new /obj/item/device/encryptionkey/heads/cmo
/obj/item/device/radio/headset/heads/hop
name = "head of personnel's headset"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :z - service, :c - command, :s - security"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :z - service, :s - security, :c - command."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hop
keyslot1 = new /obj/item/device/encryptionkey/heads/hop
/*
/obj/item/device/radio/headset/headset_mine
name = "mining radio headset"
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
icon_state = "mine_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_mine
keyslot1 = new /obj/item/device/encryptionkey/headset_mine
/obj/item/device/radio/headset/heads/qm
name = "quartermaster's headset"
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/qm
keyslot1 = new /obj/item/device/encryptionkey/heads/qm
*/
/obj/item/device/radio/headset/headset_cargo
name = "supply radio headset"
desc = "A headset used by the QM and his slaves. To access the supply channel, use :u."
desc = "A headset used by the cargo department. To access the supply channel, use :u."
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_cargo
keyslot1 = new /obj/item/device/encryptionkey/headset_cargo
/obj/item/device/radio/headset/headset_service
name = "service radio headset"
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean. To access the service channel, use :z."
icon_state = "srv_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_service
keyslot1 = new /obj/item/device/encryptionkey/headset_service
/obj/item/device/radio/headset/heads/ntrep
name = "nanotrasen representative's headset"
desc = "The headset of the Nanotrasen Representative. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :z - service, :m - medical, :n - science."
icon_state = "com_headset"
item_state = "headset"
keyslot1 = new /obj/item/device/encryptionkey/heads/ntrep
/obj/item/device/radio/headset/heads/ntrec
name = "nanotrasen recruiter's headset"
desc = "The headset of the Nanotrasen Recruiter. Channels are as follows: :c - command, :s - security."
icon_state = "com_headset"
item_state = "headset"
keyslot1 = new /obj/item/device/encryptionkey/heads/ntrec
/obj/item/device/radio/headset/heads/magistrate
name = "magistrate's headset"
desc = "The headset of the Magistrate. Channels are as follows: :c - command, :s - security."
icon_state = "com_headset"
item_state = "headset"
keyslot1 = new /obj/item/device/encryptionkey/heads/magistrate
/obj/item/device/radio/headset/heads/blueshield
name = "blueshield's headset"
desc = "The headset of the Blueshield. Channels are as follows: :c - command, :s - security."
icon_state = "com_headset"
item_state = "headset"
keyslot1 = new /obj/item/device/encryptionkey/heads/blueshield
/obj/item/device/radio/headset/ert
name = "CentCom Response Team headset"
@@ -172,7 +199,7 @@
icon_state = "com_headset"
item_state = "headset"
freerange = 1
keyslot2 = new /obj/item/device/encryptionkey/ert
keyslot1 = new /obj/item/device/encryptionkey/ert
//The below was ported from Baystation.
/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
@@ -223,7 +250,7 @@
user << "You pop out the encryption keys in the headset!"
else
user << "This headset doesn't have any encryption keys! How useless..."
user << "This headset doesn't have any unique encryption keys! How useless..."
if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot1 && keyslot2)
@@ -4,7 +4,7 @@
icon_state = "intercom"
anchored = 1
w_class = 4.0
canhear_range = 2
canhear_range = 5
flags = FPRINT | CONDUCT | TABLEPASS | NOBLOODY
var/number = 0
var/anyai = 1
@@ -196,7 +196,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/proc/isWireCut(var/index)
return wires.IsIndexCut(index)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = list(1)) //BS12 EDIT
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if (channel == "department")
@@ -215,7 +215,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
Broadcast_Message(connection, A,
0, "*garbled automated announcement*", src,
message, from, "Automated Announcement", from, "synthesized voice",
4, 0, list(1), 1459)
4, 0, zlevel, connection.frequency)
del(A)
return
+5 -2
View File
@@ -91,7 +91,8 @@ REAGENT SCANNER
/obj/item/device/healthanalyzer
name = "Health Analyzer"
icon_state = "health"
item_state = "analyzer"
item_state = "healthanalyzer"
icon_override = 'icons/mob/in-hand/tools.dmi'
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
@@ -188,8 +189,10 @@ REAGENT SCANNER
var/datum/data/record/V = virusDB[ID]
user.show_message(text("\red Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]"))
// user.show_message(text("\red Warning: Unknown pathogen detected in subject's blood."))
if(M.getStaminaLoss())
user.show_message("<span class='info'>Subject appears to be suffering from fatigue.</span>")
if (M.getCloneLoss())
user.show_message("\red Subject appears to have been imperfectly cloned.")
user.show_message("<span class='warning'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
// user.show_message("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.")
if (M.has_brain_worms())
@@ -75,7 +75,8 @@ effective or pretty fucking useless.
/obj/item/device/rad_laser
name = "Health Analyzer"
icon_state = "health"
item_state = "analyzer"
item_state = "healthanalyzer"
icon_override = 'icons/mob/in-hand/tools.dmi'
desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end."
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
+16 -22
View File
@@ -12,13 +12,11 @@
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
user << "<span class='danger'>\The [src] cannot be applied to [M]!</span>"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
user << "\red You don't have the dexterity to do this!"
if (!(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon) || istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey"))
user << "<span class='danger'>You don't have the dexterity to do this!</span>"
return 1
if (istype(M, /mob/living/carbon/human))
@@ -27,33 +25,30 @@
if(affecting.display_name == "head")
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
user << "\red You can't apply [src] through [H.head]!"
user << "<span class='danger'>You can't apply [src] through [H.head]!</span>"
return 1
else
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
user << "\red You can't apply [src] through [H.wear_suit]!"
user << "<span class='danger'>You can't apply [src] through [H.wear_suit]!</span>"
return 1
if(affecting.status & ORGAN_ROBOT)
user << "\red This isn't useful at all on a robotic limb.."
user << "<span class='danger'>This can't be used on a robotic limb.</span>"
return 1
if(affecting.status & ORGAN_PEG)
user << "\red This isn't useful at all on a peg limb. It's fucking wood."
user << "<span class='danger'>This can't be used on a peg limb.</span>"
return 1
H.UpdateDamageIcon()
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
user.visible_message( \
"\blue [M] has been applied with [src] by [user].", \
"\blue You apply \the [src] to [M]." \
)
user.visible_message("<span class='notice'>[M] has been applied with [src] by [user].</span>","<span class='notice'>You apply \the [src] to [M].</span>")
use(1)
M.updatehealth()
/obj/item/stack/medical/bruise_pack
name = "roll of gauze"
singular_name = "gauze length"
@@ -80,21 +75,19 @@
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages \the [W.desc] on [M]'s [affecting.display_name].", \
"\blue You bandage \the [W.desc] on [M]'s [affecting.display_name]." )
//H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places a bruise patch over \the [W.desc] on [M]'s [affecting.display_name].", \
"\blue You place a bruise patch over \the [W.desc] on [M]'s [affecting.display_name]." )
else
user.visible_message( "\blue [user] places a bandaid over \the [W.desc] on [M]'s [affecting.display_name].", \
"\blue You place a bandaid over \the [W.desc] on [M]'s [affecting.display_name]." )
use(1)
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src))
return
else
user << "<span class='notice'>The [affecting.display_name] is cut open, you'll need more than a bandage!</span>"
affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
use(1)
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
use(1)
/obj/item/stack/medical/ointment
name = "ointment"
desc = "Used to treat those nasty burns."
@@ -119,6 +112,7 @@
else
user.visible_message( "\blue [user] salves the wounds on [M]'s [affecting.display_name].", \
"\blue You salve the wounds on [M]'s [affecting.display_name]." )
affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
use(1)
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
@@ -18,7 +18,7 @@
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
g_amt = 3750
g_amt = MINERAL_MATERIAL_AMOUNT
origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic
var/full_window = /obj/structure/window/full/basic
@@ -127,8 +127,8 @@
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
g_amt = 3750
m_amt = 1875
g_amt = MINERAL_MATERIAL_AMOUNT
m_amt = MINERAL_MATERIAL_AMOUNT / 2
origin_tech = "materials=2"
var/created_window = /obj/structure/window/reinforced
var/full_window = /obj/structure/window/full/reinforced
@@ -246,7 +246,7 @@
desc = "A very strong and very resistant sheet of a plasma-glass alloy."
singular_name = "glass sheet"
icon_state = "sheet-plasmaglass"
g_amt = 7500
g_amt = MINERAL_MATERIAL_AMOUNT * 2
origin_tech = "materials=3;plasma=2"
var/created_window = /obj/structure/window/plasmabasic
var/full_window = /obj/structure/window/full/plasmabasic
@@ -335,8 +335,8 @@
desc = "Plasma glass which seems to have rods or something stuck in them."
singular_name = "reinforced plasma glass sheet"
icon_state = "sheet-plasmarglass"
g_amt = 7500
m_amt = 1875
g_amt = MINERAL_MATERIAL_AMOUNT * 2
m_amt = MINERAL_MATERIAL_AMOUNT / 2
origin_tech = "materials=4;plasma=2"
var/created_window = /obj/structure/window/plasmareinforced
var/full_window = /obj/structure/window/full/plasmareinforced
@@ -8,7 +8,7 @@
throw_speed = 3
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/perunit = 3750
var/perunit = MINERAL_MATERIAL_AMOUNT
var/sheettype = null //this is used for girders in the creation of walls/false walls
+8 -8
View File
@@ -161,15 +161,15 @@
return
return
/obj/item/stack/proc/use(var/amount)
src.amount-=amount
if (src.amount<=0)
var/oldsrc = src
src = null //dont kill proc after del()
/obj/item/stack/proc/use(var/used)
if (amount < used)
return 0
amount -= used
if (amount <= 0)
if(usr)
usr.before_take_item(oldsrc)
qdel(oldsrc)
return
usr.before_take_item(src, 1)
qdel(src)
return 1
/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
var/obj/item/stack/oldsrc = src
+14 -14
View File
@@ -6,7 +6,7 @@ RCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build walls/floor."
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/items.dmi'
icon_state = "rcd"
opacity = 0
@@ -18,7 +18,7 @@ RCD
throw_speed = 3
throw_range = 5
w_class = 3.0
m_amt = 30000
m_amt = 100000
origin_tech = "engineering=4;materials=2"
var/datum/effect/effect/system/spark_spread/spark_system
var/matter = 0
@@ -29,7 +29,7 @@ RCD
New()
desc = "A RCD. It currently holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/100 matter-units."
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -39,15 +39,15 @@ RCD
attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
if((matter + 10) > 30)
if((matter + 20) > 100)
user << "<span class='notice'>The RCD cant hold any more matter-units.</span>"
return
user.drop_item()
del(W)
matter += 10
matter += 20
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>The RCD now holds [matter]/30 matter-units.</span>"
desc = "A RCD. It currently holds [matter]/30 matter-units."
user << "<span class='notice'>The RCD now holds [matter]/100 matter-units.</span>"
desc = "A RCD. It currently holds [matter]/100 matter-units."
return
@@ -148,11 +148,11 @@ RCD
return 0
if(istype(A, /obj/machinery/door/airlock))
if(checkResource(10, user))
if(checkResource(20, user))
user << "Deconstructing Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!useResource(10, user)) return 0
if(!useResource(20, user)) return 0
activate()
del(A)
return 1
@@ -166,7 +166,7 @@ RCD
if(matter < amount)
return 0
matter -= amount
desc = "A RCD. It currently holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [matter]/100 matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
@@ -174,17 +174,17 @@ RCD
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
if(!isrobot(user))
return 0
return user:cell:use(amount * 30)
return user:cell:use(amount * 160)
/obj/item/weapon/rcd/borg/checkResource(var/amount, var/mob/user)
if(!isrobot(user))
return 0
return user:cell:charge >= (amount * 30)
return user:cell:charge >= (amount * 160)
/obj/item/weapon/rcd/borg/New()
..()
desc = "A device used to rapidly build walls/floor."
canRwall = 0
desc = "A device used to rapidly build and deconstruct walls and floors."
canRwall = 1
/obj/item/weapon/rcd_ammo
name = "compressed matter cartridge"
-59
View File
@@ -1,59 +0,0 @@
/obj/item/weapon/rcs
name = "rapid-crate-sender (RCS)"
desc = "Use this to send crates and closets to cargo telepads."
icon = 'icons/obj/items.dmi'
icon_state = "rcs"
opacity = 0
density = 0
anchored = 0.0
flags = FPRINT | CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
var/rcharges = 10
var/obj/machinery/pad = null
var/last_charge = 30
var/mode = 0
var/rand_x = 0
var/rand_y = 0
var/emagged = 0
var/teleporting = 0
/obj/item/weapon/rcs/New()
processing_objects.Add(src)
desc = "Use this to send crates and closets to cargo telepads. There are [rcharges] charges left."
/obj/item/weapon/rcs/Destroy()
processing_objects.Remove(src)
..()
/obj/item/weapon/rcs/process()
if(rcharges > 10)
rcharges = 10
if(last_charge == 0)
rcharges++
desc = "Use this to send crates and closets to cargo telepads. There are [rcharges] charges left."
last_charge = 30
else
last_charge--
/obj/item/weapon/rcs/attack_self(mob/user)
if(emagged)
if(mode == 0)
mode = 1
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
user << "\red The telepad locator has become uncalibrated."
else
mode = 0
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
user << "\blue You calibrate the telepad locator."
/obj/item/weapon/rcs/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)
emagged = 1
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
user << "\red You emag the RCS. Click on it to toggle between modes."
return
+356 -151
View File
@@ -1,159 +1,364 @@
/obj/item/weapon/melee/defibrilator
name = "emergency defibrilator"
desc = "A handheld emergency defibrilator, used to bring people back from the brink of death or put them there."
icon_state = "defib_full"
item_state = "defib"
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
//backpack item
/obj/item/weapon/defibrillator
name = "defibrillator"
desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibunit"
item_state = "defibunit"
icon_override = 'icons/mob/in-hand/tools.dmi'
slot_flags = SLOT_BACK
force = 5
throwforce = 5
w_class = 3
var/emagged = 0
var/charges = 10
var/status = 0
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
origin_tech = "biotech=3"
throwforce = 6
w_class = 4
origin_tech = "biotech=4"
action_button_name = "Toggle Paddles"
icon_action_button = "action_defibunit"
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.</b>"
return (OXYLOSS)
var/on = 0 //if the paddles are equipped (1) or on the defib (0)
var/safety = 1 //if you can zap people with the defibs on harm mode
var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/weapon/twohanded/shockpaddles/paddles
var/obj/item/weapon/cell/high/bcell = null
/obj/item/weapon/melee/defibrilator/update_icon()
if(!status)
if(charges >= 7)
icon_state = "defib_full"
if(charges <= 6 && charges >= 4)
icon_state = "defib_half"
if(charges <= 3 && charges >= 1)
icon_state = "defib_low"
if(charges <= 0)
icon_state = "defib_empty"
else
if(charges >= 7)
icon_state = "defibpaddleout_full"
if(charges <= 6 && charges >= 4)
icon_state = "defibpaddleout_half"
if(charges <= 3 && charges >= 1)
icon_state = "defibpaddleout_low"
/obj/item/weapon/melee/defibrilator/attack_self(mob/user as mob)
if(status && (M_CLUMSY in user.mutations) && prob(50))
spark_system.attach(user)
spark_system.set_up(5, 0, src)
spark_system.start()
user << "\red You touch the paddles together shorting the device."
user.Weaken(5)
charges--
if(charges < 1)
status = 0
update_icon()
return
if(charges > 0)
status = !status
user << "<span class='notice'>\The [src] is now [status ? "on" : "off"].</span>"
playsound(get_turf(src), "sparks", 75, 1, -1)
update_icon()
else
status = 0
user << "<span class='warning'>\The [src] is out of charge.</span>"
add_fingerprint(user)
/obj/item/weapon/melee/defibrilator/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/defibrillator/New() //starts without a cell for rnd
..()
if(istype(W, /obj/item/weapon/card/emag))
var/image/I = image("icon" = "icons/obj/weapons.dmi", "icon_state" = "defib_emag")
if(emagged == 0)
emagged = 1
usr << "\red [W] unlocks [src]'s safety protocols"
overlays += I
else
emagged = 0
usr << "\blue [W] sets [src]'s safety protocols"
overlays -= I
paddles = make_paddles()
update_icon()
return
/obj/item/weapon/melee/defibrilator/attack(mob/M as mob, mob/user as mob)
var/tobehealed
var/threshhold = -config.health_threshold_dead
var/mob/living/carbon/human/H = M
if(!ishuman(M))
..()
return
if(status)
if(user.a_intent == "hurt" && emagged)
H.visible_message("<span class='danger'>[M.name] has been touched by the defibrilator paddles by [user]!</span>")
if(charges >= 2)
H.Weaken(10)
H.adjustOxyLoss(10)
else
H.Weaken(5)
H.adjustOxyLoss(5)
H.updatehealth() //forces health update before next life tick
spark_system.attach(M)
spark_system.set_up(5, 0, M)
spark_system.start()
charges -= 2
if(charges < 0)
charges = 0
if(!charges)
status = 0
/obj/item/weapon/defibrillator/loaded/New() //starts with hicap
..()
paddles = make_paddles()
bcell = new(src)
update_icon()
return
/obj/item/weapon/defibrillator/update_icon()
update_power()
update_overlays()
update_charge()
/obj/item/weapon/defibrillator/proc/update_power()
if(bcell)
if(bcell.charge < paddles.revivecost)
powered = 0
else
powered = 1
else
powered = 0
/obj/item/weapon/defibrillator/proc/update_overlays()
overlays.Cut()
if(!on)
overlays += "defibunit-paddles"
if(powered)
overlays += "defibunit-powered"
if(!bcell)
overlays += "defibunit-nocell"
if(!safety)
overlays += "defibunit-emagged"
/obj/item/weapon/defibrillator/proc/update_charge()
if(powered) //so it doesn't show charge if it's unpowered
if(bcell)
var/ratio = bcell.charge / bcell.maxcharge
ratio = Ceiling(ratio*4) * 25
overlays += "defibunit-charge[ratio]"
/obj/item/weapon/defibrillator/CheckParts()
bcell = locate(/obj/item/weapon/cell) in contents
update_icon()
/obj/item/weapon/defibrillator/ui_action_click()
if(usr.get_item_by_slot(slot_back) == src)
toggle_paddles()
else
usr << "<span class='warning'>Put the defibrillator on your back first!</span>"
return
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
var/obj/item/weapon/cell/C = W
if(bcell)
user << "<span class='notice'>[src] already has a cell.</span>"
else
if(C.maxcharge < paddles.revivecost)
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
return
user.drop_item()
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
if(istype(W, /obj/item/weapon/card/emag))
if(safety)
safety = 0
user << "<span class='warning'>You silently disable [src]'s safety protocols with the [W]."
else
safety = 1
user << "<span class='notice'>You silently enable [src]'s safety protocols with the [W]."
if(istype(W, /obj/item/weapon/screwdriver))
if(bcell)
bcell.updateicon()
bcell.loc = get_turf(src.loc)
bcell = null
user << "<span class='notice'>You remove the cell from the [src].</span>"
update_icon()
return
/obj/item/weapon/defibrillator/emp_act(severity)
if(bcell)
deductcharge(1000 / severity)
if(bcell.reliability != 100 && prob(50/severity))
bcell.reliability -= 10 / severity
if(safety)
safety = 0
src.visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
else
safety = 1
src.visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
update_icon()
..()
/obj/item/weapon/defibrillator/verb/toggle_paddles()
set name = "Toggle Paddles"
set category = "Object"
on = !on
var/mob/living/carbon/human/user = usr
if(on)
//Detach the paddles into the user's hands
if(!usr.put_in_hands(paddles))
on = 0
user << "<span class='warning'>You need a free hand to hold the paddles!</span>"
update_icon()
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
user.attack_log += "\[[time_stamp()]\]<font color='red'> Defibrilated [H.name] ([H.ckey]) with [src.name]</font>"
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Defibrilated by [user.name] ([user.ckey]) with [src.name]</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) defibrilated [H.name] ([H.ckey]) with [src.name]</font>" )
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
return
H.visible_message("\blue [user] places the defibrilator paddles on [M.name]'s chest.", "\blue You place the defibrilator paddles on [M.name]'s chest.")
if(do_after(user, 10))
if(H.stat == 2 || H.stat == DEAD)
var/uni = 0
var/armor = 0
var/health = H.health
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/under))
uni = 1
if(istype(carried_item, /obj/item/clothing/suit/armor))
armor = 1
if(uni && armor)
if(prob(30))
spark_system.attach(M)
spark_system.start()
if(prob(30))
tobehealed = health + threshhold
tobehealed -= 5 //They get 5 health in crit to heal the person or inject stabalizers
H.adjustOxyLoss(tobehealed)
else if(uni || armor)
if(prob(30))
spark_system.attach(M)
spark_system.start()
if(prob(60))
tobehealed = health + threshhold
tobehealed -= 5 //They get 5 health in crit to heal the person or inject stabalizers
H.adjustOxyLoss(tobehealed)
else
if(prob(90))
tobehealed = health + threshhold
tobehealed -= 5 //They get 5 health in crit to heal the person or inject stabalizers
H.adjustOxyLoss(tobehealed)
H.updatehealth() //forces a health update, otherwise the oxyloss adjustment wouldnt do anything
M.visible_message("\red [M]'s body convulses a bit.")
var/datum/organ/external/temp = H.get_organ("head")
if(H.health > -100 && !(temp.status & ORGAN_DESTROYED) && !(M_NOCLONE in H.mutations) && !H.suiciding)
viewers(M) << "\blue [src] beeps: Resuscitation successful."
spawn(0)
H.stat = 1
dead_mob_list -= H
living_mob_list |= H
H.emote("gasp")
else
viewers(M) << "\blue [src] beeps: Resuscitation failed."
charges--
if(charges < 1)
charges = 0
status = 0
update_icon()
paddles.loc = user
else
//Remove from their hands and back onto the defib unit
remove_paddles(user)
update_icon()
return
/obj/item/weapon/defibrillator/proc/make_paddles()
return new /obj/item/weapon/twohanded/shockpaddles(src)
/obj/item/weapon/defibrillator/equipped(mob/user, slot)
if(slot != slot_back)
remove_paddles(user)
update_icon()
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user)
var/mob/living/carbon/human/M = user
if(paddles in get_both_hands(M))
M.u_equip(paddles)
update_icon()
return
/obj/item/weapon/defibrillator/Destroy()
if(on)
var/M = get(paddles, /mob)
remove_paddles(M)
..()
update_icon()
return
/obj/item/weapon/defibrillator/proc/deductcharge(var/chrgdeductamt)
if(bcell)
if(bcell.charge < (paddles.revivecost+chrgdeductamt))
powered = 0
update_icon()
if(bcell.use(chrgdeductamt))
update_icon()
return 1
else
update_icon()
return 0
/obj/item/weapon/defibrillator/proc/cooldowncheck(var/mob/user)
spawn(50)
if(bcell)
if(bcell.charge >= paddles.revivecost)
user.visible_message("<span class='notice'>[src] beeps: Unit ready.</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
else
user.visible_message("\blue [src] beeps: Patient is not in a valid state.")
user.visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
paddles.cooldown = 0
paddles.update_icon()
update_icon()
//paddles
/obj/item/weapon/twohanded/shockpaddles
name = "defibrillator paddles"
desc = "A pair of plastic-gripped paddles with flat metal surfaces that are used to deliver powerful electric shocks."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles"
item_state = "defibpaddles"
icon_override = 'icons/mob/in-hand/tools.dmi'
force = 0
throwforce = 6
w_class = 4
var/revivecost = 1000
var/cooldown = 0
var/busy = 0
var/obj/item/weapon/defibrillator/defib
/obj/item/weapon/twohanded/shockpaddles/New(mainunit)
..()
if(check_defib_exists(mainunit, src))
defib = mainunit
loc = defib
busy = 0
update_icon()
return
/obj/item/weapon/twohanded/shockpaddles/update_icon()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
/obj/item/weapon/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.</span>")
defib.deductcharge(revivecost)
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
return (OXYLOSS)
/obj/item/weapon/twohanded/shockpaddles/dropped(mob/user as mob)
if(user)
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
defib.on = 0
loc = defib
defib.update_icon()
return unwield()
/obj/item/weapon/twohanded/shockpaddles/proc/check_defib_exists(mainunit, var/mob/living/carbon/human/M, var/obj/O)
if (!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
M.u_equip(O)
qdel(O)
return 0
else
return 1
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M as mob, mob/user as mob)
var/tobehealed
var/threshold = -config.health_threshold_dead
var/mob/living/carbon/human/H = M
if(busy)
return
if(!defib.powered)
user.visible_message("<span class='notice'>[defib] beeps: Unit is unpowered.</span>")
playsound(get_turf(src), 'sound/machines/twobeep.ogg', 50, 0)
return
if(!wielded)
user << "<span class='boldnotice'>You need to wield the paddles in both hands before you can use them on someone!</span>"
return
if(cooldown)
user << "<span class='notice'>[defib] is recharging.</span>"
return
if(!ishuman(M))
user << "<span class='notice'>The instructions on [defib] don't mention how to revive that...</span>"
return
else
if(user.a_intent == "harm" && !defib.safety)
busy = 1
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
H.adjustStaminaLoss(50)
H.Weaken(5)
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", object="defibrillator")
defib.deductcharge(revivecost)
cooldown = 1
busy = 0
update_icon()
defib.cooldowncheck(user)
return
if(user.zone_sel && user.zone_sel.selecting == "chest")
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
var/tplus = world.time - H.timeofdeath
var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 900 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if((istype(carried_item, /obj/item/clothing/suit/armor)) || (istype(carried_item, /obj/item/clothing/suit/space)))
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
busy = 0
update_icon()
return
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
for(var/datum/organ/external/O in H.organs)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(H.health <= config.health_threshold_dead && total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(M_NOCLONE in H.mutations))
tobehealed = health + threshold
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0)
H.stat = 1
if(H in dead_mob_list)
dead_mob_list -= H
living_mob_list += H
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
H.updatehealth()
defib.deductcharge(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
if(ghost)
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 0)
defib.deductcharge(revivecost)
update_icon()
cooldown = 1
defib.cooldowncheck(user)
else
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
busy = 0
update_icon()
else
user << "<span class='notice'>You need to target your patient's chest with [src].</span>"
return
@@ -63,9 +63,9 @@
else
return buf.dna.SetUIValue(real_block,val)
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
/obj/item/weapon/dnainjector/proc/inject(mob/living/M as mob, mob/user as mob)
if(istype(M,/mob/living))
M.radiation += rand(5,20)
M.apply_effect(rand(5,20),IRRADIATE,0)
if (!(M_NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
// UI in syringe.
@@ -417,7 +417,7 @@
B1.reagents.add_reagent("fuel",20)
B2.reagents.add_reagent("plasma", 15)
B2.reagents.add_reagent("sacid", 15)
B1.reagents.add_reagent("fuel",20)
B1.reagents.add_reagent("incendiaryfuel",20)
beakers += B1
beakers += B2

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