Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into xenoarchaeology

Conflicts:
	icons/obj/hydroponics.dmi

manual merge of conflicted icon file

Signed-off-by: Cael Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael Aislinn
2014-06-19 10:05:27 +10:00
604 changed files with 26234 additions and 15542 deletions
+6 -1
View File
@@ -1 +1,6 @@
*.dmm merge=merge-dmm
# dmm map merger hook
# needs additional setup, see tools/mapmerge/install.txt
*.dmm merge=merge-dmm
# force changelog merging to use union
html/changelog.html merge=union
+59 -16
View File
@@ -52,6 +52,7 @@
#include "code\ATMOSPHERICS\datum_pipe_network.dm"
#include "code\ATMOSPHERICS\datum_pipeline.dm"
#include "code\ATMOSPHERICS\he_pipes.dm"
#include "code\ATMOSPHERICS\mainspipe.dm"
#include "code\ATMOSPHERICS\pipes.dm"
#include "code\ATMOSPHERICS\components\portables_connector.dm"
#include "code\ATMOSPHERICS\components\tvalve.dm"
@@ -157,7 +158,6 @@
#include "code\datums\spells\turf_teleport.dm"
#include "code\datums\spells\wizard.dm"
#include "code\defines\obj.dm"
#include "code\defines\obj\hydro.dm"
#include "code\defines\obj\weapon.dm"
#include "code\defines\procs\AStar.dm"
#include "code\defines\procs\captain_announce.dm"
@@ -230,6 +230,21 @@
#include "code\game\gamemodes\malfunction\malfunction.dm"
#include "code\game\gamemodes\meteor\meteor.dm"
#include "code\game\gamemodes\meteor\meteors.dm"
#include "code\game\gamemodes\mutiny\auth_key.dm"
#include "code\game\gamemodes\mutiny\directive.dm"
#include "code\game\gamemodes\mutiny\emergency_authentication_device.dm"
#include "code\game\gamemodes\mutiny\key_pinpointer.dm"
#include "code\game\gamemodes\mutiny\mutiny.dm"
#include "code\game\gamemodes\mutiny\mutiny_admin.dm"
#include "code\game\gamemodes\mutiny\mutiny_fluff.dm"
#include "code\game\gamemodes\mutiny\mutiny_hooks.dm"
#include "code\game\gamemodes\mutiny\directives\alien_fraud_directive.dm"
#include "code\game\gamemodes\mutiny\directives\bluespace_contagion_directive.dm"
#include "code\game\gamemodes\mutiny\directives\financial_crisis_directive.dm"
#include "code\game\gamemodes\mutiny\directives\ipc_virus_directive.dm"
#include "code\game\gamemodes\mutiny\directives\research_to_ripleys_directive.dm"
#include "code\game\gamemodes\mutiny\directives\tau_ceti_needs_women_directive.dm"
#include "code\game\gamemodes\mutiny\directives\terminations_directive.dm"
#include "code\game\gamemodes\ninja\ninja.dm"
#include "code\game\gamemodes\nuclear\nuclear.dm"
#include "code\game\gamemodes\nuclear\nuclearbomb.dm"
@@ -259,14 +274,13 @@
#include "code\game\jobs\job\silicon.dm"
#include "code\game\machinery\adv_med.dm"
#include "code\game\machinery\ai_slipper.dm"
#include "code\game\machinery\airlock_control.dm"
#include "code\game\machinery\alarm.dm"
#include "code\game\machinery\atmo_control.dm"
#include "code\game\machinery\autolathe.dm"
#include "code\game\machinery\autolathe_datums.dm"
#include "code\game\machinery\Beacon.dm"
#include "code\game\machinery\bees_apiary.dm"
#include "code\game\machinery\bees_items.dm"
#include "code\game\machinery\biogenerator.dm"
#include "code\game\machinery\buttons.dm"
#include "code\game\machinery\cell_charger.dm"
#include "code\game\machinery\cloning.dm"
@@ -281,7 +295,6 @@
#include "code\game\machinery\Freezer.dm"
#include "code\game\machinery\hologram.dm"
#include "code\game\machinery\holosign.dm"
#include "code\game\machinery\hydroponics.dm"
#include "code\game\machinery\igniter.dm"
#include "code\game\machinery\iv_drip.dm"
#include "code\game\machinery\lightswitch.dm"
@@ -357,10 +370,9 @@
#include "code\game\machinery\computer\skills.dm"
#include "code\game\machinery\computer\specops_shuttle.dm"
#include "code\game\machinery\computer\station_alert.dm"
#include "code\game\machinery\computer\syndicate_shuttle.dm"
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
#include "code\game\machinery\computer\vox_shuttle.dm"
#include "code\game\machinery\doors\airlock.dm"
#include "code\game\machinery\doors\airlock_control.dm"
#include "code\game\machinery\doors\airlock_electronics.dm"
#include "code\game\machinery\doors\alarmlock.dm"
#include "code\game\machinery\doors\brigdoors.dm"
@@ -373,8 +385,12 @@
#include "code\game\machinery\doors\unpowered.dm"
#include "code\game\machinery\doors\windowdoor.dm"
#include "code\game\machinery\embedded_controller\airlock_controllers.dm"
#include "code\game\machinery\embedded_controller\airlock_docking_controller.dm"
#include "code\game\machinery\embedded_controller\airlock_program.dm"
#include "code\game\machinery\embedded_controller\docking_program.dm"
#include "code\game\machinery\embedded_controller\embedded_controller_base.dm"
#include "code\game\machinery\embedded_controller\embedded_program_base.dm"
#include "code\game\machinery\embedded_controller\simple_docking_controller.dm"
#include "code\game\machinery\kitchen\gibber.dm"
#include "code\game\machinery\kitchen\juicer.dm"
#include "code\game\machinery\kitchen\microwave.dm"
@@ -400,7 +416,6 @@
#include "code\game\mecha\combat\combat.dm"
#include "code\game\mecha\combat\durand.dm"
#include "code\game\mecha\combat\gygax.dm"
#include "code\game\mecha\combat\honker.dm"
#include "code\game\mecha\combat\marauder.dm"
#include "code\game\mecha\combat\phazon.dm"
#include "code\game\mecha\equipment\mecha_equipment.dm"
@@ -516,7 +531,6 @@
#include "code\game\objects\items\weapons\flamethrower.dm"
#include "code\game\objects\items\weapons\gift_wrappaper.dm"
#include "code\game\objects\items\weapons\handcuffs.dm"
#include "code\game\objects\items\weapons\hydroponics.dm"
#include "code\game\objects\items\weapons\kitchen.dm"
#include "code\game\objects\items\weapons\manuals.dm"
#include "code\game\objects\items\weapons\mop.dm"
@@ -559,7 +573,9 @@
#include "code\game\objects\items\weapons\storage\briefcase.dm"
#include "code\game\objects\items\weapons\storage\fancy.dm"
#include "code\game\objects\items\weapons\storage\firstaid.dm"
#include "code\game\objects\items\weapons\storage\internal.dm"
#include "code\game\objects\items\weapons\storage\lockbox.dm"
#include "code\game\objects\items\weapons\storage\misc.dm"
#include "code\game\objects\items\weapons\storage\secure.dm"
#include "code\game\objects\items\weapons\storage\storage.dm"
#include "code\game\objects\items\weapons\storage\toolbox.dm"
@@ -569,7 +585,6 @@
#include "code\game\objects\items\weapons\tanks\tank_types.dm"
#include "code\game\objects\items\weapons\tanks\tanks.dm"
#include "code\game\objects\random\random.dm"
#include "code\game\objects\storage\coat.dm"
#include "code\game\objects\structures\barsign.dm"
#include "code\game\objects\structures\bedsheet_bin.dm"
#include "code\game\objects\structures\coathanger.dm"
@@ -631,6 +646,7 @@
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\wheelchair.dm"
#include "code\game\turfs\simulated.dm"
#include "code\game\turfs\turf.dm"
#include "code\game\turfs\unsimulated.dm"
@@ -746,6 +762,7 @@
#include "code\modules\clothing\shoes\magboots.dm"
#include "code\modules\clothing\shoes\miscellaneous.dm"
#include "code\modules\clothing\spacesuits\alien.dm"
#include "code\modules\clothing\spacesuits\breaches.dm"
#include "code\modules\clothing\spacesuits\captain.dm"
#include "code\modules\clothing\spacesuits\ert.dm"
#include "code\modules\clothing\spacesuits\miscellaneous.dm"
@@ -759,6 +776,7 @@
#include "code\modules\clothing\suits\jobs.dm"
#include "code\modules\clothing\suits\labcoat.dm"
#include "code\modules\clothing\suits\miscellaneous.dm"
#include "code\modules\clothing\suits\storage.dm"
#include "code\modules\clothing\suits\utility.dm"
#include "code\modules\clothing\suits\wiz_robe.dm"
#include "code\modules\clothing\under\chameleon.dm"
@@ -823,7 +841,13 @@
#include "code\modules\flufftext\Hallucination.dm"
#include "code\modules\flufftext\TextFilters.dm"
#include "code\modules\food\recipes_microwave.dm"
#include "code\modules\games\cards.dm"
#include "code\modules\genetics\side_effects.dm"
#include "code\modules\hydroponics\biogenerator.dm"
#include "code\modules\hydroponics\grown_inedible.dm"
#include "code\modules\hydroponics\hydro_tools.dm"
#include "code\modules\hydroponics\hydro_tray.dm"
#include "code\modules\hydroponics\seeds.dm"
#include "code\modules\library\lib_items.dm"
#include "code\modules\library\lib_machines.dm"
#include "code\modules\library\lib_readme.dm"
@@ -833,6 +857,8 @@
#include "code\modules\maps\swapmaps.dm"
#include "code\modules\maps\writer.dm"
#include "code\modules\mining\abandonedcrates.dm"
#include "code\modules\mining\alloys.dm"
#include "code\modules\mining\coins.dm"
#include "code\modules\mining\machine_input_output_plates.dm"
#include "code\modules\mining\machine_processing.dm"
#include "code\modules\mining\machine_stacking.dm"
@@ -843,12 +869,16 @@
#include "code\modules\mining\minerals.dm"
#include "code\modules\mining\mint.dm"
#include "code\modules\mining\money_bag.dm"
#include "code\modules\mining\ores_coins.dm"
#include "code\modules\mining\ore.dm"
#include "code\modules\mining\ore_datum.dm"
#include "code\modules\mining\satchel_ore_boxdm.dm"
#include "code\modules\mining\drilling\distribution.dm"
#include "code\modules\mining\drilling\drill.dm"
#include "code\modules\mob\abilities.dm"
#include "code\modules\mob\death.dm"
#include "code\modules\mob\emote.dm"
#include "code\modules\mob\hear_say.dm"
#include "code\modules\mob\holder.dm"
#include "code\modules\mob\inventory.dm"
#include "code\modules\mob\language.dm"
#include "code\modules\mob\login.dm"
@@ -952,6 +982,7 @@
#include "code\modules\mob\living\carbon\monkey\monkey.dm"
#include "code\modules\mob\living\carbon\monkey\powers.dm"
#include "code\modules\mob\living\carbon\monkey\update_icons.dm"
#include "code\modules\mob\living\silicon\alarm.dm"
#include "code\modules\mob\living\silicon\death.dm"
#include "code\modules\mob\living\silicon\login.dm"
#include "code\modules\mob\living\silicon\say.dm"
@@ -995,6 +1026,12 @@
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\wires.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_console.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_damage.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_items.dm"
#include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm"
#include "code\modules\mob\living\simple_animal\bees.dm"
#include "code\modules\mob\living\simple_animal\borer.dm"
#include "code\modules\mob\living\simple_animal\constructs.dm"
@@ -1002,7 +1039,6 @@
#include "code\modules\mob\living\simple_animal\parrot.dm"
#include "code\modules\mob\living\simple_animal\shade.dm"
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
#include "code\modules\mob\living\simple_animal\vox.dm"
#include "code\modules\mob\living\simple_animal\worm.dm"
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
#include "code\modules\mob\living\simple_animal\friendly\corgi.dm"
@@ -1055,12 +1091,14 @@
#include "code\modules\paperwork\folders.dm"
#include "code\modules\paperwork\handlabeler.dm"
#include "code\modules\paperwork\paper.dm"
#include "code\modules\paperwork\paper_bundle.dm"
#include "code\modules\paperwork\paperbin.dm"
#include "code\modules\paperwork\pen.dm"
#include "code\modules\paperwork\photocopier.dm"
#include "code\modules\paperwork\photography.dm"
#include "code\modules\paperwork\stamps.dm"
#include "code\modules\power\apc.dm"
#include "code\modules\power\batteryrack.dm"
#include "code\modules\power\cable.dm"
#include "code\modules\power\cable_heavyduty.dm"
#include "code\modules\power\cable_logic.dm"
@@ -1100,6 +1138,7 @@
#include "code\modules\projectiles\targeting.dm"
#include "code\modules\projectiles\ammunition\boxes.dm"
#include "code\modules\projectiles\ammunition\bullets.dm"
#include "code\modules\projectiles\guns\alien.dm"
#include "code\modules\projectiles\guns\energy.dm"
#include "code\modules\projectiles\guns\projectile.dm"
#include "code\modules\projectiles\guns\energy\laser.dm"
@@ -1170,7 +1209,6 @@
#include "code\modules\research\rdconsole.dm"
#include "code\modules\research\rdmachines.dm"
#include "code\modules\research\research.dm"
#include "code\modules\research\research_shuttle.dm"
#include "code\modules\research\server.dm"
#include "code\modules\research\xenoarchaeology\areas.dm"
#include "code\modules\research\xenoarchaeology\chemistry.dm"
@@ -1253,6 +1291,12 @@
#include "code\modules\scripting\Scanner\Tokens.dm"
#include "code\modules\security levels\keycard authentication.dm"
#include "code\modules\security levels\security levels.dm"
#include "code\modules\shuttles\antagonist.dm"
#include "code\modules\shuttles\departmental.dm"
#include "code\modules\shuttles\shuttle.dm"
#include "code\modules\shuttles\shuttle_console.dm"
#include "code\modules\shuttles\shuttle_specops.dm"
#include "code\modules\shuttles\shuttles_multi.dm"
#include "code\modules\supermatter\supermatter.dm"
#include "code\modules\surgery\appendix.dm"
#include "code\modules\surgery\bones.dm"
@@ -1266,10 +1310,9 @@
#include "code\modules\surgery\ribcage.dm"
#include "code\modules\surgery\robolimbs.dm"
#include "code\modules\surgery\surgery.dm"
#include "code\modules\telesci\bscrystal.dm"
#include "code\modules\telesci\gps.dm"
#include "code\modules\telesci\telepad.dm"
#include "code\modules\telesci\telesci_computer.dm"
#include "code\modules\vehicles\cargo_train.dm"
#include "code\modules\vehicles\train.dm"
#include "code\modules\vehicles\vehicle.dm"
#include "code\modules\virus2\analyser.dm"
#include "code\modules\virus2\antibodies.dm"
#include "code\modules\virus2\centrifuge.dm"
@@ -1,7 +1,7 @@
obj/machinery/atmospherics/trinary/filter
icon = 'icons/obj/atmospherics/filter.dmi'
icon_state = "intact_off"
density = 1
density = 0
name = "Gas filter"
@@ -234,4 +234,45 @@ obj/machinery/atmospherics/trinary/filter/Topic(href, href_list) // -- TLE
*/
return
obj/machinery/atmospherics/trinary/filter/m_filter
icon = 'icons/obj/atmospherics/m_filter.dmi'
icon_state = "intact_off"
dir = SOUTH
initialize_directions = SOUTH|NORTH|EAST
obj/machinery/atmospherics/trinary/filter/m_filter/New()
..()
switch(dir)
if(NORTH)
initialize_directions = WEST|NORTH|SOUTH
if(SOUTH)
initialize_directions = SOUTH|EAST|NORTH
if(EAST)
initialize_directions = EAST|WEST|NORTH
if(WEST)
initialize_directions = WEST|SOUTH|EAST
obj/machinery/atmospherics/trinary/filter/m_filter/initialize()
if(node1 && node2 && node3) return
var/node1_connect = turn(dir, -180)
var/node2_connect = turn(dir, 90)
var/node3_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
if(target.initialize_directions & get_dir(target,src))
node3 = target
break
update_icon()
@@ -1,7 +1,7 @@
obj/machinery/atmospherics/trinary/mixer
icon = 'icons/obj/atmospherics/mixer.dmi'
icon_state = "intact_off"
density = 1
density = 0
name = "Gas mixer"
@@ -160,3 +160,93 @@ obj/machinery/atmospherics/trinary/mixer
src.update_icon()
src.updateUsrDialog()
return
obj/machinery/atmospherics/trinary/mixer/t_mixer
icon = 'icons/obj/atmospherics/t_mixer.dmi'
icon_state = "intact_off"
dir = SOUTH
initialize_directions = SOUTH|EAST|WEST
//node 3 is the outlet, nodes 1 & 2 are intakes
obj/machinery/atmospherics/trinary/mixer/t_mixer/New()
..()
switch(dir)
if(NORTH)
initialize_directions = EAST|NORTH|WEST
if(SOUTH)
initialize_directions = SOUTH|WEST|EAST
if(EAST)
initialize_directions = EAST|NORTH|SOUTH
if(WEST)
initialize_directions = WEST|NORTH|SOUTH
obj/machinery/atmospherics/trinary/mixer/t_mixer/initialize()
if(node1 && node2 && node3) return
var/node1_connect = turn(dir, -90)
var/node2_connect = turn(dir, 90)
var/node3_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
if(target.initialize_directions & get_dir(target,src))
node3 = target
break
update_icon()
obj/machinery/atmospherics/trinary/mixer/m_mixer
icon = 'icons/obj/atmospherics/m_mixer.dmi'
icon_state = "intact_off"
dir = SOUTH
initialize_directions = SOUTH|NORTH|EAST
//node 3 is the outlet, nodes 1 & 2 are intakes
obj/machinery/atmospherics/trinary/mixer/m_mixer/New()
..()
switch(dir)
if(NORTH)
initialize_directions = WEST|NORTH|SOUTH
if(SOUTH)
initialize_directions = SOUTH|EAST|NORTH
if(EAST)
initialize_directions = EAST|WEST|NORTH
if(WEST)
initialize_directions = WEST|SOUTH|EAST
obj/machinery/atmospherics/trinary/mixer/m_mixer/initialize()
if(node1 && node2 && node3) return
var/node1_connect = turn(dir, -180)
var/node2_connect = turn(dir, 90)
var/node3_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
if(target.initialize_directions & get_dir(target,src))
node3 = target
break
update_icon()
+9
View File
@@ -1,3 +1,5 @@
#define STEFAN_BOLTZMANN_CONSTANT 0.0000000567
datum/pipeline
var/datum/gas_mixture/air
@@ -209,5 +211,12 @@ datum/pipeline
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
air.temperature -= heat/total_heat_capacity
if(network)
network.update = 1
proc/radiate_heat(surface, thermal_conductivity)
var/total_heat_capacity = air.heat_capacity()
var/heat = STEFAN_BOLTZMANN_CONSTANT * surface * air.temperature ** 4 * thermal_conductivity
air.temperature = max(0, air.temperature - heat / total_heat_capacity)
if(network)
network.update = 1
+5 -5
View File
@@ -4,6 +4,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
icon_state = "intact"
level = 2
var/initialize_directions_he
var/surface = 2
minimum_temperature_difference = 20
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
@@ -49,12 +50,11 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
else
var/datum/gas_mixture/environment = loc.return_air()
environment_temperature = environment.temperature
var/datum/gas_mixture/pipe_air = return_air()
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
parent.temperature_interact(loc, volume, thermal_conductivity)
else
environment_temperature = loc:temperature
var/datum/gas_mixture/pipe_air = return_air()
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
parent.temperature_interact(loc, volume, thermal_conductivity)
parent.radiate_heat(surface, 1)
obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
@@ -36,8 +36,9 @@ obj/machinery/atmospherics/mains_pipe
icon = 'icons/obj/atmospherics/mainspipe.dmi'
layer = 2.4 //under wires with their 2.5
force = 20
var/volume = 0
var/force = 20
var/alert_pressure = 80*ONE_ATMOSPHERE
@@ -535,6 +536,8 @@ obj/machinery/atmospherics/mains_pipe/cap
level = 2
icon_state = "cap"
//TODO: Get Mains valves working!
/*
obj/machinery/atmospherics/mains_pipe/valve
icon_state = "mvalve0"
@@ -700,4 +703,5 @@ obj/machinery/atmospherics/mains_pipe/valve
if(open)
close()
else
open()
open()
*/
+8 -1
View File
@@ -53,6 +53,13 @@
H:updatehealth()
return ..()
/turf/proc/hasbelow()
var/turf/controllerlocation = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
return 1
return 0
/turf/simulated/floor/open/proc/getbelow()
var/turf/controllerlocation = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
@@ -73,7 +80,7 @@
//overwrite the attackby of space to transform it to openspace if necessary
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/weapon/cable_coil))
if (istype(C, /obj/item/weapon/cable_coil) && src.hasbelow())
var/turf/simulated/floor/open/W = src.ChangeTurf(/turf/simulated/floor/open)
W.attackby(C, user)
return
@@ -86,9 +86,6 @@
for(var/coin_type in typesof(/obj/item/weapon/coin))
possible_spawns += coin_type
//no icon_state for mythril coins
possible_spawns -= /obj/item/weapon/coin/mythril
var/coin_type = pick(possible_spawns)
for(var/i=0,i<amount,i++)
new coin_type(C)
@@ -306,7 +303,7 @@
switch(trap_type)
if("sawburst")
M << "\red <b>A sawblade shoots out of the ground and strikes you!</b>"
M.apply_damage(rand(5,10), BRUTE)
M.apply_damage(rand(5,10), BRUTE, sharp=1, edge=1)
var/atom/myloc = src.loc
var/image/flicker = image('code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi',"sawblade")
@@ -143,25 +143,25 @@
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE)
M.apply_damage(rand(0,1), BRUTE, sharp=1)
if(prob(50))
spawn(rand(25,50))
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE)
M.apply_damage(rand(0,1), BRUTE, sharp=1)
if(prob(50))
spawn(rand(25,50))
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE)
M.apply_damage(rand(0,1), BRUTE, sharp=1)
if(prob(50))
spawn(rand(25,50))
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE)
M.apply_damage(rand(0,1), BRUTE, sharp=1)
/turf/unsimulated/jungle/water/deep
plants_spawn = 0
@@ -281,8 +281,6 @@
/obj/machinery/shield_gen/proc/get_shielded_turfs()
var/list/out = list()
for(var/turf/T in range(field_radius, src))
world << "turf dist:[get_dist(src,T)]"
if(get_dist(src,T) == field_radius)
out.Add(T)
world << " added"
return out
+4 -4
View File
@@ -32,6 +32,7 @@
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
del(cig)
W = butt
else if (cig.lit == 0)
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
@@ -81,8 +82,7 @@
icon_broken = "ashtray_bork_bl"
max_butts = 14
health = 24.0
g_amt = 30
m_amt = 30
matter = list("metal" = 30,"glass" = 30)
empty_desc = "Cheap plastic ashtray."
throwforce = 3.0
die()
@@ -102,7 +102,7 @@
icon_broken = "ashtray_bork_br"
max_butts = 10
health = 72.0
m_amt = 80
matter = list("metal" = 80)
empty_desc = "Massive bronze ashtray."
throwforce = 10.0
@@ -123,7 +123,7 @@
icon_broken = "ashtray_bork_gl"
max_butts = 12
health = 12.0
g_amt = 60
matter = list("glass" = 60)
empty_desc = "Glass ashtray. Looks fragile."
throwforce = 6.0
+1 -1
View File
@@ -136,7 +136,7 @@
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!is_sharp(W) && src.allowed(user))))
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
user << "You can't break the [src] with that!"
return
user.show_viewers("\blue [user] breaks the [src]!")
+1 -1
View File
@@ -157,7 +157,7 @@
var/obj/item/weapon/paper/P = new(usr.loc)
P.name = "Autopsy Data ([target_name])"
P.info = "<tt>[scan_data]</tt>"
P.overlays += "paper_words"
P.icon_state = "paper_words"
if(istype(usr,/mob/living/carbon))
// place the item in the usr's hand if possible
+2
View File
@@ -136,7 +136,9 @@ var/list/alldepartments = list("Central Command")
authenticated = 0
if(href_list["dept"])
var/lastdpt = dpt
dpt = input(usr, "Which department?", "Choose a department", "") as null|anything in alldepartments
if(!dpt) dpt = lastdpt
if(href_list["auth"])
if ( (!( authenticated ) && (scan)) )
+5 -5
View File
@@ -6,7 +6,7 @@
round_time // time of the round at which this should be announced, in seconds
message // body of the message
author = "NanoTrasen Editor"
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
can_be_redacted = 0
revolution_inciting_event
@@ -65,7 +65,7 @@
round_time = 60 * 50
found_ssd
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Doctor Eric Hanfield"
message = {"Several people have been found unconscious at their terminals. It is thought that it was due
@@ -77,7 +77,7 @@
lotus_tree
explosions
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Reporter Leland H. Howards"
message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the
@@ -91,7 +91,7 @@
food_riots
breaking_news
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Reporter Ro'kii Ar-Raqis"
message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae
@@ -102,7 +102,7 @@
round_time = 60 * 10
more
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Reporter Ro'kii Ar-Raqis"
message = {"More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from
+3 -5
View File
@@ -224,11 +224,9 @@ mob/living/carbon/human/airflow_hit(atom/A)
// for(var/mob/M in hearers(src))
// M.show_message("\red <B>[src] slams into [A]!</B>",1,"\red You hear a loud slam!",2)
playsound(src.loc, "punch", 25, 1, -1)
loc:add_blood(src)
if (src.wear_suit)
src.wear_suit.add_blood(src)
if (src.w_uniform)
src.w_uniform.add_blood(src)
if (prob(33))
loc:add_blood(src)
bloody_body(src)
var/b_loss = airflow_speed * vsc.airflow_damage
var/blocked = run_armor_check("head","melee")
+3
View File
@@ -205,6 +205,9 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid, forc
else
total_fuel += liquid.amount
if(total_fuel == 0)
return 0
//Calculate the firelevel.
var/firelevel = calculate_firelevel(liquid)
+1
View File
@@ -142,6 +142,7 @@ obj/var/contaminated = 0
if(wear_suit.flags & PHORONGUARD) return 1
else
if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1
//should check HIDETAIL as well, but for the moment tails are not a part that can be damaged separately
return 0
/mob/living/carbon/human/proc/suit_contamination()
+31 -1
View File
@@ -192,7 +192,7 @@ var/global/vs_control/vsc = new
/vs_control/proc/SetDefault(var/mob/user)
var/list/setting_choices = list("Phoron - Standard", "Phoron - Low Hazard", "Phoron - High Hazard", "Phoron - Oh Shit!",\
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish")
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish", "ZAS/Phoron - Initial")
var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
if(!def)
return
@@ -290,6 +290,36 @@ var/global/vs_control/vsc = new
airflow_mob_slowdown = 3
connection_insulation = 0
if("ZAS/Phoron - Initial")
fire_consuption_rate = initial(fire_consuption_rate)
fire_firelevel_multiplier = initial(fire_firelevel_multiplier)
fire_fuel_energy_release = initial(fire_fuel_energy_release)
IgnitionLevel = initial(IgnitionLevel)
airflow_lightest_pressure = initial(airflow_lightest_pressure)
airflow_light_pressure = initial(airflow_light_pressure)
airflow_medium_pressure = initial(airflow_medium_pressure)
airflow_heavy_pressure = initial(airflow_heavy_pressure)
airflow_dense_pressure = initial(airflow_dense_pressure)
airflow_stun_pressure = initial(airflow_stun_pressure)
airflow_stun_cooldown = initial(airflow_stun_cooldown)
airflow_stun = initial(airflow_stun)
airflow_damage = initial(airflow_damage)
airflow_speed_decay = initial(airflow_speed_decay)
airflow_delay = initial(airflow_delay)
airflow_mob_slowdown = initial(airflow_mob_slowdown)
connection_insulation = initial(connection_insulation)
connection_temperature_delta = initial(connection_temperature_delta)
plc.PHORON_DMG = initial(plc.PHORON_DMG)
plc.CLOTH_CONTAMINATION = initial(plc.CLOTH_CONTAMINATION)
plc.PHORONGUARD_ONLY = initial(plc.PHORONGUARD_ONLY)
plc.GENETIC_CORRUPTION = initial(plc.GENETIC_CORRUPTION)
plc.SKIN_BURNS = initial(plc.SKIN_BURNS)
plc.EYE_BURNS = initial(plc.EYE_BURNS)
plc.CONTAMINATION_LOSS = initial(plc.CONTAMINATION_LOSS)
plc.PHORON_HALLUCINATION = initial(plc.PHORON_HALLUCINATION)
plc.N2O_HALLUCINATION = initial(plc.N2O_HALLUCINATION)
world << "\blue <b>[key_name(user)] changed the global phoron/ZAS settings to \"[def]\"</b>"
+8
View File
@@ -22,6 +22,7 @@ var/global/list/joblist = list() //list of all jobstypes, minus borg and AI
//Languages/species/whitelist.
var/global/list/all_species[0]
var/global/list/all_languages[0]
var/global/list/language_keys[0] //table of say codes for all languages
var/global/list/whitelisted_species = list("Human")
// Posters
@@ -99,10 +100,17 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
for(var/T in paths)
var/datum/language/L = new T
all_languages[L.name] = L
for (var/language_name in all_languages)
var/datum/language/L = all_languages[language_name]
language_keys[":[lowertext(L.key)]"] = L
var/rkey = 0
paths = typesof(/datum/species)-/datum/species
for(var/T in paths)
rkey++
var/datum/species/S = new T
S.race_key = rkey //Used in mob icon caching.
all_species[S.name] = S
if(S.flags & IS_WHITELISTED)
+25
View File
@@ -297,6 +297,31 @@ proc/listclearnulls(list/list)
return (result + R.Copy(Ri, 0))
// List of lists, sorts by element[key] - for things like crew monitoring computer sorting records by name.
/proc/sortByKey(var/list/L, var/key)
if(L.len < 2)
return L
var/middle = L.len / 2 + 1
return mergeKeyedLists(sortByKey(L.Copy(0, middle), key), sortByKey(L.Copy(middle), key), key)
/proc/mergeKeyedLists(var/list/L, var/list/R, var/key)
var/Li=1
var/Ri=1
var/list/result = new()
while(Li <= L.len && Ri <= R.len)
if(sorttext(L[Li][key], R[Ri][key]) < 1)
// Works around list += list2 merging lists; it's not pretty but it works
result += "temp item"
result[result.len] = R[Ri++]
else
result += "temp item"
result[result.len] = L[Li++]
if(Li <= L.len)
return (result + L.Copy(Li, 0))
return (result + R.Copy(Ri, 0))
//Mergesort: any value in a list, preserves key=value structure
/proc/sortAssoc(var/list/L)
if(L.len < 2)
+4 -1
View File
@@ -43,6 +43,9 @@ var/religion_name = null
return capitalize(name)
/proc/system_name()
return "Nyx"
/proc/station_name()
if (station_name)
return station_name
@@ -308,4 +311,4 @@ var/syndicate_code_response//Code response for traitors.
if(5)
return
*/
*/
+6
View File
@@ -1,3 +1,9 @@
#define SECOND *10
#define SECONDS *10
#define MINUTE *600
#define MINUTES *600
//Returns the world time in english
proc/worldtime2text(time = world.time)
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
+1
View File
@@ -315,6 +315,7 @@ proc/tg_list2text(list/list, glue=",")
if(rights & R_SOUNDS) . += "[seperator]+SOUND"
if(rights & R_SPAWN) . += "[seperator]+SPAWN"
if(rights & R_MOD) . += "[seperator]+MODERATOR"
if(rights & R_MENTOR) . += "[seperator]+MENTOR"
return .
/proc/ui_style2icon(ui_style)
+34 -32
View File
@@ -352,7 +352,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/select = null
var/list/borgs = list()
for (var/mob/living/silicon/robot/A in player_list)
if (A.stat == 2 || A.connected_ai || A.scrambledcodes)
if (A.stat == 2 || A.connected_ai || A.scrambledcodes || istype(A,/mob/living/silicon/robot/drone))
continue
var/name = "[A.real_name] ([A.modtype] [A.braintype])"
borgs[name] = A
@@ -493,7 +493,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
return -M
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1)
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1, var/highlight_special_characters = 1)
var/mob/M
var/client/C
var/key
@@ -531,10 +531,18 @@ Turf and target are seperate in case you want to teleport some distance from a t
. += "*no key*"
if(include_name && M)
var/name
if(M.real_name)
. += "/([M.real_name])"
name = M.real_name
else if(M.name)
. += "/([M.name])"
name = M.name
if(include_link && is_special_character(M) && highlight_special_characters)
. += "/(<font color='#FFA500'>[name]</font>)" //Orange
else
. += "/([name])"
return .
@@ -542,14 +550,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
return key_name(whom, 1, include_name)
//Will return the location of the turf an atom is ultimatly sitting on
/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
//in case they're in a closet or sleeper or something
var/atom/loc = M.loc
while(!istype(loc, /turf/))
loc = loc.loc
return loc
// returns the turf located at the map edge in the specified direction relative to A
// used for mass driver
/proc/get_edge_target_turf(var/atom/A, var/direction)
@@ -720,14 +720,15 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
return 0
var/delayfraction = round(delay/numticks)
var/turf/T = get_turf(user)
var/original_loc = user.loc
var/original_turf = get_turf(user)
var/holding = user.get_active_hand()
for(var/i = 0, i<numticks, i++)
sleep(delayfraction)
if(!user || user.stat || user.weakened || user.stunned || !(user.loc == T))
if(!user || user.stat || user.weakened || user.stunned || user.loc != original_loc || get_turf(user) != original_turf)
return 0
if(needhand && !(user.get_active_hand() == holding)) //Sometimes you don't want the user to have to keep their active hand
return 0
@@ -1159,8 +1160,9 @@ proc/get_mob_with_client_list()
else if (zone == "r_foot") return "right foot"
else return zone
/proc/get_turf(turf/location)
//gets the turf the atom is located in (or itself, if it is a turf).
//returns null if the atom is not in a turf.
/proc/get_turf(atom/location)
while(location)
if(isturf(location))
return location
@@ -1265,8 +1267,21 @@ proc/is_hot(obj/item/W as obj)
return 0
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
//Whether or not the given item counts as sharp in terms of dealing damage
/proc/is_sharp(obj/O as obj)
if (!O) return 0
if (O.sharp) return 1
if (O.edge) return 1
return 0
//Whether or not the given item counts as cutting with an edge in terms of removing limbs
/proc/has_edge(obj/O as obj)
if (!O) return 0
if (O.edge) return 1
return 0
//Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape.
/proc/can_puncture(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
if(!W) return 0
if(W.sharp) return 1
return ( \
@@ -1277,20 +1292,7 @@ proc/is_hot(obj/item/W as obj)
istype(W, /obj/item/weapon/lighter/zippo) || \
istype(W, /obj/item/weapon/match) || \
istype(W, /obj/item/clothing/mask/cigarette) || \
istype(W, /obj/item/weapon/wirecutters) || \
istype(W, /obj/item/weapon/circular_saw) || \
istype(W, /obj/item/weapon/melee/energy/sword) || \
istype(W, /obj/item/weapon/melee/energy/blade) || \
istype(W, /obj/item/weapon/shovel) || \
istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/butch) || \
istype(W, /obj/item/weapon/scalpel) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
istype(W, /obj/item/weapon/shard) || \
istype(W, /obj/item/weapon/broken_bottle) || \
istype(W, /obj/item/weapon/reagent_containers/syringe) || \
istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \
istype(W, /obj/item/weapon/twohanded/fireaxe) \
istype(W, /obj/item/weapon/shovel) \
)
/proc/is_surgery_tool(obj/item/W as obj)
+21 -1
View File
@@ -55,6 +55,21 @@
return 1 // we don't care about our own density
return 0
/*
Quick adjacency (to turf):
* If you are in the same turf, always true
* If you are not adjacent, then false
*/
/turf/proc/AdjacentQuick(var/atom/neighbor, var/atom/target = null)
var/turf/T0 = get_turf(neighbor)
if(T0 == src)
return 1
if(get_dist(src,T0) > 1)
return 0
return 1
/*
Adjacency (to anything else):
* Must be on a turf
@@ -108,7 +123,12 @@
if( O.flags&ON_BORDER) // windows have throwpass but are on border, check them first
if( O.dir & target_dir || O.dir&(O.dir-1) ) // full tile windows are just diagonals mechanically
return 0
var/obj/structure/window/W = target_atom
if(istype(W))
if(!W.is_fulltile()) //exception for breaking full tile windows on top of single pane windows
return 0
else
return 0
else if( !border_only ) // dense, not on border, cannot pass over
return 0
+6 -4
View File
@@ -92,8 +92,9 @@
return
// operate two levels deep here (item in backpack in src; NOT item in box in backpack in src)
if(A == loc || (A in loc) || (A in contents) || (A.loc in contents))
// operate two STORAGE levels deep here (item in backpack in src; NOT item in box in backpack in src)
var/sdepth = A.storage_depth(src)
if(A == loc || (A in loc) || (sdepth != -1 && sdepth <= 1))
// faster access to objects already on you
if(A in contents)
@@ -117,7 +118,8 @@
return
// Allows you to click on a box's contents, if that box is on the ground, but no deeper than that
if(isturf(A) || isturf(A.loc) || (A.loc && isturf(A.loc.loc)))
sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
next_move = world.time + 10
if(A.Adjacent(src)) // see adjacent.dm
@@ -245,7 +247,7 @@
/atom/proc/AltClick(var/mob/user)
var/turf/T = get_turf(src)
if(T && T.Adjacent(user))
if(T && T.AdjacentQuick(user))
if(user.listed_turf == T)
user.listed_turf = null
else
-3
View File
@@ -36,9 +36,6 @@
if(istype(master, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = master
S.close(usr)
else if(istype(master,/obj/item/clothing/suit/storage))
var/obj/item/clothing/suit/storage/S = master
S.close(usr)
return 1
+19 -2
View File
@@ -40,7 +40,7 @@
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/objectives_disabled = 0 //if objectives are disabled or not
var/protect_roles_from_antagonist = 0// If security and such can be traitor/cult/other
var/continous_rounds = 1 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/allow_Metadata = 0 // Metadata is supported.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/Ticklag = 0.9
@@ -60,6 +60,7 @@
var/respawn = 1
var/guest_jobban = 1
var/usewhitelist = 0
var/mods_are_mentors = 0
var/kick_inactive = 0 //force disconnect for inactive players
var/load_jobs_from_txt = 0
var/ToRban = 0
@@ -69,6 +70,10 @@
var/cult_ghostwriter = 1 //Allows ghosts to write in blood in cult rounds...
var/cult_ghostwriter_req_cultists = 10 //...so long as this many cultists are active.
var/max_maint_drones = 5 //This many drones can spawn,
var/allow_drone_spawn = 1 //assuming the admin allow them to.
var/drone_build_time = 1200 //A drone will become available every X ticks since last drone spawn. Default is 2 minutes.
var/disable_player_mice = 0
var/uneducated_mice = 0 //Set to 1 to prevent newly-spawned mice from understanding human speech
@@ -252,6 +257,9 @@
if ("log_runtime")
config.log_runtime = 1
if ("mentors")
config.mods_are_mentors = 1
if("allow_admin_ooccolor")
config.allow_admin_ooccolor = 1
@@ -481,7 +489,16 @@
config.cult_ghostwriter = 1
if("req_cult_ghostwriter")
config.cult_ghostwriter_req_cultists = value
config.cult_ghostwriter_req_cultists = text2num(value)
if("allow_drone_spawn")
config.allow_drone_spawn = text2num(value)
if("drone_build_time")
config.drone_build_time = text2num(value)
if("max_maint_drones")
config.max_maint_drones = text2num(value)
else
log_misc("Unknown setting in configuration: '[name]'")
+70
View File
@@ -15,3 +15,73 @@
* Called in gameticker.dm when a round ends.
*/
/hook/roundend
/**
* Death hook.
* Called in death.dm when someone dies.
* Parameters: var/mob/living/carbon/human, var/gibbed
*/
/hook/death
/**
* Cloning hook.
* Called in cloning.dm when someone is brought back by the wonders of modern science.
* Parameters: var/mob/living/carbon/human
*/
/hook/clone
/**
* Debrained hook.
* Called in brain_item.dm when someone gets debrained.
* Parameters: var/obj/item/brain
*/
/hook/debrain
/**
* Borged hook.
* Called in robot_parts.dm when someone gets turned into a cyborg.
* Parameters: var/mob/living/silicon/robot
*/
/hook/borgify
/**
* Podman hook.
* Called in podmen.dm when someone is brought back as a Diona.
* Parameters: var/mob/living/carbon/monkey/diona
*/
/hook/harvest_podman
/**
* Payroll revoked hook.
* Called in Accounts_DB.dm when someone's payroll is stolen at the Accounts terminal.
* Parameters: var/datum/money_account
*/
/hook/revoke_payroll
/**
* Account suspension hook.
* Called in Accounts_DB.dm when someone's account is suspended or unsuspended at the Accounts terminal.
* Parameters: var/datum/money_account
*/
/hook/change_account_status
/**
* Employee reassignment hook.
* Called in card.dm when someone's card is reassigned at the HoP's desk.
* Parameters: var/obj/item/weapon/card/id
*/
/hook/reassign_employee
/**
* Employee terminated hook.
* Called in card.dm when someone's card is terminated at the HoP's desk.
* Parameters: var/obj/item/weapon/card/id
*/
/hook/terminate_employee
/**
* Crate sold hook.
* Called in supplyshuttle.dm when a crate is sold on the shuttle.
* Parameters: var/obj/structure/closet/crate/sold, var/area/shuttle
*/
/hook/sell_crate
+2 -2
View File
@@ -23,7 +23,7 @@
* @param hook Identifier of the hook to call.
* @returns 1 if all hooked code runs successfully, 0 otherwise.
*/
/proc/callHook(hook)
/proc/callHook(hook, list/args=null)
var/hook_path = text2path("/hook/[hook]")
if(!hook_path)
error("Invalid hook '/hook/[hook]' called.")
@@ -32,7 +32,7 @@
var/caller = new hook_path
var/status = 1
for(var/P in typesof("[hook_path]/proc"))
if(!call(caller, P)())
if(!call(caller, P)(arglist(args)))
error("Hook '[P]' failed or runtimed.")
status = 0
+17 -5
View File
@@ -32,6 +32,8 @@ datum/controller/game_controller
var/last_thing_processed
var/mob/list/expensive_mobs = list()
var/rebuild_active_areas = 0
var/list/shuttle_list //for debugging and VV
datum/controller/game_controller/New()
//There can be only one master_controller. Out with the old and in with the new.
@@ -65,6 +67,9 @@ datum/controller/game_controller/proc/setup()
if(!ticker)
ticker = new /datum/controller/gameticker()
if(!shuttles) setup_shuttles()
shuttle_list = shuttles
setup_objects()
setupgenetics()
setupfactions()
@@ -76,6 +81,10 @@ datum/controller/game_controller/proc/setup()
for(var/i=0, i<max_secret_rooms, i++)
make_mining_asteroid_secret()
//Create the mining ore distribution map.
var/datum/ore_distribution/O = new()
O.populate_distribution_map()
spawn(0)
if(ticker)
ticker.pregame()
@@ -254,6 +263,10 @@ datum/controller/game_controller/proc/process_diseases()
active_diseases.Cut(i,i+1)
datum/controller/game_controller/proc/process_machines()
process_machines_process()
process_machines_power()
process_machines_rebuild()
datum/controller/game_controller/proc/process_machines_process()
var/i = 1
while(i<=machines.len)
var/obj/machinery/Machine = machines[i]
@@ -265,7 +278,8 @@ datum/controller/game_controller/proc/process_machines()
continue
machines.Cut(i,i+1)
i=1
datum/controller/game_controller/proc/process_machines_power()
var/i=1
while(i<=active_areas.len)
var/area/A = active_areas[i]
if(A.powerupdate && A.master == A)
@@ -275,7 +289,7 @@ datum/controller/game_controller/proc/process_machines()
if(M)
if(M.use_power)
M.auto_use_power()
if(A.apc.len && A.master == A)
i++
continue
@@ -283,7 +297,7 @@ datum/controller/game_controller/proc/process_machines()
A.powerupdate = 0
active_areas.Cut(i,i+1)
datum/controller/game_controller/proc/process_machines_rebuild()
if(controller_iteration % 150 == 0 || rebuild_active_areas) //Every 300 seconds we retest every area/machine
for(var/area/A in all_areas)
if(A == A.master)
@@ -291,8 +305,6 @@ datum/controller/game_controller/proc/process_machines()
active_areas |= A
rebuild_active_areas = 0
datum/controller/game_controller/proc/process_objects()
var/i = 1
+19 -13
View File
@@ -11,7 +11,7 @@
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
datum/shuttle_controller
datum/shuttle_controller/emergency_shuttle
var/alert = 0 //0 = emergency, 1 = crew cycle
var/location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
@@ -36,7 +36,7 @@ datum/shuttle_controller
if(direction == -1)
setdirection(1)
else
settimeleft(SHUTTLEARRIVETIME*coeff)
settimeleft(get_shuttle_arrive_time()*coeff)
online = 1
if(always_fake_recall)
fake_recall = rand(300,500) //turning on the red lights in hallways
@@ -45,15 +45,21 @@ datum/shuttle_controller
if(istype(A, /area/hallway))
A.readyalert()
datum/shuttle_controller/proc/shuttlealert(var/X)
proc/get_shuttle_arrive_time()
// During mutiny rounds, the shuttle takes twice as long.
if(ticker && istype(ticker.mode,/datum/game_mode/mutiny))
return SHUTTLEARRIVETIME * 2
return SHUTTLEARRIVETIME
datum/shuttle_controller/emergency_shuttle/proc/shuttlealert(var/X)
alert = X
datum/shuttle_controller/proc/recall()
datum/shuttle_controller/emergency_shuttle/proc/recall()
if(direction == 1)
var/timeleft = timeleft()
if(alert == 0)
if(timeleft >= 600)
if(timeleft >= get_shuttle_arrive_time())
return
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
@@ -72,33 +78,33 @@ datum/shuttle_controller/proc/recall()
// returns the time (in seconds) before shuttle arrival
// note if direction = -1, gives a count-up to SHUTTLEARRIVETIME
datum/shuttle_controller/proc/timeleft()
datum/shuttle_controller/emergency_shuttle/proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
if(direction == 1 || direction == 2)
return timeleft
else
return SHUTTLEARRIVETIME-timeleft
return get_shuttle_arrive_time()-timeleft
else
return SHUTTLEARRIVETIME
return get_shuttle_arrive_time()
// sets the time left to a given delay (in seconds)
datum/shuttle_controller/proc/settimeleft(var/delay)
datum/shuttle_controller/emergency_shuttle/proc/settimeleft(var/delay)
endtime = world.timeofday + delay * 10
timelimit = delay
// sets the shuttle direction
// 1 = towards SS13, -1 = back to centcom
datum/shuttle_controller/proc/setdirection(var/dirn)
datum/shuttle_controller/emergency_shuttle/proc/setdirection(var/dirn)
if(direction == dirn)
return
direction = dirn
// if changing direction, flip the timeleft by SHUTTLEARRIVETIME
var/ticksleft = endtime - world.timeofday
endtime = world.timeofday + (SHUTTLEARRIVETIME*10 - ticksleft)
endtime = world.timeofday + (get_shuttle_arrive_time()*10 - ticksleft)
return
datum/shuttle_controller/proc/process()
datum/shuttle_controller/emergency_shuttle/proc/process()
datum/shuttle_controller/emergency_shuttle/process()
if(!online)
+4 -3
View File
@@ -163,13 +163,14 @@ datum/controller/vote
restart = 1
else
master_mode = .
if(!going)
going = 1
world << "<font color='red'><b>The round will start soon.</b></font>"
if("crew_transfer")
if(. == "Initiate Crew Transfer")
init_shift_change(null, 1)
if(mode == "gamemode") //fire this even if the vote fails.
if(!going)
going = 1
world << "<font color='red'><b>The round will start soon.</b></font>"
if(restart)
world << "World restarting due to vote..."
+5
View File
@@ -79,6 +79,11 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
add_inherent_law("You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.")
add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.")
/datum/ai_laws/drone/New()
..()
add_inherent_law("Preserve, repair and improve the station to the best of your abilities.")
add_inherent_law("Cause no harm to the station or anything on it.")
add_inherent_law("Interfere with no being that is not a fellow drone.")
/* General ai_law functions */
+6 -1
View File
@@ -154,6 +154,11 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
else
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
// Skin color
if(H.species.flags & HAS_SKIN_TONE)
if(!H.species || H.species.flags & HAS_SKIN_COLOR)
preview_icon.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
@@ -210,7 +215,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
if("Scientist")
clothes_s = new /icon('icons/mob/uniform.dmi', "rndswhite_s")
clothes_s = new /icon('icons/mob/uniform.dmi', "sciencewhite_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_tox_open"), ICON_OVERLAY)
if("Chemist")
+13 -1
View File
@@ -245,7 +245,8 @@ client
if(ismob(D))
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give Disease</option>"
body += "<option value='?_src_=vars;give_disease2=\ref[D]'>Give Disease</option>"
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give TG-style Disease</option>"
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
@@ -494,6 +495,17 @@ client
src.give_disease(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease2"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease2"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease2(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["ninja"])
if(!check_rights(R_SPAWN)) return
+5
View File
@@ -17,6 +17,11 @@
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded
for(var/mob/living/target in targets)
spawn(0)
if(target.buckled)
var/obj/structure/stool/bed/buckled_to = target.buckled.
buckled_to.unbuckle()
var/mobloc = get_turf(target.loc)
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )
+15 -4
View File
@@ -28,12 +28,23 @@
user << "<span class='notice'>They are too far away!</span>"
return
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.canremove = 0 //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
var/obj/item/clothing/mask/horsehead/magic/magichead = new /obj/item/clothing/mask/horsehead/magic
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
target.equip_to_slot(magichead, slot_wear_mask)
flick("e_flash", target.flash)
//item used by the horsehead spell
/obj/item/clothing/mask/horsehead/magic
//flags_inv = null //so you can still see their face... no. How can you recognize someone when their face is completely different?
voicechange = 1 //NEEEEIIGHH
dropped(mob/user as mob)
canremove = 1
..()
equipped(var/mob/user, var/slot)
if (slot == slot_wear_mask)
canremove = 0 //curses!
..()
+1 -1
View File
@@ -14,6 +14,6 @@
for(var/obj/machinery/door/door in T.contents)
spawn(1)
if(istype(door,/obj/machinery/door/airlock))
door:locked = 0
door:unlock(1) //forced because it's magic!
door.open()
return
+265 -31
View File
@@ -97,17 +97,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/beanbagammo
name = "Beanbag shells"
contains = list(/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag)
cost = 10
contains = list(/obj/item/weapon/storage/box/beanbags,
/obj/item/weapon/storage/box/beanbags,
/obj/item/weapon/storage/box/beanbags)
cost = 30
containertype = /obj/structure/closet/crate
containername = "Beanbag shells"
group = "Security"
@@ -179,7 +172,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Emergency crate"
group = "Engineering"
/datum/supply_packs/evacuation
/datum/supply_packs/inflatable
name = "Inflatable barriers"
contains = list(/obj/item/weapon/storage/briefcase/inflatable,
/obj/item/weapon/storage/briefcase/inflatable,
@@ -638,14 +631,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/eweapons
name = "Experimental weapons crate"
contains = list(/obj/item/weapon/flamethrower/full,
/obj/item/weapon/tank/phoron,
/obj/item/weapon/tank/phoron,
/obj/item/weapon/tank/phoron,
/obj/item/weapon/grenade/chem_grenade/incendiary,
/obj/item/weapon/grenade/chem_grenade/incendiary,
/obj/item/weapon/grenade/chem_grenade/incendiary)
cost = 25
contains = list(/obj/item/weapon/gun/energy/xray,
/obj/item/weapon/gun/energy/xray,
/obj/item/weapon/shield/energy,
/obj/item/weapon/shield/energy,
/obj/item/clothing/suit/armor/laserproof,
/obj/item/clothing/suit/armor/laserproof)
cost = 125
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Experimental weapons crate"
access = access_heads
@@ -724,17 +716,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/shotgunammo
name = "Shotgun shells"
contains = list(/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_casing/shotgun)
cost = 20
contains = list(/obj/item/weapon/storage/box/shotgunammo,
/obj/item/weapon/storage/box/shotgunammo,
/obj/item/weapon/storage/box/shotgunammo)
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "Shotgun shells"
access = access_armory
@@ -1112,3 +1097,252 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Beekeeping crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/cardboard_sheets
contains = list(/obj/item/stack/sheet/cardboard)
name = "50 cardboard sheets"
amount = 50
cost = 10
containertype = /obj/structure/closet/crate
containername = "Cardboard sheets crate"
group = "Miscellaneous"
/datum/supply_packs/bureaucracy
contains = list(/obj/item/weapon/clipboard,
/obj/item/weapon/clipboard,
/obj/item/weapon/pen/red,
/obj/item/weapon/pen/blue,
/obj/item/weapon/pen/blue,
/obj/item/device/camera_film,
/obj/item/weapon/folder/blue,
/obj/item/weapon/folder/red,
/obj/item/weapon/folder/yellow,
/obj/item/weapon/hand_labeler,
/obj/structure/filingcabinet/chestdrawer{anchored = 0},
/obj/item/weapon/paper_bin)
name = "Office supplies"
cost = 15
containertype = /obj/structure/closet/crate
containername = "Office supplies crate"
group = "Supply"
/datum/supply_packs/radsuit
contains = list(/obj/item/clothing/suit/radiation,
/obj/item/clothing/suit/radiation,
/obj/item/clothing/suit/radiation,
/obj/item/clothing/head/radiation,
/obj/item/clothing/head/radiation,
/obj/item/clothing/head/radiation)
name = "Radiation suits package"
cost = 20
containertype = /obj/structure/closet/radiation
containername = "Radiation suit locker"
group = "Engineering"
/datum/supply_packs/tactical
name = "Tactical suits"
containertype = /obj/structure/closet/crate/secure
containername = "Tactical Suit Locker"
cost = 45
group = "Security"
access = access_armory
contains = list(/obj/item/clothing/under/tactical,
/obj/item/clothing/suit/armor/tactical,
/obj/item/clothing/head/helmet/tactical,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
/obj/item/weapon/storage/belt/security/tactical,
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/gloves/black,
/obj/item/clothing/under/tactical,
/obj/item/clothing/suit/armor/tactical,
/obj/item/clothing/head/helmet/tactical,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
/obj/item/weapon/storage/belt/security/tactical,
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/gloves/black,
/obj/item/clothing/under/tactical,
/obj/item/clothing/suit/armor/tactical,
/obj/item/clothing/head/helmet/tactical,
/obj/item/clothing/mask/balaclava/tactical,
/obj/item/clothing/glasses/sunglasses/sechud/tactical,
/obj/item/weapon/storage/belt/security/tactical,
/obj/item/clothing/shoes/jackboots,
/obj/item/clothing/gloves/black)
/datum/supply_packs/carpet
name = "Imported carpet"
containertype = /obj/structure/closet
containername = "Imported carpet crate"
cost = 15
group = "Miscellaneous"
contains = list(/obj/item/stack/tile/carpet)
amount = 50
/datum/supply_packs/hydrotray
name = "Empty hydroponics tray"
cost = 30
containertype = /obj/structure/closet/crate/hydroponics
containername = "Hydroponics tray crate"
group = "Hydroponics"
contains = list(/obj/machinery/hydroponics{anchored = 0})
access = access_hydroponics
/datum/supply_packs/canister_empty
name = "Empty gas canister"
cost = 7
containername = "Empty gas canister crate"
containertype = /obj/structure/largecrate
contains = list(/obj/machinery/portable_atmospherics/canister)
group = "Engineering"
/datum/supply_packs/canister_air
name = "Air canister"
cost = 10
containername = "Air canister crate"
containertype = /obj/structure/largecrate
group = "Engineering"
contains = list(/obj/machinery/portable_atmospherics/canister/air)
/datum/supply_packs/canister_oxygen
name = "Oxygen canister"
cost = 15
containername = "Oxygen canister crate"
containertype = /obj/structure/largecrate
group = "Engineering"
contains = list(/obj/machinery/portable_atmospherics/canister/oxygen)
/datum/supply_packs/canister_nitrogen
name = "Nitrogen canister"
cost = 10
containername = "Nitrogen canister crate"
containertype = /obj/structure/largecrate
group = "Engineering"
contains = list(/obj/machinery/portable_atmospherics/canister/nitrogen)
/datum/supply_packs/canister_phoron
name = "Phoron gas canister"
cost = 60
containername = "Phoron gas canister crate"
containertype = /obj/structure/closet/crate/secure/large
access = access_atmospherics
group = "Engineering"
contains = list(/obj/machinery/portable_atmospherics/canister/phoron)
/datum/supply_packs/canister_sleeping_agent
name = "N2O gas canister"
cost = 40
containername = "N2O gas canister crate"
containertype = /obj/structure/closet/crate/secure/large
access = access_atmospherics
group = "Engineering"
contains = list(/obj/machinery/portable_atmospherics/canister/sleeping_agent)
/datum/supply_packs/canister_carbon_dioxide
name = "Carbon dioxide gas canister"
cost = 40
containername = "CO2 canister crate"
containertype = /obj/structure/closet/crate/secure/large
access = access_atmospherics
group = "Engineering"
contains = list(/obj/machinery/portable_atmospherics/canister/carbon_dioxide)
/datum/supply_packs/pacman_parts
name = "P.A.C.M.A.N. portable generator parts"
cost = 45
containername = "P.A.C.M.A.N. Portable Generator Construction Kit"
containertype = /obj/structure/closet/crate/secure
group = "Engineering"
access = access_tech_storage
contains = list(/obj/item/weapon/stock_parts/micro_laser,
/obj/item/weapon/stock_parts/capacitor,
/obj/item/weapon/stock_parts/matter_bin,
/obj/item/weapon/circuitboard/pacman)
/datum/supply_packs/pacman_parts
name = "Super P.A.C.M.A.N. portable generator parts"
cost = 55
containername = "Super P.A.C.M.A.N. portable generator construction kit"
containertype = /obj/structure/closet/crate/secure
group = "Engineering"
access = access_tech_storage
contains = list(/obj/item/weapon/stock_parts/micro_laser,
/obj/item/weapon/stock_parts/capacitor,
/obj/item/weapon/stock_parts/matter_bin,
/obj/item/weapon/circuitboard/pacman/super)
/datum/supply_packs/witch
name = "Witch costume"
containername = "Witch costume"
containertype = /obj/structure/closet
cost = 20
contains = list(/obj/item/clothing/suit/wizrobe/marisa/fake,
/obj/item/clothing/shoes/sandal,
/obj/item/clothing/head/wizard/marisa/fake,
/obj/item/weapon/staff/broom)
group = "Miscellaneous"
/datum/supply_packs/randomised/costume_hats
name = "Costume hats"
containername = "Actor hats crate"
containertype = /obj/structure/closet
cost = 10
num_contained = 2
contains = list(/obj/item/clothing/head/redcoat,
/obj/item/clothing/head/mailman,
/obj/item/clothing/head/plaguedoctorhat,
/obj/item/clothing/head/pirate,
/obj/item/clothing/head/hasturhood,
/obj/item/clothing/head/powdered_wig,
/obj/item/clothing/head/hairflower,
/obj/item/clothing/mask/gas/owl_mask,
/obj/item/clothing/mask/gas/monkeymask,
/obj/item/clothing/head/helmet/gladiator,
/obj/item/clothing/head/ushanka)
group = "Miscellaneous"
access = access_theatre
/datum/supply_packs/randomised/webbing
name = "Webbing crate"
num_contained = 1
contains = list(/obj/item/clothing/tie/holster,
/obj/item/clothing/tie/storage/brown_vest,
/obj/item/clothing/tie/storage/webbing,
/obj/item/clothing/tie/storage)
cost = 15
containertype = /obj/structure/closet/crate
containername = "Webbing crate"
group = "Operations"
/datum/supply_packs/spare_pda
name = "Spare PDAs"
cost = 10
containertype = /obj/structure/closet/crate
containername = "Spare PDA crate"
group = "Supply"
contains = list(/obj/item/device/pda,
/obj/item/device/pda,
/obj/item/device/pda)
/datum/supply_packs/randomised/dresses
name = "Womens formal dress locker"
containername = "Pretty dress locker"
containertype = /obj/structure/closet
cost = 15
num_contained = 1
contains = list(/obj/item/clothing/under/wedding/bride_orange,
/obj/item/clothing/under/wedding/bride_purple,
/obj/item/clothing/under/wedding/bride_blue,
/obj/item/clothing/under/wedding/bride_red,
/obj/item/clothing/under/wedding/bride_white,
/obj/item/clothing/under/sundress,
/obj/item/clothing/under/dress/dress_green,
/obj/item/clothing/under/dress/dress_pink,
/obj/item/clothing/under/dress/dress_orange,
/obj/item/clothing/under/dress/dress_yellow,
/obj/item/clothing/under/dress/dress_saloon)
group = "Miscellaneous"
+41 -107
View File
@@ -20,7 +20,7 @@
opacity = 0
density = 0
anchored = 0.0
var/matter = 0
var/stored_matter = 0
var/mode = 1
flags = TABLEPASS
w_class = 3.0
@@ -36,17 +36,6 @@
throw_speed = 4
throw_range = 20
/obj/item/weapon/corncob
name = "corn cob"
desc = "A reminder of meals gone by."
icon = 'icons/obj/harvest.dmi'
icon_state = "corncob"
item_state = "corncob"
w_class = 2.0
throwforce = 0
throw_speed = 4
throw_range = 20
/obj/item/weapon/soap
name = "soap"
desc = "A cheap bar of soap. Doesn't smell."
@@ -105,7 +94,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
m_amt = 50
matter = list("metal" = 50)
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
/obj/item/weapon/disk
@@ -221,19 +210,20 @@
icon = 'icons/obj/items.dmi'
icon_state = "rack_parts"
flags = FPRINT | TABLEPASS| CONDUCT
m_amt = 3750
matter = list("metal" = 3750)
/obj/item/weapon/shard
name = "shard"
icon = 'icons/obj/shards.dmi'
icon_state = "large"
sharp = 1
edge = 1
desc = "Could probably be used as ... a throwing weapon?"
w_class = 2.0
force = 5.0
throwforce = 8.0
item_state = "shard-glass"
g_amt = 3750
matter = list("glass" = 3750)
attack_verb = list("stabbed", "slashed", "sliced", "cut")
suicide_act(mob/user)
@@ -261,7 +251,7 @@
item_state = "radio"
throw_speed = 4
throw_range = 20
m_amt = 100
matter = list("metal" = 100
origin_tech = "magnets=2;syndicate=3"*/
/obj/item/weapon/shard/shrapnel
@@ -303,7 +293,7 @@
w_class = 2.0
throw_speed = 4
throw_range = 20
m_amt = 100
matter = list("metal" = 100)
origin_tech = "magnets=1"
/obj/item/weapon/staff
@@ -351,7 +341,7 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
m_amt = 3750
matter = list("metal" = 3750)
flags = FPRINT | TABLEPASS| CONDUCT
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
@@ -360,7 +350,7 @@
desc = "Hard table parts. Well...harder..."
icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
m_amt = 7500
matter = list("metal" = 7500)
flags = FPRINT | TABLEPASS| CONDUCT
/obj/item/weapon/table_parts/wood
@@ -377,7 +367,7 @@
var/amount = 1.0
var/laying = 0.0
var/old_lay = null
m_amt = 40
matter = list("metal" = 40)
attack_verb = list("whipped", "lashed", "disciplined", "tickled")
suicide_act(mob/user)
@@ -401,8 +391,14 @@
name = "power control module"
icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control."
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/obj/item/weapon/module/power_control/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if (istype(W, /obj/item/device/multitool))
var/obj/item/weapon/circuitboard/ghettosmes/newcircuit = new/obj/item/weapon/circuitboard/ghettosmes(user.loc)
del(src)
user.put_in_hands(newcircuit)
/obj/item/weapon/module/id_auth
name = "\improper ID authentication module"
@@ -464,54 +460,6 @@
w_class = 2.0
origin_tech = "biotech=2"
/obj/item/weapon/hatchet
name = "hatchet"
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
icon = 'icons/obj/weapons.dmi'
icon_state = "hatchet"
flags = FPRINT | TABLEPASS | CONDUCT
force = 12.0
w_class = 2.0
throwforce = 15.0
throw_speed = 4
throw_range = 4
m_amt = 15000
origin_tech = "materials=2;combat=1"
attack_verb = list("chopped", "torn", "cut")
/obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/hatchet/unathiknife
name = "duelling knife"
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
icon = 'icons/obj/weapons.dmi'
icon_state = "unathiknife"
attack_verb = list("ripped", "torn", "cut")
/obj/item/weapon/scythe
icon_state = "scythe0"
name = "scythe"
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
force = 13.0
throwforce = 5.0
throw_speed = 1
throw_range = 3
w_class = 4.0
flags = FPRINT | TABLEPASS | NOSHIELD
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(A, /obj/effect/spacevine))
for(var/obj/effect/spacevine/B in orange(A,1))
if(prob(80))
del B
del A
/*
/obj/item/weapon/cigarpacket
name = "Pete's Cuban Cigars"
@@ -565,45 +513,42 @@
desc = "Used in the construction of computers and other devices with a interactive console."
icon_state = "screen"
origin_tech = "materials=1"
g_amt = 200
matter = list("glass" = 200)
/obj/item/weapon/stock_parts/capacitor
name = "capacitor"
desc = "A basic capacitor used in the construction of a variety of devices."
icon_state = "capacitor"
origin_tech = "powerstorage=1"
m_amt = 50
g_amt = 50
matter = list("metal" = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module
name = "scanning module"
desc = "A compact, high resolution scanning module used in the construction of certain devices."
icon_state = "scan_module"
origin_tech = "magnets=1"
m_amt = 50
g_amt = 20
matter = list("metal" = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator
name = "micro-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "micro_mani"
origin_tech = "materials=1;programming=1"
m_amt = 30
matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser
name = "micro-laser"
desc = "A tiny laser used in certain devices."
icon_state = "micro_laser"
origin_tech = "magnets=1"
m_amt = 10
g_amt = 20
matter = list("metal" = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin
name = "matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
icon_state = "matter_bin"
origin_tech = "materials=1"
m_amt = 80
matter = list("metal" = 80)
//Rank 2
@@ -612,8 +557,7 @@
desc = "An advanced capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=3"
rating = 2
m_amt = 50
g_amt = 50
matter = list("metal" = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/adv
name = "advanced scanning module"
@@ -621,8 +565,7 @@
icon_state = "scan_module"
origin_tech = "magnets=3"
rating = 2
m_amt = 50
g_amt = 20
matter = list("metal" = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator/nano
name = "nano-manipulator"
@@ -630,7 +573,7 @@
icon_state = "nano_mani"
origin_tech = "materials=3,programming=2"
rating = 2
m_amt = 30
matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser/high
name = "high-power micro-laser"
@@ -638,8 +581,7 @@
icon_state = "high_micro_laser"
origin_tech = "magnets=3"
rating = 2
m_amt = 10
g_amt = 20
matter = list("metal" = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/adv
name = "advanced matter bin"
@@ -647,7 +589,7 @@
icon_state = "advanced_matter_bin"
origin_tech = "materials=3"
rating = 2
m_amt = 80
matter = list("metal" = 80)
//Rating 3
@@ -656,16 +598,14 @@
desc = "A super-high capacity capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=5;materials=4"
rating = 3
m_amt = 50
g_amt = 50
matter = list("metal" = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/phasic
name = "phasic scanning module"
desc = "A compact, high resolution phasic scanning module used in the construction of certain devices."
origin_tech = "magnets=5"
rating = 3
m_amt = 50
g_amt = 20
matter = list("metal" = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator/pico
name = "pico-manipulator"
@@ -673,7 +613,7 @@
icon_state = "pico_mani"
origin_tech = "materials=5,programming=2"
rating = 3
m_amt = 30
matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser/ultra
name = "ultra-high-power micro-laser"
@@ -681,8 +621,7 @@
desc = "A tiny laser used in certain devices."
origin_tech = "magnets=5"
rating = 3
m_amt = 10
g_amt = 20
matter = list("metal" = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/super
name = "super matter bin"
@@ -690,7 +629,7 @@
icon_state = "super_matter_bin"
origin_tech = "materials=5"
rating = 3
m_amt = 80
matter = list("metal" = 80)
// Subspace stock parts
@@ -699,54 +638,49 @@
icon_state = "subspace_ansible"
desc = "A compact module capable of sensing extradimensional activity."
origin_tech = "programming=3;magnets=5;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/filter
name = "hyperwave filter"
icon_state = "hyperwave_filter"
desc = "A tiny device capable of filtering and converting super-intense radiowaves."
origin_tech = "programming=4;magnets=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/amplifier
name = "subspace amplifier"
icon_state = "subspace_amplifier"
desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/treatment
name = "subspace treatment disk"
icon_state = "treatment_disk"
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
origin_tech = "programming=3;magnets=2;materials=5;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/analyzer
name = "subspace wavelength analyzer"
icon_state = "wavelength_analyzer"
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/crystal
name = "ansible crystal"
icon_state = "ansible_crystal"
desc = "A crystal made from pure glass used to transmit laser databursts to subspace."
origin_tech = "magnets=4;materials=4;bluespace=2"
g_amt = 50
matter = list("glass" = 50)
/obj/item/weapon/stock_parts/subspace/transmitter
name = "subspace transmitter"
icon_state = "subspace_transmitter"
desc = "A large piece of equipment used to open a window into the subspace dimension."
origin_tech = "magnets=5;materials=5;bluespace=3"
m_amt = 50
matter = list("metal" = 50)
/obj/item/weapon/ectoplasm
name = "ectoplasm"
+93 -7
View File
@@ -627,6 +627,10 @@ var/list/ghostteleportlocs = list()
name = "Medbay Maintenance"
icon_state = "asmaint"
/area/maintenance/engi_shuttle
name = "Engineering Shuttle Access"
icon_state = "asmaint"
/area/maintenance/asmaint2
name = "Science Maintenance"
icon_state = "asmaint"
@@ -936,6 +940,11 @@ var/list/ghostteleportlocs = list()
//Engineering
/area/engine
drone_fabrication
name = "\improper Drone Fabrication"
icon_state = "engine"
engine_smes
name = "Engineering SMES"
icon_state = "engine_smes"
@@ -957,6 +966,10 @@ var/list/ghostteleportlocs = list()
name = "\improper Engineering Monitoring Room"
icon_state = "engine_monitoring"
atmos_monitoring
name = "\improper Atmospherics Monitoring Room"
icon_state = "engine_monitoring"
engineering
name = "Engineering"
icon_state = "engine_smes"
@@ -977,10 +990,18 @@ var/list/ghostteleportlocs = list()
name = "\improper Engineering Hallway"
icon_state = "engine_hallway"
engine_hallway
name = "\improper Engine Room Hallway"
icon_state = "engine_hallway"
engine_eva
name = "\improper Engine EVA"
icon_state = "engine_eva"
engine_eva_maintenance
name = "\improper Engine EVA Maintenance"
icon_state = "engine_eva"
workshop
name = "\improper Engineering Workshop"
icon_state = "engine_storage"
@@ -1382,11 +1403,7 @@ var/list/ghostteleportlocs = list()
name = "\improper Miscellaneous Research"
icon_state = "toxmisc"
/area/rnd/telesci
name = "\improper Telescience Lab"
icon_state = "toxmisc"
/area/rnd/server
/area/toxins/server
name = "\improper Server Room"
icon_state = "server"
@@ -1444,11 +1461,11 @@ var/list/ghostteleportlocs = list()
//DJSTATION
/area/djstation
name = "\improper Ruskie DJ Station"
name = "\improper Listening Post"
icon_state = "DJ"
/area/djstation/solars
name = "\improper DJ Station Solars"
name = "\improper Listening Post Solars"
icon_state = "DJ"
//DERELICT
@@ -1539,6 +1556,71 @@ var/list/ghostteleportlocs = list()
name = "\improper Derelict Singularity Engine"
icon_state = "engine"
//HALF-BUILT STATION (REPLACES DERELICT IN BAYCODE, ABOVE IS LEFT FOR DOWNSTREAM)
/area/shuttle/constructionsite
name = "\improper Construction Site Shuttle"
icon_state = "yellow"
/area/shuttle/constructionsite/station
name = "\improper Construction Site Shuttle"
/area/shuttle/constructionsite/site
name = "\improper Construction Site Shuttle"
/area/constructionsite
name = "\improper Construction Site"
icon_state = "storage"
/area/constructionsite/storage
name = "\improper Construction Site Storage Area"
/area/constructionsite/science
name = "\improper Construction Site Research"
/area/constructionsite/bridge
name = "\improper Construction Site Bridge"
icon_state = "bridge"
/area/constructionsite/maintenance
name = "\improper Construction Site Maintenance"
icon_state = "yellow"
/area/constructionsite/hallway/aft
name = "\improper Construction Site Aft Hallway"
icon_state = "hallP"
/area/constructionsite/hallway/fore
name = "\improper Construction Site Fore Hallway"
icon_state = "hallS"
/area/constructionsite/atmospherics
name = "\improper Construction Site Atmospherics"
icon_state = "green"
/area/constructionsite/medical
name = "\improper Construction Site Medbay"
icon_state = "medbay"
/area/constructionsite/ai
name = "\improper Construction Computer Core"
icon_state = "ai"
/area/constructionsite/engineering
name = "\improper Construction Site Engine Bay"
icon_state = "engine"
/area/solar/constructionsite
name = "\improper Construction Site Solars"
icon_state = "aft"
//area/constructionsite
// name = "\improper Construction Site Shuttle"
//area/constructionsite
// name = "\improper Construction Site Shuttle"
//Construction
/area/construction
@@ -1595,6 +1677,10 @@ var/list/ghostteleportlocs = list()
name = "AI Upload Access"
icon_state = "ai_foyer"
/area/turret_protected/ai_server_room
name = "AI Server Room"
icon_state = "ai_server"
/area/turret_protected/ai
name = "\improper AI Chamber"
icon_state = "ai_chamber"
+48 -5
View File
@@ -100,8 +100,10 @@
/atom/proc/emp_act(var/severity)
return
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
return 0
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
P.on_hit(src, 0, def_zone)
. = 0
/atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container))
@@ -317,7 +319,43 @@ its easier to just keep the beam vertical.
var/full_print = md5(H.dna.uni_identity)
// Add the fingerprints
fingerprints[full_print] = full_print
//
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.
return 1
else
@@ -333,17 +371,22 @@ its easier to just keep the beam vertical.
/atom/proc/transfer_fingerprints_to(var/atom/A)
if(!istype(A.fingerprints,/list))
A.fingerprints = list()
if(!istype(A.fingerprintshidden,/list))
A.fingerprintshidden = list()
if(!istype(fingerprintshidden, /list))
fingerprintshidden = list()
//skytodo
//A.fingerprints |= fingerprints //detective
//A.fingerprintshidden |= fingerprintshidden //admin
if(fingerprints)
if(A.fingerprints && fingerprints)
A.fingerprints |= fingerprints.Copy() //detective
if(fingerprintshidden)
if(A.fingerprintshidden && fingerprintshidden)
A.fingerprintshidden |= fingerprintshidden.Copy() //admin A.fingerprintslast = fingerprintslast
+14 -7
View File
@@ -24,13 +24,16 @@
#define DNA_UI_BEARD_G 5
#define DNA_UI_BEARD_B 6
#define DNA_UI_SKIN_TONE 7
#define DNA_UI_EYES_R 8
#define DNA_UI_EYES_G 9
#define DNA_UI_EYES_B 10
#define DNA_UI_GENDER 11
#define DNA_UI_BEARD_STYLE 12
#define DNA_UI_HAIR_STYLE 13
#define DNA_UI_LENGTH 13 // Update this when you add something, or you WILL break shit.
#define DNA_UI_SKIN_R 8
#define DNA_UI_SKIN_G 9
#define DNA_UI_SKIN_B 10
#define DNA_UI_EYES_R 11
#define DNA_UI_EYES_G 12
#define DNA_UI_EYES_B 13
#define DNA_UI_GENDER 14
#define DNA_UI_BEARD_STYLE 15
#define DNA_UI_HAIR_STYLE 16
#define DNA_UI_LENGTH 16 // Update this when you add something, or you WILL break shit.
#define DNA_SE_LENGTH 27
// For later:
@@ -140,6 +143,10 @@ var/global/list/datum/dna/gene/dna_genes[0]
SetUIValueRange(DNA_UI_EYES_G, character.g_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_B, character.b_eyes, 255, 1)
SetUIValueRange(DNA_UI_SKIN_R, character.r_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_G, character.g_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_B, character.b_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative.
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
+4
View File
@@ -139,6 +139,10 @@
H.g_facial = dna.GetUIValueRange(DNA_UI_BEARD_G, 255)
H.b_facial = dna.GetUIValueRange(DNA_UI_BEARD_B, 255)
H.r_skin = dna.GetUIValueRange(DNA_UI_SKIN_R, 255)
H.g_skin = dna.GetUIValueRange(DNA_UI_SKIN_G, 255)
H.b_skin = dna.GetUIValueRange(DNA_UI_SKIN_B, 255)
H.r_eyes = dna.GetUIValueRange(DNA_UI_EYES_R, 255)
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
+3 -34
View File
@@ -16,6 +16,7 @@
var/implant=null
var/ckey=null
var/mind=null
var/languages=null
/datum/dna2/record/proc/GetData()
var/list/ser=list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0)
@@ -220,6 +221,7 @@
icon = 'icons/obj/computer.dmi'
icon_state = "scanner"
density = 1
circuit = /obj/item/weapon/circuitboard/scan_consolenew
var/selected_ui_block = 1.0
var/selected_ui_subblock = 1.0
var/selected_se_block = 1.0
@@ -241,32 +243,6 @@
var/waiting_for_user_input=0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/scan_consolenew/M = new /obj/item/weapon/circuitboard/scan_consolenew( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/scan_consolenew/M = new /obj/item/weapon/circuitboard/scan_consolenew( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
if (istype(I, /obj/item/weapon/disk/data)) //INSERT SOME diskS
if (!src.disk)
user.drop_item()
@@ -276,7 +252,7 @@
nanomanager.update_uis(src) // update all UIs attached to src
return
else
src.attack_hand(user)
..()
return
/obj/machinery/computer/scan_consolenew/ex_act(severity)
@@ -339,13 +315,6 @@
I.buf = buffer
return 1
/obj/machinery/computer/scan_consolenew/attackby(obj/item/W as obj, mob/user as mob)
if ((istype(W, /obj/item/weapon/disk/data)) && (!src.disk))
user.drop_item()
W.loc = src
src.disk = W
user << "You insert [W]."
nanomanager.update_uis(src) // update all UIs attached to src
/*
/obj/machinery/computer/scan_consolenew/process() //not really used right now
if(stat & (NOPOWER|BROKEN))
+1 -1
View File
@@ -57,7 +57,7 @@
factory.spores += src
..(loc)
return
Die()
death()
..()
if(factory)
factory.spores -= src
@@ -215,6 +215,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
var/list/absorbed_dna = list()
var/list/absorbed_species = list()
var/list/absorbed_languages = list()
var/absorbedcount = 0
var/chem_charges = 20
var/chem_recharge_rate = 0.5
@@ -1,5 +1,6 @@
//Restores our verbs. It will only restore verbs allowed during lesser (monkey) form if we are not human
/mob/proc/make_changeling()
if(!mind) return
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
verbs += /datum/changeling/proc/EvolutionMenu
@@ -23,6 +24,15 @@
src.verbs += P.verbpath
mind.changeling.absorbed_dna |= dna
var/mob/living/carbon/human/H = src
if(istype(H))
mind.changeling.absorbed_species += H.species.name
for(var/language in languages)
if(!(language in mind.changeling.absorbed_languages))
mind.changeling.absorbed_languages += language
return 1
//removes our changeling verbs
@@ -63,6 +73,54 @@
return changeling
//Used to dump the languages from the changeling datum into the actual mob.
/mob/proc/changeling_update_languages(var/updated_languages)
languages = list()
for(var/language in updated_languages)
languages += language
return
//Used to switch species based on the changeling datum.
/mob/proc/changeling_change_species()
set category = "Changeling"
set name = "Change Species (5)"
var/mob/living/carbon/human/H = src
if(!istype(H))
src << "<span class='warning'>We may only use this power while in humanoid form.</span>"
return
var/datum/changeling/changeling = changeling_power(5,1,0)
if(!changeling) return
if(changeling.absorbed_species.len < 2)
src << "<span class='warning'>We do not know of any other species genomes to use.</span>"
return
var/S = input("Select the target species: ", "Target Species", null) as null|anything in changeling.absorbed_species
if(!S) return
domutcheck(src, null)
changeling.chem_charges -= 5
changeling.geneticdamage = 30
src.visible_message("<span class='warning'>[src] transforms!</span>")
src.verbs -= /mob/proc/changeling_change_species
spawn(10) src.verbs += /mob/proc/changeling_change_species
H.set_species(S)
changeling_update_languages(changeling.absorbed_languages)
feedback_add_details("changeling_powers","TR")
return 1
//Absorbs the victim's DNA making them uncloneable. Requires a strong grip on the victim.
//Doesn't cost anything as it's the most basic ability.
/mob/proc/changeling_absorb_dna()
@@ -82,6 +140,10 @@
src << "<span class='warning'>[T] is not compatible with our biology.</span>"
return
if(T.species.flags & NO_SCAN)
src << "<span class='warning'>We do not know how to parse this creature's DNA!</span>"
return
if(NOCLONE in T.mutations)
src << "<span class='warning'>This creature's DNA is ruined beyond useability!</span>"
return
@@ -107,7 +169,7 @@
src.visible_message("<span class='danger'>[src] stabs [T] with the proboscis!</span>")
T << "<span class='danger'>You feel a sharp stabbing pain!</span>"
var/datum/organ/external/affecting = T.get_organ(src.zone_sel.selecting)
if(affecting.take_damage(39,0,1,"large organic needle"))
if(affecting.take_damage(39,0,1,0,"large organic needle"))
T:UpdateDamageIcon()
continue
@@ -127,6 +189,17 @@
changeling.chem_charges += 10
changeling.geneticpoints += 2
//Steal all of their languages!
for(var/language in T.languages)
if(!(language in changeling.absorbed_languages))
changeling.absorbed_languages += language
changeling_update_languages(changeling.absorbed_languages)
//Steal their species!
if(T.species && !(T.species.name in changeling.absorbed_species))
changeling.absorbed_species += T.species.name
if(T.mind && T.mind.changeling)
if(T.mind.changeling.absorbed_dna)
for(var/dna_data in T.mind.changeling.absorbed_dna) //steal all their loot
@@ -260,6 +333,8 @@
O.make_changeling(1)
O.verbs += /mob/proc/changeling_lesser_transform
O.changeling_update_languages(changeling.absorbed_languages)
feedback_add_details("changeling_powers","LF")
del(C)
return 1
@@ -344,6 +419,7 @@
C.mind.transfer_to(O)
O.make_changeling()
O.changeling_update_languages(changeling.absorbed_languages)
feedback_add_details("changeling_powers","LFT")
del(C)
@@ -26,6 +26,12 @@ var/list/datum/power/changeling/powerinstances = list()
genomecost = 0
verbpath = /mob/proc/changeling_transform
/datum/power/changeling/change_species
name = "Change Species"
desc = "We take on the apperance of a species that we have absorbed."
genomecost = 0
verbpath = /mob/proc/changeling_change_species
/datum/power/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We become weakened to a death-like state, where we will rise again from death."
+57 -24
View File
@@ -414,27 +414,59 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
if(usr.get_active_hand() != src)
return
var/w1
var/w2
var/w3
var/list/dictionary = list (
"convert" = list("join","blood","self"),
"wall" = list("destroy","travel","self"),
"blood boil" = list("destroy","see","blood"),
"blood drain" = list("travel","blood","self"),
"raise dead" = list("blood","join","hell"),
"summon narsie" = list("hell","join","self"),
"communicate" = list("self","other","technology"),
"emp" = list("destroy","see","technology"),
"manifest" = list("blood","see","travel"),
"summon tome" = list("see","blood","hell"),
"see invisible" = list("see","hell","join"),
"hide" = list("hide","see","blood"),
"reveal" = list("blood","see","hide"),
"astral journey" = list("hell","travel","self"),
"imbue" = list("hell","technology","join"),
"sacrifice" = list("hell","blood","join"),
"summon cultist" = list("join","other","self"),
"free cultist" = list("travel","technology","other"),
"deafen" = list("hide","other","see"),
"blind" = list("destroy","see","other"),
"stun" = list("join","hide","technology"),
"armor" = list("hell","destroy","other"),
"teleport" = list("travel","self"),
"teleport other" = list("travel","other")
)
var/list/english = list()
for (var/w in words)
english+=words[w]
var/list/scribewords = list("none")
for (var/entry in words)
if (words[entry] != entry)
english += list(words[entry] = entry)
for (var/entry in dictionary)
var/list/required = dictionary[entry]
if (length(english&required) == required.len)
scribewords += entry
var/chosen_rune = null
if(usr)
w1 = input("Write your first rune:", "Rune Scribing") in english
for (var/w in words)
if (words[w] == w1)
w1 = w
if(usr)
w2 = input("Write your second rune:", "Rune Scribing") in english
for (var/w in words)
if (words[w] == w2)
w2 = w
if(usr)
w3 = input("Write your third rune:", "Rune Scribing") in english
for (var/w in words)
if (words[w] == w3)
w3 = w
chosen_rune = input ("Choose a rune to scribe.") in scribewords
if (!chosen_rune)
return
if (chosen_rune == "none")
user << "\red You decide against scribing a rune, perhaps you should take this time to study your notes."
return
if (chosen_rune == "teleport")
dictionary[chosen_rune] += input ("Choose a destination word") in english
if (chosen_rune == "teleport other")
dictionary[chosen_rune] += input ("Choose a destination word") in english
if(usr.get_active_hand() != src)
return
@@ -449,9 +481,10 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
var/mob/living/carbon/human/H = user
var/obj/effect/rune/R = new /obj/effect/rune(user.loc)
user << "\red You finish drawing the arcane markings of the Geometer."
R.word1 = w1
R.word2 = w2
R.word3 = w3
var/list/required = dictionary[chosen_rune]
R.word1 = english[required[1]]
R.word2 = english[required[2]]
R.word3 = english[required[3]]
R.check_icon()
R.blood_DNA = list()
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
@@ -470,8 +503,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
// return
// for(var/mob/M in nearby)
// if(M == user)
for(var/w in words)
words[w] = T.words[w]
for(var/entry in words)
words[entry] = T.words[entry]
user << "You copy the translation notes from your tome."
+7 -1
View File
@@ -28,6 +28,7 @@
var/required_enemies = 0
var/recommended_enemies = 0
var/newscaster_announcements = null
var/ert_disabled = 0
var/uplink_welcome = "Syndicate Uplink Console:"
var/uplink_uses = 10
var/uplink_items = {"Highly Visible and Dangerous Weapons;
@@ -128,6 +129,8 @@ Implants;
return 1
return 0
/datum/game_mode/proc/cleanup() //This is called when the round has ended but not the game, if any cleanup would be necessary in that case.
return
/datum/game_mode/proc/declare_completion()
var/clients = 0
@@ -248,7 +251,7 @@ Implants;
for (var/obj/machinery/computer/communications/comm in machines)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.name = "Cent. Com. Status Summary"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")
@@ -407,6 +410,9 @@ Implants;
heads += player.mind
return heads
/datum/game_mode/proc/check_antagonists_topic(href, href_list[])
return 0
/datum/game_mode/New()
newscaster_announcements = pick(newscaster_standard_feeds)
+34 -3
View File
@@ -12,6 +12,7 @@ var/global/datum/controller/gameticker/ticker
var/hide_mode = 0
var/datum/game_mode/mode = null
var/post_game = 0
var/event_time = null
var/event = 0
@@ -128,6 +129,8 @@ var/global/datum/controller/gameticker/ticker
//here to initialize the random events nicely at round start
setup_economy()
setup_shuttle_docks()
spawn(0)//Forking here so we dont have to wait for this to finish
mode.post_setup()
@@ -309,8 +312,16 @@ var/global/datum/controller/gameticker/ticker
emergency_shuttle.process()
var/mode_finished = mode.check_finished() || (emergency_shuttle.location == 2 && emergency_shuttle.alert == 1)
if(!mode.explosion_in_progress && mode_finished)
var/game_finished = 0
var/mode_finished = 0
if (config.continous_rounds)
game_finished = (emergency_shuttle.location == 2 || mode.station_was_nuked)
mode_finished = (!post_game && mode.check_finished())
else
game_finished = (mode.check_finished() || (emergency_shuttle.location == 2 && emergency_shuttle.alert == 1))
mode_finished = game_finished
if(!mode.explosion_in_progress && game_finished && (mode_finished || post_game))
current_state = GAME_STATE_FINISHED
spawn
@@ -340,7 +351,17 @@ var/global/datum/controller/gameticker/ticker
world << "\blue <B>An admin has delayed the round end</B>"
else
world << "\blue <B>An admin has delayed the round end</B>"
else if (mode_finished)
post_game = 1
mode.cleanup()
//call a transfer shuttle vote
spawn(50)
world << "\red The round has ended!"
vote.autotransfer()
return 1
proc/getfactionbyname(var/name)
@@ -364,7 +385,14 @@ var/global/datum/controller/gameticker/ticker
robolist += "[robo.name][robo.stat?" (Deactivated) (Played by: [robo.key]), ":" (Played by: [robo.key]), "]"
world << "[robolist]"
var/dronecount = 0
for (var/mob/living/silicon/robot/robo in mob_list)
if(istype(robo,/mob/living/silicon/robot/drone))
dronecount++
continue
if (!robo.connected_ai)
if (robo.stat != 2)
world << "<b>[robo.name] (Played by: [robo.key]) survived as an AI-less borg! Its laws were:</b>"
@@ -374,6 +402,9 @@ var/global/datum/controller/gameticker/ticker
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
robo.laws.show_laws(world)
if(dronecount)
world << "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] this round."
mode.declare_completion()//To declare normal completion.
//calls auto_declare_completion_* for all modes
+14 -4
View File
@@ -163,7 +163,7 @@ VOX HEIST ROUNDTYPE
/datum/game_mode/heist/proc/greet_vox(var/datum/mind/raider)
raider.current << "\blue <B>You are a Vox Raider, fresh from the Shoal!</b>"
raider.current << "\blue The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to Tau Ceti and much of the unexplored galaxy. You and the crew have come to the Exodus for plunder, trade or both."
raider.current << "\blue The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to the frontier and much of the unexplored galaxy. You and the crew have come to the Exodus for plunder, trade or both."
raider.current << "\blue Vox are cowardly and will flee from larger groups, but corner one or find them en masse and they are vicious."
raider.current << "\blue Use :V to voxtalk, :H to talk on your encrypted channel, and don't forget to turn on your nitrogen internals!"
raider.current << "\red IF YOU HAVE NOT PLAYED A VOX BEFORE, REVIEW THIS THREAD: http://baystation12.net/forums/viewtopic.php?f=6&t=8657."
@@ -272,6 +272,16 @@ datum/game_mode/proc/auto_declare_completion_heist()
return 1
/datum/game_mode/heist/check_finished()
if (!(is_raider_crew_alive()) || (vox_shuttle_location && (vox_shuttle_location == "start")))
return 1
return ..()
// DO NOT FORGET TO FIX THIS.
//if (!(is_raider_crew_alive()) || (vox_shuttle_location && (vox_shuttle_location == "start")))
// return 1
return ..()
/datum/game_mode/heist/cleanup()
//the skipjack and everything in it have left and aren't coming back, so get rid of them.
var/area/skipjack = locate(/area/shuttle/vox/station)
for (var/mob/living/M in skipjack.contents)
//maybe send the player a message that they've gone home/been kidnapped? Someone responsible for vox lore should write that.
Del(M)
for (var/obj/O in skipjack.contents)
Del(O) //no hiding in lockers or anything
+39
View File
@@ -0,0 +1,39 @@
/obj/item/weapon/mutiny/auth_key
name = "authentication key"
desc = "Better keep this safe."
icon = 'icons/obj/items.dmi'
icon_state = "nucleardisk"
item_state = "card-id"
w_class = 1
var/time_entered_space
var/obj/item/device/radio/radio
New()
radio = new(src)
spawn(20 SECONDS)
keep_alive()
..()
proc/keep_alive()
var/in_space = istype(loc, /turf/space)
if (!in_space && time_entered_space)
// Recovered before the key was lost
time_entered_space = null
else if (in_space && !time_entered_space)
// The key has left the station
time_entered_space = world.time
else if (in_space && time_entered_space + (10 SECONDS) < world.time)
// Time is up
radio.autosay("This device has left the station's perimeter. Triggering emergency activation failsafe.", name)
del(src)
return
spawn(10 SECONDS)
keep_alive()
/obj/item/weapon/mutiny/auth_key/captain
name = "Captain's Authentication Key"
/obj/item/weapon/mutiny/auth_key/secondary
name = "Emergency Secondary Authentication Key"
+32
View File
@@ -0,0 +1,32 @@
datum/directive
var/datum/game_mode/mutiny/mode
var/list/special_orders
New(var/datum/game_mode/mutiny/M)
mode = M
proc/get_description()
return {"
<p>
NanoTrasen's reasons for the following directives are classified.
</p>
"}
proc/meets_prerequisites()
return 0
proc/directives_complete()
return 1
proc/initialize()
return 1
proc/get_remaining_orders()
return ""
/proc/get_directive(type)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if(!mode || !mode.current_directive || !istype(mode.current_directive, text2path("/datum/directive/[type]")))
return null
return mode.current_directive
@@ -0,0 +1,41 @@
datum/directive/terminations/alien_fraud
special_orders = list(
"Suspend financial accounts of all Tajaran and Unathi personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
proc/is_alien(mob/M)
var/species = M.get_species()
return species == "Tajaran" || species == "Unathi"
datum/directive/terminations/alien_fraud/get_crew_to_terminate()
var/list/aliens[0]
for(var/mob/M in player_list)
if (is_alien(M) && M.is_ready())
aliens.Add(M)
return aliens
datum/directive/terminations/alien_fraud/get_description()
return {"
<p>
An extensive conspiracy network aimed at defrauding NanoTrasen of large amounts of funds has been uncovered
operating within [system_name()]. Human personnel are not suspected to be involved. Further information is classified.
</p>
"}
datum/directive/terminations/alien_fraud/meets_prerequisites()
// There must be at least one Tajaran and at least one Unathi, but the total
// of the Tajarans and Unathi combined can't be more than 1/3rd of the crew.
var/tajarans = 0
var/unathi = 0
for(var/mob/M in player_list)
var/species = M.get_species()
if(species == "Tajaran")
tajarans++
if(species == "Unathi")
unathi++
if (!tajarans || !unathi)
return 0
return (tajarans + unathi) <= (player_list.len / 3)
@@ -0,0 +1,58 @@
#define INFECTION_COUNT 5
datum/directive/bluespace_contagion
var/list/infected = list()
proc/get_infection_candidates()
var/list/candidates[0]
for(var/mob/M in player_list)
if (!M.is_mechanical() && M.is_ready())
candidates.Add(M)
return candidates
datum/directive/bluespace_contagion/get_description()
return {"
<p>
A manufactured and near-undetectable virus is spreading on NanoTrasen stations.
The pathogen travels by bluespace after maturing for one day.
No treatment has yet been discovered. Personnel onboard [station_name()] have been infected. Further information is classified.
</p>
"}
datum/directive/bluespace_contagion/initialize()
var/list/candidates = get_infection_candidates()
var/list/infected_names = list()
for(var/i=0, i < INFECTION_COUNT, i++)
if(!candidates.len)
break
var/mob/candidate = pick(candidates)
candidates.Remove(candidate)
infected.Add(candidate)
infected_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
special_orders = list(
"Quarantine these personnel: [list2text(infected_names, ", ")].",
"Allow one hour for a cure to be manufactured.",
"If no cure arrives after that time, execute the infected.")
datum/directive/bluespace_contagion/meets_prerequisites()
var/list/candidates = get_infection_candidates()
return candidates.len >= 7
datum/directive/bluespace_contagion/directives_complete()
return infected.len == 0
datum/directive/bluespace_contagion/get_remaining_orders()
var/text = ""
for(var/victim in infected)
text += "<li>Kill [victim]</li>"
return text
/hook/death/proc/infected_killed(mob/living/carbon/human/deceased, gibbed)
var/datum/directive/bluespace_contagion/D = get_directive("bluespace_contagion")
if(!D) return 1
if(deceased in D.infected)
D.infected.Remove(deceased)
return 1
@@ -0,0 +1,26 @@
datum/directive/terminations/financial_crisis
special_orders = list(
"Suspend financial accounts of all civilian personnel, excluding the Head of Personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
datum/directive/terminations/financial_crisis/get_crew_to_terminate()
var/list/civilians[0]
var/list/candidates = civilian_positions - "Head of Personnel"
for(var/mob/M in player_list)
if (candidates.Find(M.mind.assigned_role) && M.is_ready())
civilians.Add(M)
return civilians
datum/directive/terminations/financial_crisis/get_description()
return {"
<p>
[system_name()] system banks in financial crisis. Local emergency situation ongoing.
NT Funds redistributed, impact upon civilian department expected.
Further information is classified.
</p>
"}
datum/directive/terminations/financial_crisis/meets_prerequisites()
var/list/civilians = get_crew_to_terminate()
return civilians.len >= 5
@@ -0,0 +1,96 @@
datum/directive/ipc_virus
special_orders = list(
"Terminate employment of all IPC personnel.",
"Extract the Positronic Brains from IPC units.",
"Mount the Positronic Brains into Cyborgs.")
var/list/roboticist_roles = list(
"Research Director",
"Roboticist"
)
var/list/brains_to_enslave = list()
var/list/cyborgs_to_make = list()
var/list/ids_to_terminate = list()
proc/get_ipcs()
var/list/machines[0]
for(var/mob/M in player_list)
if (M.get_species() == "Machine" && M.is_ready())
machines.Add(M)
return machines
proc/get_roboticists()
var/list/roboticists[0]
for(var/mob/M in player_list)
if (roboticist_roles.Find(M.mind.assigned_role) && M.is_ready())
roboticists.Add(M)
return roboticists
datum/directive/ipc_virus/initialize()
for(var/mob/living/carbon/human/H in get_ipcs())
brains_to_enslave.Add(H.mind)
cyborgs_to_make.Add(H.mind)
ids_to_terminate.Add(H.wear_id)
datum/directive/ipc_virus/get_description()
return {"
<p>
IPC units have been found to be infected with a violent and undesired virus in Virgus Ferrorus system.
Risk to [station_name()] IPC units has not been assessed. Further information is classified.
</p>
"}
datum/directive/ipc_virus/meets_prerequisites()
var/list/ipcs = get_ipcs()
var/list/roboticists = get_roboticists()
return ipcs.len > 2 && roboticists.len > 1
datum/directive/ipc_virus/directives_complete()
return brains_to_enslave.len == 0 && cyborgs_to_make.len == 0 && ids_to_terminate.len == 0
datum/directive/ipc_virus/get_remaining_orders()
var/text = ""
for(var/brain in brains_to_enslave)
text += "<li>Debrain [brain]</li>"
for(var/brain in cyborgs_to_make)
text += "<li>Enslave [brain] as a Cyborg</li>"
for(var/id in ids_to_terminate)
text += "<li>Terminate [id]</li>"
return text
/hook/debrain/proc/debrain_directive(obj/item/brain/B)
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
if(D.brains_to_enslave.Find(B.brainmob.mind))
D.brains_to_enslave.Remove(B.brainmob.mind)
return 1
/hook/borgify/proc/borgify_directive(mob/living/silicon/robot/cyborg)
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
if(D.cyborgs_to_make.Find(cyborg.mind))
D.cyborgs_to_make.Remove(cyborg.mind)
// In case something glitchy happened and the victim got
// borged without us tracking the brain removal, go ahead
// and update that list too.
if(D.brains_to_enslave.Find(cyborg.mind))
D.brains_to_enslave.Remove(cyborg.mind)
return 1
/hook/terminate_employee/proc/ipc_termination(obj/item/weapon/card/id)
var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
if (!D) return 1
if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
D.ids_to_terminate.Remove(id)
return 1
@@ -0,0 +1,79 @@
#define MATERIALS_REQUIRED 200
datum/directive/research_to_ripleys
var/list/ids_to_reassign = list()
var/materials_shipped = 0
proc/is_researcher(mob/M)
return M.mind.assigned_role in science_positions - "Research Director"
proc/get_researchers()
var/list/researchers[0]
for(var/mob/M in player_list)
if (is_researcher(M) && M.is_ready())
researchers.Add(M)
return researchers
proc/count_researchers_reassigned()
var/researchers_reassigned = 0
for(var/obj/item/weapon/card/id in ids_to_reassign)
if (ids_to_reassign[id])
researchers_reassigned++
return researchers_reassigned
datum/directive/research_to_ripleys/get_description()
return {"
<p>
The NanoTrasen [system_name()] Manufactory faces an ore deficit. Financial crisis imminent. [station_name()] has been reassigned as a mining platform.
The Research Director is to assist the Head of Personnel in coordinating assets.
Weapons department reports solid sales. Further information is classified.
</p>
"}
datum/directive/research_to_ripleys/meets_prerequisites()
var/list/researchers = get_researchers()
return researchers.len > 3
datum/directive/research_to_ripleys/initialize()
for(var/mob/living/carbon/human/R in get_researchers())
ids_to_reassign[R.wear_id] = 0
special_orders = list(
"Reassign all research personnel, excluding the Research Director, to Shaft Miner.",
"Deliver [MATERIALS_REQUIRED] sheets of metal or minerals via the supply shuttle to CentCom.")
datum/directive/research_to_ripleys/directives_complete()
if (materials_shipped < MATERIALS_REQUIRED) return 0
return count_researchers_reassigned() == ids_to_reassign.len
datum/directive/research_to_ripleys/get_remaining_orders()
var/text = ""
if(MATERIALS_REQUIRED > materials_shipped)
text += "<li>Ship [MATERIALS_REQUIRED - materials_shipped] sheets of metal or minerals.</li>"
for(var/id in ids_to_reassign)
if(!ids_to_reassign[id])
text += "<li>Reassign [id] to Shaft Miner</li>"
return text
/hook/reassign_employee/proc/research_reassignments(obj/item/weapon/card/id/id_card)
var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
if(!D) return 1
if(D.ids_to_reassign && D.ids_to_reassign.Find(id_card))
D.ids_to_reassign[id_card] = id_card.assignment == "Shaft Miner" ? 1 : 0
return 1
/hook/sell_crate/proc/deliver_materials(obj/structure/closet/crate/sold, area/shuttle)
var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
if(!D) return 1
for(var/atom/A in sold)
if(istype(A, /obj/item/stack/sheet/mineral) || istype(A, /obj/item/stack/sheet/metal))
var/obj/item/stack/S = A
D.materials_shipped += S.amount
return 1
@@ -0,0 +1,108 @@
datum/directive/tau_ceti_needs_women
var/list/command_targets = list()
var/list/alien_targets = list()
proc/get_target_gender()
if(!mode.head_loyalist) return FEMALE
return mode.head_loyalist.current.get_gender() == FEMALE ? MALE : FEMALE
proc/is_target_gender(mob/M)
var/species = M.get_species()
return species != "Diona" && M.get_gender() == get_target_gender()
proc/get_crew_of_target_gender()
var/list/targets[0]
for(var/mob/M in player_list)
if(is_target_gender(M) && !M.is_mechanical() && M.is_ready())
targets.Add(M)
return targets
proc/get_target_heads()
var/list/heads[0]
for(var/mob/M in get_crew_of_target_gender())
if(command_positions.Find(M.mind.assigned_role))
heads.Add(M)
return heads
proc/get_target_aliens()
var/list/aliens[0]
for(var/mob/M in get_crew_of_target_gender())
var/species = M.get_species()
if(species == "Tajaran" || species == "Unathi" || species == "Skrell")
aliens.Add(M)
return aliens
proc/count_heads_reassigned()
var/heads_reassigned = 0
for(var/obj/item/weapon/card/id in command_targets)
if (command_targets[id])
heads_reassigned++
return heads_reassigned
datum/directive/tau_ceti_needs_women/get_description()
return {"
<p>
Recent evidence suggests [get_target_gender()] aptitudes may be effected by radiation from [system_name()].
Effects were measured under laboratory and station conditions. Humans remain more trusted than Xeno. Further information is classified.
</p>
"}
datum/directive/tau_ceti_needs_women/initialize()
for(var/mob/living/carbon/human/H in get_target_heads())
command_targets[H.wear_id] = 0
for(var/mob/living/carbon/human/H in get_target_aliens())
alien_targets.Add(H.wear_id)
special_orders = list(
"Remove [get_target_gender()] personnel from Command positions.",
"Terminate employment of all [get_target_gender()] Skrell, Tajara, and Unathi.")
datum/directive/tau_ceti_needs_women/meets_prerequisites()
var/females = 0
var/males = 0
for(var/mob/M in player_list)
if(!M.is_mechanical() && M.get_species() != "Diona" && M.is_ready())
var/gender = M.get_gender()
if(gender == MALE)
males++
else if(gender == FEMALE)
females++
return males >= 2 && females >= 2
datum/directive/tau_ceti_needs_women/directives_complete()
return command_targets.len == count_heads_reassigned() && alien_targets.len == 0
datum/directive/tau_ceti_needs_women/get_remaining_orders()
var/text = ""
for(var/head in command_targets)
if(!command_targets[head])
text += "<li>Remove [head] from a Head Role</li>"
for(var/id in alien_targets)
text += "<li>Terminate [id]</li>"
return text
/hook/reassign_employee/proc/command_reassignments(obj/item/weapon/card/id/id_card)
var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
if(!D) return 1
if(D.command_targets && D.command_targets.Find(id_card))
D.command_targets[id_card] = command_positions.Find(id_card.assignment) ? 0 : 1
return 1
/hook/terminate_employee/proc/gender_target_termination_directive(obj/item/weapon/card/id)
var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
if (!D) return 1
if(D.alien_targets && D.alien_targets.Find(id))
D.alien_targets.Remove(id)
if(D.command_targets && D.command_targets.Find(id))
D.command_targets[id] = 1
return 1
@@ -0,0 +1,71 @@
// This is a parent directive meant to be derived by directives that fit
// the "fire X type of employee" pattern of directives. Simply apply your
// flavor text and override get_crew_to_terminate in your child datum.
// See alien_fraud_directive.dm for an example.
datum/directive/terminations
var/list/accounts_to_revoke = list()
var/list/accounts_to_suspend = list()
var/list/ids_to_terminate = list()
proc/get_crew_to_terminate()
return list()
datum/directive/terminations/directives_complete()
for(var/account_number in accounts_to_suspend)
if (!accounts_to_suspend[account_number])
return 0
for(var/account_number in accounts_to_revoke)
if (!accounts_to_revoke[account_number])
return 0
return ids_to_terminate.len == 0
datum/directive/terminations/initialize()
for(var/mob/living/carbon/human/H in get_crew_to_terminate())
var/datum/money_account/account = H.mind.initial_account
accounts_to_revoke["[account.account_number]"] = 0
accounts_to_suspend["[account.account_number]"] = account.suspended
ids_to_terminate.Add(H.wear_id)
datum/directive/terminations/get_remaining_orders()
var/text = ""
for(var/account_number in accounts_to_suspend)
if(!accounts_to_suspend[account_number])
text += "<li>Suspend Account #[account_number]</li>"
for(var/account_number in accounts_to_revoke)
if(!accounts_to_revoke[account_number])
text += "<li>Revoke Account #[account_number]</li>"
for(var/id in ids_to_terminate)
text += "<li>Terminate [id]</li>"
return text
/hook/revoke_payroll/proc/payroll_directive(datum/money_account/account)
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
if(D.accounts_to_revoke && D.accounts_to_revoke.Find("[account.account_number]"))
D.accounts_to_revoke["[account.account_number]"] = 1
return 1
/hook/change_account_status/proc/suspension_directive(datum/money_account/account)
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
if(D.accounts_to_suspend && D.accounts_to_suspend.Find("[account.account_number]"))
D.accounts_to_suspend["[account.account_number]"] = account.suspended
return 1
/hook/terminate_employee/proc/termination_directive(obj/item/weapon/card/id)
var/datum/directive/terminations/D = get_directive("terminations")
if (!D) return 1
if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
D.ids_to_terminate.Remove(id)
return 1
@@ -0,0 +1,23 @@
// For testing
datum/directive/terminations/test
special_orders = list(
"Suspend financial accounts of all ugly personnel.",
"Transfer their payrolls to the station account.",
"Terminate their employment.")
datum/directive/terminations/test/get_crew_to_terminate()
var/list/uglies[0]
for(var/mob/M in player_list)
uglies.Add(M)
return uglies
datum/directive/terminations/test/get_description()
return {"
<p>
Wow. Much ugly. So painful.
Many terminations. Very classified.
</p>
"}
datum/directive/terminations/test/meets_prerequisites()
return 1
@@ -0,0 +1,105 @@
/obj/machinery/emergency_authentication_device
var/datum/game_mode/mutiny/mode
name = "\improper Emergency Authentication Device"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "blackbox"
density = 1
anchored = 1
var/captains_key
var/secondary_key
var/activated = 0
flags = FPRINT
use_power = 0
New(loc, mode)
src.mode = mode
..(loc)
proc/check_key_existence()
if(!mode.captains_key)
captains_key = 1
if(!mode.secondary_key)
secondary_key = 1
proc/get_status()
if(activated)
return "Activated"
if(captains_key && secondary_key)
return "Both Keys Authenticated"
if(captains_key)
return "Captain's Key Authenticated"
if(secondary_key)
return "Secondary Key Authenticated"
else
return "Inactive"
/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
if(activated)
user << "\blue \The [src] is already active!"
return
if(!mode.current_directive.directives_complete())
state("Command aborted. Communication with CentCom is prohibited until Directive X has been completed.")
return
check_key_existence()
if(captains_key && secondary_key)
activated = 1
user << "\blue You activate \the [src]!"
state("Command acknowledged. Initiating quantum entanglement relay to NanoTrasen High Command.")
return
if(!captains_key && !secondary_key)
state("Command aborted. Please present the authentication keys before proceeding.")
return
if(!captains_key)
state("Command aborted. Please present the Captain's Authentication Key.")
return
if(!secondary_key)
state("Command aborted. Please present the Emergency Secondary Authentication Key.")
return
// Impossible!
state("Command aborted. This unit is defective.")
/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user)
if(activated)
user << "\blue \The [src] is already active!"
return
if(!mode.current_directive.directives_complete())
state({"Command aborted. Communication with CentCom is prohibited until Directive X has been completed."})
return
check_key_existence()
if(istype(O, /obj/item/weapon/mutiny/auth_key/captain) && !captains_key)
captains_key = O
user.drop_item()
O.loc = src
state("Key received. Thank you, Captain [mode.head_loyalist].")
spawn(5)
state(secondary_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Emergency Secondary Authentication Key now.")
return
if(istype(O, /obj/item/weapon/mutiny/auth_key/secondary) && !secondary_key)
secondary_key = O
user.drop_item()
O.loc = src
state("Key received. Thank you, Secondary Authenticator [mode.head_mutineer].")
spawn(5)
state(captains_key ? "Your keys have been authenticated. Communication with CentCom is now authorized." : "Please insert the Captain's Authentication Key now.")
return
..()
/obj/machinery/emergency_authentication_device/examine()
usr << {"
This is a specialized communications device that is able to instantly send a message to <b>NanoTrasen High Command</b> via quantum entanglement with a sister device at CentCom.
The EAD's status is [get_status()]."}
@@ -0,0 +1,49 @@
/obj/item/weapon/pinpointer/advpinpointer/auth_key
name = "\improper Authentication Key Pinpointer"
desc = "Tracks the positions of the emergency authentication keys."
var/datum/game_mode/mutiny/mutiny
New()
mutiny = ticker.mode
..()
/obj/item/weapon/pinpointer/advpinpointer/auth_key/attack_self()
switch(mode)
if (0)
mode = 1
active = 1
target = mutiny.captains_key
workobj()
usr << "\blue You calibrate \the [src] to locate the Captain's Authentication Key."
if (1)
mode = 2
target = mutiny.secondary_key
usr << "\blue You calibrate \the [src] to locate the Emergency Secondary Authentication Key."
else
mode = 0
active = 0
icon_state = "pinoff"
usr << "\blue You switch \the [src] off."
/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine()
switch(mode)
if (1)
usr << "Is is calibrated for the Captain's Authentication Key."
if (2)
usr << "It is calibrated for the Emergency Secondary Authentication Key."
else
usr << "It is switched off."
/datum/supply_packs/key_pinpointer
name = "Authentication Key Pinpointer crate"
contains = list(/obj/item/weapon/pinpointer/advpinpointer/auth_key)
cost = 250
containertype = /obj/structure/closet/crate
containername = "Authentication Key Pinpointer crate"
access = access_heads
group = "Operations"
New()
// This crate is only accessible during mutiny rounds
if (istype(ticker.mode,/datum/game_mode/mutiny))
..()
+350
View File
@@ -0,0 +1,350 @@
#define MUTINY_RECRUITMENT_COOLDOWN 5
datum/game_mode/mutiny
var/datum/mutiny_fluff/fluff
var/datum/directive/current_directive
var/obj/item/weapon/mutiny/auth_key/captain/captains_key
var/obj/item/weapon/mutiny/auth_key/secondary/secondary_key
var/obj/machinery/emergency_authentication_device/ead
var/datum/mind/head_loyalist
var/datum/mind/head_mutineer
var/recruit_loyalist_cooldown = 0
var/recruit_mutineer_cooldown = 0
var/list/loyalists = list()
var/list/mutineers = list()
var/list/body_count = list()
name = "mutiny"
config_tag = "mutiny"
required_players = 7
ert_disabled = 1
uplink_welcome = "Mutineers Uplink Console:"
uplink_uses = 0
New()
fluff = new(src)
proc/reveal_directives()
spawn(rand(1 MINUTE, 3 MINUTES))
fluff.announce_incoming_fax()
spawn(rand(3 MINUTES, 5 MINUTES))
send_pda_message()
spawn(rand(3 MINUTES, 5 MINUTES))
fluff.announce_directives()
spawn(rand(2 MINUTES, 3 MINUTE))
fluff.announce_ert_unavailable()
// Returns an array in case we want to expand on this later.
proc/get_head_loyalist_candidates()
var/list/candidates[0]
for(var/mob/loyalist in player_list)
if(loyalist.mind && loyalist.mind.assigned_role == "Captain")
candidates.Add(loyalist.mind)
return candidates
proc/get_head_mutineer_candidates()
var/list/candidates[0]
for(var/mob/mutineer in player_list)
if(mutineer.client.prefs.be_special & BE_MUTINEER)
for(var/job in command_positions - "Captain")
if(mutineer.mind && mutineer.mind.assigned_role == job)
candidates.Add(mutineer.mind)
return candidates
proc/get_directive_candidates()
var/list/candidates[0]
for(var/T in typesof(/datum/directive) - /datum/directive)
var/datum/directive/D = new T(src)
if (D.meets_prerequisites())
candidates.Add(D)
return candidates
proc/send_pda_message()
var/obj/item/device/pda/pda = null
for(var/obj/item/device/pda/P in head_mutineer.current)
pda = P
break
if (!pda)
return 0
if (!pda.silent)
playsound(pda.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, pda.loc))
O.show_message(text("\icon[pda] *[pda.ttone]*"))
head_mutineer.current << fluff.get_pda_body()
return 1
proc/get_equipment_slots()
return list(
"left pocket" = slot_l_store,
"right pocket" = slot_r_store,
"backpack" = slot_in_backpack,
"left hand" = slot_l_hand,
"right hand" = slot_r_hand)
proc/equip_head_loyalist()
equip_head(head_loyalist, "loyalist", /mob/living/carbon/human/proc/recruit_loyalist)
proc/equip_head_mutineer()
equip_head(head_mutineer, "mutineer", /mob/living/carbon/human/proc/recruit_mutineer)
proc/equip_head(datum/mind/head, faction, proc/recruitment_verb)
var/mob/living/carbon/human/H = head.current
H << "You are the Head [capitalize(faction)]!"
head.special_role = "head_[faction]"
var/slots = get_equipment_slots()
switch(faction)
if("loyalist")
if(captains_key) del(captains_key)
captains_key = new(H)
H.equip_in_one_of_slots(captains_key, slots)
if("mutineer")
if(secondary_key) del(secondary_key)
secondary_key = new(H)
H.equip_in_one_of_slots(secondary_key, slots)
H.update_icons()
H.verbs += recruitment_verb
proc/add_loyalist(datum/mind/M)
add_faction(M, "loyalist", loyalists)
proc/add_mutineer(datum/mind/M)
add_faction(M, "mutineer", mutineers)
proc/add_faction(datum/mind/M, faction, list/faction_list)
if(!can_be_recruited(M, faction))
M.current << "\red Recruitment canceled; your role has already changed."
head_mutineer.current << "\red Could not recruit [M]. Their role has changed."
return
if(M in loyalists)
loyalists.Remove(M)
if(M in mutineers)
mutineers.Remove(M)
M.special_role = faction
faction_list.Add(M)
if(faction == "mutineer")
M.current << fluff.mutineer_tag("You have joined the mutineers!")
head_mutineer.current << fluff.mutineer_tag("[M] has joined the mutineers!")
else
M.current << fluff.loyalist_tag("You have joined the loyalists!")
head_loyalist.current << fluff.loyalist_tag("[M] has joined the loyalists!")
update_icon(M)
proc/was_bloodbath()
var/list/remaining_loyalists = loyalists - body_count
if (!remaining_loyalists.len)
return 1
var/list/remaining_mutineers = mutineers - body_count
if (!remaining_mutineers.len)
return 1
return 0
proc/replace_nuke_with_ead()
for(var/obj/machinery/nuclearbomb/N in world)
ead = new(N.loc, src)
del(N)
proc/unbolt_vault_door()
var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
vault.lock()
proc/make_secret_transcript()
var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server)
if(!S) return
var/obj/item/weapon/paper/crumpled/bloody/transcript = new(S.loc)
transcript.name = "secret transcript"
transcript.info = fluff.secret_transcript()
proc/can_be_recruited(datum/mind/M, role)
if(!M) return 0
if(!M.special_role) return 1
switch(role)
if("loyalist")
return M.special_role == "mutineer"
if("mutineer")
return M.special_role == "loyalist"
proc/round_outcome()
world << "<center><h4>Breaking News</h4></center><br><hr>"
if (was_bloodbath())
world << fluff.no_victory()
return
var/directives_completed = current_directive.directives_complete()
var/ead_activated = ead.activated
if (directives_completed && ead_activated)
world << fluff.loyalist_major_victory()
else if (directives_completed && !ead_activated)
world << fluff.loyalist_minor_victory()
else if (!directives_completed && ead_activated)
world << fluff.mutineer_minor_victory()
else if (!directives_completed && !ead_activated)
world << fluff.mutineer_major_victory()
world << sound('sound/machines/twobeep.ogg')
proc/update_all_icons()
spawn(0)
for(var/datum/mind/M in mutineers)
update_icon(M)
for(var/datum/mind/M in loyalists)
update_icon(M)
return 1
proc/update_icon(datum/mind/M)
if(!M.current || !M.current.client)
return 0
for(var/image/I in head_loyalist.current.client.images)
if(I.loc == M.current && (I.icon_state == "loyalist" || I.icon_state == "mutineer"))
del(I)
for(var/image/I in head_mutineer.current.client.images)
if(I.loc == M.current && (I.icon_state == "loyalist" || I.icon_state == "mutineer"))
del(I)
if(M in loyalists)
var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "loyalist")
head_loyalist.current.client.images += I
if(M in mutineers)
var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "mutineer")
head_mutineer.current.client.images += I
return 1
/datum/game_mode/mutiny/announce()
fluff.announce()
/datum/game_mode/mutiny/pre_setup()
var/list/loyalist_candidates = get_head_loyalist_candidates()
if(!loyalist_candidates || loyalist_candidates.len == 0)
world << "\red Mutiny mode aborted: no valid candidates for head loyalist."
return 0
var/list/mutineer_candidates = get_head_mutineer_candidates()
if(!mutineer_candidates || mutineer_candidates.len == 0)
world << "\red Mutiny mode aborted: no valid candidates for head mutineer."
return 0
var/list/directive_candidates = get_directive_candidates()
if(!directive_candidates || directive_candidates.len == 0)
world << "\red Mutiny mode aborted: no valid candidates for Directive X."
return 0
head_loyalist = pick(loyalist_candidates)
head_mutineer = pick(mutineer_candidates)
current_directive = pick(directive_candidates)
return 1
/datum/game_mode/mutiny/post_setup()
equip_head_loyalist()
equip_head_mutineer()
loyalists.Add(head_loyalist)
mutineers.Add(head_mutineer)
replace_nuke_with_ead()
current_directive.initialize()
unbolt_vault_door()
make_secret_transcript()
update_all_icons()
spawn(0)
reveal_directives()
..()
/mob/living/carbon/human/proc/recruit_loyalist()
set name = "Recruit Loyalist"
set category = "Mutiny"
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode || src != mode.head_loyalist.current)
return
var/list/candidates = list()
for (var/mob/living/carbon/human/P in oview(src))
if(!stat && P.client && mode.can_be_recruited(P.mind, "loyalist"))
candidates += P
if(!candidates.len)
src << "\red You aren't close enough to anybody that can be recruited."
return
if(world.time < mode.recruit_loyalist_cooldown)
src << "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again."
return
mode.recruit_loyalist_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
var/mob/living/carbon/human/M = input("Select a person to recruit", "Loyalist recruitment", null) as mob in candidates
if (M)
src << "Attempting to recruit [M]..."
log_admin("[src]([src.ckey]) attempted to recruit [M] as a loyalist.")
message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a loyalist.")
var/choice = alert(M, "Asked by [src]: Will you help me complete Directive X?", "Loyalist recruitment", "No", "Yes")
if(choice == "Yes")
mode.add_loyalist(M.mind)
else if(choice == "No")
M << "\red You declined to join the loyalists."
mode.head_loyalist.current << "\red <b>[M] declined to support the loyalists.</b>"
/mob/living/carbon/human/proc/recruit_mutineer()
set name = "Recruit Mutineer"
set category = "Mutiny"
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode || src != mode.head_mutineer.current)
return
var/list/candidates = list()
for (var/mob/living/carbon/human/P in oview(src))
if(!stat && P.client && mode.can_be_recruited(P.mind, "mutineer"))
candidates += P
if(!candidates.len)
src << "\red You aren't close enough to anybody that can be recruited."
return
if(world.time < mode.recruit_mutineer_cooldown)
src << "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again."
return
mode.recruit_mutineer_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
var/mob/living/carbon/human/M = input("Select a person to recruit", "Mutineer recruitment", null) as mob in candidates
if (M)
src << "Attempting to recruit [M]..."
log_admin("[src]([src.ckey]) attempted to recruit [M] as a mutineer.")
message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a mutineer.")
var/choice = alert(M, "Asked by [src]: Will you help me stop Directive X?", "Mutineer recruitment", "No", "Yes")
if(choice == "Yes")
mode.add_mutineer(M.mind)
else if(choice == "No")
M << "\red You declined to join the mutineers."
mode.head_mutineer.current << "\red <b>[M] declined to support the mutineers.</b>"
/proc/get_mutiny_mode()
if(!ticker || !istype(ticker.mode, /datum/game_mode/mutiny))
return null
return ticker.mode
@@ -0,0 +1,83 @@
/datum/game_mode/mutiny/proc/check_antagonists_ui(admins)
var/turf/captains_key_loc = captains_key ? captains_key.get_loc_turf() : "Lost or Destroyed"
var/turf/secondary_key_loc = secondary_key ? secondary_key.get_loc_turf() : "Lost or Destroyed"
var/remaining_objectives = current_directive.get_remaining_orders()
var/txt = {"
<h5>Context:</h5>
<p>
[current_directive.get_description()]
</p>
<h5>Orders:</h5>
<ol>
[fluff.get_orders()]
</ol>
<br>
<h5>Remaining Objectives</h5>
<ol>
[remaining_objectives ? remaining_objectives : "<li>None</li>"]
</ol>
<br>
<h5>Authentication:</h5>
<b>Captain's Key:</b> [captains_key_loc]
<a href='?src=\ref[admins];choice=activate_captains_key'>Activate</a><br>
<b>Secondary Key:</b> [secondary_key_loc]
<a href='?src=\ref[admins];choice=activate_secondary_key'>Activate</a><br>
<b>EAD: [ead ? ead.get_status() : "Lost or Destroyed"]</b>
<a href='?src=\ref[admins];choice=activate_ead'>Activate</a><br>
<hr>
"}
txt += "<a href='?src=\ref[admins];choice=reassign_head_loyalist'>Reassign Head Loyalist</a><br>"
if(head_loyalist)
txt += check_role_table("Head Loyalist", list(head_loyalist), admins, 0)
var/list/loyal_crew = loyalists - head_loyalist
if(loyal_crew.len)
txt += check_role_table("Loyalists", loyal_crew, admins, 0)
txt += "<a href='?src=\ref[admins];choice=reassign_head_mutineer'>Reassign Head Mutineer</a><br>"
if(head_mutineer)
txt += check_role_table("Head Mutineer", list(head_mutineer), admins, 0)
var/list/mutiny_crew = mutineers - head_mutineer
if(mutiny_crew.len)
txt += check_role_table("Mutineers", mutiny_crew, admins, 0)
if(body_count.len)
txt += check_role_table("Casualties", body_count, admins, 0)
return txt
/datum/game_mode/mutiny/check_antagonists_topic(href, href_list[])
switch(href_list["choice"])
if("activate_captains_key")
ead.captains_key = 1
return 1
if("activate_secondary_key")
ead.secondary_key = 1
return 1
if("activate_ead")
ead.activated = 1
return 1
if("reassign_head_loyalist")
var/mob/M = get_reassignment_candidate("Loyalist")
if(M)
head_loyalist = M.mind
equip_head_loyalist()
return 1
if("reassign_head_mutineer")
var/mob/M = get_reassignment_candidate("Mutineer")
if(M)
head_mutineer = M.mind
equip_head_mutineer()
return 1
else
return 0
/datum/game_mode/mutiny/proc/get_reassignment_candidate(faction)
var/list/targets[0]
for(var/mob/living/carbon/human/H in player_list)
if(H.is_ready() && !H.is_dead())
targets.Add(H)
return input("Select a player to lead the [faction] faction.", "Head [faction] reassignment", null) as mob in targets
+251
View File
@@ -0,0 +1,251 @@
/datum/mutiny_fluff
var/datum/game_mode/mutiny/mode
New(datum/game_mode/mutiny/M)
mode = M
proc/centcom_announce(text)
world << {"
<font color='#FFA500'><hr><center><b>:-:=:-: CENTRAL COMMAND ANNOUNCEMENT :-:=:-:</b></center><hr></font>
[text]
"}
world << sound('sound/AI/commandreport.ogg')
proc/announce_incoming_fax()
centcom_announce({"
<b>Incoming Emergency Directive:</b>
<i>Captain's Office Fax Machine, [station_name()]</i>
"})
proc/announce_directives()
for (var/obj/machinery/faxmachine/fax in world)
if (fax.department == "Captain's Office")
var/obj/item/weapon/paper/directive_x = new(fax.loc)
directive_x.name = "emergency action message"
directive_x.info = get_fax_body()
proc/get_fax_body()
return {"
<center><h5>NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL</h5></center>
<p>
<b>TO:</b> Captain [mode.head_loyalist], Commanding Officer, [station_name()]<br>
<b>FROM:</b> NanoTrasen Emergency Messaging Relay<br>
<b>DATE:</b> [time2text(world.realtime, "MM/DD")]/[game_year]<br>
<b>SUBJECT:</b> Directive X<br>
</p>
[mode.current_directive.get_description()]
<hr>
<h5><b>Emergency Authentication Protocol</b></h5>
<p>
A member of your Command Staff is this shift's designated Emergency Secondary Authenticator.<br>
This Emergency Secondary Authenticator is uniquely aware of their role and possesses the Emergency Secondary Authentication Key.<br>
As Captain, you possess the Captain's Authentication Key.<br>
The Emergency Authentication Device is located in the vault of your station, and requires simultaneous activation of the Authentication Keys.<br>
An <b>Authentication Key Pinpointer</b> can be delivered via Cargo Bay to assist recovery of the Authentication Keys should they be lost aboard the station.<br>
A key's destruction or removal from the station's perimeter will automatically and irreversibly activate the Emergency Authentication Device.
</p>
<br>
<h5><b>Orders</b></h5>
<p>
Captain [mode.head_loyalist], you are to immediately initiate the following procedure; codenamed Directive X:
</p>
<ol>
[get_orders()]
</ol>
<br>
<h5><b>Authentication</b></h5>
<b>Encoded Authentication String:</b> <small>T0JCJUwoIVFDQA==</small><br>
<b>Emergency Action Code:</b> O B B _ L _ _ Q C _<br>
<font color='red'><u>ERROR: DECODING INCOMPLETE (40% LOSS)</u></font>
<br>
<br>
<br>
<center><h5>NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL</h5></center>
"}
proc/get_orders()
var/text = "<li>Immediate external transmission and signals silence. Evacuation and Cargo services will remain available. All ERT teams are engaged elsewhere. Do not communicate with Central Command under any circumstances.</li>"
for(var/order in mode.current_directive.special_orders)
text += "<li>[order]</li>"
text += "<li>Upon completion of this Directive, Captain [mode.head_loyalist] and the Emergency Secondary Authenticator must utilise the Captain's Authentication Key and the Emergency Secondary Authentication Key to activate the Emergency Authentication Device.</li>"
return text
proc/get_pda_body()
return {"<b>&larr; From Anonymous Channel:</b> <p>\"You must read this! NanoTrasen Chain of Command COMPROMISED. Command Encryptions BROKEN. [station_name()] Captain [mode.head_loyalist] will receive orders that must NOT BE BROUGHT TO FRUITION!
They don't care about us they only care about WEALTH and POWER... Share this message with people you trust.
Be safe, friend.\" (Unable to Reply)</p>"}
proc/announce_ert_unavailable()
// I might have gotten a little carried away.
centcom_announce({"
<p>The presence of [pick(
"political instability",
"quantum fluctuations",
"hostile raiders",
"derelict station debris",
"REDACTED",
"ancient alien artillery",
"solar magnetic storms",
"sentient time-travelling killbots",
"gravitational anomalies",
"wormholes to another dimension",
"a telescience mishap",
"radiation flares",
"supermatter dust",
"leaks into a negative reality",
"antiparticle clouds",
"residual bluespace energy",
"suspected syndicate operatives",
"malfunctioning von Neumann probe swarms",
"shadowy interlopers",
"a stranded Vox arkship",
"haywire IPC constructs",
"rogue Unathi exiles",
"artifacts of eldritch horror",
"a brain slug infestation",
"killer bugs that lay eggs in the husks of the living",
"a deserted transport carrying xenomorph specimens",
"an emissary for the gestalt requesting a security detail",
"a Tajaran slave rebellion",
"radical Skrellian transevolutionaries",
"classified security operations",
"science-defying raw elemental chaos")]
in the region is tying up all available local emergency resources;
<b>emergency response teams</b> can not be called at this time.</p>
"})
proc/announce()
world << "<B>The current game mode is - Mutiny!</B>"
world << {"
<p>The crew will be divided by their sense of ethics when a morally turbulent emergency directive arrives with an incomplete command validation code.<br><br>
The [loyalist_tag("Head Loyalist")] is the Captain, who carries the [loyalist_tag("Captain's Authentication Key")] at all times.<br>
The [mutineer_tag("Head Mutineer")] is a random Head of Staff who carries the [mutineer_tag("Emergency Secondary Authentication Key")].</p>
Both keys are required to activate the <b>Emergency Authentication Device (EAD)</b> in the vault, signalling to NanoTrasen that the directive is complete.
<hr>
<p>
<b>Loyalists</b> - Follow the Head Loyalist in carrying out [loyalist_tag("NanoTrasen's directives")] then activate the <b>EAD</b>.<br>
<b>Mutineers</b> - Prevent the completion of the [mutineer_tag("improperly validated directives")] and the activation of the <b>EAD</b>.
</p>
"}
proc/loyalist_tag(text)
return "<font color='blue'><b>[text]</b></font>"
proc/mutineer_tag(text)
return "<font color='#FFA500'><b>[text]</b></font>"
proc/their(datum/mind/head)
if (head.current.gender == MALE)
return "his"
else if (head.current.gender == FEMALE)
return "her"
return "their"
proc/loyalist_major_victory()
return {"
NanoTrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the <b>[station_name()]</b>, a research station in [system_name()].
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
Despite the mutiny, the crew was successful in implementing the directive and activating their on-board emergency authentication device.
[mode.mutineers.len] members of the station's personnel were charged with sedition against the company and if found guilty will be sentenced to life incarceration.
NanoTrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their successful efforts, at a ceremony this coming Thursday.
[mode.body_count.len] are believed to have died during the coup.
<p>NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.</p>
"}
proc/loyalist_minor_victory()
return {"
NanoTrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the <b>[station_name()]</b>, a research station in [system_name()].
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
Despite the mutiny, the crew was successful in implementing the directive. Unfortunately, they failed to notify Central Command of their successes due to a breach in the chain of command.
[mode.mutineers.len] members of the station's personnel were charged with sedition against the Company and if found guilty will be sentenced to life incarceration.
NanoTrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their mostly successful efforts, at a ceremony this coming Thursday.
[mode.body_count.len] are believed to have died during the coup.
<p>NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.</p>
"}
proc/no_victory()
return {"
NanoTrasen has been thrust into turmoil following an apparent mutiny by key personnel aboard the <b>[station_name()]</b>, a research station in [system_name()].
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
No further information has yet emerged from the station or its crew, who are presumed to be in holding with NanoTrasen investigators.
NanoTrasen officials refuse to comment.
Sources indicate that [mode.mutineers.len] members of the station's personnel are currently under investigation for mutiny, and [mode.loyalists.len] crew are currently providing evidence to investigators, believed to be the 'loyal' station personnel.
[mode.body_count.len] are believed to have died during the coup.
<p>NanoTrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.</p>
"}
proc/mutineer_minor_victory()
return {"
Reports have emerged that an impromptu mutiny has taken place, amid a local interstellar crisis, aboard the <b>[station_name()]</b>, a research station in [system_name()].
The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
Information at present indicates that the top-secret directive--which has since been retracted--was invalid due to a broken authentication code. Members of the crew, including an unidentified Head of Staff, prevented the directive from being accomplished.
[mode.mutineers.len] members of the station's personnel were released from interrogations today, following a mutiny investigation.
NanoTrasen has reprimanded [mode.loyalists.len] members of the crew for failing to follow command validation procedures.
[mode.body_count.len] are believed to have died during the coup.
<p>Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.</p>
"}
proc/mutineer_major_victory()
return {"
NanoTrasen has praised the efforts of [mode.head_mutineer.assigned_role] [mode.head_mutineer] and several other members of the crew, who recently seized control of a research station in [system_name()]--<b>[station_name()]</b>--amid a local interstellar crisis.
What appears to have been a "legitimate" mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
It has been revealed that the directive was invalid and fraudulent. Company officials have not released a statement about the source of the directive.
Thanks to the efforts of the resistant members of the crew, the directive was not carried out.
[mode.mutineers.len] members of the station's personnel were congratulated and awarded with the [mutineer_tag("Star of Bravery")], for their efforts in preventing the illegal directive's completion.
NanoTrasen has [mode.loyalists.len] members of the crew in holding, while it investigates the circumstances that led to the acceptance and initiation of an invalid directive.
[mode.body_count.len] are believed to have died during the coup.
<p>Even though the directive was not successfully implemented, NanoTrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.</p>
"}
proc/secret_transcript()
return {"
<center><h3>Corporate Rival Threat Assessment</h3></center>
<center><b>Gilthari Exports Incident Transcript</b></center>
<center><font color='red'>CONFIDENTIAL: PROPERTY OF NANOTRASEN</font></center>
<i>Location:</i> Operator's Desk, D Deck, Polumetis Installation<br>
<i>Time:</i> 16:11, May 24, 2558 (Sol Reckoning)<br>
<br>
<br>
<center>\[Start of transcript\]</center>
<center>\[Sound of an internal airlock door opening\]</center>
TM: Thank you for coming to see me, Director. I'm afraid this is urgent.<br>
D: Mr. Mitchell, first you send cryptic messages to my office and then you request to have me come personally to this barely lit closet you call a workstation; all of this to talk about a computer glitch?<br>
<center>\[Sound of the internal airlock door shutting\]</center>
TM: Do you remember <b>Mallory</b>?<br>
D: Who?<br>
TM: It's not who, it's what. The computer program we planted in the [system_name()] communications satellite.<br>
D: What is so important about this computer program?<br>
TM: We call her an eavesdropper. Captures network traffic, records it, and forwards the stream to the receiver autonomously.<br>
D: Speak English <i>goddamnit</i>.<br>
TM: Standard intelligence acquisition package, sir; we bug their satellite and listen. It's like we have their playbook and we know what their moves are going to be on the market before they make them.<br>
D: So Mallory doesn't work?<br>
TM: She worked, sir. We've had an ear on NanoTrasen's regional communications for weeks.<br>
D: Any news about their <b>Phoron refinement process</b>?<br>
TM: No sir. Our analysts believe they are using a separate channel for their most sensitive data.<br>
D: So what's the problem?<br>
TM: The intelligence hasn't been doing us any good. Anything that appears actionable, I send it to the analysts and they make a plan. Thing is, NanoTrasen always sees us coming.<br>
D: Tim...<br>
TM: I think they discovered the hack, sir. Case in point, <b>Energine Consolidated Solutions</b>. That subsidiary of ours that was awarded a lease on NanoTrasen's mining platform in Nyx? NanoTrasen acquired them a week before we made the announcement.<br>
D: They know about they have a bug. <i>They left her on and fed her the information for us to hear</i>, those sneaks. How did they find it?<br>
TM: Top secret communique came through. I'm not sure what happened. Either Mallory couldn't replicate the encryption scheme and garbled it going out or the transmission was already corrupted to begin with.<br>
D: Either way the transmission caused NanoTrasen to look at the satellite. They found out about Mallory.<br>
TM: Precisely sir. There's only so much I can do to cover our tracks from here.<br>
D: I'm pulling the plug. We have assets in the sector that are capable of a job like this. Thank you for bringing this to my attention.<br>
<center>\[Computer device chirps\]</center>
D: One last thing, did you happen to read anything from those secure transmissions?<br>
TM: Just the subject, 'Directive X'.<br>
D: Directive X... Now what do you suppose that means?<br>
<center>\[End of transcript\]</center>
"}
@@ -0,0 +1,27 @@
/hook/death/proc/track_kills(mob/living/carbon/human/deceased, gibbed)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.body_count.Add(deceased.mind)
return 1
/hook/clone/proc/update_icon(mob/living/carbon/human/H)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.update_icon(H.mind)
return 1
/hook/harvest_podman/proc/update_icon(mob/living/carbon/monkey/diona/D)
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.update_icon(D.mind)
return 1
/hook/roundend/proc/report_mutiny_news()
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
if (!mode) return 1
mode.round_outcome()
return 1
+17 -18
View File
@@ -228,28 +228,27 @@
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/c20r(synd_mob), slot_belt)
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(synd_mob.back), slot_in_backpack)
var/obj/item/clothing/suit/space/rig/syndi/new_suit = new(synd_mob)
var/obj/item/clothing/head/helmet/space/rig/syndi/new_helmet = new(synd_mob)
if(synd_mob.species)
var/race = synd_mob.species.name
if(race == "Unathi")
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/unathi(synd_mob), slot_wear_suit)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/unathi(synd_mob), slot_head)
else if(race == "Tajaran")
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/tajara(synd_mob), slot_wear_suit)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/tajara(synd_mob), slot_head)
else if(race == "Skrell")
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/skrell(synd_mob), slot_wear_suit)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/skrell(synd_mob), slot_head)
else
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/human(synd_mob), slot_wear_suit)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/human(synd_mob), slot_head)
else
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/syndi/human(synd_mob), slot_wear_suit)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/syndi/human(synd_mob), slot_head)
switch(race)
if("Unathi")
new_suit.species_restricted = list("Unathi")
if("Tajaran")
new_suit.species_restricted = list("Tajaran")
if("Skrell")
new_suit.species_restricted = list("Skrell")
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob)
E.imp_in = synd_mob
E.implanted = 1
synd_mob.equip_to_slot_or_del(new_suit, slot_wear_suit)
synd_mob.equip_to_slot_or_del(new_helmet, slot_head)
// var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob)
// E.imp_in = synd_mob
// E.implanted = 1
synd_mob.update_icons()
return 1
+1 -1
View File
@@ -404,7 +404,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
if(ticker)
if(ticker.mode && ticker.mode.name == "nuclear emergency")
var/obj/machinery/computer/syndicate_station/syndie_location = locate(/obj/machinery/computer/syndicate_station)
var/obj/machinery/computer/shuttle_control/multi/syndicate/syndie_location = locate(/obj/machinery/computer/shuttle_control/multi/syndicate)
if(syndie_location)
ticker.mode:syndies_didnt_escape = (syndie_location.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
ticker.mode:nuke_off_station = off_station
+2 -3
View File
@@ -8,7 +8,7 @@
item_state = "electronic"
throw_speed = 4
throw_range = 20
m_amt = 500
matter = list("metal" = 500)
var/obj/item/weapon/disk/nuclear/the_disk = null
var/active = 0
@@ -179,8 +179,7 @@
/obj/item/weapon/pinpointer/nukeop
var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle
var/obj/machinery/computer/syndicate_station/home = null
var/obj/machinery/computer/shuttle_control/multi/syndicate/home = null
/obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob)
if(!active)
@@ -45,7 +45,7 @@
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.name = "Cent. Com. Status Summary"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")
@@ -116,7 +116,7 @@
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.name = "Cent. Com. Status Summary"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")
@@ -134,7 +134,7 @@
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.name = "Cent. Com. Status Summary"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")
@@ -248,7 +248,7 @@
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper - 'Cent. Com. Announcement'"
intercept.name = "Cent. Com. Announcement"
intercept.info = message
comm.messagetitle.Add("Cent. Com. Announcement")
-6
View File
@@ -179,7 +179,6 @@
del(T)
Z << "<B>You are playing a Juggernaut. Though slow, you can withstand extreme punishment, and rip apart enemies and walls alike.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall(Z)
Z.cancel_camera()
del(C)
@@ -195,7 +194,6 @@
del(T)
Z << "<B>You are playing a Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.spell_list += new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift(Z)
Z.cancel_camera()
del(C)
@@ -211,10 +209,6 @@
del(T)
Z << "<B>You are playing an Artificer. You are incredibly weak and fragile, but you are able to construct fortifications, repair allied constructs (by clicking on them), and even create new constructs</B>"
Z << "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>"
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser(Z)
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/wall(Z)
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/floor(Z)
Z.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone(Z)
Z.cancel_camera()
del(C)
else
+3 -1
View File
@@ -91,7 +91,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt)
if(H.backbag == 1)
if(H.backbag == 3)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back)
else if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+8 -2
View File
@@ -71,6 +71,8 @@
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/virologist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
if(H.backbag == 3)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_vir(H), slot_back)
if("Medical Doctor")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
@@ -120,7 +122,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/chemist(H), slot_wear_suit)
if(H.backbag == 1)
if(H.backbag == 3)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back)
else if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
@@ -149,7 +153,9 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
if(H.backbag == 3)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back)
else if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+9 -3
View File
@@ -27,7 +27,9 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
if(H.backbag == 1)
if(H.backbag == 3)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
else if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
@@ -55,7 +57,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
if(H.backbag == 1)
if(H.backbag == 3)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
else if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
@@ -82,7 +86,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
if(H.backbag == 1)
if(H.backbag == 3)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
else if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+8
View File
@@ -366,6 +366,10 @@ var/global/datum/controller/occupations/job_master
S = locate("start*[rank]") // use old stype
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/stool/bed/chair/wheelchair))
H.buckled.loc = H.loc
H.buckled.dir = H.dir
//give them an account in the station database
var/datum/money_account/M = create_account(H.real_name, rand(50,500)*10, null)
@@ -424,6 +428,10 @@ var/global/datum/controller/occupations/job_master
new /obj/item/weapon/storage/box/survival(BPK)
H.equip_to_slot_or_del(BPK, slot_back,1)
//TODO: Generalize this by-species
if(H.species && (H.species.name == "Tajaran" || H.species.name == "Unathi"))
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
H << "<B>You are the [alt_title ? alt_title : rank].</B>"
H << "<b>As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
if(job.req_admin_notify)
+4 -1
View File
@@ -282,6 +282,7 @@
dat += "</tr>"
for(var/datum/organ/external/e in occupant.organs)
dat += "<tr>"
var/AN = ""
var/open = ""
@@ -307,13 +308,15 @@
robot = "Prosthetic:"
if(e.open)
open = "Open:"
var/unknown_body = 0
for(var/I in e.implants)
if(is_type_in_list(I,known_implants))
imp += "[I] implanted:"
else
unknown_body++
if(unknown_body)
if(unknown_body || e.hidden)
imp += "Unknown body present:"
if(!AN && !open && !infected & !imp)
AN = "None:"
+180 -149
View File
@@ -87,7 +87,6 @@
var/screen = AALARM_SCREEN_MAIN
var/area_uid
var/area/alarm_area
var/danger_level = 0
var/buildstage = 2 //2 is built, 1 is building, 0 is frame.
var/target_temperature = T0C+20
@@ -97,6 +96,13 @@
var/list/TLV = list()
var/danger_level = 0
var/pressure_dangerlevel = 0
var/oxygen_dangerlevel = 0
var/co2_dangerlevel = 0
var/phoron_dangerlevel = 0
var/temperature_dangerlevel = 0
var/other_dangerlevel = 0
/obj/machinery/alarm/server/New()
..()
@@ -187,8 +193,8 @@
var/heat_capacity = gas.heat_capacity()
var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
//Use power. Assuming that each power unit represents 1000 watts....
use_power(energy_used/1000, ENVIRON)
//Use power. Assuming that each power unit represents 1 watts....
use_power(energy_used, ENVIRON)
//We need to cool ourselves.
if(environment.temperature > target_temperature)
@@ -204,12 +210,18 @@
"You hear a click as a faint electronic humming stops.")
var/old_level = danger_level
var/old_pressurelevel = pressure_dangerlevel
danger_level = overall_danger_level()
if (old_level != danger_level)
refresh_danger_level()
update_icon()
if (old_pressurelevel != pressure_dangerlevel)
if (breach_detected())
mode = AALARM_MODE_OFF
apply_mode()
if (mode==AALARM_MODE_CYCLE && environment.return_pressure()<ONE_ATMOSPHERE*0.05)
mode=AALARM_MODE_FILL
apply_mode()
@@ -242,12 +254,12 @@
for(var/datum/gas/G in environment.trace_gases)
other_moles+=G.moles
var/pressure_dangerlevel = get_danger_level(environment_pressure, TLV["pressure"])
var/oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, TLV["oxygen"])
var/co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, TLV["carbon dioxide"])
var/phoron_dangerlevel = get_danger_level(environment.phoron*partial_pressure, TLV["phoron"])
var/temperature_dangerlevel = get_danger_level(environment.temperature, TLV["temperature"])
var/other_dangerlevel = get_danger_level(other_moles*partial_pressure, TLV["other"])
pressure_dangerlevel = get_danger_level(environment_pressure, TLV["pressure"])
oxygen_dangerlevel = get_danger_level(environment.oxygen*partial_pressure, TLV["oxygen"])
co2_dangerlevel = get_danger_level(environment.carbon_dioxide*partial_pressure, TLV["carbon dioxide"])
phoron_dangerlevel = get_danger_level(environment.phoron*partial_pressure, TLV["phoron"])
temperature_dangerlevel = get_danger_level(environment.temperature, TLV["temperature"])
other_dangerlevel = get_danger_level(other_moles*partial_pressure, TLV["other"])
return max(
pressure_dangerlevel,
@@ -258,6 +270,24 @@
temperature_dangerlevel
)
// Returns whether this air alarm thinks there is a breach, given the sensors that are available to it.
/obj/machinery/alarm/proc/breach_detected()
var/turf/simulated/location = loc
if(!istype(location))
return 0
var/datum/gas_mixture/environment = location.return_air()
var/environment_pressure = environment.return_pressure()
var/pressure_levels = TLV["pressure"]
if (environment_pressure <= pressure_levels[1]) //low pressures
if (!(mode == AALARM_MODE_PANIC || mode == AALARM_MODE_CYCLE))
return 1
return 0
/obj/machinery/alarm/proc/master_is_operating()
return alarm_area.master_air_alarm && !(alarm_area.master_air_alarm.stat & (NOPOWER|BROKEN))
@@ -616,18 +646,6 @@
updateDialog()
return
/obj/machinery/alarm/proc/shock(mob/user, prb)
if((stat & (NOPOWER))) // unpowered, no shock
return 0
if(!prob(prb))
return 0 //you lucked out, no shock for you
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start() //sparks always.
if (electrocute_mob(user, get_area(src), src))
return 1
else
return 0
///////////////
//END HACKING//
///////////////
@@ -956,108 +974,28 @@ table tr:first-child th:first-child { border: none;}
return output
/obj/machinery/alarm/Topic(href, href_list)
if(href_list["rcon"])
rcon_setting = text2num(href_list["rcon"])
if ( (get_dist(src, usr) > 1 ))
if (!istype(usr, /mob/living/silicon))
usr.machine = null
usr << browse(null, "window=air_alarm")
usr << browse(null, "window=AAlarmwires")
return
if(..() || !( Adjacent(usr) || istype(usr, /mob/living/silicon)) ) // dont forget calling super in machine Topics -walter0o
usr.machine = null
usr << browse(null, "window=air_alarm")
usr << browse(null, "window=AAlarmwires")
return
add_fingerprint(usr)
usr.machine = src
usr.set_machine(src)
if(href_list["command"])
var/device_id = href_list["id_tag"]
switch(href_list["command"])
if( "power",
"adjust_external_pressure",
"set_external_pressure",
"checks",
"co2_scrub",
"tox_scrub",
"n2o_scrub",
"panic_siphon",
"scrubbing")
// hrefs that can always be called -walter0o
if(href_list["rcon"])
var/attempted_rcon_setting = text2num(href_list["rcon"])
send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
if("set_threshold")
var/env = href_list["env"]
var/threshold = text2num(href_list["var"])
var/list/selected = TLV[env]
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
if (isnull(newval) || ..() || (locked && issilicon(usr)))
return
if (newval<0)
selected[threshold] = -1.0
else if (env=="temperature" && newval>5000)
selected[threshold] = 5000
else if (env=="pressure" && newval>50*ONE_ATMOSPHERE)
selected[threshold] = 50*ONE_ATMOSPHERE
else if (env!="temperature" && env!="pressure" && newval>200)
selected[threshold] = 200
else
newval = round(newval,0.01)
selected[threshold] = newval
if(threshold == 1)
if(selected[1] > selected[2])
selected[2] = selected[1]
if(selected[1] > selected[3])
selected[3] = selected[1]
if(selected[1] > selected[4])
selected[4] = selected[1]
if(threshold == 2)
if(selected[1] > selected[2])
selected[1] = selected[2]
if(selected[2] > selected[3])
selected[3] = selected[2]
if(selected[2] > selected[4])
selected[4] = selected[2]
if(threshold == 3)
if(selected[1] > selected[3])
selected[1] = selected[3]
if(selected[2] > selected[3])
selected[2] = selected[3]
if(selected[3] > selected[4])
selected[4] = selected[3]
if(threshold == 4)
if(selected[1] > selected[4])
selected[1] = selected[4]
if(selected[2] > selected[4])
selected[2] = selected[4]
if(selected[3] > selected[4])
selected[3] = selected[4]
apply_mode()
if(href_list["screen"])
screen = text2num(href_list["screen"])
if(href_list["atmos_unlock"])
switch(href_list["atmos_unlock"])
if("0")
air_doors_close(1)
if("1")
air_doors_open(1)
if(href_list["atmos_alarm"])
if (alarm_area.atmosalert(2))
apply_danger_level(2)
update_icon()
if(href_list["atmos_reset"])
if (alarm_area.atmosalert(0))
apply_danger_level(0)
update_icon()
if(href_list["mode"])
mode = text2num(href_list["mode"])
apply_mode()
switch(attempted_rcon_setting)
if(RCON_NO)
rcon_setting = RCON_NO
if(RCON_AUTO)
rcon_setting = RCON_AUTO
if(RCON_YES)
rcon_setting = RCON_YES
else
return
if(href_list["temperature"])
var/list/selected = TLV["temperature"]
@@ -1069,31 +1007,126 @@ table tr:first-child th:first-child { border: none;}
else
target_temperature = input_temperature + T0C
if (href_list["AAlarmwires"])
var/t1 = text2num(href_list["AAlarmwires"])
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
usr << "You need wirecutters!"
return
if (isWireColorCut(t1))
mend(t1)
else
cut(t1)
if (AAlarmwires == 0)
usr << "<span class='notice'>You cut last of wires inside [src]</span>"
update_icon()
buildstage = 1
return
// hrefs that need the AA unlocked -walter0o
if(!locked || istype(usr, /mob/living/silicon))
else if (href_list["pulse"])
var/t1 = text2num(href_list["pulse"])
if (!istype(usr.equipped(), /obj/item/device/multitool))
usr << "You need a multitool!"
return
if (isWireColorCut(t1))
usr << "You can't pulse a cut wire."
return
else
pulse(t1)
if(href_list["command"])
var/device_id = href_list["id_tag"]
switch(href_list["command"])
if( "power",
"adjust_external_pressure",
"set_external_pressure",
"checks",
"co2_scrub",
"tox_scrub",
"n2o_scrub",
"panic_siphon",
"scrubbing")
send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
if("set_threshold")
var/env = href_list["env"]
var/threshold = text2num(href_list["var"])
var/list/selected = TLV[env]
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
if (isnull(newval) || ..() || (locked && issilicon(usr)))
return
if (newval<0)
selected[threshold] = -1.0
else if (env=="temperature" && newval>5000)
selected[threshold] = 5000
else if (env=="pressure" && newval>50*ONE_ATMOSPHERE)
selected[threshold] = 50*ONE_ATMOSPHERE
else if (env!="temperature" && env!="pressure" && newval>200)
selected[threshold] = 200
else
newval = round(newval,0.01)
selected[threshold] = newval
if(threshold == 1)
if(selected[1] > selected[2])
selected[2] = selected[1]
if(selected[1] > selected[3])
selected[3] = selected[1]
if(selected[1] > selected[4])
selected[4] = selected[1]
if(threshold == 2)
if(selected[1] > selected[2])
selected[1] = selected[2]
if(selected[2] > selected[3])
selected[3] = selected[2]
if(selected[2] > selected[4])
selected[4] = selected[2]
if(threshold == 3)
if(selected[1] > selected[3])
selected[1] = selected[3]
if(selected[2] > selected[3])
selected[2] = selected[3]
if(selected[3] > selected[4])
selected[4] = selected[3]
if(threshold == 4)
if(selected[1] > selected[4])
selected[1] = selected[4]
if(selected[2] > selected[4])
selected[2] = selected[4]
if(selected[3] > selected[4])
selected[3] = selected[4]
apply_mode()
if(href_list["screen"])
screen = text2num(href_list["screen"])
if(href_list["atmos_unlock"])
switch(href_list["atmos_unlock"])
if("0")
air_doors_close(1)
if("1")
air_doors_open(1)
if(href_list["atmos_alarm"])
if (alarm_area.atmosalert(2))
apply_danger_level(2)
update_icon()
if(href_list["atmos_reset"])
if (alarm_area.atmosalert(0))
apply_danger_level(0)
update_icon()
if(href_list["mode"])
mode = text2num(href_list["mode"])
apply_mode()
// hrefs that need the AA wires exposed, note that borgs should be in range here too -walter0o
if(wiresexposed && Adjacent(usr))
if (href_list["AAlarmwires"])
var/t1 = text2num(href_list["AAlarmwires"])
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
usr << "You need wirecutters!"
return
if (isWireColorCut(t1))
mend(t1)
else
cut(t1)
if (AAlarmwires == 0)
usr << "<span class='notice'>You cut last of wires inside [src]</span>"
update_icon()
buildstage = 1
return
else if (href_list["pulse"])
var/t1 = text2num(href_list["pulse"])
if (!istype(usr.equipped(), /obj/item/device/multitool))
usr << "You need a multitool!"
return
if (isWireColorCut(t1))
usr << "You can't pulse a cut wire."
return
else
pulse(t1)
updateUsrDialog()
@@ -1202,8 +1235,7 @@ Just a object used in constructing air alarms
icon_state = "door_electronics"
desc = "Looks like a circuit. Probably is."
w_class = 2.0
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/*
@@ -1233,7 +1265,7 @@ Code shamelessly copied from apc_frame
if (!(ndir in cardinal))
return
var/turf/loc = get_turf_loc(usr)
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Air Alarm cannot be placed on this spot."
@@ -1530,8 +1562,7 @@ Just a object used in constructing fire alarms
icon_state = "door_electronics"
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
w_class = 2.0
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/*
@@ -1561,7 +1592,7 @@ Code shamelessly copied from apc_frame
if (!(ndir in cardinal))
return
var/turf/loc = get_turf_loc(usr)
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Fire Alarm cannot be placed on this spot."
+10 -2
View File
@@ -275,10 +275,15 @@ update_flag
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
//Do not use "if(..()) return" here, canisters will stop working in unpowered areas like space or on the derelict.
//Do not use "if(..()) return" here, canisters will stop working in unpowered areas like space or on the derelict. // yeah but without SOME sort of Topic check any dick can mess with them via exploits as he pleases -walter0o
if (!istype(src.loc, /turf))
return 0
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) // exploit protection -walter0o
usr << browse(null, "window=canister")
onclose(usr, "canister")
return
if(href_list["toggle"])
if (valve_open)
if (holding)
@@ -294,6 +299,9 @@ update_flag
if (href_list["remove_tank"])
if(holding)
if (valve_open)
valve_open = 0
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
if(istype(holding, /obj/item/weapon/tank))
holding.manipulated_by = usr.real_name
holding.loc = loc
+338 -368
View File
@@ -1,401 +1,371 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
var/global/list/autolathe_recipes = list( \
/* screwdriver removed*/ \
new /obj/item/weapon/reagent_containers/glass/bucket(), \
new /obj/item/weapon/crowbar(), \
new /obj/item/device/flashlight(), \
new /obj/item/weapon/extinguisher(), \
new /obj/item/device/multitool(), \
new /obj/item/device/t_scanner(), \
new /obj/item/weapon/weldingtool(), \
new /obj/item/weapon/screwdriver(), \
new /obj/item/weapon/wirecutters(), \
new /obj/item/weapon/wrench(), \
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/module/power_control(), \
new /obj/item/stack/sheet/metal(), \
new /obj/item/stack/sheet/glass(), \
new /obj/item/stack/sheet/rglass(), \
new /obj/item/stack/rods(), \
new /obj/item/weapon/rcd_ammo(), \
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/beaker/vial(), \
new /obj/item/weapon/reagent_containers/syringe(), \
new /obj/item/ammo_casing/shotgun/blank(), \
new /obj/item/ammo_casing/shotgun/beanbag(), \
new /obj/item/ammo_magazine/c45r(), \
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/weapon/light/tube(), \
new /obj/item/weapon/light/bulb(), \
new /obj/item/ashtray/glass(), \
new /obj/item/weapon/camera_assembly(), \
)
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/ammo_magazine/a357(), \
new /obj/item/ammo_magazine/c45m(), \
new /obj/item/ammo_casing/shotgun(), \
new /obj/item/ammo_casing/shotgun/dart(), \
/* new /obj/item/weapon/shield/riot(), */ \
)
/obj/machinery/autolathe
name = "\improper Autolathe"
name = "\improper autolathe"
desc = "It produces items using metal and glass."
icon_state = "autolathe"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 100
var/m_amount = 0.0
var/max_m_amount = 150000.0
var/list/stored_material = list("metal" = 0, "glass" = 0)
var/list/storage_capacity = list("metal" = 0, "glass" = 0)
var/show_category = "All"
var/g_amount = 0.0
var/max_g_amount = 75000.0
var/operating = 0.0
var/opened = 0.0
anchored = 1.0
var/list/L = list()
var/list/LL = list()
var/opened = 0
var/hacked = 0
var/disabled = 0
var/shocked = 0
var/busy = 0
var/list/wires = list()
var/hack_wire
var/disable_wire
var/shock_wire
use_power = 1
idle_power_usage = 10
active_power_usage = 100
var/busy = 0
proc
wires_win(mob/user as mob)
var/dat as text
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 as mob)
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")
regular_win(mob/user as mob)
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])<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] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
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)
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")
shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
if(..() || disabled)
return
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))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
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)
del(src)
return 1
else
user.set_machine(src)
interact(user)
return 1
if (shocked)
shock(user,50)
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 (O.m_amt == 0 && O.g_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
return
*/
var/dat = "<center><h1>Autolathe Control Panel</h1><hr/>"
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)
dat += "<table width = '100%'>"
var/material_top = "<tr>"
var/material_bottom = "<tr>"
for(var/material in stored_material)
material_top += "<td width = '25%' align = center><b>[material]</b></td>"
material_bottom += "<td width = '25%' align = center>[stored_material[material]]<b>/[storage_capacity[material]]</b></td>"
dat += "[material_top]</tr>[material_bottom]</tr></table><hr>"
dat += "<h2>Printable Designs</h2><h3>Showing: <a href='?src=\ref[src];change_category=1'>[show_category]</a>.</h3></center><table width = '100%'>"
var/index = 0
for(var/datum/autolathe/recipe/R in autolathe_recipes)
index++
if(R.hidden && !hacked || (show_category != "All" && show_category != R.category))
continue
var/can_make = 1
var/material_string = ""
var/multiplier_string = ""
var/max_sheets
var/comma
if(!R.resources || !R.resources.len)
material_string = "No resources required.</td>"
else
usr.before_take_item(O)
O.loc = src
icon_state = "autolathe"
//Make sure it's buildable and list requires resources.
for(var/material in R.resources)
var/sheets = round(stored_material[material]/R.resources[material])
if(isnull(max_sheets) || max_sheets > sheets)
max_sheets = sheets
if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material])
can_make = 0
if(!comma)
comma = 1
else
material_string += ", "
material_string += "[R.resources[material]] [material]"
material_string += ".<br></td>"
//Build list of multipliers for sheets.
if(R.is_stack)
if(max_sheets && max_sheets > 0)
multiplier_string += "<br>"
for(var/i = 5;i<max_sheets;i*=2) //5,10,20,40...
multiplier_string += "<a href='?src=\ref[src];make=[index];multiplier=[i]'>\[x[i]\]</a>"
multiplier_string += "<a href='?src=\ref[src];make=[index];multiplier=[max_sheets]'>\[x[max_sheets]\]</a>"
dat += "<tr><td width = 180>[R.hidden ? "<font color = 'red'>*</font>" : ""]<b>[can_make ? "<a href='?src=\ref[src];make=[index];multiplier=1'>" : ""][R.name][can_make ? "</a>" : ""]</b>[R.hidden ? "<font color = 'red'>*</font>" : ""][multiplier_string]</td><td align = right>[material_string]</tr>"
dat += "</table><hr>"
//Hacking.
if(opened)
dat += "<h2>Maintenance Panel</h2>"
for(var/wire in wires)
dat += "[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>"
dat += "<br>"
dat += "The red light is [disabled ? "off" : "on"].<br>"
dat += "The green light is [shocked ? "off" : "on"].<br>"
dat += "The blue light is [hacked ? "off" : "on"].<br>"
dat += "<hr>"
user << browse(dat, "window=autolathe")
onclose(user, "autolathe")
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return
if (busy)
user << "\red \The [src] is busy. Please wait for completion of previous operation."
return
if(istype(O, /obj/item/weapon/screwdriver))
opened = !opened
icon_state = (opened ? "autolathe_t": "autolathe")
user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
updateUsrDialog()
return
if (opened)
//Dismantle the frame.
if(istype(O, /obj/item/weapon/crowbar))
dismantle()
return
//Resources are being loaded.
var/obj/item/eating = O
if(!eating.matter)
user << "\The [eating] does not contain significant amounts of useful materials and cannot be accepted."
return
var/filltype = 0 // Used to determine message.
var/total_used = 0 // Amount of material used.
var/mass_per_sheet = 0 // Amount of material constituting one sheet.
for(var/material in eating.matter)
if(isnull(stored_material[material]) || isnull(storage_capacity[material]))
continue
if(stored_material[material] >= storage_capacity[material])
continue
var/total_material = eating.matter[material]
//If it's a stack, we eat multiple sheets.
if(istype(eating,/obj/item/stack))
var/obj/item/stack/stack = eating
total_material *= stack.amount
if(stored_material[material] + total_material > storage_capacity[material])
total_material = storage_capacity[material] - stored_material[material]
filltype = 1
else
filltype = 2
stored_material[material] += total_material
total_used += total_material
mass_per_sheet += eating.matter[material]
if(!filltype)
user << "\red \The [src] is full. Please remove material from the autolathe in order to insert more."
return
else if(filltype == 1)
user << "You fill \the [src] to capacity with \the [eating]."
else
user << "You fill \the [src] with \the [eating]."
flick("autolathe_o",src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
if(istype(eating,/obj/item/stack))
var/obj/item/stack/stack = eating
stack.use(max(1,round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
else
user.drop_item(O)
del(O)
updateUsrDialog()
return
/obj/machinery/autolathe/attack_paw(mob/user as mob)
return 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)
add_fingerprint(usr)
if(busy)
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
return
if(href_list["change_category"])
var/choice = input("Which category do you wish to display?") as null|anything in autolathe_categories+"All"
if(!choice) return
show_category = choice
if(href_list["make"] && autolathe_recipes)
var/index = text2num(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
var/datum/autolathe/recipe/making
if(index > 0 && index <= autolathe_recipes.len)
making = autolathe_recipes[index]
//Exploit detection, not sure if necessary after rewrite.
if(!making || multiplier < 0 || multiplier > 100)
var/turf/exploit_loc = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate an item! ([exploit_loc ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[exploit_loc.x];Y=[exploit_loc.y];Z=[exploit_loc.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate an item!")
return
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)
del(O)
//This needs some work.
use_power(max(2000, (making.power_use*multiplier)))
//Check if we still have the materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
if(stored_material[material] < (making.resources[material]*multiplier))
return
//Consume materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
stored_material[material] = max(0,stored_material[material]-(making.resources[material]*multiplier))
//Fancy autolathe animation.
flick("autolathe_n",src)
sleep(50)
busy = 0
src.updateUsrDialog()
attack_paw(mob/user as mob)
return src.attack_hand(user)
//Sanity check.
if(!making || !src) return
attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
//Create the desired item.
var/obj/item/I = new making.path(get_step(loc, get_dir(src,usr)))
if(multiplier>1 && istype(I,/obj/item/stack))
var/obj/item/stack/S = I
S.amount = multiplier
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!"
return
if(wires[temp_wire])
usr << "You can't pulse a cut wire."
return
if(hack_wire == temp_wire)
hacked = !hacked
spawn(100)
hacked = !hacked
if(disable_wire == temp_wire)
disabled = !disabled
shock(usr,50)
spawn(100)
disabled = !disabled
if(shock_wire == temp_wire)
shocked = !shocked
shock(usr,50)
spawn(100)
shocked = !shocked
else if(href_list["act"] == "wire")
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
return
wires[temp_wire] = !wires[temp_wire]
if(hack_wire == temp_wire)
hacked = !hacked
if(disable_wire == temp_wire)
disabled = !disabled
shock(usr,50)
if(shock_wire == temp_wire)
shocked = !shocked
shock(usr,50)
updateUsrDialog()
Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if (!busy)
if(href_list["make"])
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"])
/obj/machinery/autolathe/New()
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)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier)
busy = 1
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
use_power(power)
spawn(16)
use_power(power)
spawn(16)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(T)
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
busy = 0
src.updateUsrDialog()
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
//Create global autolathe recipe list if it hasn't been made already.
if(isnull(autolathe_recipes))
autolathe_recipes = list()
autolathe_categories = list()
for(var/R in typesof(/datum/autolathe/recipe)-/datum/autolathe/recipe)
var/datum/autolathe/recipe/recipe = new R
autolathe_recipes += recipe
autolathe_categories |= recipe.category
var/obj/item/I = new recipe.path
if(I.matter && !recipe.resources) //This can be overidden in the datums.
recipe.resources = list()
for(var/material in I.matter)
if(!isnull(storage_capacity[material]))
recipe.resources[material] = round(I.matter[material]*1.25) // More expensive to produce than they are to recycle.
del(I)
//Create parts for lathe.
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()
..()
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
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()
//Init wires.
wires = list(
"Light Red" = 0,
"Dark Red" = 0,
"Blue" = 0,
"Green" = 0,
"Yellow" = 0,
"Black" = 0,
"White" = 0,
"Gray" = 0,
"Orange" = 0,
"Pink" = 0
)
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
//Randomize wires.
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
hack_wire = pick(w)
w -= hack_wire
shock_wire = pick(w)
w -= shock_wire
disable_wire = pick(w)
w -= disable_wire
//Updates overall lathe storage size.
/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
storage_capacity["metal"] = tot_rating * 25000
storage_capacity["glass"] = tot_rating * 12500
+304
View File
@@ -0,0 +1,304 @@
/var/global/list/autolathe_recipes
/var/global/list/autolathe_categories
/datum/autolathe/recipe
var/name = "object"
var/path
var/list/resources
var/hidden
var/category
var/power_use = 0
var/is_stack
/datum/autolathe/recipe/bucket
name = "bucket"
path = /obj/item/weapon/reagent_containers/glass/bucket
category = "General"
/datum/autolathe/recipe/flashlight
name = "flashlight"
path = /obj/item/device/flashlight
category = "General"
/datum/autolathe/recipe/extinguisher
name = "extinguisher"
path = /obj/item/weapon/extinguisher
category = "General"
/datum/autolathe/recipe/crowbar
name = "crowbar"
path = /obj/item/weapon/crowbar
category = "Tools"
/datum/autolathe/recipe/multitool
name = "multitool"
path = /obj/item/device/multitool
category = "Tools"
/datum/autolathe/recipe/t_scanner
name = "T-ray scanner"
path = /obj/item/device/t_scanner
category = "Tools"
/datum/autolathe/recipe/weldertool
name = "welding tool"
path = /obj/item/weapon/weldingtool
category = "Tools"
/datum/autolathe/recipe/screwdriver
name = "screwdriver"
path = /obj/item/weapon/screwdriver
category = "Tools"
/datum/autolathe/recipe/wirecutters
name = "wirecutters"
path = /obj/item/weapon/wirecutters
category = "Tools"
/datum/autolathe/recipe/wrench
name = "wrench"
path = /obj/item/weapon/wrench
category = "Tools"
/datum/autolathe/recipe/radio_headset
name = "radio headset"
path = /obj/item/device/radio/headset
category = "General"
/datum/autolathe/recipe/radio_bounced
name = "station bounced radio"
path = /obj/item/device/radio/off
category = "General"
/datum/autolathe/recipe/weldermask
name = "welding mask"
path = /obj/item/clothing/head/welding
category = "General"
/datum/autolathe/recipe/metal
name = "steel sheets"
path = /obj/item/stack/sheet/metal
category = "General"
is_stack = 1
/datum/autolathe/recipe/glass
name = "glass sheets"
path = /obj/item/stack/sheet/glass
category = "General"
is_stack = 1
/datum/autolathe/recipe/rglass
name = "reinforced glass sheets"
path = /obj/item/stack/sheet/rglass
category = "General"
is_stack = 1
/datum/autolathe/recipe/rods
name = "metal rods"
path = /obj/item/stack/rods
category = "General"
is_stack = 1
/datum/autolathe/recipe/knife
name = "kitchen knife"
path = /obj/item/weapon/kitchenknife
category = "General"
/datum/autolathe/recipe/taperecorder
name = "tape recorder"
path = /obj/item/device/taperecorder
category = "General"
/datum/autolathe/recipe/airlockmodule
name = "airlock electronics"
path = /obj/item/weapon/airlock_electronics
category = "Engineering"
/datum/autolathe/recipe/airalarm
name = "air alarm electronics"
path = /obj/item/weapon/airalarm_electronics
category = "Engineering"
/datum/autolathe/recipe/firealarm
name = "fire alarm electronics"
path = /obj/item/weapon/firealarm_electronics
category = "Engineering"
/datum/autolathe/recipe/powermodule
name = "power control module"
path = /obj/item/weapon/module/power_control
category = "Engineering"
/datum/autolathe/recipe/rcd_ammo
name = "matter cartridge"
path = /obj/item/weapon/rcd_ammo
category = "Engineering"
/datum/autolathe/recipe/scalpel
name = "scalpel"
path = /obj/item/weapon/scalpel
category = "Medical"
/datum/autolathe/recipe/circularsaw
name = "circular saw"
path = /obj/item/weapon/circular_saw
category = "Medical"
/datum/autolathe/recipe/surgicaldrill
name = "surgical drill"
path = /obj/item/weapon/surgicaldrill
category = "Medical"
/datum/autolathe/recipe/retractor
name = "retractor"
path = /obj/item/weapon/retractor
category = "Medical"
/datum/autolathe/recipe/cautery
name = "cautery"
path = /obj/item/weapon/cautery
category = "Medical"
/datum/autolathe/recipe/hemostat
name = "hemostat"
path = /obj/item/weapon/hemostat
category = "Medical"
/datum/autolathe/recipe/beaker
name = "glass beaker"
path = /obj/item/weapon/reagent_containers/glass/beaker
category = "Medical"
/datum/autolathe/recipe/beaker_large
name = "large glass beaker"
path = /obj/item/weapon/reagent_containers/glass/beaker/large
category = "Medical"
/datum/autolathe/recipe/vial
name = "glass vial"
path = /obj/item/weapon/reagent_containers/glass/beaker/vial
category = "Medical"
/datum/autolathe/recipe/syringe
name = "syringe"
path = /obj/item/weapon/reagent_containers/syringe
category = "Medical"
/datum/autolathe/recipe/shotgun_blanks
name = "ammunition (shotgun, blanks)"
path = /obj/item/ammo_casing/shotgun/blank
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun_beanbag
name = "ammunition (shotgun, beanbag)"
path = /obj/item/ammo_casing/shotgun/beanbag
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_rubber
name = "ammunition (rubber)"
path = /obj/item/ammo_magazine/c45r
category = "Arms and Ammunition"
/datum/autolathe/recipe/consolescreen
name = "console screen"
path = /obj/item/weapon/stock_parts/console_screen
category = "Devices and Components"
/datum/autolathe/recipe/igniter
name = "igniter"
path = /obj/item/device/assembly/igniter
category = "Devices and Components"
/datum/autolathe/recipe/signaler
name = "signaler"
path = /obj/item/device/assembly/signaler
category = "Devices and Components"
/datum/autolathe/recipe/sensor_infra
name = "infrared sensor"
path = /obj/item/device/assembly/infra
category = "Devices and Components"
/datum/autolathe/recipe/timer
name = "timer"
path = /obj/item/device/assembly/timer
category = "Devices and Components"
/datum/autolathe/recipe/sensor_prox
name = "proximity sensor"
path = /obj/item/device/assembly/prox_sensor
category = "Devices and Components"
/datum/autolathe/recipe/tube
name = "light tube"
path = /obj/item/weapon/light/tube
category = "General"
/datum/autolathe/recipe/bulb
name = "light bulb"
path = /obj/item/weapon/light/bulb
category = "General"
/datum/autolathe/recipe/ashtray_glass
name = "glass ashtray"
path = /obj/item/ashtray/glass
category = "General"
/datum/autolathe/recipe/camera_assembly
name = "camera assembly"
path = /obj/item/weapon/camera_assembly
category = "Engineering"
/datum/autolathe/recipe/flamethrower
name = "flamethrower"
path = /obj/item/weapon/flamethrower/full
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_revolver_1
name = "ammunition (.357)"
path = /obj/item/ammo_magazine/a357
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_revolver_2
name = "ammunition (.45)"
path = /obj/item/ammo_magazine/c45m
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun
name = "ammunition (shell, shotgun)"
path = /obj/item/ammo_casing/shotgun
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun_dart
name = "ammunition (dart, shotgun)"
path = /obj/item/ammo_casing/shotgun/dart
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/rcd
name = "rapid construction device"
path = /obj/item/weapon/rcd
hidden = 1
category = "Engineering"
/datum/autolathe/recipe/electropack
name = "electropack"
path = /obj/item/device/radio/electropack
hidden = 1
category = "Devices and Components"
/datum/autolathe/recipe/welder_industrial
name = "industrial welding tool"
path = /obj/item/weapon/weldingtool/largetank
hidden = 1
category = "Tools"
/datum/autolathe/recipe/handcuffs
name = "handcuffs"
path = /obj/item/weapon/handcuffs
hidden = 1
category = "General"
+6 -5
View File
@@ -102,21 +102,22 @@
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {list-style: none; margin: 5px; padding: 0px;}
ul {margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
body {font-size: 13px; font-family: Verdana;}
</style>
</head>
<body>
<h3>Raising Bees</h3>
<h1>Raising Bees</h1>
Bees are loving but fickle creatures. Don't mess with their hive and stay away from any clusters of them, and you'll avoid their ire.
Sometimes, you'll need to dig around in there for those delicious sweeties though - in that case make sure you wear sealed protection gear
and carry an extinguisher or smoker with you - any bees chasing you, once calmed down, can thusly be netted and returned safely to the hive.<br.
<br>
Beezeez is a cure-all panacea for them, but use it too much and the hive may grow to apocalyptic proportions. Other than that, bees are excellent pets
BeezEez is a cure-all panacea for them, but use it too much and the hive may grow to apocalyptic proportions. Other than that, bees are excellent pets
for all the family and are excellent caretakers of one's garden: having a hive or two around will aid in the longevity and growth rate of plants,
and aid them in fighting off poisons and disease.
</body>
</html>
"}
</html>
"}
+2 -2
View File
@@ -269,7 +269,7 @@ Auto Patrol: []"},
walk_to(src,0)
if (target) // make sure target exists
if (get_dist(src, src.target) <= 1) // if right next to perp
if (Adjacent(target)) // if right next to perp
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "[lasercolor]ed209-c"
spawn(2)
@@ -731,7 +731,7 @@ Auto Patrol: []"},
/obj/machinery/bot/ed209/Bump(M as mob|obj) //Leave no door unopened!
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
var/obj/machinery/door/D = M
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard) && !istype(D,/obj/machinery/door/poddoor))
D.open()
src.frustration = 0
else if ((istype(M, /mob/living/)) && (!src.anchored))
+9 -3
View File
@@ -441,7 +441,7 @@
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/datum/organ/external/affecting = human.get_organ(ran_zone(dam_zone))
var/armor = human.run_armor_check(affecting, "melee")
human.apply_damage(damage,BRUTE,affecting,armor)
human.apply_damage(damage,BRUTE,affecting,armor,sharp=1,edge=1)
else // warning, plants infested with weeds!
mode = FARMBOT_MODE_WAITING
@@ -540,10 +540,9 @@
var/obj/item/weapon/farmbot_arm_assembly/A = new /obj/item/weapon/farmbot_arm_assembly
A.loc = src.loc
A.layer = 20
user << "You add the robot arm to the [src]"
src.loc = A //Place the water tank into the assembly, it will be needed for the finished bot
user.u_equip(S)
del(S)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -552,18 +551,21 @@
src.build_step++
user << "You add the plant analyzer to [src]!"
src.name = "farmbot assembly"
user.u_equip(W)
del(W)
else if(( istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (src.build_step == 1))
src.build_step++
user << "You add a bucket to [src]!"
src.name = "farmbot assembly with bucket"
user.u_equip(W)
del(W)
else if(( istype(W, /obj/item/weapon/minihoe)) && (src.build_step == 2))
src.build_step++
user << "You add a minihoe to [src]!"
src.name = "farmbot assembly with bucket and minihoe"
user.u_equip(W)
del(W)
else if((isprox(W)) && (src.build_step == 3))
@@ -575,6 +577,7 @@
S.tank = wTank
S.loc = get_turf(src)
S.name = src.created_name
user.u_equip(W)
del(W)
del(src)
@@ -587,3 +590,6 @@
return
src.created_name = t
/obj/item/weapon/farmbot_arm_assembly/attack_hand(mob/user as mob)
return //it's a converted watertank, no you cannot pick it up and put it in your backpack
+2 -2
View File
@@ -284,7 +284,7 @@
continue
if(src.patient && (get_dist(src,src.patient) <= 1))
if(src.patient && Adjacent(patient))
if(!src.currently_healing)
src.currently_healing = 1
src.frustration = 0
@@ -480,7 +480,7 @@
/obj/machinery/bot/medbot/Bump(M as mob|obj) //Leave no door unopened!
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
var/obj/machinery/door/D = M
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard) && !istype(D,/obj/machinery/door/poddoor))
D.open()
src.frustration = 0
else if ((istype(M, /mob/living/)) && (!src.anchored))
+2 -4
View File
@@ -219,7 +219,7 @@ Auto Patrol: []"},
walk_to(src,0)
if(target) // make sure target exists
if(get_dist(src, src.target) <= 1 && isturf(src.target.loc)) // if right next to perp
if(Adjacent(target)) // if right next to perp
if(istype(src.target,/mob/living/carbon))
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
src.icon_state = "secbot-c"
@@ -600,8 +600,6 @@ Auto Patrol: []"},
if(istype(C, /mob/living/carbon/human))
src.threatlevel = src.assess_perp(C)
else if((src.idcheck) && (istype(C, /mob/living/carbon/monkey)))
src.threatlevel = 4
else if(istype(M, /mob/living/simple_animal/hostile))
if(M.stat == DEAD)
@@ -682,7 +680,7 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/Bump(M as mob|obj) //Leave no door unopened!
if((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
var/obj/machinery/door/D = M
if(!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
if(!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard) && !istype(D,/obj/machinery/door/poddoor))
D.open()
src.frustration = 0
else if((istype(M, /mob/living/)) && (!src.anchored))
+1 -6
View File
@@ -94,11 +94,6 @@
src.view_range = num
cameranet.updateVisibility(src, 0)
/obj/machinery/camera/proc/shock(var/mob/living/user)
if(!istype(user))
return
user.electrocute_act(10, src)
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
if(!istype(user))
return
@@ -215,7 +210,7 @@
/obj/machinery/camera/proc/cancelCameraAlarm()
alarm_on = 0
for(var/mob/living/silicon/S in mob_list)
S.cancelAlarm("Camera", get_area(src), list(src), src)
S.cancelAlarm("Camera", get_area(src), src)
/obj/machinery/camera/proc/can_use()
if(!status)
@@ -6,8 +6,7 @@
w_class = 2
anchored = 0
m_amt = 700
g_amt = 300
matter = list("metal" = 700,"glass" = 300)
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/phoron, /obj/item/weapon/reagent_containers/food/snacks/grown/carrot)
+2 -2
View File
@@ -42,14 +42,14 @@
/obj/machinery/camera/proc/cancelAlarm()
if (detectTime == -1)
for (var/mob/living/silicon/aiPlayer in player_list)
if (status) aiPlayer.cancelAlarm("Motion", src.loc.loc)
if (status) aiPlayer.cancelAlarm("Motion", get_area(src), src)
detectTime = 0
return 1
/obj/machinery/camera/proc/triggerAlarm()
if (!detectTime) return 0
for (var/mob/living/silicon/aiPlayer in player_list)
if (status) aiPlayer.triggerAlarm("Motion", src.loc.loc, src)
if (status) aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)
detectTime = -1
return 1
-1
View File
@@ -50,7 +50,6 @@
if(CAMERA_WIRE_POWER)
deactivate(usr, 1)
//shock(usr)
if(CAMERA_WIRE_LIGHT)
light_disabled = 1
+7 -4
View File
@@ -10,6 +10,7 @@
power_channel = EQUIP
var/obj/item/weapon/cell/charging = null
var/chargelevel = -1
var/efficiency = 0.875 //<1.0 means some power is lost in the charging process, >1.0 means free energy.
proc
updateicon()
icon_state = "ccharger[charging ? 1 : 0]"
@@ -91,8 +92,10 @@
//world << "ccpt [charging] [stat]"
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
return
use_power(200) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
charging.give(175) //inefficiency.
var/power_used = 100000 //for 200 units of charge. Yes, thats right, 100 kW. Is something wrong with CELLRATE?
power_used = charging.give(power_used*CELLRATE*efficiency)
use_power(power_used)
updateicon()
+4 -3
View File
@@ -183,6 +183,7 @@
H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>"
// -- Mode/mind specific stuff goes here
callHook("clone", list(H))
switch(ticker.mode.name)
if("revolution")
@@ -212,8 +213,8 @@
if(R.dna.species == "Human") //no more xenos losing ears/tentacles
H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
//for(var/datum/language/L in languages)
// H.add_language(L.name)
for(var/datum/language/L in R.languages)
H.add_language(L.name)
H.suiciding = 0
src.attempting = 0
return 1
@@ -448,7 +449,7 @@
*/
/obj/item/weapon/paper/Cloning
name = "paper - 'H-87 Cloning Apparatus Manual"
name = "H-87 Cloning Apparatus Manual"
info = {"<h4>Getting Started</h4>
Congratulations, your station has purchased the H-87 industrial cloning device!<br>
Using the H-87 is almost as simple as brain surgery! Simply insert the target humanoid into the scanning chamber and select the scan option to create a new profile!<br>
+3 -32
View File
@@ -2,6 +2,7 @@
name = "AI System Integrity Restorer"
icon = 'icons/obj/computer.dmi'
icon_state = "ai-fixer"
circuit = /obj/item/weapon/circuitboard/aifixer
req_access = list(access_captain, access_robotics, access_heads)
var/mob/living/silicon/ai/occupant = null
var/active = 0
@@ -11,43 +12,13 @@
/obj/machinery/computer/aifixer/attackby(I as obj, user as mob)
/*
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/robotics/M = new /obj/item/weapon/circuitboard/robotics( A )
for (var/obj/C in src)
C.loc = src.loc
M.id = src.id
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/robotics/M = new /obj/item/weapon/circuitboard/robotics( A )
for (var/obj/C in src)
C.loc = src.loc
M.id = src.id
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
*/
if(istype(I, /obj/item/device/aicard))
if(stat & (NOPOWER|BROKEN))
user << "This terminal isn't functioning right now, get it working!"
return
I:transfer_ai("AIFIXER","AICARD",src,user)
//src.attack_hand(user)
..()
return
/obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob)
+2 -19
View File
@@ -238,27 +238,10 @@
src.updateUsrDialog()
else if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/arcade/M = new /obj/item/weapon/circuitboard/arcade( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.anchored = 1
else
..()
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
A.state = 3
A.icon_state = "3"
else
user << "\blue You disconnect the monitor."
A.state = 4
A.icon_state = "4"
del(src)
/obj/machinery/computer/arcade/emp_act(severity)
if(stat & (NOPOWER|BROKEN))
..(severity)

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