Merge pull request #72 from ParadiseSS13/master

merge from master
This commit is contained in:
Fox-McCloud
2015-02-19 22:30:21 -05:00
465 changed files with 3343 additions and 2847 deletions
+4 -6
View File
@@ -9,8 +9,6 @@
set_temperature = 20 // in celcius, add T0C for kelvin
var/cooling_power = 40000
flags = FPRINT
/obj/machinery/space_heater/air_conditioner/New()
..()
@@ -96,11 +94,11 @@
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\ATMOSPHERICS\chiller.dm:95: dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>"
dat += {"Power Level: [cell ? round(cell.percent(),1) : 0]%<BR><BR>
Set Temperature:
<A href='?src=\ref[src];op=temp;val=-5'>-</A>
Set Temperature:
<A href='?src=\ref[src];op=temp;val=-5'>-</A>
<A href='?src=\ref[src];op=temp;val=-1'>-</A>
[temp]&deg;C
<A href='?src=\ref[src];op=temp;val=1'>+</A>
[temp]&deg;C
<A href='?src=\ref[src];op=temp;val=1'>+</A>
<A href='?src=\ref[src];op=temp;val=5'>+</A><BR>"}
// END AUTOFIX
user.set_machine(src)
+1 -1
View File
@@ -253,7 +253,7 @@ zone/proc/movables()
continue
. += A
//ULTRALIGHT - only file where this is still used, hence why it's in here
//ULTRALIGHT - only file where this is still used, hence why it's in here
#define UL_I_FALLOFF_SQUARE 0
#define UL_I_FALLOFF_ROUND 1
#define ul_FalloffStyle UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular.
+1 -1
View File
@@ -29,7 +29,7 @@ atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
return 0
return 1
//Convenience function for atoms to update turfs they occupy
/atom/movable/proc/update_nearby_tiles(need_rebuild)
if(!air_master)
+1 -1
View File
@@ -44,7 +44,7 @@ var/global/list/facial_hair_styles_male_list = list()
var/global/list/facial_hair_styles_female_list = list()
var/global/list/skin_styles_female_list = list() //unused
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None")
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None")
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
var/global/list/underwear_list = underwear_m + underwear_f
//undershirt
+32 -2
View File
@@ -82,7 +82,7 @@
// Used to get a sanitized input.
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
var/name = input(user, message, title, default)
return strip_html_simple(name, max_length)
return strip_html_properly(name, max_length)
//Filters out undesirable characters from names
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
@@ -311,4 +311,34 @@ proc/checkhtml(var/t)
var/new_text = ""
for(var/i = length(text); i > 0; i--)
new_text += copytext(text, i, i+1)
return new_text
return new_text
//This proc strips html properly, but it's not lazy like the other procs.
//This means that it doesn't just remove < and > and call it a day.
//Also limit the size of the input, if specified.
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
if(!input)
return
var/opentag = 1 //These store the position of < and > respectively.
var/closetag = 1
while(1)
opentag = findtext(input, "<")
closetag = findtext(input, ">")
if(closetag && opentag)
if(closetag < opentag)
input = copytext(input, (closetag + 1))
else
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
else if(closetag || opentag)
if(opentag)
input = copytext(input, 1, opentag)
else
input = copytext(input, (closetag + 1))
else
break
if(max_length)
input = copytext(input,1,max_length)
return sanitize(input)
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
return trim(strip_html_properly(input, max_length))
+2 -1
View File
@@ -227,7 +227,7 @@ proc/tg_text2list(text, glue=",", assocglue=";")
. += copytext(text, last_found, found)
last_found = found + delim_len
while(found)
/proc/text2numlist(text, delimiter="\n")
var/list/num_list = list()
for(var/x in text2list(text, delimiter))
@@ -347,6 +347,7 @@ proc/tg_text2list(text, glue=",", assocglue=";")
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)
+1 -7
View File
@@ -411,13 +411,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//world << "<b>[newname] is the AI!</b>"
//world << sound('sound/AI/newAI.ogg')
// Set eyeobj name
if(A.eyeobj)
A.eyeobj.name = "[newname] (AI Eye)"
// Set ai pda name
if(A.aiPDA)
A.aiPDA.owner = newname
A.aiPDA.name = newname + " (" + A.aiPDA.ownjob + ")"
A.SetName(newname)
fully_replace_character_name(oldname,newname)
-2
View File
@@ -65,8 +65,6 @@
if(stat || paralysis || stunned || weakened)
return
face_atom(A) // change direction to face what you clicked on
if(next_move > world.time) // in the year 2000...
return
+1 -2
View File
@@ -503,8 +503,7 @@
if("Crew Monitoring")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
var/obj/machinery/computer/crew/C = locate(/obj/machinery/computer/crew)
C.attack_ai(AI)
AI.nano_crew_monitor()
if("Show Crew Manifest")
if(isAI(usr))
+1 -1
View File
@@ -66,7 +66,7 @@
/obj/machinery/teleport/hub/attack_ghost(mob/user as mob)
var/atom/l = loc
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
if(com.locked)
if(com && com.locked)
user.loc = get_turf(com.locked)
/obj/effect/portal/attack_ghost(mob/user as mob)
+7 -2
View File
@@ -17,10 +17,13 @@
/atom/proc/attack_hand(mob/user as mob)
return
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
/*
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) -- Handled by carbons
return
*/
/mob/living/carbon/RestrainedClickOn(var/atom/A)
return 0
// Commented out to prevent overwriting RangedAttack in click.dm ~ Bone White
/*
@@ -72,6 +75,8 @@
things considerably
*/
/mob/living/carbon/monkey/RestrainedClickOn(var/atom/A)
if(..())
return
if(a_intent != "harm" || !ismob(A)) return
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
+1 -1
View File
@@ -65,7 +65,7 @@ var/const/tk_maxrange = 15
desc = "Magic"
icon = 'icons/obj/magic.dmi'//Needs sprites
icon_state = "2"
flags = NOBLUDGEON
flags = NOBLUDGEON | ABSTRACT
//item_state = null
w_class = 10.0
layer = 20
+17
View File
@@ -135,6 +135,11 @@
var/default_laws = 0 //Controls what laws the AI spawns with.
var/list/station_levels = list(1) // Defines which Z-levels the station exists on.
var/list/admin_levels= list(2) // Defines which Z-levels which are for admin functionality, for example including such areas as Central Command and the Syndicate Shuttle
var/list/contact_levels = list(1, 5) // Defines which Z-levels which, for example, a Code Red announcement may affect
var/list/player_levels = list(1, 3, 4, 5, 6) // Defines all Z-levels a character can typically reach
var/const/minutes_to_ticks = 60 * 10
// Event settings
var/expected_round_length = 60 * 2 * minutes_to_ticks // 2 hours
@@ -458,6 +463,18 @@
if("max_maint_drones")
config.max_maint_drones = text2num(value)
if("station_levels")
config.station_levels = text2numlist(value, ";")
if("admin_levels")
config.admin_levels = text2numlist(value, ";")
if("contact_levels")
config.contact_levels = text2numlist(value, ";")
if("player_levels")
config.player_levels = text2numlist(value, ";")
if("expected_round_length")
config.expected_round_length = MinutesToTicks(text2num(value))
@@ -18,7 +18,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
var/deny_shuttle = 0 //allows admins to prevent the shuttle from being called
var/departed = 0 //if the shuttle has left the station at least once
var/datum/announcement/priority/emergency_shuttle_docked = new(0, new_sound = sound('sound/AI/shuttledock.ogg'))
var/datum/announcement/priority/emergency_shuttle_called = new(0, new_sound = sound('sound/AI/shuttlecalled.ogg'))
var/datum/announcement/priority/emergency_shuttle_recalled = new(0, new_sound = sound('sound/AI/shuttlerecalled.ogg'))
/datum/emergency_shuttle_controller/proc/process()
if (wait_for_launch)
@@ -29,7 +32,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
if (!shuttle.location) //leaving from the station
if(is_stranded())
captain_announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.")
priority_announcement.Announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.")
wait_for_launch = 0
return
//launch the pods!
@@ -49,10 +52,9 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
set_launch_countdown(SHUTTLE_LEAVETIME) //get ready to return
if (evac)
captain_announce("The Emergency Shuttle has docked with the station. You have approximately [round(estimate_launch_time()/60,1)] minutes to board the Emergency Shuttle.")
world << sound('sound/AI/shuttledock.ogg')
emergency_shuttle_docked.Announce("The Emergency Shuttle has docked with the station. You have approximately [round(estimate_launch_time()/60,1)] minutes to board the Emergency Shuttle.")
else
captain_announce("The scheduled Crew Transfer Shuttle has docked with the station. It will depart in approximately [round(emergency_shuttle.estimate_launch_time()/60,1)] minutes.")
priority_announcement.Announce("The scheduled Crew Transfer Shuttle has docked with the station. It will depart in approximately [round(emergency_shuttle.estimate_launch_time()/60,1)] minutes.")
//arm the escape pods
if (evac)
@@ -81,8 +83,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
evac = 1
captain_announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
world << sound('sound/AI/shuttlecalled.ogg')
emergency_shuttle_called.Announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyalert()
@@ -101,7 +102,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
//reset the shuttle transit time if we need to
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
captain_announce("A crew transfer has been scheduled. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
priority_announcement.Announce("A crew transfer has been scheduled. The shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
//recalls the shuttle
/datum/emergency_shuttle_controller/proc/recall()
@@ -111,15 +112,14 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
shuttle.cancel_launch(src)
if (evac)
captain_announce("The emergency shuttle has been recalled.")
world << sound('sound/AI/shuttlerecalled.ogg')
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.")
for(var/area/A in world)
if(istype(A, /area/hallway))
A.readyreset()
evac = 0
else
captain_announce("The scheduled crew transfer has been cancelled.")
priority_announcement.Announce("The scheduled crew transfer has been cancelled.")
/datum/emergency_shuttle_controller/proc/can_call()
if (deny_shuttle)
+2 -2
View File
@@ -190,7 +190,7 @@
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
return 0
if(destination.z == 2) //centcomm z-level
if((destination.z in config.admin_levels)) //centcomm z-level
if(istype(teleatom, /obj/mecha))
var/obj/mecha/MM = teleatom
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
@@ -200,6 +200,6 @@
return 0
if(destination.z > 7) //Away mission z-levels
if(!(destination.z in config.player_levels)) //Away mission z-levels
return 0
return 1
+1 -1
View File
@@ -1070,7 +1070,7 @@ datum/mind
switch(href_list["common"])
if("undress")
for(var/obj/item/W in current)
current.drop_from_inventory(W)
current.unEquip(W, 1)
if("takeuplink")
take_uplink()
memory = null//Remove any memory they may have had.
+7 -6
View File
@@ -8,6 +8,7 @@
author = "Nanotrasen Editor"
channel_name = "Tau Ceti Daily"
can_be_redacted = 0
message_type = "Story"
revolution_inciting_event
@@ -129,12 +130,6 @@ proc/check_for_newscaster_updates(type)
proc/announce_newscaster_news(datum/news_announcement/news)
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author
newMsg.is_admin_message = !news.can_be_redacted
newMsg.body = news.message
var/datum/feed_channel/sendto
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == news.channel_name)
@@ -148,6 +143,12 @@ proc/announce_newscaster_news(datum/news_announcement/news)
sendto.locked = 1
sendto.is_admin_channel = 1
news_network.network_channels += sendto
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author ? news.author : sendto.author
newMsg.is_admin_message = !news.can_be_redacted
newMsg.body = news.message
newMsg.message_type = news.message_type
sendto.messages += newMsg
+1 -1
View File
@@ -60,7 +60,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
caster.reset_view(0)
return 0
if(user.z == 2 && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
if((user.z in config.admin_levels) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
return 0
if(!skipcharge)
+3 -2
View File
@@ -35,12 +35,13 @@
return
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.canremove = 0 //curses!
magichead.flags |= NODROP //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
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.drop_from_inventory(target.wear_mask)
if(!target.unEquip(target.wear_mask))
del target.wear_mask
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
flick("e_flash", target.flash)
+1 -1
View File
@@ -59,7 +59,7 @@
item_to_retrive = null
break
M.u_equip(item_to_retrive)
M.unEquip(item_to_retrive)
if(ishuman(M)) //Edge case housekeeping
var/mob/living/carbon/human/C = M
+6 -51
View File
@@ -16,7 +16,7 @@
rate = -rate
solar_next_update = world.time // init the timer
angle = rand (0,360) // the station position to the sun is randomised at round start
/hook/startup/proc/createSun()
sun = new /datum/sun()
return 1
@@ -50,54 +50,9 @@
dx = s/abs(s)
dy = c / abs(s)
for(var/obj/machinery/power/M in solars_list)
if(!M.powernet)
solars_list.Remove(M)
//now tell the solar control computers to update their status and linked devices
for(var/obj/machinery/power/solar_control/SC in solars_list)
if(!SC.powernet)
solars_list.Remove(SC)
continue
// Solar Tracker
if(istype(M, /obj/machinery/power/tracker))
var/obj/machinery/power/tracker/T = M
T.set_angle(angle)
// Solar Control
else if(istype(M, /obj/machinery/power/solar_control))
var/obj/machinery/power/solar_control/C = M
if(C.track == 1) //if manual tracking...
C.tracker_update() //...update the position (not passing an angle, it is handled internally for manual tracking)
// Solar Panel
else if(istype(M, /obj/machinery/power/solar))
var/obj/machinery/power/solar/S = M
if(S.control)
occlusion(S)
// for a solar panel, trace towards sun to see if we're in shadow
/datum/sun/proc/occlusion(var/obj/machinery/power/solar/S)
var/ax = S.x // start at the solar panel
var/ay = S.y
var/turf/T = null
for(var/i = 1 to 20) // 20 steps is enough
ax += dx // do step
ay += dy
T = locate( round(ax,0.5),round(ay,0.5),S.z)
if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge
break
if(T.density) // if we hit a solid turf, panel is obscured
S.obscured = 1
return
S.obscured = 0 // if hit the edge or stepped 20 times, not obscured
S.update_solar_exposure()
SC.update()
+1 -1
View File
@@ -380,7 +380,7 @@ var/global/list/PDA_Manifest = list()
throwforce = 0.0
throw_speed = 1
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
/obj/effect/stop
+72 -15
View File
@@ -3,7 +3,7 @@
desc = "Should anything ever go wrong..."
icon = 'icons/obj/items.dmi'
icon_state = "red_phone"
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
force = 3.0
throwforce = 2.0
throw_speed = 1
@@ -22,7 +22,6 @@
anchored = 0.0
var/matter = 0
var/mode = 1
flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/bananapeel
@@ -108,7 +107,7 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "cane"
item_state = "stick"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
force = 5.0
throwforce = 7.0
w_class = 2.0
@@ -154,6 +153,65 @@
item_state = "gift"
w_class = 4.0
/obj/item/weapon/legcuffs
name = "legcuffs"
desc = "Use this to keep prisoners in line."
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "handcuff"
flags = CONDUCT
throwforce = 0
w_class = 3.0
origin_tech = "materials=1"
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
/obj/item/weapon/legcuffs/beartrap
name = "bear trap"
throw_speed = 1
throw_range = 1
icon_state = "beartrap0"
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
suicide_act(mob/user)
viewers(user) << "<span class='suicide'>[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.</span>"
return (BRUTELOSS)
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
icon_state = "beartrap[armed]"
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
/obj/item/weapon/legcuffs/beartrap/Crossed(AM as mob|obj)
if(armed && isturf(src.loc))
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
var/mob/living/L = AM
armed = 0
icon_state = "beartrap0"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
L.visible_message("<span class='danger'>[L] triggers \the [src].</span>", \
"<span class='userdanger'>You trigger \the [src]!</span>")
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.lying)
H.apply_damage(20,BRUTE,"chest")
else
H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg")))
if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs.
H.legcuffed = src
src.loc = H
H.update_inv_legcuffed(0)
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
else
L.apply_damage(20,BRUTE)
..()
/obj/item/weapon/holosign_creator
name = "holographic sign projector"
desc = "A handy-dandy hologaphic projector that displays a janitorial sign."
@@ -213,7 +271,6 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS
attack_verb = list("warned", "cautioned", "smashed")
proximity_sign
@@ -276,7 +333,7 @@
desc = "Parts of a rack."
icon = 'icons/obj/items.dmi'
icon_state = "rack_parts"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
m_amt = 3750
/*/obj/item/weapon/syndicate_uplink
@@ -290,7 +347,7 @@
var/traitor_frequency = 0.0
var/mob/currentUser = null
var/obj/item/device/radio/origradio = null
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
flags = CONDUCT | ONBELT
w_class = 2.0
item_state = "radio"
throw_speed = 4
@@ -308,7 +365,7 @@
var/selfdestruct = 0.0
var/traitor_frequency = 0.0
var/obj/item/device/radio/origradio = null
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
item_state = "radio"
throwforce = 5
@@ -328,7 +385,7 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
flags = NOSHIELD
attack_verb = list("bludgeoned", "whacked", "disciplined")
/obj/item/weapon/staff/broom
@@ -348,7 +405,7 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
flags = NOSHIELD
/obj/item/weapon/table_parts
name = "table parts"
@@ -357,7 +414,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
m_amt = 3750
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
/obj/item/weapon/table_parts/reinforced
@@ -366,7 +423,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
m_amt = 7500
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
/obj/item/weapon/table_parts/wood
name = "wooden table parts"
@@ -394,7 +451,7 @@
icon_state = "std_module"
w_class = 2.0
item_state = "electronic"
flags = FPRINT|TABLEPASS|CONDUCT
flags = CONDUCT
var/mtype = 1 // 1=electronic 2=hardware
/obj/item/weapon/module/card_reader
@@ -463,7 +520,7 @@
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
flags = CONDUCT
force = 12.0
sharp = 1
edge = 1
@@ -494,7 +551,7 @@
throw_speed = 2
throw_range = 3
w_class = 4.0
flags = FPRINT | TABLEPASS | NOSHIELD
flags = NOSHIELD
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")
@@ -518,7 +575,7 @@
w_class = 1
throwforce = 2
var/cigarcount = 6
flags = ONBELT | TABLEPASS */
flags = ONBELT */
/obj/item/weapon/pai_cable
desc = "A flexible coated cable with a universal jack on one end."
+121
View File
@@ -0,0 +1,121 @@
/var/datum/announcement/priority/priority_announcement = new(do_log = 0)
/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1)
/datum/announcement
var/title = "Attention"
var/announcer = ""
var/log = 0
var/sound
var/newscast = 0
var/channel_name = "Station Announcements"
var/announcement_type = "Announcement"
var/disable_newscasts = 1 // Bay also adds announcements to their newscaster system - set this to 0 to also use that system
/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0)
sound = new_sound
log = do_log
newscast = do_newscast
/datum/announcement/priority/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
..(do_log, new_sound, do_newscast)
title = "Priority Announcement"
announcement_type = "Priority Announcement"
/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
..(do_log, new_sound, do_newscast)
title = "[command_name()] Update"
announcement_type = "[command_name()] Update"
/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0)
..(do_log, new_sound, do_newscast)
title = "Security Announcement"
announcement_type = "Security Announcement"
/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast)
if(!message)
return
var/tmp/message_title = new_title ? new_title : title
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
message = trim_strip_html_properly(message)
message_title = html_encode(message_title)
Message(message, message_title)
if(do_newscast)
NewsCast(message, message_title)
Sound(message_sound)
Log(message, message_title)
datum/announcement/proc/Message(message as text, message_title as text)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << "<h2 class='alert'>[title]</h2>"
M << "<span class='alert'>[message]</span>"
if (announcer)
M << "<span class='alert'> -[html_encode(announcer)]</span>"
datum/announcement/minor/Message(message as text, message_title as text)
world << "<b>[message]</b>"
datum/announcement/priority/Message(message as text, message_title as text)
world << "<h1 class='alert'>[message_title]</h1>"
world << "<span class='alert'>[message]</span>"
if(announcer)
world << "<span class='alert'> -[html_encode(announcer)]</span>"
world << "<br>"
datum/announcement/priority/command/Message(message as text, message_title as text)
var/command
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (message_title)
command += "<br><h2 class='alert'>[message_title]</h2>"
command += "<br><span class='alert'>[message]</span><br>"
command += "<br>"
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << command
datum/announcement/priority/security/Message(message as text, message_title as text)
world << "<font size=4 color='red'>[message_title]</font>"
world << "<font color='red'>[message]</font>"
datum/announcement/proc/NewsCast(message as text, message_title as text)
if(disable_newscasts)
return
if(!newscast)
return
var/datum/news_announcement/news = new
news.channel_name = channel_name
news.author = announcer
news.message = message
news.message_type = announcement_type
news.can_be_redacted = 0
announce_newscaster_news(news)
datum/announcement/proc/PlaySound(var/message_sound)
if(!message_sound)
return
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << message_sound
datum/announcement/proc/Sound(var/message_sound)
PlaySound(message_sound)
datum/announcement/priority/Sound(var/message_sound)
if(sound)
world << sound
datum/announcement/priority/command/Sound(var/message_sound)
PlaySound(message_sound)
datum/announcement/proc/Log(message as text, message_title as text)
if(log)
log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]")
message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1)
/proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I)
// Format currently matches that of newscaster feeds: Registered Name (Assigned Rank)
return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name
-5
View File
@@ -1,5 +0,0 @@
/proc/captain_announce(var/text)
world << "<h1 class='alert'>Priority Announcement</h1>"
world << "<span class='alert'>[html_encode(text)]</span>"
world << "<br>"
-11
View File
@@ -1,11 +0,0 @@
/proc/command_alert(var/text, var/title = "")
var/command
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (title && length(title) > 0)
command += "<br><h2 class='alert'>[html_encode(title)]</h2>"
command += "<br><span class='alert'>[html_encode(text)]</span><br>"
command += "<br>"
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << command
+3 -3
View File
@@ -70,7 +70,7 @@ var/list/teleportlocs = list()
var/list/turfs = get_area_turfs(AR.type)
if(turfs.len)
var/turf/picked = pick(turfs)
if (picked.z == 1)
if ((picked.z in config.station_levels))
teleportlocs += AR.name
teleportlocs[AR.name] = AR
@@ -83,13 +83,13 @@ var/list/ghostteleportlocs = list()
/hook/startup/proc/setupGhostTeleportLocs()
for(var/area/AR in world)
if(ghostteleportlocs.Find(AR.name)) continue
if(istype(AR, /area/turret_protected/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome))
if(istype(AR, /area/tdome))
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
var/list/turfs = get_area_turfs(AR.type)
if(turfs.len)
var/turf/picked = pick(turfs)
if (picked.z == 1 || picked.z == 5 || picked.z == 3)
if ((picked.z in config.player_levels))
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
+1 -3
View File
@@ -1,7 +1,7 @@
/atom
layer = 2
var/level = 2
var/flags = FPRINT
var/flags = 0
var/list/fingerprints
var/list/fingerprintshidden
var/fingerprintslast = null
@@ -380,8 +380,6 @@ its easier to just keep the beam vertical.
M.dna = new /datum/dna(null)
M.dna.real_name = M.real_name
M.check_dna()
if (!( src.flags ) & FPRINT)
return 0
if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
blood_DNA = list()
+2 -1
View File
@@ -99,7 +99,8 @@
src.throw_impact(A,speed)
/atom/movable/proc/throw_at(atom/target, range, speed, thrower)
if(!target || !src) return 0
if(!target || !src || (flags & NODROP))
return 0
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
src.throwing = 1
+2 -2
View File
@@ -410,7 +410,7 @@
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
H.unEquip(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
@@ -483,7 +483,7 @@
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
Mo.unEquip(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
+2 -2
View File
@@ -22,7 +22,7 @@
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
H.unEquip(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
@@ -93,7 +93,7 @@
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
Mo.unEquip(W)
M.monkeyizing = 1
M.canmove = 0
M.icon = null
+5 -8
View File
@@ -58,7 +58,7 @@ var/list/blob_nodes = list()
/datum/game_mode/blob/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && bomb.z == 1)
if(bomb && bomb.r_code && (bomb.z in config.station_levels))
nukecode = bomb.r_code
return nukecode
@@ -92,7 +92,7 @@ var/list/blob_nodes = list()
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
if(location.z != 1 || istype(location, /turf/space))
if(!(location.z in config.station_levels) || istype(location, /turf/space))
location = null
C.gib()
@@ -175,17 +175,14 @@ var/list/blob_nodes = list()
return
if (1)
command_alert("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/blob_confirmed.ogg')
command_announcement.Announce("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg')
return
if (2)
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert")
command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg')
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
send_intercept(2)
+1 -1
View File
@@ -62,7 +62,7 @@ datum/game_mode/proc/auto_declare_completion_blob()
if (istype(T, /turf/space))
numSpace += 1
else if(istype(T, /turf))
if (M.z!=1)
if (!(M.z in config.station_levels))
numOffStation += 1
else
numAlive += 1
+2 -2
View File
@@ -61,7 +61,7 @@
proc/count()
for(var/turf/T in world)
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
if(istype(T,/turf/simulated/floor))
@@ -83,7 +83,7 @@
src.r_wall += 1
for(var/obj/O in world)
if(O.z != 1)
if(!(O.z in config.station_levels))
continue
if(istype(O, /obj/structure/window))
+1 -1
View File
@@ -39,7 +39,7 @@
return 0 // not enough candidates for borer
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == STATION_Z) // No more spawning in atmos. Assuming the mappers did their jobs, anyway.
if(!v.welded && (v.z in config.station_levels))
found_vents.Add(v)
// for each 2 possible borers, add one borer and one host
@@ -31,7 +31,7 @@
implants += I
for(var/obj/item/W in src)
user.u_equip(W)
user.unEquip(W)
if (user.client)
user.client.screen -= W
if (W)
@@ -42,7 +42,7 @@
C.dna = null
for(var/obj/item/W in C)
C.drop_from_inventory(W)
C.unEquip(W)
for(var/obj/T in C)
del(T)
@@ -34,7 +34,7 @@
..(user, target)
/obj/effect/proc_holder/changeling/weapon/sting_action(var/mob/user)
if(!user.drop_item() && user.get_active_hand())
if(!user.drop_item())
user << "The [user.get_active_hand()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!"
return
var/obj/item/W = new weapon_type(user)
@@ -83,15 +83,15 @@
..(H, target)
/obj/effect/proc_holder/changeling/suit/sting_action(var/mob/living/carbon/human/user)
if(user.wear_suit && !user.wear_suit.canremove)
if(!user.unEquip(user.wear_suit))
user << "\the [user.wear_suit] is stuck to your body, you cannot grow a [suit_name_simple] over it!"
return
if(user.head && !user.head.canremove)
if(!user.unEquip(user.head))
user << "\the [user.head] is stuck on your head, you cannot grow a [helmet_name_simple] over it!"
return
user.u_equip(user.head)
user.u_equip(user.wear_suit)
user.unEquip(user.head)
user.unEquip(user.wear_suit)
user.equip_to_slot_if_possible(new suit_type(user), slot_wear_suit, 1, 1, 1)
user.equip_to_slot_if_possible(new helmet_type(user), slot_head, 1, 1, 1)
@@ -123,11 +123,11 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "arm_blade"
item_state = "arm_blade"
flags = ABSTRACT | NODROP
icon_override = 'icons/mob/in-hand/changeling.dmi'
w_class = 5.0
sharp = 1
edge = 1
canremove = 0
force = 25
throwforce = 0 //Just to be on the safe side
throw_range = 0
@@ -195,13 +195,15 @@
return
var/obj/item/weapon/shield/changeling/S = ..(user)
if(!S)
return
S.remaining_uses = round(changeling.absorbedcount * 3)
return 1
/obj/item/weapon/shield/changeling
name = "shield-like mass"
desc = "A mass of tough, boney tissue. You can still see the fingers as a twisted pattern in the shield."
canremove = 0
flags = NODROP
icon = 'icons/obj/weapons.dmi'
icon_state = "ling_shield"
icon_override = 'icons/mob/in-hand/changeling.dmi'
@@ -221,7 +223,7 @@
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
H.visible_message("<span class='warning'>With a sickening crunch, [H] reforms his shield into an arm!</span>", "<span class='notice'>We assimilate our shield into our body</span>", "<span class='warning>You hear organic matter ripping and tearing!</span>")
H.u_equip(src, 1)
H.unEquip(src, 1)
qdel(src)
return 0
else
@@ -256,10 +258,9 @@
name = "flesh mass"
icon_state = "lingspacesuit"
desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel."
flags = STOPSPRESSUREDMAGE
flags = STOPSPRESSUREDMAGE | NODROP
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/tank/oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) //No armor at all.
canremove = 0
/obj/item/clothing/suit/space/changeling/New()
..()
@@ -279,9 +280,8 @@
name = "flesh mass"
icon_state = "lingspacehelmet"
desc = "A covering of pressure and temperature-resistant organic tissue with a glass-like chitin front."
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | NODROP
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
canremove = 0
/obj/item/clothing/head/helmet/space/changeling/dropped()
qdel(src)
@@ -310,10 +310,10 @@
name = "chitinous mass"
desc = "A tough, hard covering of black chitin."
icon_state = "lingarmor"
flags = NODROP
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 2
armor = list(melee = 65, bullet = 20, laser = 10, energy = 13, bomb = 0, bio = 0, rad = 0)
canremove = 0
flags_inv = HIDEJUMPSUIT
cold_protection = 0
heat_protection = 0
@@ -330,9 +330,8 @@
name = "chitinous mass"
desc = "A tough, hard covering of black chitin with transparent chitin in front."
icon_state = "lingarmorhelmet"
flags = HEADCOVERSEYES | BLOCKHAIR
flags = HEADCOVERSEYES | BLOCKHAIR | NODROP
armor = list(melee = 70, bullet = 15, laser = 7,energy = 10, bomb = 5, bio = 2, rad = 0)
canremove = 0
flags_inv = HIDEEARS
/obj/item/clothing/head/helmet/changeling/dropped()
+2 -5
View File
@@ -3,7 +3,6 @@
desc = "An arcane weapon wielded by the followers of Nar-Sie"
icon_state = "cultblade"
item_state = "cultblade"
flags = FPRINT | TABLEPASS
w_class = 4
force = 30
throwforce = 10
@@ -34,7 +33,7 @@
icon_state = "culthood"
desc = "A hood worn by the followers of Nar-Sie."
flags_inv = HIDEFACE
flags = FPRINT|TABLEPASS|HEADCOVERSEYES
flags = HEADCOVERSEYES
armor = list(melee = 30, bullet = 10, laser = 5,energy = 5, bomb = 0, bio = 0, rad = 0)
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
@@ -55,7 +54,6 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "cultrobes"
item_state = "cultrobes"
flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
@@ -68,7 +66,7 @@
item_state = "magus"
desc = "A helm worn by the followers of Nar-Sie."
flags_inv = HIDEFACE
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
armor = list(melee = 30, bullet = 30, laser = 30,energy = 20, bomb = 0, bio = 0, rad = 0)
siemens_coefficient = 0
loose = 6 // mostly one size fits all
@@ -78,7 +76,6 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "magusred"
item_state = "magusred"
flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
+2 -3
View File
@@ -112,7 +112,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
return "itemport"
return "[rune_to_english[word1]]_[rune_to_english[word2]]_[rune_to_english[word3]]"
/obj/effect/rune
var/list/effect_dictionary = list( "teleport"=/obj/effect/rune/proc/teleportRune,
"itemport"=/obj/effect/rune/proc/itemportRune,
@@ -150,7 +150,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
user << "You are unable to speak at all! You cannot say the words of the rune."
if(!word1 || !word2 || !word3 || prob(user.getBrainLoss()))
return fizzle()
var/word_string = get_word_string()
if (word_string in effect_dictionary)
cult_log("of type [effect_dictionary[word_string]] activated by [key_name_admin(user)].")
@@ -176,7 +176,6 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS
var/notedat = ""
var/tomedat = ""
var/list/words = list("ire" = "ire", "ego" = "ego", "nahlizet" = "nahlizet", "certum" = "certum", "veri" = "veri", "jatkaa" = "jatkaa", "balaq" = "balaq", "mgar" = "mgar", "karazet" = "karazet", "geeri" = "geeri")
+1 -1
View File
@@ -813,7 +813,7 @@ var/list/sacrificed = list()
cultist.legcuffed = null
cultist.update_inv_legcuffed()
if (istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle))
cultist.u_equip(cultist.wear_mask)
cultist.unEquip(cultist.wear_mask)
if(istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded)
cultist.loc:welded = 0
if(istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked)
+1 -1
View File
@@ -149,7 +149,7 @@
announce_to_kill_crew()
stage = 2
else if(stage == 2 && cruiser_seconds() <= 60 * 5)
command_alert("Inbound cruiser detected on collision course. Scans indicate the ship to be armed and ready to fire. Estimated time of arrival: 5 minutes.", "[station_name()] Early Warning System")
command_announcement.Announce("Inbound cruiser detected on collision course. Scans indicate the ship to be armed and ready to fire. Estimated time of arrival: 5 minutes.", "[station_name()] Early Warning System")
stage = 3
else if(stage == 3 && cruiser_seconds() <= 0)
crew_lose()
+24 -37
View File
@@ -30,10 +30,7 @@
eventNumbersToPickFrom += 3
switch(pick(eventNumbersToPickFrom))
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/meteors.ogg')
command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
@@ -42,22 +39,18 @@
spawn_meteors()
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/granomalies.ogg')
command_announcement.Announce("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
/*
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/spanomalies.ogg')
command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg')
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
if((T.z in config.station_levels))
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
@@ -107,8 +100,7 @@
/*
/proc/viral_outbreak(var/virus = null)
// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
// world << sound('sound/AI/outbreak7.ogg')
// command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
var/virus_type
if(!virus)
virus_type = pick(/datum/disease/dnaspread,/datum/disease/advance/flu,/datum/disease/advance/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
@@ -140,7 +132,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
for(var/datum/disease/D in H.viruses)
foundAlready = 1
@@ -167,17 +159,14 @@
H.viruses += D
break
spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
for(var/mob/M in player_list)
M << sound('sound/AI/outbreak7.ogg')
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
*/
/proc/alien_infestation(var/spawncount = 1) // -- TLE
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
//world << sound('sound/AI/aliens.ogg')
//command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
@@ -197,7 +186,7 @@
spawncount--
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
for(var/mob/M in player_list)
M << sound('sound/AI/aliens.ogg')
@@ -205,7 +194,7 @@
/* // Haha, this is way too laggy. I'll keep the prison break though.
for(var/obj/machinery/light/L in world)
if(L.z != 1) continue
if(!(L.z in config.station_levels)) continue
L.flicker(50)
sleep(100)
@@ -214,9 +203,11 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
if(istype(H,/mob/living/carbon/human))
if(H.species.flags & IS_SYNTHETIC)
return
H.apply_effect((rand(15,75)),IRRADIATE,0)
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE,0)
@@ -231,13 +222,11 @@
var/turf/T = get_turf(M)
if(!T)
continue
if(T.z != 1)
if(!(T.z in config.station_levels))
continue
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
for(var/mob/M in player_list)
M << sound('sound/AI/radiation.ogg')
command_announcement.Announce("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
@@ -276,9 +265,9 @@
temp_timer.releasetime = 1
sleep(150)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
command_announcement.Announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
world.log << "ERROR: Could not initate grey-tide virus. Unable find prison or brig area."
/proc/carp_migration() // -- Darem
for(var/obj/effect/landmark/C in landmarks_list)
@@ -286,13 +275,11 @@
new /mob/living/simple_animal/hostile/carp(C.loc)
//sleep(100)
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
for(var/mob/M in player_list)
M << sound('sound/AI/commandreport.ogg')
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert", new_sound = 'sound/AI/commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
if(lightsoutAmount)
var/list/epicentreList = list()
@@ -442,21 +429,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
if((APC.z in config.station_levels))
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
if((SMES.z in config.station_levels))
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
if((D.z in config.station_levels))
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
@@ -465,7 +452,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
if((D.z in config.station_levels))
firedoornum++;
spawn(0)
D.ion_act()
+3 -3
View File
@@ -1,18 +1,18 @@
/datum/event/portalstorm
Announce()
command_alert("Subspace disruption detected around the vessel", "Anomaly Alert")
command_announcement.Announce("Subspace disruption detected around the vessel", "Anomaly Alert")
LongTerm()
var/list/turfs = list( )
var/turf/picked
for(var/turf/T in world)
if(T.z < 5 && istype(T,/turf/simulated/floor))
if((T.z in config.player_levels) && istype(T,/turf/simulated/floor))
turfs += T
for(var/turf/T in world)
if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor))
if(prob(10) && (T.z in config.player_levels) && istype(T,/turf/simulated/floor))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/portal/P = new /obj/portal( T )
+3 -4
View File
@@ -13,11 +13,11 @@
if(prob(100)) // no lethal diseases outside virus mode!
infect_mob_random_lesser(H)
if(prob(20))//don't want people to know that the virus alert = greater virus
command_alert("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
command_announcement.Announce("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
else
infect_mob_random_greater(H)
if(prob(80))
command_alert("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
command_announcement.Announce("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
break
//overall virus alert happens 26% of the time, might need to be higher
else
@@ -73,8 +73,7 @@
H.viruses += D
break
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
Tick()
ActiveFor = Lifetime //killme
+2 -2
View File
@@ -78,7 +78,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
walk_towards(immrod, end,1)
sleep(1)
while (immrod)
if (immrod.z != 1)
if ((immrod.z in config.station_levels))
immrod.z = 1
if(immrod.loc == end)
del(immrod)
@@ -86,4 +86,4 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
for(var/obj/effect/immovablerod/imm in world)
return
sleep(50)
command_alert("What the fuck was that?!", "General Alert")
command_announcement.Announce("What the fuck was that?!", "General Alert")
@@ -1,6 +1,6 @@
/proc/Christmas_Game_Start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != 1) continue
if(!(xmas.z in config.station_levels)) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/a_gift(T)
@@ -58,6 +58,5 @@
icon_state = "xmashat"
desc = "A crappy paper hat that you are REQUIRED to wear."
flags_inv = 0
flags = FPRINT|TABLEPASS
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
@@ -171,7 +171,7 @@ var/global/Holiday = null
*/
/* var/list/obj/containers = list()
for(var/obj/item/weapon/storage/S in world)
if(S.z != 1) continue
if(!(S.z in config.station_levels)) continue
containers += S
message_admins("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/
+2 -5
View File
@@ -12,10 +12,7 @@
spawn(3000)
blobevent = 0
spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/outbreak5.ogg')
command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
/proc/dotheblobbaby()
if (blobevent)
@@ -24,7 +21,7 @@
sleep(-1)
if(!blob_cores.len) break
var/obj/effect/blob/B = pick(blob_cores)
if(B.z != 1)
if(!(B.z in config.station_levels))
continue
B.Life()
spawn(30)
@@ -1287,7 +1287,7 @@ ________________________________________________________________________________
/obj/item/clothing/gloves/space_ninja/examine()
set src in view()
..()
if(!canremove)
if(flags & NODROP)
var/mob/living/carbon/human/U = loc
U << "The energy drain mechanism is: <B>[candrain?"active":"inactive"]</B>."
@@ -1479,7 +1479,7 @@ It is possible to destroy the net by the occupant or someone else.
if(istype(M,/mob/living/carbon/human))
if(W==M:w_uniform) continue//So all they're left with are shoes and uniform.
if(W==M:shoes) continue
M.drop_from_inventory(W)
M.unEquip(W)
spawn(0)
playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1)
+7 -13
View File
@@ -1,16 +1,14 @@
/proc/power_failure(var/announce = 1)
if(announce)
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
for(var/mob/M in player_list)
M << sound('sound/AI/poweroff.ogg')
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
var/list/skipped_areas = list(/area/turret_protected/ai)
var/list/skipped_areas_apc = list(/area/engine/engineering)
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || S.z != 1)
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
continue
S.charge = 0
S.output = 0
@@ -21,7 +19,7 @@
for(var/obj/machinery/power/apc/C in world)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || C.z != 1)
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
continue
if(C.cell)
C.cell.charge = 0
@@ -31,18 +29,16 @@
var/list/skipped_areas_apc = list(/area/engine/engineering)
if(announce)
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in machines)
var/area/current_area = get_area(C)
if(current_area.type in skipped_areas_apc || C.z != 1)
if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels))
continue
if(C.cell)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in machines)
var/area/current_area = get_area(S)
if(current_area.type in skipped_areas || S.z != 1)
if(current_area.type in skipped_areas || !(S.z in config.station_levels))
continue
S.charge = S.capacity
S.output = 200000
@@ -53,9 +49,7 @@
/proc/power_restore_quick(var/announce = 1)
if(announce)
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
for(var/mob/M in player_list)
M << sound('sound/AI/poweron.ogg')
command_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in machines)
if(S.z != 1)
continue
+10 -10
View File
@@ -594,39 +594,39 @@ As such, it's hard-coded for now. No reason for it not to be, really.
U << "\red <B>ERROR</B>: 110223 \black UNABLE TO LOCATE MASK\nABORTING..."
return 0
affecting = U
canremove = 0
flags |= NODROP
slowdown = 0
n_hood = U:head
n_hood.canremove=0
n_hood.flags |= NODROP
n_shoes = U:shoes
n_shoes.canremove=0
n_shoes.flags |= NODROP
n_shoes.slowdown--
n_gloves = U:gloves
n_gloves.canremove=0
n_gloves.flags |= NODROP
n_mask = U:wear_mask
n_mask.canremove=0
n_mask.flags |= NODROP
return 1
//This proc allows the suit to be taken off.
/obj/item/clothing/suit/space/space_ninja/proc/unlock_suit()
affecting = null
canremove = 1
flags &= ~NODROP
slowdown = 1
icon_state = "s-ninja"
if(n_hood)//Should be attached, might not be attached.
n_hood.canremove=1
n_hood.flags &= ~NODROP
if(n_shoes)
n_shoes.canremove=1
n_shoes.flags &= ~NODROP
n_shoes.slowdown++
if(n_gloves)
n_gloves.icon_state = "s-ninja"
n_gloves.item_state = "s-ninja"
n_gloves.canremove=1
n_gloves.flags &= ~NODROP
n_gloves.candrain=0
n_gloves.draining=0
if(n_mask)
n_mask.canremove=1
n_mask.flags &= ~NODROP
//Allows the mob to grab a stealth icon.
/mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay.
+2 -2
View File
@@ -2,12 +2,12 @@
spawn()
var/list/pick_turfs = list()
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
if((T.z in config.station_levels))
pick_turfs += T
if(pick_turfs.len)
//All ready. Announce that bad juju is afoot.
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
command_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/spanomalies.ogg')
+6 -4
View File
@@ -323,10 +323,7 @@ Implants;
comm.messagetext.Add(intercepttext)
/* world << sound('sound/AI/commandreport.ogg') */
command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercepted. Security Level Elevated.")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/intercept.ogg')
command_announcement.Announce("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercepted. Security Level Elevated.", new_sound = 'sound/AI/intercept.ogg')
if(security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
@@ -445,6 +442,11 @@ Implants;
if(P.client && P.ready)
. ++
/datum/game_mode/proc/num_players_started()
. = 0
for(var/mob/living/carbon/human/H in player_list)
if(H.client)
. ++
///////////////////////////////////
//Keeps track of all living heads//
+9 -8
View File
@@ -246,12 +246,12 @@ var/global/datum/controller/gameticker/ticker
var/obj/structure/stool/bed/temp_buckle = new(src)
//Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around
if(station_missed)
for(var/mob/living/M in living_mob_list)
for(var/mob/M in living_mob_list)
M.buckled = temp_buckle //buckles the mob so it can't do anything
if(M.client)
M.client.screen += cinematic //show every client the cinematic
else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived"
for(var/mob/living/M in living_mob_list)
for(var/mob/M in mob_list)
M.buckled = temp_buckle
if(M.client)
M.client.screen += cinematic
@@ -259,12 +259,13 @@ var/global/datum/controller/gameticker/ticker
switch(M.z)
if(0) //inside a crate or something
var/turf/T = get_turf(M)
if(T && T.z==1) //we don't use M.death(0) because it calls a for(/mob) loop and
M.health = 0
M.stat = DEAD
if(T && (T.z in config.station_levels))
M.death(0)
if(1) //on a z-level 1 turf.
M.health = 0
M.stat = DEAD
M.death(0)
for(var/obj/effect/blob/core in blob_cores)
core.health = -10
core.update_icon()
//Now animate the cinematic
switch(station_missed)
@@ -319,7 +320,7 @@ var/global/datum/controller/gameticker/ticker
world << sound('sound/effects/explosionfar.ogg')
cinematic.icon_state = "summary_selfdes"
for(var/mob/living/M in living_mob_list)
if(M.loc.z == 1)
if((M.loc.z in config.station_levels))
M.death()//No mercy
//If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards.
@@ -90,6 +90,8 @@ rcd light flash thingy on matter drain
var/obj/machinery/door/airlock/AL
for(var/obj/machinery/door/D in airlocks)
if(!(D.z in config.contact_levels))
continue
spawn()
if(istype(D, /obj/machinery/door/airlock))
AL = D
+7 -10
View File
@@ -74,12 +74,12 @@
/datum/game_mode/proc/greet_malf(var/datum/mind/malf)
malf.current << {"\red<font size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font><br />
\black<B>The crew do not know you have malfunctioned. You may keep it a secret or go wild.</B><br />
<B>You must overwrite the programming of the station's APCs to assume full control of the station.</B><br />
The process takes one minute per APC, during which you cannot interface with any other station objects.<br />
Remember that only APCs that are on the station can help you take over the station.<br />
When you feel you have enough APCs under your control, you may begin the takeover attempt."}
malf.current << "\red<font size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font>"
malf.current << "<B>The crew do not know you have malfunctioned. You may keep it a secret or go wild.</B>"
malf.current << "<B>You must overwrite the programming of the station's APCs to assume full control of the station.</B>"
malf.current << "The process takes one minute per APC, during which you cannot interface with any other station objects."
malf.current << "Remember that only APCs that are on the station can help you take over the station."
malf.current << "When you feel you have enough APCs under your control, you may begin the takeover attempt."
return
@@ -172,7 +172,7 @@
if (alert(usr, "Are you sure you wish to initiate the takeover? The station hostile runtime detection software is bound to alert everyone. You have hacked [ticker.mode:apcs] APCs.", "Takeover:", "Yes", "No") != "Yes")
return
command_alert("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert")
command_announcement.Announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", new_sound = 'sound/AI/aimalf.ogg')
set_security_level("delta")
for(var/obj/item/weapon/pinpointer/point in world)
@@ -184,9 +184,6 @@
ticker.mode:malf_mode_declared = 1
for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
M << sound('sound/AI/aimalf.ogg')
/datum/game_mode/malfunction/proc/ai_win()
@@ -11,7 +11,6 @@
var/secondary_key
var/activated = 0
flags = FPRINT
use_power = 0
New(loc, mode)
@@ -42,7 +41,7 @@
if(emergency_shuttle.call_evac())
spawn(20 SECONDS)
var/text = "[station_name()], we have confirmed your completion of Directive X. An evacuation shuttle is en route to receive your crew for debriefing."
command_alert(text, "Emergency Transmission")
command_announcement.Announce(text, "Emergency Transmission")
/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
if(activated)
+2 -2
View File
@@ -27,7 +27,7 @@ datum/game_mode/mutiny
proc/reveal_directives()
spawn(rand(1 MINUTES, 3 MINUTES))
command_alert("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission")
command_announcement.Announce("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission")
spawn(rand(3 MINUTES, 5 MINUTES))
send_pda_message()
spawn(rand(3 MINUTES, 5 MINUTES))
@@ -67,7 +67,7 @@ datum/game_mode/mutiny
"classified security operations",
"science-defying raw elemental chaos"
)
command_alert("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission")
command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission")
// Returns an array in case we want to expand on this later.
proc/get_head_loyalist_candidates()
+1 -1
View File
@@ -28,7 +28,7 @@ datum/game_mode/nations
return ..()
/datum/game_mode/nations/send_intercept()
command_alert("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \
command_announcement.Announce("Due to recent and COMPLETELY UNFOUNDED allegations of massive fraud and insider trading \
affecting trillions of investors, the Nanotrasen Corporation has decided to liquidate all \
assets of the Centcom Division in order to pay the massive legal fees that will be incurred \
during the following centuries long court process. Therefore, all current employment contracts \
+1 -1
View File
@@ -1398,7 +1398,7 @@ datum
var/turf/T = get_turf(target.current)
if(target.current.stat == 2)
return 1
else if((T) && (T.z != 1))//If they leave the station they count as dead for this
else if((T) && !(T.z in config.station_levels))//If they leave the station they count as dead for this
return 2
else
return 0
+13 -14
View File
@@ -23,11 +23,10 @@ var/bomb_set
var/timing_wire
var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open, 3 is sealant open, 4 is unwrenched, 5 is removed from bolts.
var/lastentered
var/data[0]
var/data[0]
var/uiwidth
var/uiheight
var/uititle
flags = FPRINT
use_power = 0
unacidable = 1
@@ -85,7 +84,7 @@ var/bomb_set
if (istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters))
ui_interact(user)
if (src.extended)
if (istype(O, /obj/item/weapon/disk/nuclear))
usr.drop_item()
@@ -187,7 +186,7 @@ var/bomb_set
obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
ui_interact(user)
/obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!src.opened)
data["hacking"] = 0
@@ -198,12 +197,12 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
else
data["authstatus"] = "Auth. S2"
else
if (src.timing)
if (src.timing)
data["authstatus"] = "Set"
else
data["authstatus"] = "Auth. S1"
data["safe"] = src.safety ? "Safe" : "Engaged"
data["time"] = src.timeleft
data["safe"] = src.safety ? "Safe" : "Engaged"
data["time"] = src.timeleft
data["timer"] = src.timing
data["safety"] = src.safety
data["anchored"] = src.anchored
@@ -218,7 +217,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
uititle = "Nuke Control Panel"
else
data["hacking"] = 1
var/list/tempwires[0]
var/list/tempwires[0]
for(var/wire in src.wires)
tempwires.Add(list(list("name" = wire, "cut" = src.wires[wire])))
data["wires"] = tempwires
@@ -228,10 +227,10 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
uiwidth = 420
uiheight = 440
uititle = "Nuclear Bomb Defusion"
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "nuclear_bomb.tmpl", uititle, uiwidth, uiheight)
ui.set_initial_data(data)
ui.set_initial_data(data)
ui.open()
/obj/machinery/nuclearbomb/verb/make_deployable()
@@ -338,8 +337,8 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
if (src.timing == -1.0)
return
if (src.safety)
usr << "\red The safety is still on."
nanomanager.update_uis(src)
usr << "\red The safety is still on."
nanomanager.update_uis(src)
return
src.timing = !( src.timing )
if (src.timing)
@@ -409,7 +408,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
var/off_station = 0
var/turf/bomb_location = get_turf(src)
if( bomb_location && (bomb_location.z == 1) )
if( bomb_location && (bomb_location.z in config.station_levels) )
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
off_station = 1
else
@@ -427,7 +426,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
if(ticker.mode.name == "nuclear emergency")
ticker.mode:nukes_left --
else if(off_station == 1)
world << "<b>A nuclear device was set off, but the explosion was out of reach of the station!</b>"
world << "<b>A nuclear device was set off, but the explosion was out of reach of the station!</b>"
else if(off_station == 2)
world << "<b>A nuclear device was set off, but the device was not on the station!</b>"
else
+3 -3
View File
@@ -2,7 +2,7 @@
name = "pinpointer"
icon = 'icons/obj/device.dmi'
icon_state = "pinoff"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0
item_state = "electronic"
@@ -344,7 +344,7 @@
icon_state = "pinonfar"
spawn(5)
.()
/obj/item/weapon/pinpointer/operative
name = "operative pinpointer"
icon = 'icons/obj/device.dmi'
@@ -379,7 +379,7 @@
user << "Nearest operative: <b>[nearest_op]</b>."
if(nearest_op == null && active)
user << "No operatives detected within scanning range."
/obj/item/weapon/pinpointer/operative/proc/point_at(atom/target, spawnself = 1)
if(!active)
return
+3 -3
View File
@@ -104,7 +104,7 @@ datum/objective/mutiny
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client)
return 1
var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
return 2
return 0
return 1
@@ -139,7 +139,7 @@ datum/objective/mutiny/rp
if(target in ticker.mode:head_revolutionaries)
return 1
var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
rval = 2
return 0
return rval
@@ -255,7 +255,7 @@ datum/objective/maroon
if(target && target.current)
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
return 1
if(target.current.z == 2)
if((target.current.z in config.admin_levels))
return 0
return 1
@@ -134,7 +134,7 @@
/datum/game_mode/anti_revolution/proc/check_crew_victory()
for(var/datum/mind/head_mind in heads)
var/turf/T = get_turf(head_mind.current)
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600))
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z in config.station_levels) && !head_mind.is_brigged(600))
if(ishuman(head_mind.current))
return 0
return 1
+47 -6
View File
@@ -75,7 +75,7 @@
/datum/game_mode/revolution/post_setup()
var/list/heads = get_living_heads()
if(num_players() >= 40)
if(num_players_started() >= 30)
heads += get_extra_living_heads()
extra_heads = 1
@@ -110,10 +110,51 @@
checkwin_counter = 0
return 0
/proc/get_rev_mode()
if(!ticker || !istype(ticker.mode, /datum/game_mode/revolution))
return null
/**
* LateSpawn hook.
* Called in newplayer.dm when a humanoid character joins the round after it started.
* Parameters: var/mob/living/carbon/human, var/rank
*/
/hook/latespawn/proc/add_latejoiner_heads(var/mob/living/carbon/human/H)
var/datum/game_mode/revolution/mode = get_rev_mode()
if (!mode) return 1
var/list/heads = list()
var/list/alt_positions = list("Warden", "Magistrate", "Blueshield", "Nanotrasen Representative")
if(H.stat!=2 && H.mind && (H.mind.assigned_role in command_positions))
heads += H
if(mode.extra_heads)
if(H.stat!=2 && H.mind && (H.mind.assigned_role in alt_positions))
heads += H
for(var/datum/mind/rev_mind in mode.head_revolutionaries)
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
rev_mind.current << "Additional Objective: Assassinate [head_mind.name], the [head_mind.assigned_role]."
for(var/datum/mind/rev_mind in mode.revolutionaries)
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
rev_mind.current << "Additional Objective: Assassinate [head_mind.name], the [head_mind.assigned_role]."
/datum/game_mode/proc/forge_revolutionary_objectives(var/datum/mind/rev_mind)
var/list/heads = get_living_heads()
if(num_players() >= 40)
if(num_players_started() >= 30)
heads += get_extra_living_heads()
extra_heads = 1
for(var/datum/mind/head_mind in heads)
@@ -347,7 +388,7 @@
/datum/game_mode/revolution/proc/check_heads_victory()
for(var/datum/mind/rev_mind in head_revolutionaries)
var/turf/T = get_turf(rev_mind.current)
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == 1))
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z in config.station_levels))
if(ishuman(rev_mind.current))
return 0
return 1
@@ -376,7 +417,7 @@
if(headrev.current)
if(headrev.current.stat == DEAD)
text += "died"
else if(headrev.current.z != 1)
else if(!(headrev.current.z in config.station_levels))
text += "fled the station"
else
text += "survived the revolution"
@@ -399,7 +440,7 @@
if(rev.current)
if(rev.current.stat == DEAD)
text += "died"
else if(rev.current.z != 1)
else if(!(rev.current.z in config.station_levels))
text += "fled the station"
else
text += "survived the revolution"
@@ -426,7 +467,7 @@
if(head.current)
if(head.current.stat == DEAD)
text += "died"
else if(head.current.z != 1)
else if(!(head.current.z in config.station_levels))
text += "fled the station"
else
text += "survived the revolution"
@@ -124,7 +124,7 @@
// probably wanna export this stuff into a separate function for use by both
// revs and heads
//assume that only carbon mobs can become rev heads for now
if(!rev_mind.current:handcuffed && T && T.z == 1)
if(!rev_mind.current:handcuffed && T && (T.z in config.station_levels))
return 0
return 1
+5 -5
View File
@@ -26,13 +26,13 @@
// Who is alive/dead, who escaped
for (var/mob/living/silicon/ai/I in mob_list)
if (I.stat == 2 && I.z == 1)
if (I.stat == 2 && (I.z in config.station_levels))
score_deadaipenalty = 1
score_deadcrew += 1
for (var/mob/living/carbon/human/I in mob_list)
// for (var/datum/ailment/disease/V in I.ailments)
// if (!V.vaccine && !V.spread != "Remissive") score_disease++
if (I.stat == 2 && I.z == 1) score_deadcrew += 1
if (I.stat == 2 && (I.z in config.station_levels)) score_deadcrew += 1
if (I.job == "Clown")
for(var/thing in I.attack_log)
if(findtext(thing, "<font color='orange'>")) score_clownabuse++
@@ -102,7 +102,7 @@
if (location in bad_zone1) score_disc = 0
if (location in bad_zone2) score_disc = 0
if (location in bad_zone3) score_disc = 0
if (A.loc.z != 1) score_disc = 0
if (!(A.loc.z in config.station_levels)) score_disc = 0
*/
if (score_nuked)
for (var/obj/machinery/nuclearbomb/NUKE in machines)
@@ -132,13 +132,13 @@
// Check station's power levels
for (var/obj/machinery/power/apc/A in machines)
if (A.z != 1) continue
if (!(A.z in config.station_levels)) continue
for (var/obj/item/weapon/stock_parts/cell/C in A.contents)
if (C.charge < 2300) score_powerloss += 1 // 200 charge leeway
// Check how much uncleaned mess is on the station
for (var/obj/effect/decal/cleanable/M in world)
if (M.z != 1) continue
if (!(M.z in config.station_levels)) continue
if (istype(M, /obj/effect/decal/cleanable/blood/gibs/)) score_mess += 3
if (istype(M, /obj/effect/decal/cleanable/blood/)) score_mess += 1
// if (istype(M, /obj/effect/decal/cleanable/greenpuke)) score_mess += 1
-3
View File
@@ -9,7 +9,6 @@
throw_range = 5
w_class = 1.0
var/used = 0
flags = FPRINT | TABLEPASS
/obj/item/weapon/contract/attack_self(mob/user as mob)
@@ -116,7 +115,6 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
item_state = "render"
flags = FPRINT | TABLEPASS
force = 15
throwforce = 10
w_class = 3
@@ -197,7 +195,6 @@
throwforce = 15
damtype = BURN
force = 15
flags = FPRINT | TABLEPASS
hitsound = 'sound/items/welder2.ogg'
/obj/item/weapon/scrying/attack_self(mob/user as mob)
+1 -3
View File
@@ -5,7 +5,6 @@
item_state = "electronic"
desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power."
w_class = 1.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
origin_tech = "bluespace=4;materials=4"
var/imprinted = "empty"
@@ -90,7 +89,6 @@
icon = 'icons/obj/wizard.dmi'
icon_state = "construct"
desc = "A wicked machine used by those skilled in magical arts. It is inactive"
flags = FPRINT | TABLEPASS
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/device/soulstone))
@@ -118,7 +116,7 @@
U << "\red <b>Capture failed!</b>: \black The soul stone is full! Use or free an existing soul to make room."
else
for(var/obj/item/W in T)
T.drop_from_inventory(W)
T.unEquip(W)
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
T.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( T.loc )
+4 -4
View File
@@ -6,7 +6,6 @@
throw_speed = 1
throw_range = 5
w_class = 1.0
flags = FPRINT | TABLEPASS
var/uses = 5
var/temp = null
var/max_uses = 5
@@ -555,12 +554,13 @@
if(istype(user, /mob/living/carbon/human))
user <<"<font size='15' color='red'><b>HOR-SIE HAS RISEN</b></font>"
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.canremove = 0 //curses!
magichead.flags |= NODROP //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
user.drop_from_inventory(user.wear_mask)
if(!user.unEquip(user.wear_mask))
del user.wear_mask
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
del(src)
del src
else
user <<"<span class='notice'>I say thee neigh</span>"
+3 -3
View File
@@ -200,10 +200,10 @@
else
if(playeralienratio >= gammaratio && !gammacalled)
gammacalled = 1
command_alert("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
return ..()
@@ -238,7 +238,7 @@
var/list/livingplayers = list()
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2)))
if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || emergency_shuttle.departed && ((T.z in config.station_levels) || (T.z in config.admin_levels))))
if(ishuman(M))
livingplayers += 1
return livingplayers.len
+1 -1
View File
@@ -140,7 +140,7 @@
H.equip_or_collect(new /obj/item/device/pda/roboticist(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
// H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
+2 -1
View File
@@ -1,3 +1,4 @@
var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
/datum/job/captain
title = "Captain"
flag = CAPTAIN
@@ -35,7 +36,7 @@
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
world << "<b>Captain [H.real_name] on deck!</b>"
captain_announcement.Announce("All hands, captain [H.real_name] on deck!")
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
+1
View File
@@ -526,6 +526,7 @@ var/global/datum/controller/occupations/job_master
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
pda.ownjob = C.assignment
pda.ownrank = C.rank
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
return 1
+1 -1
View File
@@ -73,7 +73,7 @@
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
if(usr.stat || (!ishuman(usr) && !isrobot(usr)) || usr.restrained() || !check_table(usr) || usr.weakened || usr.stunned)
return
var/mob/living/L = O
+13 -13
View File
@@ -728,15 +728,15 @@
wires.Interact(user)
if(!shorted)
ui_interact(user)
/obj/machinery/alarm/proc/can_use(mob/user as mob)
if (user.stat && !isobserver(user))
user << "\red You must be conscious to use this [src]!"
return 0
if(stat & (NOPOWER|BROKEN))
return 0
if(buildstage != 2)
return 0
@@ -748,7 +748,7 @@
return 0
return 1
/obj/machinery/alarm/proc/is_authenticated(mob/user as mob)
if(isAI(user) || isrobot(user))
return 1
@@ -758,7 +758,7 @@
/obj/machinery/alarm/Topic(href, href_list)
if(..())
return 1
if(!can_use(usr))
return 1
@@ -782,7 +782,7 @@
if(href_list["command"])
if(!is_authenticated(usr))
return
var/device_id = href_list["id_tag"]
switch(href_list["command"])
if( "power",
@@ -870,7 +870,7 @@
if(href_list["screen"])
if(!is_authenticated(usr))
return
screen = text2num(href_list["screen"])
ui_interact(usr)
return 1
@@ -878,7 +878,7 @@
if(href_list["atmos_alarm"])
if(!is_authenticated(usr))
return
alarmActivated=1
alarm_area.updateDangerLevel()
update_icon()
@@ -888,7 +888,7 @@
if(href_list["atmos_reset"])
if(!is_authenticated(usr))
return
alarmActivated=0
alarm_area.updateDangerLevel()
update_icon()
@@ -898,7 +898,7 @@
if(href_list["mode"])
if(!is_authenticated(usr))
return
mode = text2num(href_list["mode"])
apply_mode()
ui_interact(usr)
@@ -907,7 +907,7 @@
if(href_list["preset"])
if(!is_authenticated(usr))
return
preset = text2num(href_list["preset"])
apply_preset()
ui_interact(usr)
@@ -1060,7 +1060,7 @@ Code shamelessly copied from apc_frame
desc = "Used for building Air Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "alarm_bitem"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
/obj/item/alarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
@@ -1396,7 +1396,7 @@ Code shamelessly copied from apc_frame
desc = "Used for building Fire Alarms"
icon = 'icons/obj/monitors.dmi'
icon_state = "fire_bitem"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
/obj/item/firealarm_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
+21 -22
View File
@@ -4,14 +4,13 @@
icon_state = "yellow"
density = 1
var/health = 100.0
flags = FPRINT | CONDUCT
flags = CONDUCT
var/menu = 0
//used by nanoui: 0 = main menu, 1 = relabel
var/valve_open = 0
var/release_pressure = ONE_ATMOSPHERE
var/list/_color //variable that stores colours
var/list/decals // list that stores the decals
var/list/possibledecals
@@ -22,7 +21,7 @@
var/list/possibletertcolor
var/list/possiblequartcolor
var/list/colorcontainer //passed to the ui to render the color lists
var/can_label = 1
var/filled = 0.5
pressure_resistance = 7*ONE_ATMOSPHERE
@@ -32,7 +31,7 @@
var/release_log = ""
var/busy = 0
var/update_flag = 0
New()
..()
_color = list(
@@ -127,11 +126,11 @@
if(list2params(oldcolor) != list2params(_color))
update_flag |= 64
oldcolor = _color.Copy()
if(list2params(olddecals) != list2params(decals))
update_flag |= 128
olddecals = decals.Copy()
if(update_flag == old_flag)
return 1
else
@@ -162,7 +161,7 @@ update_flag
return
src.overlays = 0
if (_color["sec"])//COLORS!
overlays.Add(_color["sec"])
@@ -171,7 +170,7 @@ update_flag
if (_color["quart"])
overlays.Add(_color["quart"])
for(var/D in decals)
overlays.Add("decal-" + D)
@@ -187,12 +186,12 @@ update_flag
overlays += "can-o2"
else if(update_flag & 32)
overlays += "can-o3"
update_flag &= ~196 //the flags 128 and 64 represent change, not states. As such, we have to reset them to be able to detect a change on the next go.
return
//template modification exploit prevention, used in Topic()
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
if (checkColor == "prim" || checkColor == "all")
for(var/list/L in possiblemaincolor)
if (L["icon"] == inputVar)
@@ -407,7 +406,7 @@ update_flag
usr << browse(null, "window=canister")
onclose(usr, "canister")
return
if (href_list["choice"] == "menu")
menu = text2num(href_list["mode_target"])
@@ -438,7 +437,7 @@ update_flag
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
else
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
if (href_list["rename"])
if (can_label)
var/T = copytext(sanitize(input("Choose canister label", "Name", name) as text|null),1,MAX_NAME_LEN)
@@ -474,21 +473,21 @@ update_flag
else if (is_a_color(href_list["icon"],"quart"))
_color["quart"] = href_list["icon"]
colorcontainer["quart"]["anycolor"] = 1
if (href_list["choice"] == "decals")
if (is_a_decal(href_list["icon"]))
for (var/list/L in possibledecals)
if (L["icon"] == href_list["icon"])
L["active"] = (L["active"] == 0)
break
decals = list()
for (var/list/L in possibledecals)
if (L["active"])
if (!(L["icon"] in decals))
decals.Add(L["icon"])
src.add_fingerprint(usr)
update_icon()
@@ -527,7 +526,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/toxins/New()
..()
_color["prim"] = "orange"
decals = list("plasma")
possibledecals[3]["active"] = 1
@@ -548,7 +547,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
..()
_color["prim"] = "redws"
var/datum/gas/sleeping_agent/trace_gas = new
air_contents.trace_gases += trace_gas
@@ -586,7 +585,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
..()
_color["prim"] = "black"
src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
@@ -597,7 +596,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/air/New()
..()
_color["prim"] = "grey"
src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
+214 -24
View File
@@ -15,6 +15,9 @@
var/max_g_amount = 75000.0
var/operating = 0.0
var/list/queue = list()
var/queue_max_len = 10
var/turf/BuildTurf
anchored = 1.0
var/list/L = list()
var/list/LL = list()
@@ -44,7 +47,7 @@
"Medical",
"Miscellaneous",
"Security",
"Tools"
"Tools"
)
/obj/machinery/autolathe/New()
@@ -61,7 +64,7 @@
wires = new(src)
files = new /datum/research/autolathe(src)
matching_designs = list()
/obj/machinery/autolathe/upgraded/New()
..()
component_parts = list()
@@ -72,7 +75,7 @@
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
/obj/machinery/autolathe/interact(mob/user)
if(shocked && !(stat & NOPOWER))
shock(user,50)
@@ -92,7 +95,7 @@
if(AUTOLATHE_SEARCH_MENU)
dat = search_win(user)
var/datum/browser/popup = new(user, "autolathe", name, 500, 500)
var/datum/browser/popup = new(user, "autolathe", name, 800, 500)
popup.set_content(dat)
popup.open()
@@ -151,7 +154,7 @@
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
else
if(!user.before_take_item(O))
if(!user.unEquip(O))
user << "<span class='notice'>/the [O] is stuck to your hand, you can't put it in \the [src]!</span>"
O.loc = src
icon_state = "autolathe"
@@ -234,17 +237,74 @@
g_amount = 0
busy = 0
src.updateUsrDialog()
if(href_list["search"])
matching_designs.Cut()
for(var/datum/design/D in files.known_designs)
if(findtext(D.name,href_list["to_search"]))
matching_designs.Add(D)
else
usr << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
if(href_list["menu"])
screen = text2num(href_list["menu"])
if(href_list["category"])
selected_category = href_list["category"]
if(href_list["make"])
BuildTurf = get_step(src.loc, get_dir(src,usr))
/////////////////
//href protection
being_built = files.FindDesignByID(href_list["make"]) //check if it's a valid design
if(!being_built)
return
if(!(being_built.build_type & AUTOLATHE))
return
//multiplier checks : only stacks can have one and its value is 1, 10 ,25 or max_multiplier
var/multiplier = text2num(href_list["multiplier"])
var/max_multiplier = min(50, being_built.materials["$metal"] ?round(m_amount/being_built.materials["$metal"]):INFINITY,being_built.materials["$glass"]?round(g_amount/being_built.materials["$glass"]):INFINITY)
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
if(!is_stack && (multiplier > 1))
return
if (!(multiplier in list(1,10,25,max_multiplier))) //"enough materials ?" is checked in the build proc
return
/////////////////
if(queue.len<queue_max_len)
add_to_queue(being_built,multiplier)
else
usr << "\red The autolathe queue is full!"
if (!busy)
busy = 1
process_queue()
busy = 0
if(href_list["remove_from_queue"])
var/index = text2num(href_list["remove_from_queue"])
if(isnum(index) && IsInRange(index,1,queue.len))
remove_from_queue(index)
if(href_list["queue_move"] && href_list["index"])
var/index = text2num(href_list["index"])
var/new_index = index + text2num(href_list["queue_move"])
if(isnum(index) && isnum(new_index))
if(IsInRange(new_index,1,queue.len))
queue.Swap(index,new_index)
if(href_list["clear_queue"])
queue = list()
if(href_list["search"])
matching_designs.Cut()
for(var/datum/design/D in files.known_designs)
if(findtext(D.name,href_list["to_search"]))
matching_designs.Add(D)
src.updateUsrDialog()
return
@@ -260,8 +320,134 @@
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
prod_coeff += M.rating - 1
/obj/machinery/autolathe/proc/get_coeff(var/datum/design/D)
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)//stacks are unaffected by production coefficient
return coeff
/obj/machinery/autolathe/proc/build_item(var/datum/design/D, var/multiplier)
desc = initial(desc)+"\nIt's building \a [initial(D.name)]."
var/is_stack = ispath(D.build_path, /obj/item/stack)
var/coeff = get_coeff(D)
var/metal_cost = D.materials["$metal"]
var/glass_cost = D.materials["$glass"]
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
if (can_build(D,multiplier))
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
updateUsrDialog()
sleep(32/coeff)
if(is_stack)
m_amount -= metal_cost*multiplier
g_amount -= glass_cost*multiplier
var/obj/item/stack/S = new D.build_path(BuildTurf)
S.amount = multiplier
else
m_amount -= metal_cost/coeff
g_amount -= glass_cost/coeff
var/obj/item/new_item = new D.build_path(BuildTurf)
new_item.m_amt /= coeff
new_item.g_amt /= coeff
if(m_amount < 0)
m_amount = 0
if(g_amount < 0)
g_amount = 0
updateUsrDialog()
desc = initial(desc)
/obj/machinery/autolathe/proc/can_build(var/datum/design/D,var/multiplier=1,var/custom_metal,var/custom_glass)
var/coeff = get_coeff(D)
var/m_amount_tmp = m_amount
if(custom_metal)
m_amount_tmp = custom_metal
var/g_amount_tmp = g_amount
if(custom_glass)
g_amount_tmp = custom_glass
if(D.materials["$metal"] && (m_amount_tmp*multiplier < (D.materials["$metal"] / coeff)))
return 0
if(D.materials["$glass"] && (g_amount_tmp*multiplier < (D.materials["$glass"] / coeff)))
return 0
return 1
/obj/machinery/autolathe/proc/get_design_cost_as_list(var/datum/design/D,var/multiplier=1)
var/list/OutputList = list(0,0)
var/coeff = get_coeff(D)
if(D.materials["$metal"])
OutputList[1] = (D.materials["$metal"] / coeff)*multiplier
if(D.materials["$glass"])
OutputList[2] = (D.materials["$glass"] / coeff)*multiplier
return OutputList
/obj/machinery/autolathe/proc/get_queue()
var/temp_metal = m_amount
var/temp_glass = g_amount
var/output = "<td valign='top' style='width: 300px'>"
output += "<div class='statusDisplay'>"
output += "<b>Queue contains:</b>"
if (!istype(queue) || !queue.len)
output += "<br>Nothing"
else
output += "<ol>"
var/i = 0
var/datum/design/D
for(var/list/L in queue)
i++
D = L[1]
var/multiplier = L[2]
var/obj/part = D.build_path
var/list/LL = get_design_cost_as_list(D,multiplier)
var/is_stack = (multiplier>1)
output += "<li[!can_build(D,multiplier,temp_metal,temp_glass)?" style='color: #f00;'":null]>[initial(part.name)][is_stack?" (x[multiplier])":null] - [i>1?"<a href='?src=\ref[src];queue_move=-1;index=[i]' class='arrow'>&uarr;</a>":null] [i<queue.len?"<a href='?src=\ref[src];queue_move=+1;index=[i]' class='arrow'>&darr;</a>":null] <a href='?src=\ref[src];remove_from_queue=[i]'>Remove</a></li>"
temp_metal = max(temp_metal-LL[1],1)
temp_glass = max(temp_glass-LL[2],1)
output += "</ol>"
output += "<a href='?src=\ref[src];clear_queue=1'>Clear queue</a>"
output += "</div></td>"
return output
/obj/machinery/autolathe/proc/add_to_queue(D,var/multiplier)
if(!istype(queue))
queue = list()
if(D)
queue.Add(list(list(D,multiplier)))
return queue.len
/obj/machinery/autolathe/proc/remove_from_queue(index)
if(!isnum(index) || !istype(queue) || (index<1 || index>queue.len))
return 0
queue.Cut(index,++index)
return 1
/obj/machinery/autolathe/proc/process_queue()
var/datum/design/D = queue[1][1]
var/multiplier = queue[1][2]
if(!D)
remove_from_queue(1)
if(queue.len)
return process_queue()
else
return
while(D)
if(stat&(NOPOWER|BROKEN))
return 0
if(!can_build(D,multiplier))
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Not enough resources. Queue processing terminated.\"")
queue = list()
return 0
remove_from_queue(1)
build_item(D,multiplier)
D = listgetindex(listgetindex(queue, 1),1)
multiplier = listgetindex(listgetindex(queue,1),2)
//visible_message("\icon[src] <b>\The [src]</b> beeps, \"Queue processing finished successfully.\"")
/obj/machinery/autolathe/proc/main_win(mob/user)
var/dat = "<div class='statusDisplay'><h3>Autolathe Menu:</h3><br>"
var/dat = "<table style='width:100%'><tr>"
dat += "<td valign='top' style='margin-right: 300px'>"
dat += "<div class='statusDisplay'><h3>Autolathe Menu:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup>"
@@ -285,11 +471,16 @@
line_length++
dat += "</tr></table></div>"
dat += "</td>"
dat += get_queue()
dat += "</tr></table>"
return dat
/obj/machinery/autolathe/proc/category_win(mob/user,var/selected_category)
var/dat = "<A href='?src=\ref[src];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
dat += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3><br>"
var/dat = "<table style='width:100%'><tr><td valign='top' style='margin-right: 300px'>"
dat += "<div class='statusDisplay'>"
dat += "<A href='?src=\ref[src];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
dat += "<h3>Browsing [selected_category]:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
@@ -314,11 +505,16 @@
dat += "[get_design_cost(D)]<br>"
dat += "</div>"
dat += "</td>"
dat += get_queue()
dat += "</tr></table>"
return dat
/obj/machinery/autolathe/proc/search_win(mob/user)
var/dat = "<A href='?src=\ref[src];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
dat += "<div class='statusDisplay'><h3>Search results:</h3><br>"
var/dat = "<table style='width:100%'><tr><td valign='top' style='margin-right: 300px'>"
dat += "<div class='statusDisplay'>"
dat += "<A href='?src=\ref[src];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
dat += "<h3>Search results:</h3><br>"
dat += "<b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
@@ -340,19 +536,13 @@
dat += "[get_design_cost(D)]<br>"
dat += "</div>"
dat += "</td>"
dat += get_queue()
dat += "</tr></table>"
return dat
/obj/machinery/autolathe/proc/can_build(var/datum/design/D)
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)
if(D.materials["$metal"] && (m_amount < (D.materials["$metal"] / coeff)))
return 0
if(D.materials["$glass"] && (g_amount < (D.materials["$glass"] / coeff)))
return 0
return 1
/obj/machinery/autolathe/proc/get_design_cost(var/datum/design/D)
var/coeff = (ispath(D.build_path,/obj/item/stack) ? 1 : 2 ** prod_coeff)
var/coeff = get_coeff(D)
var/dat
if(D.materials["$metal"])
dat += "[D.materials["$metal"] / coeff] metal "
@@ -378,7 +568,7 @@
if(hack)
for(var/datum/design/D in files.possible_designs)
if((D.build_type & 4) && ("hacked" in D.category))
if((D.build_type & AUTOLATHE) && ("hacked" in D.category))
files.known_designs += D
else
for(var/datum/design/D in files.known_designs)
-1
View File
@@ -65,7 +65,6 @@
name = "bottle of BeezEez"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle17"
flags = FPRINT | TABLEPASS
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
+9 -9
View File
@@ -55,12 +55,12 @@
if(beaker)
user << "<span class='warning'>A container is already loaded into the machine.</span>"
else
user.before_take_item(O)
user.unEquip(O)
O.loc = src
beaker = O
user << "<span class='notice'>You add the container to the machine.</span>"
updateUsrDialog()
if(!processing)
if(default_deconstruction_screwdriver(user, "biogen-empty-o", "biogen-empty", O))
if(beaker)
@@ -72,7 +72,7 @@
if(exchange_parts(user, O))
return
else if(istype(O, /obj/item/weapon/crowbar))
else if(istype(O, /obj/item/weapon/crowbar))
else if(panel_open)
user << "<span class='notice'>Close the maintenance panel first.</span>"
else if(processing)
@@ -105,13 +105,13 @@
if(i >= 10)
user << "<span class='warning'>The biogenerator is full! Activate it.</span>"
else
user.before_take_item(O)
user.unEquip(O)
O.loc = src
user << "<span class='info'>You put [O.name] in [src.name]</span>"
default_deconstruction_crowbar(O)
default_deconstruction_crowbar(O)
update_icon()
return
@@ -246,14 +246,14 @@
if(in_beaker)
if(check_container_volume(10)) return 0
else beaker.reagents.add_reagent("left4zed",10)
else
else
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
if("rh")
if (check_cost(25/efficiency)) return 0
if(in_beaker)
if(check_container_volume(10)) return 0
else beaker.reagents.add_reagent("robustharvest",10)
else
else
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
if("wallet")
if (check_cost(100/efficiency)) return 0
@@ -324,7 +324,7 @@
else if(href_list["menu"])
menustat = "menu"
updateUsrDialog()
else if(href_list["inbeaker"])
in_beaker = !in_beaker
updateUsrDialog()
+1 -1
View File
@@ -272,7 +272,7 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
var/obj/machinery/bot/cleanbot/A = new /obj/machinery/bot/cleanbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
else if (istype(W, /obj/item/weapon/pen))
+1 -1
View File
@@ -671,7 +671,7 @@ Auto Patrol[]"},
new /obj/machinery/bot/ed209(T,created_name,lasercolor)
user.drop_item()
qdel(W)
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
+5 -5
View File
@@ -544,7 +544,7 @@
A.loc = src.loc
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)
user.unEquip(S)
del(S)
/obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -553,21 +553,21 @@
src.build_step++
user << "You add the plant analyzer to [src]!"
src.name = "farmbot assembly"
user.u_equip(W)
user.unEquip(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)
user.unEquip(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)
user.unEquip(W)
del(W)
else if((isprox(W)) && (src.build_step == 3))
@@ -579,7 +579,7 @@
S.tank = wTank
S.loc = get_turf(src)
S.name = src.created_name
user.u_equip(W)
user.unEquip(W)
del(W)
del(src)
+3 -3
View File
@@ -491,7 +491,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
else
user << "<span class='alert'>You need 10 floor tiles to start building a floorbot.</span>"
@@ -505,7 +505,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
B.created_name = created_name
user.put_in_hands(B)
user << "<span class='notice'>You add the sensor to the toolbox and tiles!</span>"
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
else if (istype(W, /obj/item/weapon/pen))
@@ -525,7 +525,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
var/obj/machinery/bot/floorbot/A = new /obj/machinery/bot/floorbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly! Boop beep!</span>"
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
+2 -2
View File
@@ -564,7 +564,7 @@
qdel(S)
user.put_in_hands(A)
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
@@ -598,5 +598,5 @@
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
S.skin = skin
S.name = created_name
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
+2 -2
View File
@@ -52,7 +52,7 @@
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
radio_frequency = AIPRIV_FREQ
radio_name = "AI Private"
/obj/machinery/bot/secbot/ofitser
name = "Prison Ofitser"
desc = "It's Prison Ofitser! Powered by the tears and sweat of prisoners."
@@ -428,7 +428,7 @@ Auto Patrol: []"},
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
user.put_in_hands(A)
user << "<span class='notice'>You add the signaler to the helmet.</span>"
user.before_take_item(src, 1)
user.unEquip(src, 1)
qdel(src)
else
return
@@ -5,8 +5,8 @@
icon_state = "cameracase"
w_class = 2
anchored = 0
m_amt = 700
g_amt = 300
m_amt = 400
g_amt = 250
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/osmium, /obj/item/weapon/stock_parts/scanning_module)
+7 -3
View File
@@ -4,7 +4,7 @@
/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
if(!T)
return 1
if(T.z == 2)
if((T.z in config.station_levels))
return 1
if(T.z > 6)
return 1
@@ -132,7 +132,8 @@
//Cameras can't track people wearing an agent card or a ninja hood.
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
continue
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP))
continue
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
if(!near_camera(M))
continue
@@ -194,6 +195,9 @@
if(H.digitalcamo)
U.ai_cancel_tracking(1)
return
if(H.head && istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP))
U.ai_cancel_tracking(1)
return
if(istype(target.loc,/obj/effect/dummy))
U.ai_cancel_tracking()
@@ -224,7 +228,7 @@
/proc/trackable(atom/movable/M)
var/turf/T = get_turf(M)
if(T && (T.z == 1 || T.z == 3 || T.z == 5))
if(T && (T.z in config.contact_levels))
return 1
return near_camera(M)
@@ -241,8 +241,7 @@
if(isobj(obj))
var/mob/M = obj.loc
if(ismob(M))
M.u_equip(obj)
M.update_icons() //so their overlays update
M.unEquip(obj, 1) //Holoweapons should always drop.
if(!silent)
var/obj/oldobj = obj
@@ -461,7 +460,7 @@
throw_range = 5
throwforce = 0
w_class = 2.0
flags = FPRINT | TABLEPASS | NOSHIELD
flags = NOSHIELD
var/active = 0
/obj/item/weapon/holo/esword/green
+20 -14
View File
@@ -55,14 +55,20 @@ var/shuttle_call/shuttle_calls[0]
var/stat_msg1
var/stat_msg2
var/display_type="blank"
var/datum/announcement/priority/crew_announcement = new
l_color = "#0000FF"
/obj/machinery/computer/communications/New()
..()
crew_announcement.newscast = 1
/obj/machinery/computer/communications/Topic(href, href_list)
if(..(href, href_list))
return 1
if (!(src.z in list(STATION_Z,CENTCOMM_Z)))
if ((!(src.z in config.station_levels) && !(src.z in config.admin_levels)))
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
@@ -83,10 +89,12 @@ var/shuttle_call/shuttle_calls[0]
if (I && istype(I))
if(src.check_access(I))
authenticated = 1
if(20 in I.access)
if(access_captain in I.access)
authenticated = 2
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
if("logout")
authenticated = 0
crew_announcement.announcer = ""
setMenuState(usr,COMM_SCREEN_MAIN)
// ALART LAVUL
@@ -127,14 +135,14 @@ var/shuttle_call/shuttle_calls[0]
usr << "You need to swipe your ID."
if("announce")
if(src.authenticated==2 && !issilicon(usr))
if(message_cooldown) return
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
if(src.authenticated==2)
if(message_cooldown)
usr << "Please allow at least one minute to pass between announcements"
return
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
if(!input || !(usr in view(1,src)))
return
captain_announce(input)//This should really tell who is, IE HoP, CE, HoS, RD, Captain
log_say("[key_name(usr)] has made a captain announcement: [input]")
message_admins("[key_name_admin(usr)] has made a captain announcement.", 1)
crew_announcement.Announce(input)
message_cooldown = 1
spawn(600)//One minute cooldown
message_cooldown = 0
@@ -204,7 +212,7 @@ var/shuttle_call/shuttle_calls[0]
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
var/input = input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
if(!input || !(usr in view(1,src)))
return
Centcomm_announce(input, usr)
@@ -398,7 +406,7 @@ var/shuttle_call/shuttle_calls[0]
return
if(emergency_shuttle.going_to_centcom())
user << "The shuttle may not be called while returning to CentCom."
user << "The shuttle may not be called while returning to Central Command."
return
if(emergency_shuttle.online())
@@ -408,11 +416,11 @@ var/shuttle_call/shuttle_calls[0]
// if force is 0, some things may stop the shuttle call
if(!force)
if(emergency_shuttle.deny_shuttle)
user << "Centcom does not currently have a shuttle available in your sector. Please try again later."
user << "Central Command does not currently have a shuttle available in your sector. Please try again later."
return
if(sent_strike_team == 1)
user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated."
user << "Central Command will not allow the shuttle to be called. Consider all contracts terminated."
return
if(world.time < 54000) // 30 minute grace period to let the game get going
@@ -426,8 +434,6 @@ var/shuttle_call/shuttle_calls[0]
emergency_shuttle.call_transfer()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(emergency_shuttle.estimate_arrival_time()/60)] minutes.")
return
+6 -102
View File
@@ -1,18 +1,15 @@
/obj/machinery/computer/crew
name = "Crew Monitoring Computer"
name = "crew monitoring computer"
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
icon_state = "crew"
use_power = 1
idle_power_usage = 250
active_power_usage = 500
circuit = "/obj/item/weapon/circuitboard/crew"
var/list/tracked = list( )
l_color = "#0000FF"
var/obj/nano_module/crew_monitor/crew_monitor
/obj/machinery/computer/crew/New()
tracked = list()
crew_monitor = new(src)
..()
@@ -27,6 +24,8 @@
return
ui_interact(user)
/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
crew_monitor.ui_interact(user, ui_key, ui, force_open)
/obj/machinery/computer/crew/update_icon()
@@ -40,100 +39,5 @@
icon_state = initial(icon_state)
stat &= ~NOPOWER
/obj/machinery/computer/crew/Topic(href, href_list)
if(..())
return 1
if (src.z > 6)
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return 0
if( href_list["close"] )
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
usr.unset_machine()
ui.close()
return 0
if(href_list["update"])
src.updateDialog()
return 1
/obj/machinery/computer/crew/interact(mob/user)
ui_interact(user)
/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(stat & (BROKEN|NOPOWER))
return
user.set_machine(src)
src.scan()
var/data[0]
var/list/crewmembers = list()
for(var/obj/item/clothing/under/C in src.tracked)
var/turf/pos = get_turf(C)
if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode)
if(istype(C.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C.loc
var/list/crewmemberData = list()
crewmemberData["sensor_type"] = C.sensor_mode
crewmemberData["dead"] = H.stat > 1
crewmemberData["oxy"] = round(H.getOxyLoss(), 1)
crewmemberData["tox"] = round(H.getToxLoss(), 1)
crewmemberData["fire"] = round(H.getFireLoss(), 1)
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
crewmemberData["name"] = "Unknown"
crewmemberData["rank"] = "Unknown"
if(H.wear_id && istype(H.wear_id, /obj/item/weapon/card/id) )
var/obj/item/weapon/card/id/I = H.wear_id
crewmemberData["name"] = I.name
crewmemberData["rank"] = I.rank
else if(H.wear_id && istype(H.wear_id, /obj/item/device/pda) )
var/obj/item/device/pda/P = H.wear_id
crewmemberData["name"] = (P.id ? P.id.name : "Unknown")
crewmemberData["rank"] = (P.id ? P.id.rank : "Unknown")
var/area/A = get_area(H)
crewmemberData["area"] = sanitize(A.name)
crewmemberData["x"] = pos.x
crewmemberData["y"] = pos.y
// Works around list += list2 merging lists; it's not pretty but it works
crewmembers += "temporary item"
crewmembers[crewmembers.len] = crewmemberData
crewmembers = sortByKey(crewmembers, "name")
data["crewmembers"] = crewmembers
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800)
// adding a template with the key "mapContent" enables the map ui functionality
ui.add_template("mapContent", "crew_monitor_map_content.tmpl")
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "crew_monitor_map_header.tmpl")
// we want to show the map by default
ui.set_show_map(1)
ui.set_initial_data(data)
ui.open()
// should make the UI auto-update; doesn't seem to?
ui.set_auto_update(1)
/obj/machinery/computer/crew/proc/scan()
for(var/mob/living/carbon/human/H in mob_list)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/C = H.w_uniform
if (C.has_sensor)
tracked |= C
return 1
crew_monitor.ui_interact(user)
+1 -1
View File
@@ -17,7 +17,7 @@
/obj/machinery/computer/HONKputer/Topic(href, href_list)
if(..())
return 1
if (src.z > 1)
if (!(src.z in config.station_levels))
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
return
usr.set_machine(src)
+1 -1
View File
@@ -65,7 +65,7 @@
if(!T.implanted) continue
var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in
if(M.z == 1 && !istype(M.loc, /turf/space))
if((M.z in config.station_levels) && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf_loc(M)
loc_display = mob_loc.loc
if(T.malfunction)
+5 -5
View File
@@ -283,7 +283,7 @@
/obj/machinery/cryopod/robot/despawn_occupant()
var/mob/living/silicon/robot/R = occupant
if(!istype(R)) return ..()
R.contents -= R.mmi
del(R.mmi)
for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc
@@ -299,7 +299,7 @@
/obj/machinery/cryopod/proc/despawn_occupant()
//Drop all items into the pod.
for(var/obj/item/W in occupant)
occupant.drop_from_inventory(W)
occupant.unEquip(W)
W.loc = src
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
@@ -388,7 +388,7 @@
//Make an announcement and log the person entering storage.
control_computer.frozen_crew += "[occupant.real_name]"
var/ailist[] = list()
for (var/mob/living/silicon/ai/A in living_mob_list)
ailist += A
@@ -397,7 +397,7 @@
announcer.say(";[occupant.real_name] [on_store_message]")
else
announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]")
visible_message("<span class='notice'>\The [src] hums and hisses as it moves [occupant.real_name] into storage.</span>", 3)
// Delete the mob.
@@ -460,7 +460,7 @@
//Despawning occurs when process() is called with an occupant without a client.
src.add_fingerprint(M)
/obj/machinery/cryopod/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
+4 -4
View File
@@ -35,7 +35,7 @@
if(is_type_in_list(W,accepted))
if(!running)
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meat))
user.u_equip(W)
user.unEquip(W)
del(W)
user << "You add the meat to the drying rack."
src.running = 1
@@ -48,7 +48,7 @@
src.running = 0
return
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/grapes))
user.u_equip(W)
user.unEquip(W)
del(W)
user << "You add the grapes to the drying rack."
src.running = 1
@@ -61,7 +61,7 @@
src.running = 0
return
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes))
user.u_equip(W)
user.unEquip(W)
del(W)
user << "You add the green grapes to the drying rack."
src.running = 1
@@ -79,7 +79,7 @@
var/obj/item/weapon/reagent_containers/food/snacks/grown/B = W
B.reagents.trans_to(src, B.reagents.total_volume)
user << "You add the [W] to the drying rack."
user.u_equip(W)
user.unEquip(W)
del(W)
src.running = 1
use_power = 2
+7 -3
View File
@@ -37,7 +37,9 @@
if (beaker)
return 1
else
user.before_take_item(O)
if(!user.unEquip(O))
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
return 0
O.loc = src
beaker = O
src.verbs += /obj/machinery/juicer/verb/detach
@@ -45,9 +47,11 @@
src.updateUsrDialog()
return 0
if (!is_type_in_list(O, allowed_items))
user << "It looks as not containing any juice."
user << "It doesn't look like that contains any juice."
return 1
user.before_take_item(O)
if(!user.unEquip(O))
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
return 0
O.loc = src
src.updateUsrDialog()
return 0
+11 -9
View File
@@ -49,7 +49,7 @@
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/stack/cable_coil(null, 2)
RefreshParts()
RefreshParts()
/obj/machinery/microwave/upgraded/New()
@@ -59,14 +59,14 @@
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/stack/cable_coil(null, 2)
RefreshParts()
RefreshParts()
/obj/machinery/microwave/RefreshParts()
var/E
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
E += M.rating
efficiency = E
efficiency = E
/*******************
* Item Adding
********************/
@@ -87,11 +87,11 @@
return
else if(!anchored)
anchored = 1
user << "<span class='caution'>The [src] is now secured.</span>"
user << "<span class='caution'>The [src] is now secured.</span>"
return
default_deconstruction_crowbar(O)
if(src.broken > 0)
if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
user.visible_message( \
@@ -150,8 +150,10 @@
"\blue [user] has added one of [O] to \the [src].", \
"\blue You add one of [O] to \the [src].")
else
// user.before_take_item(O) //This just causes problems so far as I can tell. -Pete
user.drop_item()
// user.unEquip(O) //This just causes problems so far as I can tell. -Pete
if(!user.drop_item())
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
return 0
O.loc = src
user.visible_message( \
"\blue [user] has added \the [O] to \the [src].", \
+3 -1
View File
@@ -85,7 +85,9 @@
user << "<span class='notice'>\The [src] is full.</span>"
return 1
else
user.before_take_item(O)
if(!user.unEquip(O))
usr << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
return
O.loc = src
if(item_quants[O.name])
item_quants[O.name]++
+19 -10
View File
@@ -5,6 +5,7 @@
/datum/feed_message
var/author =""
var/body =""
var/message_type ="Story"
//var/parent_channel
var/backup_body =""
var/backup_author =""
@@ -39,6 +40,12 @@
src.backup_author = ""
src.censored = 0
src.is_admin_channel = 0
/datum/feed_channel/proc/announce_news()
return "Breaking news from [channel_name]!"
/datum/feed_channel/station/announce_news()
return "New Station Announcement Available"
/datum/feed_network
var/list/datum/feed_channel/network_channels = list()
@@ -213,7 +220,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
switch(screen)
if(0)
dat += {"Welcome to Newscasting Unit #[src.unit_no].<BR> Interface & News networks Operational.
<BR><FONT SIZE=1>Property of Nanotransen Inc</FONT>"}
<BR><FONT SIZE=1>Property of Nanotrasen</FONT>"}
if(news_network.wanted_issue)
dat+= "<HR><A href='?src=\ref[src];view_wanted=1'>Read Wanted Issue</A>"
dat+= {"<HR><BR><A href='?src=\ref[src];create_channel=1'>Create Feed Channel</A>
@@ -248,7 +255,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="<I>No feed messages found in channel...</I><BR><BR>"
else
for(var/datum/feed_message/MESSAGE in CHANNEL.messages)
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"*/
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"*/
dat+="<BR><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
dat+="<BR><A href='?src=\ref[src];setScreen=[0]'>Back</A>"
@@ -334,7 +341,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(MESSAGE.img)
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
dat+="<img src='tmp_photo[i].png' width = '180'><BR><BR>"
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<BR><HR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
dat+="<BR><A href='?src=\ref[src];setScreen=[1]'>Back</A>"
if(10)
@@ -369,7 +376,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="<I>No feed messages found in channel...</I><BR>"
else
for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<FONT SIZE=2><A href='?src=\ref[src];censor_channel_story_body=\ref[MESSAGE]'>[(MESSAGE.body == "\[REDACTED\]") ? ("Undo story censorship") : ("Censor story")]</A> - <A href='?src=\ref[src];censor_channel_story_author=\ref[MESSAGE]'>[(MESSAGE.author == "\[REDACTED\]") ? ("Undo Author Censorship") : ("Censor message Author")]</A></FONT><BR>"
dat+="<BR><A href='?src=\ref[src];setScreen=[10]'>Back</A>"
if(13)
@@ -383,7 +390,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
dat+="<I>No feed messages found in channel...</I><BR>"
else
for(var/datum/feed_message/MESSAGE in src.viewing_channel.messages)
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="-[MESSAGE.body] <BR><FONT SIZE=1>\[[MESSAGE.message_type] by <FONT COLOR='maroon'>[MESSAGE.author]</FONT>\]</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];setScreen=[11]'>Back</A>"
if(14)
@@ -516,7 +523,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
else if(href_list["set_new_message"])
src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", ""))
src.msg = strip_html(input(usr, "Write your feed story", "Network Channel Handler", ""))
while (findtext(src.msg," ") == 1)
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
src.updateUsrDialog()
@@ -535,13 +542,15 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(photo)
newMsg.img = photo.img
feedback_inc("newscaster_stories",1)
var/announcement = ""
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == src.channel_name)
FC.messages += newMsg //Adding message to the network's appropriate feed_channel
announcement = FC.announce_news()
break
src.screen=4
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert(src.channel_name)
NEWSCASTER.newsAlert(announcement)
src.updateUsrDialog()
@@ -986,11 +995,11 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
///obj/machinery/newscaster/process() //Was thinking of doing the icon update through process, but multiple iterations per second does not
// return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list.
/obj/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile.
/obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile.
var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ
if(channel)
if(news_call)
for(var/mob/O in hearers(world.view-1, T))
O.show_message("<span class='newscaster'><EM>[src.name]</EM> beeps, \"Breaking news from [channel]!\"</span>",2)
O.show_message("<span class='newscaster'><EM>[src.name]</EM> beeps, \"[news_call]\"</span>",2)
src.alert = 1
src.update_icon()
spawn(300)

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