Merge branch 'dev' into aiemergencymessage

This commit is contained in:
Yoshax
2015-04-05 17:39:30 +01:00
93 changed files with 894 additions and 402 deletions
+15 -2
View File
@@ -84,7 +84,8 @@ var/list/admin_verbs_admin = list(
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/aooc,
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
/client/proc/change_human_appearance_self /* Allows the human-based mob itself change its basic appearance */
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
/client/proc/change_security_level
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
@@ -762,6 +763,17 @@ var/list/admin_verbs_mentor = list(
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1)
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/change_security_level()
set name = "Set security level"
set desc = "Sets the station security level"
set category = "Admin"
if(!check_rights(R_ADMIN)) return
var sec_level = input(usr, "It's currently code [get_security_level()].", "Select Security Level") as null|anything in (list("green","blue","red","delta")-get_security_level())
if(alert("Switch from code [get_security_level()] to code [sec_level]?","Change security level?","Yes","No") == "Yes")
set_security_level(sec_level)
log_admin("[key_name(usr)] changed the security level to code [sec_level].")
//---- bs12 verbs ----
@@ -857,7 +869,8 @@ var/list/admin_verbs_mentor = list(
var/job = input("Please select job slot to free", "Free job slot") as null|anything in jobs
if (job)
job_master.FreeRole(job)
return
message_admins("A job slot for [job] has been opened by [key_name_admin(usr)]")
return
/client/proc/toggleattacklogs()
set name = "Toggle Attack Log Messages"
@@ -12,6 +12,7 @@
name = "mounted grenade launcher"
desc = "A shoulder-mounted micro-explosive dispenser."
selectable = 1
icon_state = "grenade_launcher"
interface_name = "integrated grenade launcher"
interface_desc = "Discharges loaded grenades against the wearer's location."
@@ -86,6 +87,7 @@
selectable = 1
usable = 1
module_cooldown = 0
icon_state = "lcannon"
engage_string = "Configure"
@@ -115,6 +117,7 @@
name = "mounted energy gun"
desc = "A forearm-mounted energy projector."
icon_state = "egun"
interface_name = "mounted energy gun"
interface_desc = "A forearm-mounted suit-powered energy gun."
@@ -124,7 +127,8 @@
/obj/item/rig_module/mounted/taser
name = "mounted taser"
desc = "A shoulder-mounted energy projector."
desc = "A palm-mounted nonlethal energy projector."
icon_state = "taser"
usable = 0
@@ -140,6 +144,7 @@
name = "energy blade projector"
desc = "A powerful cutting beam projector."
icon_state = "eblade"
activate_string = "Project Blade"
deactivate_string = "Cancel Blade"
@@ -200,6 +205,7 @@
selectable = 1
usable = 1
use_power_cost = 15
icon_state = "enet"
engage_string = "Fabricate Star"
@@ -29,6 +29,7 @@
name = "IIS module"
desc = "An integrated intelligence system module suitable for most hardsuits."
icon_state = "IIS"
toggleable = 1
usable = 1
disruptive = 0
@@ -202,6 +203,7 @@
name = "datajack module"
desc = "A simple induction datalink module."
icon_state = "datajack"
toggleable = 1
activates_on_touch = 1
usable = 0
@@ -292,6 +294,7 @@
name = "electrowarfare module"
desc = "A bewilderingly complex bundle of fiber optics and chips."
icon_state = "ewar"
toggleable = 1
usable = 0
@@ -322,6 +325,7 @@
name = "hardsuit power sink"
desc = "An heavy-duty power sink."
icon_state = "powersink"
toggleable = 1
activates_on_touch = 1
disruptive = 0
@@ -66,6 +66,7 @@
name = "teleportation module"
desc = "A complex, sleek-looking, hardsuit-integrated teleportation module."
icon_state = "teleporter"
use_power_cost = 40
redundant = 1
usable = 1
@@ -126,6 +127,7 @@
name = "net projector"
desc = "Some kind of complex energy projector with a hardsuit mount."
icon_state = "enet"
interface_name = "energy net launcher"
interface_desc = "An advanced energy-patterning projector used to capture targets."
@@ -147,6 +149,7 @@
name = "self-destruct module"
desc = "Oh my God, Captain. A bomb."
icon_state = "deadman"
usable = 1
active = 1
permanent = 1
@@ -28,6 +28,7 @@
/obj/item/rig_module/device/plasmacutter
name = "hardsuit plasma cutter"
desc = "A lethal-looking industrial cutter."
icon_state = "plasmacutter"
interface_name = "plasma cutter"
interface_desc = "A self-sustaining plasma arc capable of cutting through walls."
suit_overlay_active = "plasmacutter"
@@ -38,6 +39,7 @@
/obj/item/rig_module/device/healthscanner
name = "health scanner module"
desc = "A hardsuit-mounted health scanner."
icon_state = "scanner"
interface_name = "health scanner"
interface_desc = "Shows an informative health readout when used on a subject."
@@ -46,6 +48,7 @@
/obj/item/rig_module/device/drill
name = "hardsuit drill mount"
desc = "A very heavy diamond-tipped drill."
icon_state = "drill"
interface_name = "mounted drill"
interface_desc = "A diamond-tipped industrial drill."
suit_overlay_active = "mounted-drill"
@@ -56,6 +59,7 @@
/obj/item/rig_module/device/anomaly_scanner
name = "hardsuit anomaly scanner"
desc = "You think it's called an Elder Sarsparilla or something."
icon_state = "eldersasparilla"
interface_name = "Alden-Saraspova counter"
interface_desc = "An exotic particle detector commonly used by xenoarchaeologists."
engage_string = "Begin Scan"
@@ -66,6 +70,7 @@
/obj/item/rig_module/device/orescanner
name = "ore scanner module"
desc = "A clunky old ore scanner."
icon_state = "scanner"
interface_name = "ore detector"
interface_desc = "A sonar system for detecting large masses of ore."
engage_string = "Begin Scan"
@@ -76,6 +81,7 @@
/obj/item/rig_module/device/rcd
name = "RCD mount"
desc = "A cell-powered rapid construction device for a hardsuit."
icon_state = "rcd"
interface_name = "mounted RCD"
interface_desc = "A device for building or removing walls. Cell-powered."
usable = 1
@@ -105,9 +111,12 @@
device.afterattack(target,holder.wearer,1)
return 1
/obj/item/rig_module/chem_dispenser
name = "mounted chemical dispenser"
desc = "A complex web of tubing and needles suitable for hardsuit use."
icon_state = "injector"
usable = 1
selectable = 0
toggleable = 0
@@ -223,6 +232,19 @@
/obj/item/rig_module/chem_dispenser/combat
name = "combat chemical injector"
desc = "A complex web of tubing and needles suitable for hardsuit use."
charges = list(
list("synaptizine", "synaptizine", 0, 30),
list("hyperzine", "hyperzine", 0, 30),
list("oxycodone", "oxycodone", 0, 30),
list("nutrients", "nutriment", 0, 80),
)
interface_name = "combat chem dispenser"
interface_desc = "Dispenses loaded chemicals directly into the bloodstream."
/obj/item/rig_module/chem_dispenser/injector
@@ -239,6 +261,7 @@
name = "hardsuit voice synthesiser"
desc = "A speaker box and sound processor."
icon_state = "megaphone"
usable = 1
selectable = 0
toggleable = 0
@@ -291,6 +314,7 @@
name = "hardsuit maneuvering jets"
desc = "A compact gas thruster system for a hardsuit."
icon_state = "thrusters"
usable = 1
toggleable = 1
selectable = 0
@@ -1,8 +1,12 @@
/*
* Contains
* /obj/item/rig_module/vision
* /obj/item/rig_module/vision/multi
* /obj/item/rig_module/vision/meson
* /obj/item/rig_module/vision/thermal
* /obj/item/rig_module/vision/nvg
* /obj/item/rig_module/vision/medhud
* /obj/item/rig_module/vision/sechud
*/
/datum/rig_vision
@@ -24,10 +28,21 @@
/datum/rig_vision/meson/New()
glasses = new /obj/item/clothing/glasses/meson
/datum/rig_vision/sechud
mode = "security HUD"
/datum/rig_vision/sechud/New()
glasses = new /obj/item/clothing/glasses/hud/security
/datum/rig_vision/medhud
mode = "medical HUD"
/datum/rig_vision/medhud/New()
glasses = new /obj/item/clothing/glasses/hud/health
/obj/item/rig_module/vision
name = "hardsuit visor"
desc = "A layered, translucent visor system for a hardsuit."
icon_state = "optics"
interface_name = "optical scanners"
interface_desc = "An integrated multi-mode vision system."
@@ -49,10 +64,27 @@
var/vision_index
/obj/item/rig_module/vision/multi
name = "hardsuit optical package"
desc = "A complete visor system of optical scanners and vision modes."
icon_state = "fulloptics"
interface_name = "multi optical visor"
interface_desc = "An integrated multi-mode vision system."
vision_modes = list(/datum/rig_vision/meson,
/datum/rig_vision/nvg,
/datum/rig_vision/thermal,
/datum/rig_vision/sechud,
/datum/rig_vision/medhud)
/obj/item/rig_module/vision/meson
name = "hardsuit meson scanner"
desc = "A layered, translucent visor system for a hardsuit."
icon_state = "meson"
usable = 0
@@ -65,6 +97,7 @@
name = "hardsuit thermal scanner"
desc = "A layered, translucent visor system for a hardsuit."
icon_state = "thermal"
usable = 0
@@ -73,6 +106,46 @@
vision_modes = list(/datum/rig_vision/thermal)
/obj/item/rig_module/vision/nvg
name = "hardsuit night vision interface"
desc = "A multi input night vision system for a hardsuit."
icon_state = "night"
usable = 0
interface_name = "night vision interface"
interface_desc = "An integrated night vision system."
vision_modes = list(/datum/rig_vision/nvg)
/obj/item/rig_module/vision/sechud
name = "hardsuit security hud"
desc = "A simple tactical information system for a hardsuit."
icon_state = "securityhud"
usable = 0
interface_name = "security HUD"
interface_desc = "An integrated security heads up display."
vision_modes = list(/datum/rig_vision/sechud)
/obj/item/rig_module/vision/medhud
name = "hardsuit medical hud"
desc = "A simple medical status indicator for a hardsuit."
icon_state = "healthhud"
usable = 0
interface_name = "medical HUD"
interface_desc = "An integrated medical heads up display."
vision_modes = list(/datum/rig_vision/medhud)
// There should only ever be one vision module installed in a suit.
/obj/item/rig_module/vision/installed()
..()
+9 -8
View File
@@ -134,18 +134,18 @@
verbs |= /obj/item/weapon/rig/proc/toggle_chest
for(var/obj/item/piece in list(gloves,helmet,boots,chest))
if(!piece)
if(!istype(piece))
continue
piece.canremove = 0
piece.name = "[suit_type] [initial(piece.name)]"
piece.desc = "It seems to be part of a [src.name]."
piece.icon_state = "[initial(icon_state)]"
piece.armor = armor.Copy()
piece.min_cold_protection_temperature = min_cold_protection_temperature
piece.max_heat_protection_temperature = max_heat_protection_temperature
piece.siemens_coefficient = siemens_coefficient
piece.permeability_coefficient = permeability_coefficient
piece.unacidable = unacidable
if(islist(armor)) piece.armor = armor.Copy()
update_icon(1)
@@ -631,14 +631,15 @@
use_obj.loc = src
else if (deploy_mode != ONLY_RETRACT)
if(check_slot)
if(check_slot != use_obj)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
return
if(check_slot && check_slot != use_obj)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
return
else
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
use_obj.loc = H
H.equip_to_slot(use_obj, equip_to)
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0))
use_obj.loc = src
else
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
if(piece == "helmet" && helmet)
helmet.update_light(H)
@@ -8,11 +8,16 @@
suit_type = "combat hardsuit"
armor = list(melee = 80, bullet = 65, laser = 50, energy = 15, bomb = 80, bio = 100, rad = 60)
slowdown = 1
offline_slowdown = 3
offline_vision_restriction = 1
helm_type = /obj/item/clothing/head/helmet/space/rig/combat
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton)
/obj/item/weapon/rig/combat/equipped
initial_modules = list(
/obj/item/rig_module/mounted,
/obj/item/rig_module/vision/thermal,
@@ -1,6 +1,6 @@
/obj/item/clothing/head/helmet/space/rig/ert
light_overlay = "helmet_light_dual"
camera_networks = list("ERT","SS13")
camera_networks = list("ERT")
/obj/item/weapon/rig/ert
name = "ERT-C hardsuit control module"
@@ -12,11 +12,11 @@
req_access = list(access_cent_specops)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
/obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \
/obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \
/obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller)
/obj/item/device/radio, /obj/item/device/analyzer,/obj/item/weapon/storage/briefcase/inflatable, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, \
/obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller)
initial_modules = list(
/obj/item/rig_module/ai_container,
@@ -29,7 +29,6 @@
desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
suit_type = "ERT engineer"
icon_state = "ert_engineer_rig"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
glove_type = /obj/item/clothing/gloves/rig/ert_engineer
@@ -68,4 +67,23 @@
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/grenade_launcher,
/obj/item/rig_module/mounted/egun,
)
/obj/item/weapon/rig/ert/assetprotection
name = "Heavy Asset Protection suit control module"
desc = "A heavy suit worn by the highest level of Nanotrasen Asset Protection, don't mess with the person wearing this. Armoured and space ready."
suit_type = "heavy asset protection"
icon_state = "asset_protection_rig"
armor = list(melee = 60, bullet = 50, laser = 50,energy = 40, bomb = 40, bio = 100, rad = 100)
initial_modules = list(
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/grenade_launcher,
/obj/item/rig_module/vision/multi,
/obj/item/rig_module/mounted/egun,
/obj/item/rig_module/chem_dispenser/injector,
/obj/item/rig_module/device/plasmacutter,
/obj/item/rig_module/device/rcd,
/obj/item/rig_module/datajack
)
@@ -9,6 +9,7 @@
suit_type = "crimson hardsuit"
armor = list(melee = 80, bullet = 65, laser = 50, energy = 15, bomb = 80, bio = 100, rad = 60)
slowdown = 1
offline_slowdown = 3
offline_vision_restriction = 1
helm_type = /obj/item/clothing/head/helmet/space/rig/merc
@@ -1,19 +1,45 @@
/obj/item/clothing/head/helmet/space/rig/industrial
camera_networks = list("Mine")
/obj/item/clothing/head/helmet/space/rig/ce
camera_networks = list("Engineering")
/obj/item/clothing/head/helmet/space/rig/eva
light_overlay = "helmet_light_dual"
camera_networks = list("Engineering")
/obj/item/clothing/head/helmet/space/rig/hazmat
light_overlay = "hardhat_light"
camera_networks = list("Research")
/obj/item/clothing/head/helmet/space/rig/medical
camera_networks = list("Medbay")
/obj/item/clothing/head/helmet/space/rig/hazard
light_overlay = "helmet_light_dual"
camera_networks = list("Security")
/obj/item/weapon/rig/industrial
name = "industrial suit control module"
suit_type = "industrial hardsuit"
desc = "A heavy, powerful rig used by construction crews and mining corporations."
icon_state = "engineering_rig"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 50)
slowdown = 3
offline_slowdown = 10
offline_vision_restriction = 2
emp_protection = -20
helm_type = /obj/item/clothing/head/helmet/space/rig/industrial
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
req_access = list()
req_one_access = list()
/obj/item/weapon/rig/industrial/equipped
initial_modules = list(
/obj/item/rig_module/device/plasmacutter,
/obj/item/rig_module/device/drill,
@@ -22,6 +48,32 @@
/obj/item/rig_module/vision/meson
)
/obj/item/weapon/rig/eva
name = "EVA suit control module"
suit_type = "EVA hardsuit"
desc = "A light rig for repairs and maintenance to the outside of habitats and vessels."
icon_state = "eva_rig"
armor = list(melee = 30, bullet = 10, laser = 20,energy = 25, bomb = 20, bio = 100, rad = 100)
slowdown = 0
offline_slowdown = 1
offline_vision_restriction = 1
helm_type = /obj/item/clothing/head/helmet/space/rig/eva
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/toolbox,/obj/item/weapon/storage/briefcase/inflatable,/obj/item/device/t_scanner,/obj/item/weapon/rcd)
req_access = list()
req_one_access = list()
/obj/item/weapon/rig/eva/equipped
initial_modules = list(
/obj/item/rig_module/device/plasmacutter,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/device/rcd,
/obj/item/rig_module/vision/meson
)
//Chief Engineer's rig. This is sort of a halfway point between the old hardsuits (voidsuits) and the rig class.
/obj/item/weapon/rig/ce
@@ -29,13 +81,24 @@
suit_type = "advanced voidsuit"
desc = "An advanced voidsuit that protects against hazardous, low pressure environments. Shines with a high polish."
icon_state = "ce_rig"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
armor = list(melee = 40, bullet = 10, laser = 30,energy = 25, bomb = 40, bio = 100, rad = 100)
slowdown = 0
offline_slowdown = 0
offline_vision_restriction = 0
helm_type = /obj/item/clothing/head/helmet/space/rig/ce
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
req_access = list()
req_one_access = list()
boot_type = null
glove_type = null
/obj/item/weapon/rig/ce/equipped
req_access = list(access_ce)
initial_modules = list(
@@ -55,14 +118,21 @@
suit_type = "hazmat hardsuit"
desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it."
icon_state = "science_rig"
armor = list(melee = 15, bullet = 15, laser = 80, energy = 80, bomb = 60, bio = 100, rad = 100)
armor = list(melee = 45, bullet = 5, laser = 45, energy = 80, bomb = 60, bio = 100, rad = 100)
slowdown = 1
offline_vision_restriction = 1
helm_type = /obj/item/clothing/head/helmet/space/rig/hazmat
helm_type = /obj/item/clothing/head/helmet/space/rig/ert
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/weapon/storage/box/excavation,/obj/item/weapon/pickaxe,/obj/item/device/healthanalyzer,/obj/item/device/measuring_tape,/obj/item/device/ano_scanner,/obj/item/device/depth_scanner,/obj/item/device/core_sampler,/obj/item/device/gps,/obj/item/device/beacon_locator,/obj/item/device/radio/beacon,/obj/item/weapon/pickaxe/hand,/obj/item/weapon/storage/bag/fossils)
req_access = list()
req_one_access = list()
/obj/item/weapon/rig/hazmat/equipped
req_access = list(access_rd)
initial_modules = list(
@@ -81,30 +151,45 @@
slowdown = 1
offline_vision_restriction = 1
helm_type = /obj/item/clothing/head/helmet/space/rig/medical
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/roller )
req_access = list()
req_one_access = list()
/obj/item/weapon/rig/medical/equipped
initial_modules = list(
/obj/item/rig_module/chem_dispenser/injector,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/device/healthscanner
/obj/item/rig_module/device/healthscanner,
/obj/item/rig_module/vision/medhud
)
/obj/item/weapon/rig/hazard
name = "hazard hardsuit control module"
suit_type = "hazard hardsuit"
desc = "A Nanotrasen security hardsuit designed for prolonged EVA in dangerous environments. The name HARPER is printed on the control unit."
desc = "A Nanotrasen security hardsuit designed for prolonged EVA in dangerous environments."
icon_state = "hazard_rig"
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
armor = list(melee = 60, bullet = 40, laser = 30, energy = 15, bomb = 60, bio = 100, rad = 30)
slowdown = 1
offline_slowdown = 3
offline_vision_restriction = 1
helm_type = /obj/item/clothing/head/helmet/space/rig/ert
helm_type = /obj/item/clothing/head/helmet/space/rig/hazard
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton)
req_access = list()
req_one_access = list()
/obj/item/weapon/rig/hazard/equipped
initial_modules = list(
/obj/item/rig_module/vision/sechud,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/grenade_launcher,
/obj/item/rig_module/mounted/taser
)
@@ -12,7 +12,7 @@
A << "<br>"
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
command_announcement.Announce(alert, new_sound = 'sound/misc/interference.ogg')
command_announcement.Announce(alert, new_sound = sound('sound/misc/interference.ogg', volume=50))
/datum/event/communications_blackout/start()
+22
View File
@@ -0,0 +1,22 @@
/datum/event/dust
startWhen = 10
endWhen = 30
/datum/event/dust/announce()
command_announcement.Announce("The station is now passing through a belt of space dust.", "Dust Alert")
/datum/event/dust/start()
dust_swarm(get_severity())
/datum/event/dust/end()
command_announcement.Announce("The station has now passed through the belt of space dust.", "Dust Notice")
/datum/event/dust/proc/get_severity()
switch(severity)
if(EVENT_LEVEL_MUNDANE)
return "weak"
if(EVENT_LEVEL_MODERATE)
return prob(80) ? "norm" : "strong"
if(EVENT_LEVEL_MAJOR)
return "super"
return "weak"
-10
View File
@@ -37,16 +37,6 @@
return total_weight
/datum/event_meta/alien/get_weight(var/list/active_with_role)
if(config.aliens_allowed)
return ..(active_with_role)
return 0
/datum/event_meta/ninja/get_weight(var/list/active_with_role)
if(config.ninjas_allowed)
return ..(active_with_role)
return 0
/datum/event //NOTE: Times are measured in master controller ticks!
var/startWhen = 0 //When in the lifetime to call start().
var/announceWhen = 0 //When in the lifetime to call announce().
+39 -33
View File
@@ -59,20 +59,10 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
var/list/possible_events = list()
for(var/datum/event_meta/EM in available_events)
var/event_weight = EM.get_weight(active_with_role)
if(EM.enabled && event_weight)
var/event_weight = get_weight(EM, active_with_role)
if(event_weight)
possible_events[EM] = event_weight
for(var/event_meta in last_event_time) if(possible_events[event_meta])
var/time_passed = world.time - event_last_fired[event_meta]
var/weight_modifier = max(0, (config.expected_round_length - time_passed) / 300)
var/new_weight = max(possible_events[event_meta] - weight_modifier, 0)
if(new_weight)
possible_events[event_meta] = new_weight
else
possible_events -= event_meta
if(possible_events.len == 0)
return null
@@ -81,6 +71,19 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
available_events -= picked_event
return picked_event
/datum/event_container/proc/get_weight(var/datum/event_meta/EM, var/list/active_with_role)
if(!EM.enabled)
return 0
var/weight = EM.get_weight(active_with_role)
var/last_time = last_event_time[EM]
if(last_time)
var/time_passed = world.time - last_time
var/weight_modifier = max(0, round((config.expected_round_length - time_passed) / 300))
weight = weight - weight_modifier
return weight
/datum/event_container/proc/set_event_delay()
// If the next event time has not yet been set and we have a custom first time start
if(next_event_time == 0 && config.event_first_run[severity])
@@ -124,14 +127,15 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
available_events = list(
// Severity level, event name, even type, base weight, role weights, one shot, min weight, max weight. Last two only used if set and non-zero
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 100),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "PDA Spam", /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 0, 25, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 1, 10, 25),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brand Intelligence",/datum/event/brand_intelligence,20, list(ASSIGNMENT_JANITOR = 25), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 1, 10, 25),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "PDA Spam", /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 0, 25, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Space Dust", /datum/event/dust , 30, list(ASSIGNMENT_ENGINEER = 5), 0, 0, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
)
@@ -140,30 +144,32 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
severity = EVENT_LEVEL_MODERATE
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravity Failure", /datum/event/gravity, 75, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_SCIENTIST = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Random Antagonist", /datum/event/random_antag, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Random Antagonist", /datum/event/random_antag, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 30, list(ASSIGNMENT_ENGINEER = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
)
/datum/event_container/major
severity = EVENT_LEVEL_MAJOR
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 1320),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 60), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 3), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 0, list(ASSIGNMENT_ENGINEER = 15), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
)
+1 -1
View File
@@ -201,7 +201,7 @@ var/list/event_last_fired = list()
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
active_with_role["Medical"]++
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
if(M.mind.assigned_role in medical_positions)
active_with_role["Medical"]++
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
+2 -1
View File
@@ -89,6 +89,7 @@
html += "<h2>Available [severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)</h2>"
html += "<table[table_options]>"
html += "<tr><td[row_options2]>Name </td><td>Weight </td><td>MinWeight </td><td>MaxWeight </td><td>OneShot </td><td>Enabled </td><td><span class='alert'>CurrWeight </span></td><td>Remove</td></tr>"
var/list/active_with_role = number_active_with_role()
for(var/datum/event_meta/EM in selected_event_container.available_events)
html += "<tr>"
html += "<td>[EM.name]</td>"
@@ -97,7 +98,7 @@
html += "<td>[EM.max_weight]</td>"
html += "<td><A align='right' href='?src=\ref[src];toggle_oneshot=\ref[EM]'>[EM.one_shot]</A></td>"
html += "<td><A align='right' href='?src=\ref[src];toggle_enabled=\ref[EM]'>[EM.enabled]</A></td>"
html += "<td><span class='alert'>[EM.get_weight(number_active_with_role())]</span></td>"
html += "<td><span class='alert'>[selected_event_container.get_weight(EM, active_with_role)]</span></td>"
html += "<td><A align='right' href='?src=\ref[src];remove=\ref[EM];EC=\ref[selected_event_container]'>Remove</A></td>"
html += "</tr>"
html += "</table>"
+24
View File
@@ -0,0 +1,24 @@
/datum/event/gravity
announceWhen = 5
/datum/event/gravity/setup()
endWhen = rand(15, 60)
/datum/event/gravity/announce()
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes.", "Gravity Failure")
/datum/event/gravity/start()
gravity_is_on = 0
for(var/area/A in world)
if(A.z in config.station_levels)
A.gravitychange(gravity_is_on, A)
/datum/event/gravity/end()
if(!gravity_is_on)
gravity_is_on = 1
for(var/area/A in world)
if(A.z in config.station_levels)
A.gravitychange(gravity_is_on, A)
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
+2 -4
View File
@@ -1,12 +1,10 @@
//cael - two events here
//meteor storms are much heavier
/datum/event/meteor_wave
startWhen = 6
endWhen = 33
/datum/event/meteor_wave/setup()
endWhen = rand(10,25) * 3
endWhen = rand(15,30) * 3
/datum/event/meteor_wave/announce()
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
@@ -26,7 +24,7 @@
var/waves = 1
/datum/event/meteor_shower/setup()
waves = rand(1,4)
waves = rand(2,5)
/datum/event/meteor_shower/announce()
command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
+1 -1
View File
@@ -10,4 +10,4 @@
valid_types |= antag
if(valid_types.len)
var/datum/antagonist/antag = pick(valid_types)
antag.random_spawn()
antag.random_spawn()
@@ -35,6 +35,11 @@
die_off()
return 0
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
if(smoke.reagents.has_reagent("plantbgone"))
die_off()
return
// Handle life.
var/turf/simulated/T = get_turf(src)
if(istype(T))
+16 -16
View File
@@ -98,22 +98,22 @@
// Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order).
var/global/list/beneficial_reagents = list(
"beer" = list( -0.05, 0, 0 ),
"fluorine" = list( -2, 0, 0 ),
"chlorine" = list( -1, 0, 0 ),
"phosphorus" = list( -0.75, 0, 0 ),
"sodawater" = list( 0.1, 0, 0 ),
"sacid" = list( -1, 0, 0 ),
"pacid" = list( -2, 0, 0 ),
"plantbgone" = list( -2, 0, 0.2 ),
"cryoxadone" = list( 3, 0, 0 ),
"ammonia" = list( 0.5, 0, 0 ),
"diethylamine" = list( 1, 0, 0 ),
"nutriment" = list( 0.5, 0.1, 0 ),
"radium" = list( -1.5, 0, 0.2 ),
"adminordrazine" = list( 1, 1, 1 ),
"robustharvest" = list( 0, 0.2, 0 ),
"left4zed" = list( 0, 0, 0.2 )
"beer" = list( -0.05, 0, 0 ),
"fluorine" = list( -2, 0, 0 ),
"chlorine" = list( -1, 0, 0 ),
"phosphorus" = list( -0.75, 0, 0 ),
"sodawater" = list( 0.1, 0, 0 ),
"sacid" = list( -1, 0, 0 ),
"pacid" = list( -2, 0, 0 ),
"plantbgone" = list( -2, 0, 0.2),
"cryoxadone" = list( 3, 0, 0 ),
"ammonia" = list( 0.5, 0, 0 ),
"diethylamine" = list( 1, 0, 0 ),
"nutriment" = list( 0.5, 0.1, 0 ),
"radium" = list( -1.5, 0, 0.2),
"adminordrazine" = list( 1, 1, 1 ),
"robustharvest" = list( 0, 0.2, 0 ),
"left4zed" = list( 0, 0, 0.2)
)
// Mutagen list specifies minimum value for the mutation to take place, rather
@@ -1,5 +1,10 @@
/obj/machinery/portable_atmospherics/hydroponics/process()
// Handle nearby smoke if any.
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.copy_to(src, 5)
//Do this even if we're not ready for a plant cycle.
process_reagents()
+4 -4
View File
@@ -151,7 +151,7 @@ var/list/slot_equipment_priority = list( \
remove_from_mob(W)
if(!W) return 1 // self destroying objects (tk, grabs)
W.forceMove(Target)
update_icons()
return 1
@@ -173,11 +173,11 @@ var/list/slot_equipment_priority = list( \
/*
Removes the object from any slots the mob might have, calling the appropriate icon update proc.
Does nothing else.
DO NOT CALL THIS PROC DIRECTLY. It is meant to be called only by other inventory procs.
It's probably okay to use it if you are transferring the item between slots on the same mob,
but chances are you're safer calling remove_from_mob() or drop_from_inventory() anyways.
As far as I can tell the proc exists so that mobs with different inventory slots can override
the search through all the slots, without having to duplicate the rest of the item dropping.
*/
@@ -216,7 +216,7 @@ var/list/slot_equipment_priority = list( \
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
I.dropped()
I.dropped(src)
return 1
@@ -2,6 +2,9 @@
name = "brain"
health = 400 //They need to live awhile longer than other organs.
desc = "A piece of juicy meat found in a person's head."
organ_tag = "brain"
parent_organ = "head"
vital = 1
icon_state = "brain2"
force = 1.0
w_class = 2.0
@@ -46,7 +49,7 @@
/obj/item/organ/brain/removed(var/mob/living/user)
..()
name = "[owner.real_name]'s brain"
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
@@ -57,6 +60,8 @@
if(istype(B) && istype(owner))
B.transfer_identity(owner)
..()
/obj/item/organ/brain/replaced(var/mob/living/target)
if(target.key)
+4 -5
View File
@@ -31,10 +31,9 @@
var/d = rand(round(I.force / 4), I.force)
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
var/organ = H.get_organ("chest")
if (istype(organ, /obj/item/organ/external))
var/obj/item/organ/external/temp = organ
if(temp.take_damage(d, 0))
var/obj/item/organ/external/organ = H.get_organ("chest")
if (istype(organ))
if(organ.take_damage(d, 0))
H.UpdateDamageIcon()
H.updatehealth()
else
@@ -328,7 +327,7 @@
if(!item) return //Grab processing has a chance of returning null
src.remove_from_mob(item)
item.loc = src.loc
@@ -117,7 +117,7 @@
g_skin = green
b_skin = blue
update_body()
force_update_limbs()
return 1
/mob/living/carbon/human/proc/change_skin_tone(var/tone)
@@ -126,7 +126,7 @@
s_tone = tone
update_body()
force_update_limbs()
return 1
/mob/living/carbon/human/proc/update_dna()
@@ -186,3 +186,8 @@
/proc/q()
var/mob/living/carbon/human/H = usr
H.change_appearance(APPEARANCE_ALL)
/mob/living/carbon/human/proc/force_update_limbs()
for(var/obj/item/organ/external/O in organs)
O.sync_colour_to_human(src)
update_body(0)
+12 -4
View File
@@ -20,6 +20,9 @@
else
set_species()
if(species)
name = species.get_random_name(gender)
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
@@ -326,8 +329,8 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/obj/item/organ/external/head/head = get_organ("head")
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
var/obj/item/organ/external/head = get_organ("head")
if(!head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -1119,8 +1122,6 @@
species = all_species[new_species]
species.create_organs(src)
if(species.language)
add_language(species.language)
@@ -1137,6 +1138,8 @@
g_skin = 0
b_skin = 0
species.create_organs(src)
species.handle_post_spawn(src)
maxHealth = species.total_health
@@ -1361,3 +1364,8 @@
U << "<span class='danger'>You pop [S]'s [current_limb.joint] back in!</span>"
S << "<span class='danger'>[U] pops your [current_limb.joint] back in!</span>"
current_limb.undislocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in organs)
return
..()
@@ -227,7 +227,7 @@
chance = !hand ? 40 : 20
if (prob(chance))
visible_message("<spawn class=danger>[src]'s [W] goes off during struggle!")
visible_message("<span class='danger'>[src]'s [W] goes off during struggle!</span>")
var/list/turfs = list()
for(var/turf/T in view())
turfs += T
@@ -192,10 +192,11 @@ This saves us from having to call add_fingerprint() any time something is put in
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
if(!slot) return
if(!istype(W)) return
if(!has_organ_for_slot(slot)) return
if(!species || !species.hud || !(slot in species.hud.equip_slots)) return
W.loc = src
switch(slot)
if(slot_back)
@@ -314,7 +315,7 @@ This saves us from having to call add_fingerprint() any time something is put in
W.layer = 20
return
return 1
/*
MouseDrop human inventory menu
@@ -45,7 +45,7 @@
"heart" = /obj/item/organ/heart,
"lungs" = /obj/item/organ/lungs,
"liver" = /obj/item/organ/liver,
"kidneys" = /obj/item/organ/kidney,
"kidneys" = /obj/item/organ/kidneys,
"brain" = /obj/item/organ/brain,
"eyes" = /obj/item/organ/eyes,
"stack" = /obj/item/organ/stack/vox
@@ -110,7 +110,7 @@
"heart" = /obj/item/organ/heart,
"lungs" = /obj/item/organ/lungs,
"liver" = /obj/item/organ/liver,
"kidneys" = /obj/item/organ/kidney,
"kidneys" = /obj/item/organ/kidneys,
"brain" = /obj/item/organ/brain,
"appendix" = /obj/item/organ/appendix,
"eyes" = /obj/item/organ/eyes
+5
View File
@@ -967,6 +967,11 @@ default behaviour is:
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
return 0
/mob/living/carbon/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in internal_organs)
return
..()
/mob/living/carbon/proc/spin(spintime, speed)
spawn()
var/D = dir
@@ -92,6 +92,7 @@
if(health < 1)
death()
return
if(health > maxHealth)
health = maxHealth
+1 -1
View File
@@ -729,7 +729,7 @@ note dizziness decrements automatically in the mob's Life() proc.
stat(null,"Location:\t([x], [y], [z])")
stat(null,"CPU:\t[world.cpu]")
stat(null,"Instances:\t[world.contents.len]")
if(statpanel("Status") && processScheduler.getIsRunning())
if(statpanel("Status") && processScheduler && processScheduler.getIsRunning())
var/datum/controller/process/process
process = processScheduler.getProcess("ticker")
+1
View File
@@ -29,6 +29,7 @@
var/obj/screen/damageoverlay = null
var/obj/screen/pain = null
var/obj/screen/gun/item/item_use_icon = null
var/obj/screen/gun/radio/radio_use_icon = null
var/obj/screen/gun/move/gun_move_icon = null
var/obj/screen/gun/run/gun_run_icon = null
var/obj/screen/gun/mode/gun_setting_icon = null
@@ -473,6 +473,7 @@
//new_character.dna.UpdateSE()
// Do the initial caching of the player's body icons.
new_character.force_update_limbs()
new_character.regenerate_icons()
new_character.key = key //Manually transfer the key to log them in
+3
View File
@@ -235,12 +235,14 @@ var/list/organ_cache = list()
owner.internal_organs_by_name[organ_tag] = null
owner.internal_organs_by_name -= organ_tag
owner.internal_organs_by_name -= null
owner.internal_organs -= src
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
if(affected) affected.internal_organs -= src
loc = owner.loc
processing_objects |= src
rejecting = null
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
if(!organ_blood || !organ_blood.data["blood_DNA"])
@@ -269,6 +271,7 @@ var/list/organ_cache = list()
transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"]
owner = target
processing_objects -= src
target.internal_organs |= src
affected.internal_organs |= src
target.internal_organs_by_name[organ_tag] = src
+13 -20
View File
@@ -3,13 +3,16 @@
****************************************************/
/obj/item/organ/external
name = "external"
min_broken_damage = 30
max_damage = 0
dir = SOUTH
organ_tag = "limb"
var/icon_name = null
var/body_part = null
var/icon_position = 0
var/model
var/force_icon
var/damage_state = "00"
var/brute_dam = 0
var/burn_dam = 0
@@ -18,7 +21,7 @@
var/icon/mob_icon
var/gendered_icon = 0
var/limb_name
var/disfigured = 1
var/disfigured = 0
var/cannot_amputate
var/cannot_break
var/s_tone
@@ -26,38 +29,25 @@
var/list/wounds = list()
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
var/perma_injury = 0
var/obj/item/organ/external/parent
var/list/obj/item/organ/external/children
// Internal organs of this body part
var/list/internal_organs = list()
var/list/internal_organs = list() // Internal organs of this body part
var/damage_msg = "\red You feel an intense pain"
var/broken_description
var/open = 0
var/stage = 0
var/cavity = 0
var/sabotaged = 0 // If a prosthetic limb is emagged, it will detonate when it fails.
var/encased // Needs to be opened with a saw to access the organs.
var/obj/item/hidden = null
var/list/implants = list()
// how often wounds should be updated, a higher number means less often
var/wound_update_accuracy = 1
var/wound_update_accuracy = 1 // how often wounds should be updated, a higher number means less often
var/joint = "joint" // Descriptive string used in dislocation.
var/amputation_point // Descriptive string used in amputation.
var/dislocated = 0 // If you target a joint, you can dislocate the limb, causing temporary damage to the organ.
var/can_grasp
var/can_stand
min_broken_damage = 30
max_damage = 0
dir = SOUTH
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/user as mob)
switch(stage)
if(0)
@@ -650,8 +640,8 @@ Note that amputating the affected organ does in fact remove the infection from t
wounds.Cut()
if(parent)
var/datum/wound/W
if(max_damage < 50)
W = new/datum/wound/lost_limb/small(max_damage)
if(clean || max_damage < 50)
W = new/datum/wound/lost_limb/small(max_damage/2)
else
W = new/datum/wound/lost_limb(max_damage)
parent.children -= src
@@ -940,6 +930,7 @@ Note that amputating the affected organ does in fact remove the infection from t
gendered_icon = 1
cannot_amputate = 1
parent_organ = null
encased = "ribcage"
/obj/item/organ/external/groin
name = "lower body"
@@ -1061,9 +1052,11 @@ Note that amputating the affected organ does in fact remove the infection from t
joint = "jaw"
amputation_point = "neck"
gendered_icon = 1
encased = "skull"
/obj/item/organ/external/head/removed()
if(owner)
name = "[owner.real_name]'s head"
owner.u_equip(owner.glasses)
owner.u_equip(owner.head)
owner.u_equip(owner.l_ear)
+3 -1
View File
@@ -16,7 +16,9 @@ var/global/list/limb_icon_cache = list()
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
s_tone = null
s_col = null
if(human.s_tone && (human.species.flags & HAS_SKIN_TONE))
if(status & ORGAN_ROBOT)
return
if(!isnull(human.s_tone) && (human.species.flags & HAS_SKIN_TONE))
s_tone = human.s_tone
if(human.species.flags & HAS_SKIN_COLOR)
s_col = list(human.r_skin, human.g_skin, human.b_skin)
+3 -3
View File
@@ -44,7 +44,7 @@
organ_tag = "kidneys"
parent_organ = "groin"
/obj/item/organ/kidney/process()
/obj/item/organ/kidneys/process()
..()
@@ -61,7 +61,6 @@
else if(is_broken())
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
/obj/item/organ/eyes
name = "eyeballs"
icon_state = "eyes"
@@ -113,7 +112,7 @@
name = "liver"
icon_state = "liver"
organ_tag = "liver"
parent_organ = "chest"
parent_organ = "groin"
/obj/item/organ/liver/process()
@@ -175,6 +174,7 @@
name = "appendix"
icon_state = "appendix"
parent_organ = "groin"
organ_tag = "appendix"
/obj/item/organ/appendix/removed()
+17 -9
View File
@@ -80,7 +80,7 @@
else
handle_click_empty(user)
return 0
return 1
return 1
/obj/item/weapon/gun/emp_act(severity)
for(var/obj/O in contents)
@@ -112,7 +112,7 @@
else if(user.a_intent == I_HURT) //point blank shooting
Fire(A, user, pointblank=1)
else
return ..() //Pistolwhippin'
return ..() //Pistolwhippin'
/obj/item/weapon/gun/proc/Fire(atom/target, mob/living/user, params, pointblank=0, reflex=0)
if(!user || !target) return
@@ -167,11 +167,19 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
user.visible_message(
"<span class='danger'>[user] fires [src][pointblank ? " point blank at [target]":""][reflex ? " by reflex":""]!</span>",
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>",
"You hear a [fire_sound_text]!"
)
if(reflex)
user.visible_message(
"<span class='reflex_shoot'><b>\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""] by reflex!<b></span>",
"<span class='reflex_shoot'>You fire \the [src] by reflex!</span>",
"You hear a [fire_sound_text]!"
)
else
user.visible_message(
"<span class='danger'>\The [user] fires \the [src][pointblank ? " point blank at \the [target]":""]!</span>",
"<span class='warning'>You fire \the [src]!</span>",
"You hear a [fire_sound_text]!"
)
if(recoil)
spawn()
@@ -185,7 +193,7 @@
var/obj/item/projectile/P = projectile
//shooting while in shock
//shooting while in shock
var/x_offset = 0
var/y_offset = 0
if(istype(user, /mob/living/carbon))
@@ -258,7 +266,7 @@
else
handle_click_empty(user)
mouthshoot = 0
return
return
/obj/item/weapon/gun/proc/toggle_scope(var/zoom_amount=2.0)
//looking through a scope limits your periphereal vision
@@ -2,7 +2,7 @@
name = "temperature gun"
icon_state = "freezegun"
fire_sound = 'sound/weapons/pulse3.ogg'
desc = "A gun that changes temperatures."
desc = "A gun that changes temperatures. It has a small label on the side, 'More extreme temperatures will cost more charge!'"
var/temperature = T20C
var/current_temperature = T20C
charge_cost = 100
@@ -10,7 +10,7 @@
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/temp
cell_type = /obj/item/weapon/cell/crap
cell_type = /obj/item/weapon/cell/high
/obj/item/weapon/gun/energy/temperature/New()
@@ -62,7 +62,7 @@
/obj/item/weapon/gun/projectile/automatic/sts35/update_icon()
..()
icon_state = (ammo_magazine)? "arifle-0" : "arifle"
icon_state = (ammo_magazine)? "arifle" : "arifle-empty"
update_held_icon()
/obj/item/weapon/gun/projectile/automatic/wt550
+51 -18
View File
@@ -14,7 +14,7 @@
set category = "Object"
if(aim_targets)
stop_aim()
usr.visible_message("\blue \The [usr] lowers \the [src]...")
usr.visible_message("<span class='notice'> \The [usr] lowers \the [src]...</span>")
//Clicking gun will still lower aim for guns that don't overwrite this
/obj/item/weapon/gun/attack_self()
@@ -23,7 +23,7 @@
//Removing the lock and the buttons.
/obj/item/weapon/gun/dropped(mob/user as mob)
stop_aim()
if (user.client)
if(user && user.client)
user.client.remove_gun_icons()
return ..()
@@ -47,7 +47,7 @@
/obj/item/weapon/gun/proc/PreFire(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, params)
//Lets not spam it.
if(lock_time > world.time - 2) return
user.set_dir(get_cardinal_dir(src, A))
if(isliving(A) && !(A in aim_targets))
Aim(A) //Clicked a mob, aim at them
@@ -58,7 +58,7 @@
if(isliving(M) && (M in view(user)) && !(M in aim_targets))
Aim(M) //Aha! Aim at them!
return 1
return 0
//Aiming at the target mob.
@@ -70,9 +70,9 @@
if(L)
L.NotTargeted(src)
del(aim_targets)
usr.visible_message("\red <b>[usr] turns \the [src] on [M]!</b>")
usr.visible_message("<span class='danger'><b>[usr] turns \the [src] on [M]!</b></span>")
else
usr.visible_message("\red <b>[usr] aims \a [src] at [M]!</b>")
usr.visible_message("<span class='danger'><b>[usr] aims \a [src] at [M]!</b></span>")
M.Targeted(src)
//HE MOVED, SHOOT HIM!
@@ -83,19 +83,19 @@
if(src != M.get_active_hand())
stop_aim()
return
//reflex firing is disabled when help intent is set
if (M.a_intent == I_HELP)
M << "\red You refrain from firing your [src] as your intent is set to help."
M << "<span class='danger'>You refrain from firing your [src] as your intent is set to help.</span>"
return
M.last_move_intent = world.time
var/firing_check = can_hit(T,usr) //0 if it cannot hit them, 1 if it is capable of hitting, and 2 if a special check is preventing it from firing.
if(firing_check > 0)
if(firing_check == 1)
Fire(T,usr, reflex = 1)
else if(!told_cant_shoot)
M << "\red They can't be hit from here!"
M << "<span class='danger'>They can't be hit from here!</span>"
told_cant_shoot = 1
spawn(30)
told_cant_shoot = 0
@@ -153,6 +153,7 @@
last_move_intent = -100
last_target_click = -5
target_locked = null
last_target_radio = -5;
/mob/living/proc/Targeted(var/obj/item/weapon/gun/I) //Self explanitory.
if(!I.aim_targets)
@@ -171,10 +172,10 @@
if(!targeted_by) targeted_by = list()
targeted_by += I
I.lock_time = world.time + 20 //Target has 2 second to realize they're targeted and stop (or target the opponent).
src << "((\red <b>Your character is being targeted. They have 2 seconds to stop any click or move actions.</b> \black While targeted, they may \
src << "((<span class='danger'><b>Your character is being targeted. They have 2 seconds to stop any click or move actions.</b></span> While targeted, they may \
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map objects (floors and walls are fine), their items \
(other than a weapon to de-target), or moving will result in being fired upon. \red The aggressor may also fire manually, \
so try not to get on their bad side.\black ))"
(other than a weapon to de-target), moving, or talking into a radio will result in being fired upon. <span class='danger'>The aggressor may also fire manually, \
so try not to get on their bad side.</span>))"
if(targeted_by.len == 1)
spawn(0)
@@ -195,7 +196,7 @@
I.lower_aim()
return
if(m_intent == "run" && T.client.target_can_move == 1 && T.client.target_can_run == 0)
src << "\red Your move intent is now set to walk, as your targeter permits it." //Self explanitory.
src << "<span class='danger'>Your move intent is now set to walk, as your targeter permits it.</span>" //Self explanitory.
set_m_intent("walk")
//Processing the aiming. Should be probably in separate object with process() but lasy.
@@ -218,6 +219,12 @@
I.lock_time = world.time + 5
I.lock_time = world.time + 5
I.last_moved_mob = src
if(last_target_radio > I.lock_time + 10 && !T.client.target_can_radio)
I.TargetActed(src)
if(I.last_moved_mob == src) //If they were the last ones to move, give them more of a grace period, so that an automatic weapon can hold down a room better.
I.lock_time = world.time + 5
I.lock_time = world.time + 5
I.last_moved_mob = src
sleep(1)
/mob/living/proc/NotTargeted(var/obj/item/weapon/gun/I)
@@ -253,12 +260,14 @@
target_can_move = 0
target_can_run = 0
target_can_click = 0
target_can_radio = 0
gun_mode = 0
//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
/client/proc/add_gun_icons()
screen += usr.item_use_icon
screen += usr.gun_move_icon
screen += usr.radio_use_icon
if (target_can_move)
screen += usr.gun_run_icon
@@ -268,6 +277,7 @@
if(!usr) return 1 // Runtime prevention on N00k agents spawning with SMG
screen -= usr.item_use_icon
screen -= usr.gun_move_icon
screen -= usr.radio_use_icon
if (target_can_move)
screen -= usr.gun_run_icon
@@ -313,10 +323,10 @@
if(target_can_move)
M << "Your character may now <b>walk</b> at the discretion of their targeter."
if(!target_can_run)
M << "\red Your move intent is now set to walk, as your targeter permits it."
M << "<span class='danger'>Your move intent is now set to walk, as your targeter permits it.</span>"
M.set_m_intent("walk")
else
M << "\red <b>Your character will now be shot if they move.</b>"
M << "<span class='danger'><b>Your character will now be shot if they move.</b></span>"
/mob/living/proc/set_m_intent(var/intent)
if (intent != "walk" && intent != "run")
@@ -349,7 +359,7 @@ client/verb/AllowTargetRun()
if(target_can_run)
M << "Your character may now <b>run</b> at the discretion of their targeter."
else
M << "\red <b>Your character will now be shot if they run.</b>"
M << "<span class='danger'><b>Your character will now be shot if they run.</b></span>"
/client/verb/AllowTargetClick()
set hidden=1
@@ -373,4 +383,27 @@ client/verb/AllowTargetRun()
if(target_can_click)
M << "Your character may now <b>use items</b> at the discretion of their targeter."
else
M << "\red <b>Your character will now be shot if they use items.</b>"
M << "<span class='danger'><b>Your character will now be shot if they use items.</b></span>"
/client/verb/AllowTargetRadio()
set hidden=1
target_can_radio = !target_can_radio
if(target_can_radio)
usr << "Target may now use radio."
else
usr << "Target may no longer use radio."
if(usr.radio_use_icon)
usr.radio_use_icon.icon_state = "no_radio[target_can_radio]"
usr.radio_use_icon.name = "[target_can_radio ? "Disallow" : "Allow"] Radio Use"
//Handling change for all the guns on client
for(var/obj/item/weapon/gun/G in src)
G.lock_time = world.time + 5
if(G.aim_targets)
for(var/mob/living/M in G.aim_targets)
if(target_can_radio)
M << "Your character may now <b>use the radio</b> at the discretion of their targeter."
else
M << "<span class='danger'><b>Your character will now be shot if they use the radio.</b></span>"
+9 -5
View File
@@ -779,6 +779,9 @@
continue
var/remaining_volume = beaker.reagents.maximum_volume - beaker.reagents.total_volume
if(remaining_volume <= 0)
break
if(sheet_reagents[O.type])
var/obj/item/stack/stack = O
if(istype(stack))
@@ -788,10 +791,11 @@
beaker.reagents.add_reagent(sheet_reagents[stack.type], (amount_to_take*REAGENTS_PER_SHEET))
continue
O.reagents.trans_to(beaker, min(O.reagents.total_volume, remaining_volume))
if(O.reagents.total_volume == 0)
remove_object(O)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
if(O.reagents)
O.reagents.trans_to(beaker, min(O.reagents.total_volume, remaining_volume))
if(O.reagents.total_volume == 0)
remove_object(O)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
#undef REAGENTS_PER_SHEET
+2 -5
View File
@@ -1849,12 +1849,9 @@ datum
var/obj/effect/alien/weeds/alien_weeds = O
alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast
alien_weeds.healthcheck()
else if(istype(O,/obj/effect/plant)) //even a small amount is enough to kill it
del(O)
else if(istype(O,/obj/effect/plant))
if(prob(50))
var/obj/effect/plant/plant = O
plant.die_off()
var/obj/effect/plant/plant = O
plant.die_off()
else if(istype(O,/obj/machinery/portable_atmospherics/hydroponics))
var/obj/machinery/portable_atmospherics/hydroponics/tray = O
@@ -57,7 +57,7 @@
FA.overlays += image('icons/obj/monitors.dmi', "overlay_red")
if(SEC_LEVEL_DELTA)
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta security level reached!")
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta security level reached!", new_sound = 'sound/effects/siren.ogg')
security_level = SEC_LEVEL_DELTA
for(var/obj/machinery/firealarm/FA in machines)
if(FA.z in config.contact_levels)
+13
View File
@@ -1,6 +1,19 @@
/datum/shuttle/ferry/escape_pod
var/datum/computer/file/embedded_program/docking/simple/escape_pod/arming_controller
/datum/shuttle/ferry/escape_pod/init_docking_controllers()
..()
arming_controller = locate(dock_target_station)
if(!istype(arming_controller))
world << "<span class='danger'>warning: escape pod with station dock tag [dock_target_station] could not find it's dock target!</span>"
if(docking_controller)
var/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/controller_master = docking_controller.master
if(!istype(controller_master))
world << "<span class='danger'>warning: escape pod with docking tag [docking_controller_tag] could not find it's controller master!</span>"
else
controller_master.pod = src
/datum/shuttle/ferry/escape_pod/can_launch()
if(arming_controller && !arming_controller.armed) //must be armed
return 0
+6
View File
@@ -12,6 +12,12 @@
var/arrive_time = 0 //the time at which the shuttle arrives when long jumping
/datum/shuttle/proc/init_docking_controllers()
if(docking_controller_tag)
docking_controller = locate(docking_controller_tag)
if(!istype(docking_controller))
world << "<span class='danger'>warning: shuttle with docking tag [docking_controller_tag] could not find it's controller!</span>"
/datum/shuttle/proc/short_jump(var/area/origin,var/area/destination)
if(moving_status != SHUTTLE_IDLE) return
+10
View File
@@ -14,6 +14,16 @@
var/datum/computer/file/embedded_program/docking/docking_controller_station
var/datum/computer/file/embedded_program/docking/docking_controller_offsite
/datum/shuttle/ferry/multidock/init_docking_controllers()
if(docking_controller_tag_station)
docking_controller_station = locate(docking_controller_tag_station)
if(!istype(docking_controller_station))
world << "<span class='danger'>warning: shuttle with docking tag [docking_controller_station] could not find it's controller!</span>"
if(docking_controller_tag_offsite)
docking_controller_offsite = locate(docking_controller_tag_offsite)
if(!istype(docking_controller_offsite))
world << "<span class='danger'>warning: shuttle with docking tag [docking_controller_offsite] could not find it's controller!</span>"
/datum/shuttle/ferry/multidock/move(var/area/origin,var/area/destination)
..(origin, destination)
if (!location)
+98 -2
View File
@@ -14,19 +14,45 @@
var/area/interim
var/area/last_departed
var/start_location
var/last_location
var/list/destinations
var/list/destination_dock_controller_tags = list() //optional, in case the shuttle has multiple docking ports like the ERT shuttle (even though that isn't a multi_shuttle)
var/list/destination_dock_controllers = list()
var/list/destination_dock_targets = list()
var/area/origin
var/return_warning = 0
/datum/shuttle/multi_shuttle/New()
..()
/datum/shuttle/multi_shuttle/init_docking_controllers()
..()
for(var/destination in destinations)
var/controller_tag = destination_dock_controller_tags[destination]
if(!controller_tag)
destination_dock_controllers[destination] = docking_controller
else
var/datum/computer/file/embedded_program/docking/C = locate(controller_tag)
if(!istype(C))
world << "<span class='danger'>warning: shuttle with docking tag [controller_tag] could not find it's controller!</span>"
else
destination_dock_controllers[destination] = C
//might as well set this up here.
if(origin) last_departed = origin
last_location = start_location
/datum/shuttle/multi_shuttle/current_dock_target()
return destination_dock_targets[last_location]
/datum/shuttle/multi_shuttle/move(var/area/origin, var/area/destination)
..()
last_move = world.time
if (destination == src.origin)
returned_home = 1
docking_controller = destination_dock_controllers[last_location]
/datum/shuttle/multi_shuttle/proc/announce_departure()
@@ -73,9 +99,53 @@
dat += "<br><b><A href='?src=\ref[src];toggle_cloak=[1]'>Toggle cloaking field</A></b><br>"
dat += "<b><A href='?src=\ref[src];move_multi=[1]'>Move ship</A></b><br>"
dat += "<b><A href='?src=\ref[src];start=[1]'>Return to base</A></b></center>"
//Docking
dat += "<center><br><br>"
if(MS.skip_docking_checks())
dat += "Docking Status: <font color='grey'>Not in use.</font></center>"
else
var/override_en = MS.docking_controller.override_enabled
var/docking_status = MS.docking_controller.get_docking_status()
dat += "Docking Status: "
switch(docking_status)
if("undocked")
dat += "<font color='[override_en? "red" : "grey"]'>Undocked</font>"
if("docking")
dat += "<font color='[override_en? "red" : "yellow"]'>Docking</font>"
if("undocking")
dat += "<font color='[override_en? "red" : "yellow"]'>Undocking</font>"
if("docked")
dat += "<font color='[override_en? "red" : "green"]'>Docked</font>"
if(override_en) dat += " <font color='red'>(Override Enabled)</font>"
dat += ". <A href='?src=\ref[src];refresh=[1]'>\[Refresh\]</A><br><br>"
switch(docking_status)
if("undocked")
dat += "<b><A href='?src=\ref[src];dock_command=[1]'>Dock</A></b></center>"
if("docked")
dat += "<b><A href='?src=\ref[src];undock_command=[1]'>Undock</A></b></center>"
user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=300x600")
//check if we're undocked, give option to force launch
/obj/machinery/computer/shuttle_control/proc/check_docking(datum/shuttle/multi_shuttle/MS)
if(MS.skip_docking_checks() || MS.docking_controller.can_launch())
return 1
var/choice = alert("The shuttle is currently docked! Please undock before continuing.","Error","Cancel","Force Launch")
if(choice == "Cancel")
return 0
choice = alert("Forcing a shuttle launch while docked may result in severe injury, death and/or damage to property. Are you sure you wish to continue?", "Force Launch", "Force Launch", "Cancel")
if(choice == "Cancel")
return 0
return 1
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list)
if(..())
return 1
@@ -88,16 +158,35 @@
//world << "multi_shuttle: last_departed=[MS.last_departed], origin=[MS.origin], interim=[MS.interim], travel_time=[MS.move_time]"
if(href_list["refresh"])
updateUsrDialog()
return
if (MS.moving_status != SHUTTLE_IDLE)
usr << "\blue [shuttle_tag] vessel is moving."
return
if(href_list["dock_command"])
MS.dock()
return
if(href_list["undock_command"])
MS.undock()
return
if(href_list["start"])
if(MS.at_origin)
usr << "\red You are already at your home base."
return
if((MS.last_move + MS.cooldown*10) > world.time)
usr << "\red The ship's drive is inoperable while the engines are charging."
return
if(!check_docking(MS))
updateUsrDialog()
return
if(!MS.return_warning)
usr << "\red Returning to your home base will end your mission. If you are sure, press the button again."
//TODO: Actually end the mission.
@@ -106,6 +195,7 @@
MS.long_jump(MS.last_departed,MS.origin,MS.interim,MS.move_time)
MS.last_departed = MS.origin
MS.last_location = MS.start_location
MS.at_origin = 1
if(href_list["toggle_cloak"])
@@ -117,7 +207,11 @@
if((MS.last_move + MS.cooldown*10) > world.time)
usr << "\red The ship's drive is inoperable while the engines are charging."
return
if(!check_docking(MS))
updateUsrDialog()
return
var/choice = input("Select a destination.") as null|anything in MS.destinations
if(!choice) return
@@ -131,6 +225,7 @@
MS.long_jump(MS.last_departed, MS.destinations[choice], MS.interim, MS.move_time)
MS.last_departed = MS.destinations[choice]
MS.last_location = choice
return
else if(choice == MS.origin)
@@ -139,5 +234,6 @@
MS.short_jump(MS.last_departed, MS.destinations[choice])
MS.last_departed = MS.destinations[choice]
MS.last_location = choice
updateUsrDialog()
+5 -3
View File
@@ -343,9 +343,11 @@
var/o_a = (O.gender == PLURAL) ? "" : "a "
var/o_do = (O.gender == PLURAL) ? "don't" : "doesn't"
if(target.species.has_organ[O.organ_tag])
if(O.organ_tag == "limb")
return 0
else if(target.species.has_organ[O.organ_tag])
if(!O.health)
if(O.is_damaged())
user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted."
return 2
@@ -355,7 +357,7 @@
user << "\red \The [target] already has [o_a][O.organ_tag]."
return 2
if(O && affected.name == O.parent_organ)
if(O && affected.limb_name == O.parent_organ)
organ_compatible = 1
else
user << "\red \The [O.organ_tag] [o_do] normally go in \the [affected.name]."
+4 -1
View File
@@ -39,8 +39,11 @@
if(L.part)
for(var/part_name in L.part)
if(!isnull(target.get_organ(part_name))) continue
if(!isnull(target.get_organ(part_name)))
continue
var/list/organ_data = target.species.has_limbs["[target_zone]"]
if(!organ_data)
continue
var/new_limb_type = organ_data["path"]
var/obj/item/organ/external/new_limb = new new_limb_type(target)
new_limb.robotize(L.model_info)