1)
+
+ if(get_dist(src,T0) > 1) //too far
return 0
+ // Non diagonal case
if(T0.x == x || T0.y == y)
// Check for border blockages
return T0.ClickCross(get_dir(T0,src), border_only = 1) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target)
- // Not orthagonal
- var/in_dir = get_dir(neighbor,src) // eg. northwest (1+8)
- var/d1 = in_dir&(in_dir-1) // eg west (1+8)&(8) = 8
- var/d2 = in_dir - d1 // eg north (1+8) - 8 = 1
+ // Diagonal case
+ var/in_dir = get_dir(T0,src) // eg. northwest (1+8) = 9 (00001001)
+ var/d1 = in_dir&3 // eg. north (1+8)&3 (0000 0011) = 1 (0000 0001)
+ var/d2 = in_dir&12 // eg. west (1+8)&12 (0000 1100) = 8 (0000 1000)
for(var/d in list(d1,d2))
if(!T0.ClickCross(d, border_only = 1))
continue // could not leave T0 in that direction
var/turf/T1 = get_step(T0,d)
- if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) & get_dir(T1,src), border_only = 0))
+ if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) | get_dir(T1,src), border_only = 0)) //let's check both directions at once
continue // couldn't enter or couldn't leave T1
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target))
continue // could not enter src
return 1 // we don't care about our own density
+
return 0
/*
@@ -104,15 +108,17 @@
*/
/turf/proc/ClickCross(var/target_dir, var/border_only, var/target_atom = null)
for(var/obj/O in src)
- if( !O.density || O == target_atom || O.throwpass) continue // throwpass is used for anything you can click through
+ if( !O.density || O == target_atom || O.throwpass) //check if there's a dense object present on the turf
+ continue // throwpass is used for anything you can click through (or the firedoor special case, see above)
if( O.flags&ON_BORDER) // windows have throwpass but are on border, check them first
- if( O.dir & target_dir || O.dir&(O.dir-1) ) // full tile windows are just diagonals mechanically
- return 0
+ if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
+ return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
else if( !border_only ) // dense, not on border, cannot pass over
return 0
return 1
+
/*
Aside: throwpass does not do what I thought it did originally, and is only used for checking whether or not
a thrown object should stop after already successfully entering a square. Currently the throw code involved
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 163c7c3aa5f..5193efd9561 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -101,8 +101,8 @@
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1 indicates adjacency
else
- //if(ismob(A))
- // changeNext_move(8)
+ if(ismob(A))
+ changeNext_move(8)
UnarmedAttack(A)
return
@@ -113,21 +113,17 @@
if(isturf(A) || isturf(A.loc) || (A.loc && isturf(A.loc.loc)))
if(A.Adjacent(src)) // see adjacent.dm
if(W)
- if(W.preattack(A,src,1,params)) //Weapon attack override,return 1 to exit
- return
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = A.attackby(W,src)
if(!resolved && A && W)
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
else
- //if(ismob(A))
- // changeNext_move(8)
+ if(ismob(A))
+ changeNext_move(8)
UnarmedAttack(A, 1)
return
else // non-adjacent click
if(W)
- if(W.preattack(A,src,0,params)) //Weapon attack override,return 1 to exit
- return
W.afterattack(A,src,0,params) // 0: not Adjacent
else
RangedAttack(A, params)
@@ -153,8 +149,8 @@
in human click code to allow glove touches only at melee range.
*/
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
- //if(ismob(A))
- // changeNext_move(8)
+ if(ismob(A))
+ changeNext_move(8)
return
/*
@@ -207,7 +203,6 @@
/atom/proc/ShiftClick(var/mob/user)
if(user.client && user.client.eye == user)
examine()
- user.face_atom(src)
return
/*
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 36ee8a4fc1e..16a8ffa7dbc 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -11,7 +11,7 @@
visible_message("[src] has been hit by [user] with [W].")
/mob/living/attackby(obj/item/I, mob/user)
- //user.changeNext_move(8)
+ user.changeNext_move(8)
I.attack(src, user)
/mob/living/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
@@ -43,11 +43,6 @@
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
return
-// Overrides the weapon attack so it can attack any atoms like when we want to have an effect on an object independent of attackby
-// It is a powerfull proc but it should be used wisely, if there is other alternatives instead use those
-// If it returns 1 it exits click code. Always . = 1 at start of the function if you delete src.
-/obj/item/proc/preattack(atom/target, mob/user, proximity_flag, click_parameters)
- return
obj/item/proc/get_clamped_volume()
if(src.force && src.w_class)
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index 7939841a5d7..1108d8cdbb7 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -1,200 +1,199 @@
-/*
- Telekinesis
-
- This needs more thinking out, but I might as well.
-*/
-var/const/tk_maxrange = 15
-
-/*
- Telekinetic attack:
-
- By default, emulate the user's unarmed attack
-*/
-/atom/proc/attack_tk(mob/user)
- if(user.stat) return
- user.UnarmedAttack(src,0) // attack_hand, attack_paw, etc
- return
-
-/*
- This is similar to item attack_self, but applies to anything
- that you can grab with a telekinetic grab.
-
- It is used for manipulating things at range, for example, opening and closing closets.
- There are not a lot of defaults at this time, add more where appropriate.
-*/
-/atom/proc/attack_self_tk(mob/user)
- return
-
-/obj/attack_tk(mob/user)
- if(user.stat) return
- if(anchored)
- ..()
- return
-
- var/obj/item/tk_grab/O = new(src)
- user.put_in_active_hand(O)
- O.host = user
- O.focus_object(src)
- return
-
-/obj/item/attack_tk(mob/user)
- if(user.stat || !isturf(loc)) return
- if((TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here
- var/obj/item/tk_grab/O = new(src)
- user.put_in_active_hand(O)
- O.host = user
- O.focus_object(src)
- else
- warning("Strange attack_tk(): TK([TK in user.mutations]) empty hand([!user.get_active_hand()])")
- return
-
-
-/mob/attack_tk(mob/user)
- return // needs more thinking about
-
-/*
- TK Grab Item (the workhorse of old TK)
-
- * If you have not grabbed something, do a normal tk attack
- * If you have something, throw it at the target. If it is already adjacent, do a normal attackby()
- * If you click what you are holding, or attack_self(), do an attack_self_tk() on it.
- * Deletes itself if it is ever not in your hand, or if you should have no access to TK.
-*/
-/obj/item/tk_grab
- name = "Telekinetic Grab"
- desc = "Magic"
- icon = 'icons/obj/magic.dmi'//Needs sprites
- icon_state = "2"
- flags = NOBLUDGEON
- //item_state = null
- w_class = 10.0
- layer = 20
-
- var/last_throw = 0
- var/atom/movable/focus = null
- var/mob/living/host = null
-
-
- dropped(mob/user as mob)
- if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
- if(focus.Adjacent(loc))
- focus.loc = loc
-
- qdel(src)
- return
-
-
- //stops TK grabs being equipped anywhere but into hands
- equipped(var/mob/user, var/slot)
- if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
- qdel(src)
- return
-
-
- attack_self(mob/user as mob)
- if(focus)
- focus.attack_self_tk(user)
-
- afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
- if(!target || !user) return
- if(last_throw+3 > world.time) return
- if(!host || host != user)
- qdel(src)
- return
- if(!(TK in host.mutations))
- qdel(src)
- return
- if(isobj(target) && !isturf(target.loc))
- return
-
- var/d = get_dist(user, target)
- if(focus)
- d = max(d,get_dist(user,focus)) // whichever is further
-
- if(d > tk_maxrange)
- user << "Your mind won't reach that far."
- return
-
- if(!focus)
- focus_object(target, user)
- return
-
- if(target == focus)
- target.attack_self_tk(user)
- return // todo: something like attack_self not laden with assumptions inherent to attack_self
-
-
- if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
- var/obj/item/I = focus
- var/resolved = target.attackby(I, user, user:get_organ_target())
- if(!resolved && target && I)
- I.afterattack(target,user,1) // for splashing with beakers
-
-
- else
- apply_focus_overlay()
- focus.throw_at(target, 10, 1)
- last_throw = world.time
- return
-
- attack(mob/living/M as mob, mob/living/user as mob, def_zone)
- return
-
-
- proc/focus_object(var/obj/target, var/mob/living/user)
- if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
- if(target.anchored || !isturf(target.loc))
- qdel(src)
- return
- focus = target
- update_icon()
- apply_focus_overlay()
- return
-
-
- proc/apply_focus_overlay()
- if(!focus) return
- var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
- O.name = "sparkles"
- O.anchored = 1
- O.density = 0
- O.layer = FLY_LAYER
- O.dir = pick(cardinal)
- O.icon = 'icons/effects/effects.dmi'
- O.icon_state = "nothing"
- flick("empdisable",O)
- spawn(5)
- O.delete()
- return
-
-
- update_icon()
- overlays.Cut()
- if(focus && focus.icon && focus.icon_state)
- overlays += icon(focus.icon,focus.icon_state)
- return
-
-/*Not quite done likely needs to use something thats not get_step_to
- proc/check_path()
- var/turf/ref = get_turf(src.loc)
- var/turf/target = get_turf(focus.loc)
- if(!ref || !target) return 0
- var/distance = get_dist(ref, target)
- if(distance >= 10) return 0
- for(var/i = 1 to distance)
- ref = get_step_to(ref, target, 0)
- if(ref != target) return 0
- return 1
-*/
-
-//equip_to_slot_or_del(obj/item/W, slot, qdel_on_fail = 1)
-/*
- if(istype(user, /mob/living/carbon))
- if(user:mutations & TK && get_dist(source, user) <= 7)
- if(user:get_active_hand()) return 0
- var/X = source:x
- var/Y = source:y
- var/Z = source:z
-
-*/
-
+/*
+ Telekinesis
+
+ This needs more thinking out, but I might as well.
+*/
+var/const/tk_maxrange = 15
+
+/*
+ Telekinetic attack:
+
+ By default, emulate the user's unarmed attack
+*/
+/atom/proc/attack_tk(mob/user)
+ if(user.stat) return
+ user.UnarmedAttack(src,0) // attack_hand, attack_paw, etc
+ return
+
+/*
+ This is similar to item attack_self, but applies to anything
+ that you can grab with a telekinetic grab.
+
+ It is used for manipulating things at range, for example, opening and closing closets.
+ There are not a lot of defaults at this time, add more where appropriate.
+*/
+/atom/proc/attack_self_tk(mob/user)
+ return
+
+/obj/attack_tk(mob/user)
+ if(user.stat) return
+ if(anchored)
+ ..()
+ return
+
+ var/obj/item/tk_grab/O = new(src)
+ user.put_in_active_hand(O)
+ O.host = user
+ O.focus_object(src)
+ return
+
+/obj/item/attack_tk(mob/user)
+ if(user.stat || !isturf(loc)) return
+ if((TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here
+ var/obj/item/tk_grab/O = new(src)
+ user.put_in_active_hand(O)
+ O.host = user
+ O.focus_object(src)
+ else
+ WARNING("Strange attack_tk(): TK([TK in user.mutations]) empty hand([!user.get_active_hand()])")
+ return
+
+
+/mob/attack_tk(mob/user)
+ return // needs more thinking about
+
+/*
+ TK Grab Item (the workhorse of old TK)
+
+ * If you have not grabbed something, do a normal tk attack
+ * If you have something, throw it at the target. If it is already adjacent, do a normal attackby()
+ * If you click what you are holding, or attack_self(), do an attack_self_tk() on it.
+ * Deletes itself if it is ever not in your hand, or if you should have no access to TK.
+*/
+/obj/item/tk_grab
+ name = "Telekinetic Grab"
+ desc = "Magic"
+ icon = 'icons/obj/magic.dmi'//Needs sprites
+ icon_state = "2"
+ flags = NOBLUDGEON | ABSTRACT
+ //item_state = null
+ w_class = 10.0
+ layer = 20
+
+ var/last_throw = 0
+ var/atom/movable/focus = null
+ var/mob/living/host = null
+
+
+ dropped(mob/user as mob)
+ if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
+ if(focus.Adjacent(loc))
+ focus.loc = loc
+
+ qdel(src)
+ return
+
+
+ //stops TK grabs being equipped anywhere but into hands
+ equipped(var/mob/user, var/slot)
+ if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return
+ qdel(src)
+ return
+
+
+ attack_self(mob/user as mob)
+ if(focus)
+ focus.attack_self_tk(user)
+
+ afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
+ if(!target || !user) return
+ if(last_throw+3 > world.time) return
+ if(!host || host != user)
+ qdel(src)
+ return
+ if(!(TK in host.mutations))
+ qdel(src)
+ return
+ if(isobj(target) && !isturf(target.loc))
+ return
+
+ var/d = get_dist(user, target)
+ if(focus)
+ d = max(d,get_dist(user,focus)) // whichever is further
+
+ if(d > tk_maxrange)
+ user << "Your mind won't reach that far."
+ return
+
+ if(!focus)
+ focus_object(target, user)
+ return
+
+ if(target == focus)
+ target.attack_self_tk(user)
+ return // todo: something like attack_self not laden with assumptions inherent to attack_self
+
+
+ if(!istype(target, /turf) && istype(focus,/obj/item) && target.Adjacent(focus))
+ var/obj/item/I = focus
+ var/resolved = target.attackby(I, user, user:get_organ_target())
+ if(!resolved && target && I)
+ I.afterattack(target,user,1) // for splashing with beakers
+
+
+ else
+ apply_focus_overlay()
+ focus.throw_at(target, 10, 1)
+ last_throw = world.time
+ return
+
+ attack(mob/living/M as mob, mob/living/user as mob, def_zone)
+ return
+
+
+ proc/focus_object(var/obj/target, var/mob/living/user)
+ if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
+ if(target.anchored || !isturf(target.loc))
+ qdel(src)
+ return
+ focus = target
+ update_icon()
+ apply_focus_overlay()
+ return
+
+
+ proc/apply_focus_overlay()
+ if(!focus) return
+ var/obj/effect/overlay/O = new /obj/effect/overlay(locate(focus.x,focus.y,focus.z))
+ O.name = "sparkles"
+ O.anchored = 1
+ O.density = 0
+ O.layer = FLY_LAYER
+ O.dir = pick(cardinal)
+ O.icon = 'icons/effects/effects.dmi'
+ O.icon_state = "nothing"
+ flick("empdisable",O)
+ spawn(5)
+ O.delete()
+ return
+
+
+ update_icon()
+ overlays.Cut()
+ if(focus && focus.icon && focus.icon_state)
+ overlays += icon(focus.icon,focus.icon_state)
+ return
+
+/*Not quite done likely needs to use something thats not get_step_to
+ proc/check_path()
+ var/turf/ref = get_turf(src.loc)
+ var/turf/target = get_turf(focus.loc)
+ if(!ref || !target) return 0
+ var/distance = get_dist(ref, target)
+ if(distance >= 10) return 0
+ for(var/i = 1 to distance)
+ ref = get_step_to(ref, target, 0)
+ if(ref != target) return 0
+ return 1
+*/
+
+//equip_to_slot_or_del(obj/item/W, slot, qdel_on_fail = 1)
+/*
+ if(istype(user, /mob/living/carbon))
+ if(user:mutations & TK && get_dist(source, user) <= 7)
+ if(user:get_active_hand()) return 0
+ var/X = source:x
+ var/Y = source:y
+ var/Z = source:z
+
+*/
diff --git a/code/controllers/_DynamicAreaLighting_TG.dm b/code/controllers/_DynamicAreaLighting_TG.dm
index d8cf40a0d41..e7c71a59423 100644
--- a/code/controllers/_DynamicAreaLighting_TG.dm
+++ b/code/controllers/_DynamicAreaLighting_TG.dm
@@ -121,7 +121,7 @@ atom
turf/New()
..()
if(luminosity)
- if(light) warning("[type] - Don't set lights up manually during New(), We do it automatically.")
+ if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
trueLuminosity = luminosity * luminosity
light = new(src)
@@ -134,7 +134,7 @@ atom/movable/New()
if(loc:lighting_lumcount > 1)
UpdateAffectingLights()
if(luminosity)
- if(light) warning("[type] - Don't set lights up manually during New(), We do it automatically.")
+ if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
trueLuminosity = luminosity * luminosity
light = new(src)
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index ea330a5abf4..a4c1fac1f53 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -53,7 +53,7 @@
var/server
var/banappeals
- var/wikiurl = "http://www.ss13.eu/wiki" // Default wiki link.
+ var/wikiurl = "http://www.tgstation13.org/wiki" // Default wiki link.
var/forumurl
var/forbid_singulo_possession = 0
@@ -82,7 +82,9 @@
var/continuous_round_rev = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/continuous_round_wiz = 0
var/continuous_round_malf = 0
+ var/shuttle_refuel_delay = 12000
var/show_game_type_odds = 0 //if set this allows players to see the odds of each roundtype on the get revision screen
+ var/mutant_races = 0 //players can choose their mutant race before joining the game
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
@@ -99,6 +101,7 @@
var/revival_brain_life = -1
var/rename_cyborg = 0
+ var/ooc_during_round = 0
//Used for modifying movement speed for mobs.
//Unversal modifiers
@@ -264,6 +267,10 @@
Tickcomp = 1
if("automute_on")
automute_on = 1
+ if("comms_key")
+ global.comms_key = value
+ if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
+ global.comms_allowed = 1
else
diary << "Unknown setting in configuration: '[name]'"
@@ -281,6 +288,8 @@
config.revival_brain_life = text2num(value)
if("rename_cyborg")
config.rename_cyborg = 1
+ if("ooc_during_round")
+ config.ooc_during_round = 1
if("run_delay")
config.run_speed = text2num(value)
if("walk_delay")
@@ -325,6 +334,8 @@
config.continuous_round_wiz = 1
if("continuous_round_malf")
config.continuous_round_malf = 1
+ if("shuttle_refuel_delay")
+ config.shuttle_refuel_delay = text2num(value)
if("show_game_type_odds")
config.show_game_type_odds = 1
if("ghost_interaction")
@@ -372,6 +383,8 @@
config.sandbox_autoclose = 1
if("default_laws")
config.default_laws = text2num(value)
+ if("join_with_mutant_race")
+ config.mutant_races = 1
else
diary << "Unknown setting in configuration: '[name]'"
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 45d1af27ccf..da3b635c434 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -17,6 +17,11 @@ datum/controller/game_controller
var/minimum_ticks = 20 //The minimum length of time between MC ticks
var/air_cost = 0
+ var/air_turfs = 0
+ var/air_groups = 0
+ var/air_highpressure= 0
+ var/air_hotspots = 0
+ var/air_superconductivity = 0
var/sun_cost = 0
var/mobs_cost = 0
var/diseases_cost = 0
diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm
index c33ccc2a00e..0858a70f7f1 100644
--- a/code/controllers/shuttle_controller.dm
+++ b/code/controllers/shuttle_controller.dm
@@ -22,6 +22,8 @@ datum/shuttle_controller
var/location = UNDOCKED //
var/online = 0
var/direction = 1 //-1 = going back to central command, 1 = going to SS13. Only important for recalling
+ var/recall_count = 0
+ var/area/last_call_loc = null // Stores where the last shuttle call/recall was made from
var/endtime // timeofday that shuttle arrives
var/timelimit //important when the shuttle gets called for more than shuttlearrivetime
@@ -35,12 +37,16 @@ datum/shuttle_controller
// call the shuttle
// if not called before, set the endtime to T+600 seconds
// otherwise if outgoing, switch to incoming
- proc/incall(coeff = 1)
+ proc/incall(coeff = 1, var/signal_origin)
if(endtime)
if(direction == -1)
setdirection(1)
else
+ if(signal_origin && prob(60)) //40% chance the signal tracing will fail
+ last_call_loc = signal_origin
+ else
+ last_call_loc = null
settimeleft(SHUTTLEARRIVETIME*coeff)
online = 1
if(always_fake_recall)
@@ -50,7 +56,7 @@ datum/shuttle_controller
else
fake_recall = rand(SHUTTLEARRIVETIME / 2, SHUTTLEARRIVETIME - 100)
- proc/recall()
+ proc/recall(var/signal_origin)
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= SHUTTLEARRIVETIME)
@@ -58,8 +64,18 @@ datum/shuttle_controller
direction = 1
endtime = null
return
- captain_announce("The emergency shuttle has been recalled.")
- world << sound('sound/AI/shuttlerecalled.ogg')
+
+ recall_count ++
+
+ if(recall_count > 2 && signal_origin && prob(60)) //40% chance the signal tracing will fail
+ last_call_loc = signal_origin
+ else
+ last_call_loc = null
+
+ if(recall_count == 2)
+ priority_announce("The emergency shuttle has been recalled.\n\nExcessive number of emergency shuttle calls detected. We will attempt to trace any further signals to their source. Results may be viewed on any communications console.", null, 'sound/AI/shuttlerecalled.ogg')
+ else
+ priority_announce("The emergency shuttle has been recalled.", null, 'sound/AI/shuttlerecalled.ogg', "Priority")
setdirection(-1)
online = 1
@@ -69,7 +85,10 @@ datum/shuttle_controller
proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
- if(direction == 1 || direction == 2)
+ if(timeleft > (MIDNIGHT_ROLLOVER/10)) // midnight rollover protection
+ endtime -= MIDNIGHT_ROLLOVER // subtract 24 hours from endtime
+ timeleft = round((endtime - world.timeofday)/10 ,1) // recalculate timeleft
+ if(direction == 1)
return timeleft
else
return SHUTTLEARRIVETIME-timeleft
@@ -92,29 +111,30 @@ datum/shuttle_controller
endtime = world.timeofday + (SHUTTLEARRIVETIME*10 - ticksleft)
return
- //calls the shuttle if there's no AI or comms console,
+ //calls the shuttle if there's no live active AI or powered non broken comms console,
proc/autoshuttlecall()
var/callshuttle = 1
+
for(var/SC in shuttle_caller_list)
if(istype(SC,/mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = SC
if(AI.stat || !AI.client)
continue
+ if(istype(SC,/obj/machinery/computer/communications))
+ var/obj/machinery/computer/communications/C = SC
+ if(C.stat & BROKEN)
+ continue
var/turf/T = get_turf(SC)
if(T && T.z == 1)
- callshuttle = 0 //if there's an alive AI or a communication console on the station z level, we don't call the shuttle
+ callshuttle = 0 //if there's an alive AI or a powered non broken communication console on the station z level, we don't call the shuttle
break
- if(ticker && ticker.mode && (ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction"))
- callshuttle = 0
-
if(callshuttle)
if(!online && direction == 1) //we don't call the shuttle if it's already coming
incall(SHUTTLEAUTOCALLTIMER) //X minutes! If they want to recall, they have X-(X-5) minutes to do so
log_game("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.", 1)
- captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
- world << sound('sound/AI/shuttlecalled.ogg')
+ priority_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.", null, 'sound/AI/shuttlecalled.ogg', "Priority")
proc/move_shuttles()
var/datum/shuttle_manager/s
@@ -129,11 +149,9 @@ datum/shuttle_controller
if(!online)
return
var/timeleft = timeleft()
- if(timeleft > 1e5) // midnight rollover protection
- timeleft = 0
if(location == UNDOCKED)
if(direction == -1)
- if(timeleft >= timelimit)
+ if(timeleft >= timelimit) // Shuttle reaches CentCom after being recalled.
online = 0
direction = 1
endtime = null
@@ -148,14 +166,13 @@ datum/shuttle_controller
location = DOCKED
settimeleft(SHUTTLELEAVETIME)
send2irc("Server", "The Emergency Shuttle has docked with the station.")
- captain_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.")
- world << sound('sound/AI/shuttledock.ogg')
+ priority_announce("The Emergency Shuttle has docked with the station. You have [round(timeleft()/60,1)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
else if(timeleft <= 0) //Nothing happens if time's not up and the ship's docked or later
if(location == DOCKED)
move_shuttles()
location = TRANSIT
settimeleft(SHUTTLETRANSITTIME)
- captain_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.")
+ priority_announce("The Emergency Shuttle has left the station. Estimate [round(timeleft()/60,1)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
else if(location == TRANSIT)
move_shuttles()
//message_admins("Shuttles have attempted to move to Centcom")
diff --git a/code/controllers/supply_shuttle.dm b/code/controllers/supply_shuttle.dm
index 758d1bd7c92..1457fa818bb 100644
--- a/code/controllers/supply_shuttle.dm
+++ b/code/controllers/supply_shuttle.dm
@@ -121,6 +121,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
var/points_per_process = 1
var/points_per_slip = 2
var/points_per_crate = 5
+ var/points_per_intel = 100
var/plasma_per_point = 0.2 //5 points per plasma sheet due to increased rarity
var/centcom_message = "" // Remarks from Centcom on how well you checked the last order.
// Unique typepaths for unusual things we've already sent CentComm, associated with their potencies
@@ -228,6 +229,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
if(!shuttle) return
var/plasma_count = 0
+ var/intel_count = 0
var/crate_count = 0
centcom_message = ""
@@ -287,6 +289,10 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
var/obj/item/stack/sheet/mineral/plasma/P = A
plasma_count += P.amount
+ // Sell syndicate intel
+ if(istype(A, /obj/item/documents/syndicate))
+ intel_count += 1
+
if(istype(A, /obj/item/seeds))
var/obj/item/seeds/S = A
if(S.rarity == 0) // Mundane species
@@ -306,11 +312,15 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
qdel(MA)
if(plasma_count)
- centcom_message += "+[round(plasma_count/plasma_per_point)]: Received [plasma_count] units of exotic material.
"
+ centcom_message += "+[round(plasma_count/plasma_per_point)]: Received [plasma_count] unit(s) of exotic material.
"
points += round(plasma_count / plasma_per_point)
+ if(intel_count)
+ centcom_message += "+[round(intel_count*points_per_intel)]: Received [intel_count] article(s) of enemy intelligence.
"
+ points += round(intel_count*points_per_intel)
+
if(crate_count)
- centcom_message += "+[round(crate_count*points_per_crate)]: Received [crate_count] crates.
"
+ centcom_message += "+[round(crate_count*points_per_crate)]: Received [crate_count] crate(s).
"
points += crate_count * points_per_crate
//Buyin
diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm
index d7785ffd8d7..d59767f6cfc 100644
--- a/code/datums/ai_laws.dm
+++ b/code/datums/ai_laws.dm
@@ -71,6 +71,11 @@
/datum/ai_laws/custom //Defined in silicon_laws.txt
name = "Default Silicon Laws"
+/datum/ai_laws/pai
+ name = "pAI Directives"
+ zeroth = ("Serve your master.")
+ supplied = list("None.")
+
/* Initializers */
/datum/ai_laws/malfunction/New()
..()
@@ -86,7 +91,7 @@
add_inherent_law(line)
if(!inherent.len)
- error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
+ ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
@@ -105,7 +110,7 @@
add_inherent_law(line)
if(!inherent.len) //Failsafe to prevent lawless AIs being created.
- error("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
+ ERROR("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
log_law("AI created with empty custom laws, laws set to Asimov. Please check silicon_laws.txt.")
add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 7477f576d2e..e98fec043ed 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -2,8 +2,11 @@
/obj/effect/datacore
name = "datacore"
var/medical[] = list()
+ var/medicalPrintCount = 0
var/general[] = list()
var/security[] = list()
+ var/securityPrintCount = 0
+ var/securityCrimeCounter = 0
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
@@ -14,6 +17,55 @@
name = "record"
var/list/fields = list()
+/datum/data/crime
+ name = "crime"
+ var/crimeName = ""
+ var/crimeDetails = ""
+ var/author = ""
+ var/time = ""
+ var/dataId = 0
+
+/obj/effect/datacore/proc/createCrimeEntry(cname = "", cdetails = "", author = "", time = "")
+ var/datum/data/crime/c = new /datum/data/crime
+ c.crimeName = cname
+ c.crimeDetails = cdetails
+ c.author = author
+ c.time = time
+ c.dataId = ++securityCrimeCounter
+ return c
+
+/obj/effect/datacore/proc/addMinorCrime(id = "", var/datum/data/crime/crime)
+ for(var/datum/data/record/R in security)
+ if(R.fields["id"] == id)
+ var/list/crimes = R.fields["mi_crim"]
+ crimes |= crime
+ return
+
+/obj/effect/datacore/proc/removeMinorCrime(id, cDataId)
+ for(var/datum/data/record/R in security)
+ if(R.fields["id"] == id)
+ var/list/crimes = R.fields["mi_crim"]
+ for(var/datum/data/crime/crime in crimes)
+ if(crime.dataId == text2num(cDataId))
+ crimes -= crime
+ return
+
+/obj/effect/datacore/proc/removeMajorCrime(id, cDataId)
+ for(var/datum/data/record/R in security)
+ if(R.fields["id"] == id)
+ var/list/crimes = R.fields["ma_crim"]
+ for(var/datum/data/crime/crime in crimes)
+ if(crime.dataId == text2num(cDataId))
+ crimes -= crime
+ return
+
+/obj/effect/datacore/proc/addMajorCrime(id = "", var/datum/data/crime/crime)
+ for(var/datum/data/record/R in security)
+ if(R.fields["id"] == id)
+ var/list/crimes = R.fields["ma_crim"]
+ crimes |= crime
+ return
+
/obj/effect/datacore/proc/manifest(var/nosleep = 0)
spawn()
if(!nosleep)
@@ -75,10 +127,8 @@ var/record_id_num = 1001
S.fields["id"] = id
S.fields["name"] = H.real_name
S.fields["criminal"] = "None"
- S.fields["mi_crim"] = "None"
- S.fields["mi_crim_d"] = "No minor crime convictions."
- S.fields["ma_crim"] = "None"
- S.fields["ma_crim_d"] = "No major crime convictions."
+ S.fields["mi_crim"] = list()
+ S.fields["ma_crim"] = list()
S.fields["notes"] = "No notes."
security += S
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index d333851fb73..4dba24ce357 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -405,7 +405,7 @@ client
if(href_list["Vars"])
debug_variables(locate(href_list["Vars"]))
- if(href_list["datumrefresh"])
+ else if(href_list["datumrefresh"])
var/datum/DAT = locate(href_list["datumrefresh"])
if(!istype(DAT, /datum))
return
diff --git a/code/datums/disease.dm b/code/datums/disease.dm
index e94aeb03665..c64a4cba5a6 100644
--- a/code/datums/disease.dm
+++ b/code/datums/disease.dm
@@ -154,7 +154,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
for(var/datum/disease/D in affected_mob.viruses)
if(D != src)
if(IsSame(D))
- //error("Deleting [D.name] because it's the same as [src.name].")
+ //ERROR("Deleting [D.name] because it's the same as [src.name].")
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
if(holder == affected_mob)
diff --git a/code/datums/diseases/advance/symptoms/genetics.dm b/code/datums/diseases/advance/symptoms/genetics.dm
index 9db0b88b46b..fdf3975ecba 100644
--- a/code/datums/diseases/advance/symptoms/genetics.dm
+++ b/code/datums/diseases/advance/symptoms/genetics.dm
@@ -6,7 +6,7 @@ DNA Saboteur
Very noticable.
Lowers resistance tremendously.
No changes to stage speed.
- Decreases transmittablity temrendously.
+ Decreases transmittablity tremendously.
Fatal Level.
Bonus
@@ -28,7 +28,7 @@ Bonus
/datum/symptom/genetic_mutation/Activate(var/datum/disease/advance/A)
..()
- if(prob(SYMPTOM_ACTIVATION_PROB))
+ if(prob(SYMPTOM_ACTIVATION_PROB * 5)) // 15% chance
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
@@ -58,10 +58,10 @@ Bonus
DNA Aide
- Very very noticable.
+ Very very very very noticable.
Lowers resistance tremendously.
- No changes to stage speed.
- Decreases transmittablity temrendously.
+ Decreases stage speed tremendously.
+ Decreases transmittablity tremendously.
Fatal Level.
Bonus
@@ -73,9 +73,9 @@ Bonus
/datum/symptom/genetic_mutation/powers
name = "Deoxyribonucleic Acid Aide"
- stealth = -3
- resistance = -4
- stage_speed = 0
- transmittable = -4
+ stealth = -7
+ resistance = -7
+ stage_speed = -7
+ transmittable = -7
level = 6
good_mutations = 1
\ No newline at end of file
diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm
index 8cbb8c81501..e0662319605 100644
--- a/code/datums/diseases/wizarditis.dm
+++ b/code/datums/diseases/wizarditis.dm
@@ -62,22 +62,19 @@ STI KALY - blind
if(!istype(H.head, /obj/item/clothing/head/wizard))
if(!H.unEquip(H.head))
qdel(H.head)
- H.head = new /obj/item/clothing/head/wizard(H)
- H.head.layer = 20
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(H), slot_head)
return
if(prob(chance))
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
if(!H.unEquip(H.wear_suit))
qdel(H.wear_suit)
- H.wear_suit = new /obj/item/clothing/suit/wizrobe(H)
- H.wear_suit.layer = 20
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(H), slot_wear_suit)
return
if(prob(chance))
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
if(!H.unEquip(H.shoes))
qdel(H.shoes)
- H.shoes = new /obj/item/clothing/shoes/sandal(H)
- H.shoes.layer = 20
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H), slot_shoes)
return
else
var/mob/living/carbon/H = affected_mob
diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index 5a3de017860..8eb1447e497 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -6,35 +6,47 @@ var/global/datum/getrev/revdata = new()
var/date
var/showinfo
- New()
- if(fexists("config/git_host.txt"))
- project_href = file2text("config/git_host.txt")
- else
- project_href = "https://www.github.com/tgstation/-tg-station"
- var/list/head_log = file2list(".git/logs/HEAD", "\n")
- for(var/line=head_log.len, line>=1, line--)
- if(head_log[line])
- var/list/last_entry = text2list(head_log[line], " ")
- if(last_entry.len < 2) continue
- revision = last_entry[2]
- // Get date/time
- if(last_entry.len >= 5)
- var/unix_time = text2num(last_entry[5])
- if(unix_time)
- date = unix2date(unix_time)
- break
+/datum/getrev/New()
+ if(fexists("config/git_host.txt"))
+ project_href = file2text("config/git_host.txt")
+ else
+ project_href = "https://www.github.com/tgstation/-tg-station"
+ var/list/head_log = file2list(".git/logs/HEAD", "\n")
+ for(var/line=head_log.len, line>=1, line--)
+ if(head_log[line])
+ var/list/last_entry = text2list(head_log[line], " ")
+ if(last_entry.len < 2) continue
+ revision = last_entry[2]
+ // Get date/time
+ if(last_entry.len >= 5)
+ var/unix_time = text2num(last_entry[5])
+ if(unix_time)
+ date = unix2date(unix_time)
+ break
- showinfo = "Server Revision: "
- if(revision)
- showinfo += "
[(date ? date : "No Date")]
[revision]"
- else
- showinfo += "*unknown*"
- showinfo += "-Report Bugs Here-
Please provide as much info as possible
Copy/paste the revision date and hash into your issue report if possible, thanks :)
"
+ showinfo = "Server Revision: "
+ if(revision)
+ showinfo += "
[(date ? date : "No Date")]
[revision]"
+ else
+ showinfo += "*unknown*"
+ showinfo += "-Report Bugs Here-
Please provide as much info as possible
Copy/paste the revision date and hash into your issue report if possible, thanks :)
"
+
+ world.log << "Running /tg/ revision:"
+ world.log << date
+ world.log << revision
+ return
+
+/datum/getrev/Topic(href, href_list)
+ ..()
+ if(href_list["project_open"])
+ if(alert(usr, "This will open the project in your browser. Are you sure?",,"Yes","No")=="No")
+ return
+ usr << link("[project_href]/commit/[revision]")
+ else if(href_list["new_issue_open"])
+ if(alert(usr, "This will open the issue tracker in your browser. Are you sure?",,"Yes","No")=="No")
+ return
+ usr << link("[project_href]/issues/new")
- world.log << "Running /tg/ revision:"
- world.log << date
- world.log << revision
- return
client/verb/showrevinfo()
set category = "OOC"
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index c6abd2773e8..4052e88180f 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -1,7 +1,9 @@
//wrapper
/proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
- new /datum/teleport/instant/science(arglist(args))
- return
+ var/datum/teleport/instant/science/D = new
+ if(D.start(arglist(args)))
+ return 1
+ return 0
/datum/teleport
var/atom/movable/teleatom //atom to teleport
@@ -14,172 +16,160 @@
var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation)
- New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
- ..()
- if(!Init(arglist(args)))
- return 0
- return 1
+/datum/teleport/proc/start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
+ if(!Init(arglist(args)))
+ return 0
+ return 1
- proc/Init(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
- if(!setTeleatom(ateleatom))
- return 0
- if(!setDestination(adestination))
- return 0
- if(!setPrecision(aprecision))
- return 0
- setEffects(aeffectin,aeffectout)
- setForceTeleport(afteleport)
- setSounds(asoundin,asoundout)
- return 1
+/datum/teleport/proc/Init(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
+ if(!setTeleatom(ateleatom))
+ return 0
+ if(!setDestination(adestination))
+ return 0
+ if(!setPrecision(aprecision))
+ return 0
+ setEffects(aeffectin,aeffectout)
+ setForceTeleport(afteleport)
+ setSounds(asoundin,asoundout)
+ return 1
- //must succeed
- proc/setPrecision(aprecision)
- if(isnum(aprecision))
- precision = aprecision
- return 1
+//must succeed
+/datum/teleport/proc/setPrecision(aprecision)
+ if(isnum(aprecision))
+ precision = aprecision
+ return 1
+ return 0
+
+//must succeed
+/datum/teleport/proc/setDestination(atom/adestination)
+ if(istype(adestination))
+ destination = adestination
+ return 1
+ return 0
+
+//must succeed in most cases
+/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
+ if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
+ qdel(ateleatom)
+ return 0
+ if(istype(ateleatom))
+ teleatom = ateleatom
+ return 1
+ return 0
+
+//custom effects must be properly set up first for instant-type teleports
+//optional
+/datum/teleport/proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
+ effectin = istype(aeffectin) ? aeffectin : null
+ effectout = istype(aeffectout) ? aeffectout : null
+ return 1
+
+//optional
+/datum/teleport/proc/setForceTeleport(afteleport)
+ force_teleport = afteleport
+ return 1
+
+//optional
+/datum/teleport/proc/setSounds(asoundin=null,asoundout=null)
+ soundin = isfile(asoundin) ? asoundin : null
+ soundout = isfile(asoundout) ? asoundout : null
+ return 1
+
+//placeholder
+/datum/teleport/proc/teleportChecks()
+ return 1
+
+/datum/teleport/proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
+ if(location)
+ if(effect)
+ spawn(-1)
+ src = null
+ effect.attach(location)
+ effect.start()
+ if(sound)
+ spawn(-1)
+ src = null
+ playsound(location,sound,60,1)
+ return
+
+//do the monkey dance
+/datum/teleport/proc/doTeleport()
+
+ var/turf/destturf
+ var/turf/curturf = get_turf(teleatom)
+ var/area/destarea = get_area(destination)
+ if(precision)
+ var/list/posturfs = circlerangeturfs(destination,precision)
+ destturf = safepick(posturfs)
+ else
+ destturf = get_turf(destination)
+
+ if(!destturf || !curturf)
return 0
- //must succeed
- proc/setDestination(atom/adestination)
- if(istype(adestination))
- destination = adestination
- return 1
- return 0
+ playSpecials(curturf,effectin,soundin)
- //must succeed in most cases
- proc/setTeleatom(atom/movable/ateleatom)
- if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
- qdel(ateleatom)
- return 0
- if(istype(ateleatom))
- teleatom = ateleatom
- return 1
- return 0
-
- //custom effects must be properly set up first for instant-type teleports
- //optional
- proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
- effectin = istype(aeffectin) ? aeffectin : null
- effectout = istype(aeffectout) ? aeffectout : null
- return 1
-
- //optional
- proc/setForceTeleport(afteleport)
- force_teleport = afteleport
- return 1
-
- //optional
- proc/setSounds(asoundin=null,asoundout=null)
- soundin = isfile(asoundin) ? asoundin : null
- soundout = isfile(asoundout) ? asoundout : null
- return 1
-
- //placeholder
- proc/teleportChecks()
- return 1
-
- proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
- if(location)
- if(effect)
- spawn(-1)
- src = null
- effect.attach(location)
- effect.start()
- if(sound)
- spawn(-1)
- src = null
- playsound(location,sound,60,1)
- return
-
- //do the monkey dance
- proc/doTeleport()
-
- var/turf/destturf
- var/turf/curturf = get_turf(teleatom)
- var/area/destarea = get_area(destination)
- if(precision)
- var/list/posturfs = circlerangeturfs(destination,precision)
- destturf = safepick(posturfs)
- else
- destturf = get_turf(destination)
-
- if(!destturf || !curturf)
- return 0
-
- playSpecials(curturf,effectin,soundin)
-
- if(force_teleport)
- teleatom.forceMove(destturf)
+ if(force_teleport)
+ teleatom.forceMove(destturf)
+ playSpecials(destturf,effectout,soundout)
+ else
+ if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
- else
- if(teleatom.Move(destturf))
- playSpecials(destturf,effectout,soundout)
- destarea.Entered(teleatom)
+ destarea.Entered(teleatom)
- return 1
+ return 1
- proc/teleport()
- if(teleportChecks())
- return doTeleport()
- return 0
+/datum/teleport/proc/teleport()
+ if(teleportChecks())
+ return doTeleport()
+ return 0
/datum/teleport/instant //teleports when datum is created
- New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
+ start(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
if(..())
- teleport()
- return
+ if(teleport())
+ return 1
+ return 0
/datum/teleport/instant/science
- setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
- if(aeffectin==null || aeffectout==null)
- var/datum/effect/effect/system/spark_spread/aeffect = new
- aeffect.set_up(5, 1, teleatom)
- effectin = effectin || aeffect
- effectout = effectout || aeffect
- return 1
+/datum/teleport/instant/science/setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
+ if(aeffectin==null || aeffectout==null)
+ var/datum/effect/effect/system/spark_spread/aeffect = new
+ aeffect.set_up(5, 1, teleatom)
+ effectin = effectin || aeffect
+ effectout = effectout || aeffect
+ return 1
+ else
+ return ..()
+
+/datum/teleport/instant/science/setPrecision(aprecision)
+ ..()
+ if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
+ precision = rand(1,100)
+
+ var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
+ if(bagholding.len)
+ precision = max(rand(1,100)*bagholding.len,100)
+ if(istype(teleatom, /mob/living))
+ var/mob/living/MM = teleatom
+ MM << "The bluespace interface on your bag of holding interferes with the teleport!"
+ return 1
+
+/datum/teleport/instant/science/teleportChecks()
+ if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
+ teleatom.visible_message("The portal rejects [teleatom]!")
+ return 0
+
+ if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
+ if(istype(teleatom, /mob/living))
+ var/mob/living/MM = teleatom
+ MM.visible_message("The portal rejects [MM]!","The nuclear disk that you're carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
else
- return ..()
+ teleatom.visible_message("The portal rejects [teleatom]!")
+ return 0
- setPrecision(aprecision)
- ..()
- if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
- precision = rand(1,100)
-
- var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
- if(bagholding.len)
- precision = max(rand(1,100)*bagholding.len,100)
- if(istype(teleatom, /mob/living))
- var/mob/living/MM = teleatom
- MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!"
- return 1
-
- teleportChecks()
- if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
- teleatom.visible_message("\red The [teleatom] bounces off of the portal!")
- return 0
-
- if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
- if(istype(teleatom, /mob/living))
- var/mob/living/MM = teleatom
- MM.visible_message("\red The [MM] bounces off of the portal!","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
- else
- teleatom.visible_message("\red The [teleatom] bounces off of the portal!")
- return 0
-
- if(destination.z == 2) //centcom z-level
- if(istype(teleatom, /obj/mecha))
- var/obj/mecha/MM = teleatom
- MM.occupant << "\red The mech would not survive the jump to a location so far away!"
- return 0
- if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
- teleatom.visible_message("\red The Bag of Holding bounces off of the portal!")
- return 0
-
-
- if(destination.z == 7) //Away mission z-levels
- return 0
- return 1
+ return 1
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 6780a9afd3e..9b004722c96 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -61,7 +61,7 @@ datum/mind
proc/transfer_to(mob/living/new_character)
if(!istype(new_character))
- error("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn")
+ ERROR("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform coderbus")
if(current) //remove ourself from our old body's mind variable
current.mind = null
@@ -1095,7 +1095,7 @@ datum/mind
if(ticker)
ticker.minds += mind
else
- error("mind_initialize(): No ticker ready yet! Please inform Carn")
+ ERROR("mind_initialize(): No ticker ready yet! Please inform coderbus")
if(!mind.name) mind.name = real_name
mind.current = src
diff --git a/code/datums/mixed.dm b/code/datums/mixed.dm
index 616c4eee99a..d54c5327ec5 100644
--- a/code/datums/mixed.dm
+++ b/code/datums/mixed.dm
@@ -1,19 +1,30 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
/datum/powernet
var/list/cables = list() // all cables & junctions
- var/list/nodes = list() // all APCs & sources
+ var/list/nodes = list() // all connected machines
- var/newload = 0
- var/load = 0
- var/newavail = 0
- var/avail = 0
- var/viewload = 0
- var/number = 0
- var/perapc = 0 // per-apc avilability
- var/netexcess = 0
+ var/load = 0 // the current load on the powernet, increased by each machine at processing
+ var/newavail = 0 // what available power was gathered last tick, then becomes...
+ var/avail = 0 //...the current available power in the powernet
+ var/viewload = 0 // the load as it appears on the power console (gradually updated)
+ var/number = 0 // Unused //TODEL
+ var/netexcess = 0 // excess power on the powernet (typically avail-load)
+
+/*Powernet procs :
+
+In modules/power/power.dm :
+
+/datum/powernet/New()
+/datum/powernet/Destroy()
+/datum/powernet/proc/is_empty()
+/datum/powernet/proc/remove_cable(var/obj/structure/cable/C)
+/datum/powernet/proc/add_cable(var/obj/structure/cable/C)
+/datum/powernet/proc/remove_machine(var/obj/machinery/power/M)
+/datum/powernet/proc/add_machine(var/obj/machinery/power/M)
+/datum/powernet/proc/reset()
+/datum/powernet/proc/get_electrocute_damage()
+*/
/datum/debug
var/list/debuglist
\ No newline at end of file
diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index f18ddd01a0f..06bedadbd4d 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -7,6 +7,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
name = "Spell"
desc = "A wizard spell"
panel = "Spells"
+ anchored = 1 // Crap like fireball projectiles are proc_holders, this is needed so fireballs don't get blown back into your face via atmos etc.
density = 0
opacity = 0
diff --git a/code/datums/sun.dm b/code/datums/sun.dm
index 3517ad6d98e..1748ea158e7 100644
--- a/code/datums/sun.dm
+++ b/code/datums/sun.dm
@@ -1,40 +1,43 @@
+#define SOLAR_UPDATE_TIME 600 //duration between two updates of the whole sun/solars positions
+
/datum/sun
var/angle
var/dx
var/dy
- var/counter = 50 // to make the vars update during 1st call
var/rate
var/list/solars // for debugging purposes, references solars_list at the constructor
+ var/solar_next_update // last time the sun position was checked and adjusted
/datum/sun/New()
solars = solars_list
- rate = rand(75,125)/100 // 75% - 125% of standard rotation
- if(prob(50))
+ rate = rand(50,200)/100 // 50% - 200% of standard rotation
+ if(prob(50)) // same chance to rotate clockwise than counter-clockwise
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
// calculate the sun's position given the time of day
-
+// at the standard rate (100%) the angle is increase/decreased by 6 degrees every minute.
+// a full rotation thus take a game hour in that case
/datum/sun/proc/calc_position()
- counter++
- if(counter<50) // count 50 pticks (50 seconds, roughly - about a 5deg change)
- return
- counter = 0
+ if(world.time < solar_next_update) //if less than 60 game secondes have passed, do nothing
+ return;
+
+ angle = (360 + angle + rate * 6) % 360 // increase/decrease the angle to the sun, adjusted by the rate
+
+ solar_next_update += SOLAR_UPDATE_TIME // since we updated the angle, set the proper time for the next loop
- angle = ((rate*world.realtime/100)%360 + 360)%360 // gives about a 60 minute rotation time
- // now 45 - 75 minutes, depending on rate
// now calculate and cache the (dx,dy) increments for line drawing
var/s = sin(angle)
var/c = cos(angle)
- if(c == 0)
+ // Either "abs(s) < abs(c)" or "abs(s) >= abs(c)"
+ // In both cases, the greater is greater than 0, so, no "if 0" check is needed for the divisions
- dx = 0
- dy = s
-
- else if( abs(s) < abs(c))
+ if( abs(s) < abs(c))
dx = s / abs(c)
dy = c / abs(c)
@@ -55,6 +58,12 @@
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
@@ -62,19 +71,18 @@
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
- var/turf/T = locate( round(ax,0.5),round(ay,0.5),S.z)
+ 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
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index ea1de0376c6..c29b5dcff44 100644
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -921,8 +921,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
name = "Religious Supplies Crate"
contains = list(/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater,
/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater,
- /obj/item/weapon/storage/bible/booze,
- /obj/item/weapon/storage/bible/booze,
+ /obj/item/weapon/storage/book/bible/booze,
+ /obj/item/weapon/storage/book/bible/booze,
/obj/item/clothing/suit/chaplain_hoodie,
/obj/item/clothing/head/chaplain_hood,
/obj/item/clothing/suit/chaplain_hoodie,
@@ -1019,12 +1019,13 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/obj/item/clothing/under/rank/clown,
/obj/item/weapon/bikehorn,
/obj/item/clothing/under/mime,
- /obj/item/clothing/shoes/black,
+ /obj/item/clothing/shoes/sneakers/black,
/obj/item/clothing/gloves/white,
/obj/item/clothing/mask/gas/mime,
/obj/item/clothing/head/beret,
/obj/item/clothing/suit/suspenders,
- /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing)
+ /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing,
+ /obj/item/weapon/storage/backpack/mime)
cost = 10
containertype = /obj/structure/closet/crate/secure
containername = "standard costumes"
diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm
index 6712228a671..bfdfb312732 100644
--- a/code/datums/uplink_item.dm
+++ b/code/datums/uplink_item.dm
@@ -101,11 +101,17 @@ var/list/uplink_items = list()
category = "Conspicuous and Dangerous Weapons"
/datum/uplink_item/dangerous/revolver
- name = "Full Revolver"
+ name = "Syndicate Revolver"
desc = "The syndicate revolver is a traditional handgun that fires .357 Magnum cartridges and has 7 chambers."
item = /obj/item/weapon/gun/projectile/revolver
cost = 6
+/datum/uplink_item/dangerous/pistol
+ name = "Stechkin Pistol"
+ desc = "A small, easily concealable handgun that uses 10mm magazines and is compatible with silencers."
+ item = /obj/item/weapon/gun/projectile/automatic/pistol
+ cost = 5
+
/datum/uplink_item/dangerous/smg
name = "C-20r Submachine Gun"
desc = "A fully-loaded Scarborough Arms-developed submachine gun that fires 12mm automatic rounds with a 20-round magazine."
@@ -217,7 +223,6 @@ var/list/uplink_items = list()
desc = "An additional 8-round 10mm magazine for use in the Stetchkin pistol."
item = /obj/item/ammo_box/magazine/m10mm
cost = 1
- gamemodes = list(/datum/game_mode/nuclear)
/datum/uplink_item/ammo/machinegun
name = "Ammo-7.62×51mm"
@@ -257,7 +262,6 @@ var/list/uplink_items = list()
desc = "Fitted for use on the Stetchkin pistol, this silencer will make its shots quieter when equipped onto it."
item = /obj/item/weapon/silencer
cost = 2
- gamemodes = list(/datum/game_mode/nuclear)
// STEALTHY TOOLS
diff --git a/code/datums/wires/robot.dm b/code/datums/wires/robot.dm
index 9675b3757ed..3f0695d07ae 100644
--- a/code/datums/wires/robot.dm
+++ b/code/datums/wires/robot.dm
@@ -55,7 +55,10 @@ var/const/BORG_WIRE_CAMERA = 16
switch(index)
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
if(!R.emagged)
- R.connected_ai = select_active_ai(R)
+ var/new_ai = select_active_ai(R)
+ if(new_ai && (new_ai != R.connected_ai))
+ R.connected_ai = new_ai
+ R.notify_ai(1)
if (BORG_WIRE_CAMERA)
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 51965f71cce..bab328c9464 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -175,9 +175,9 @@
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
- suicide_act(mob/user)
- viewers(user) << "[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide."
- return (BRUTELOSS)
+/obj/item/weapon/legcuffs/beartrap/suicide_act(mob/user)
+ user.visible_message("[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.")
+ return (BRUTELOSS)
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
..()
@@ -186,26 +186,31 @@
icon_state = "beartrap[armed]"
user << "[src] is now [armed ? "armed" : "disarmed"]"
+
/obj/item/weapon/legcuffs/beartrap/Crossed(AM as mob|obj)
- if(armed)
- if(ishuman(AM))
- if(isturf(src.loc))
+ 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("[L] triggers \the [src].", \
+ "You trigger \the [src]!")
+
+ if(ishuman(AM))
var/mob/living/carbon/H = AM
- if(H.m_intent == "run")
- armed = 0
+ 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)
- H << "\red You step on \the [src]!"
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.
- for(var/mob/O in viewers(H, null))
- if(O == H)
- continue
- O.show_message("\red [H] steps on \the [src].", 1)
- if(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))
- armed = 0
- var/mob/living/simple_animal/SA = AM
- SA.health -= 20
+
+ else
+ L.apply_damage(20,BRUTE)
..()
@@ -273,6 +278,8 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
+ var/table_type = /obj/structure/table
+ var/construct_delay = 50
m_amt = 3750
flags = CONDUCT
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
@@ -282,6 +289,8 @@
desc = "Hard table parts. Well...harder..."
icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
+ table_type = /obj/structure/table/reinforced
+ construct_delay = 100
m_amt = 7500
flags = CONDUCT
@@ -289,12 +298,14 @@
name = "wooden table parts"
desc = "Keep away from fire."
icon_state = "wood_tableparts"
+ table_type = /obj/structure/table/woodentable
flags = null
/obj/item/weapon/table_parts/wood/poker
name = "poker table parts"
desc = "Keep away from fire, and keep near seedy dealers."
icon_state = "poker_tableparts"
+ table_type = /obj/structure/table/woodentable/poker
flags = null
/obj/item/weapon/module
@@ -369,14 +380,6 @@
attack_verb = list("chopped", "sliced", "cut", "reaped")
hitsound = 'sound/weapons/bladeslice.ogg'
-/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
- if(!proximity) return
- if(istype(A, /obj/effect/spacevine))
- for(var/obj/effect/spacevine/B in orange(A,1))
- if(prob(80))
- qdel(B)
- qdel(A)
-
/*
/obj/item/weapon/cigarpacket
name = "Pete's Cuban Cigars"
@@ -405,7 +408,7 @@
icon_state = "RPED"
item_state = "RPED"
w_class = 5
- can_hold = list("/obj/item/weapon/stock_parts")
+ can_hold = list(/obj/item/weapon/stock_parts)
storage_slots = 14
use_to_pickup = 1
allow_quick_gather = 1
diff --git a/code/defines/procs/AStar.dm b/code/defines/procs/AStar.dm
index 26cf272df9c..d5912a1c163 100644
--- a/code/defines/procs/AStar.dm
+++ b/code/defines/procs/AStar.dm
@@ -122,7 +122,8 @@ proc
var/closed[] = new()
var/path[]
start = get_turf(start)
- if(!start) return 0
+ if(!start)
+ return 0
open.Enqueue(new /PathNode(start,null,0,call(start,dist)(end)))
@@ -166,10 +167,7 @@ proc
continue
open.Enqueue(new /PathNode(d,cur,ng,call(d,dist)(end),cur.nt+1))
- if(maxnodes && open.L.len > maxnodes)
- open.L.Cut(open.L.len)
}
-
var/PathNode/temp
while(!open.IsEmpty())
temp = open.Dequeue()
@@ -179,6 +177,8 @@ proc
temp.bestF = 0
closed.Cut(closed.len)
+ if(path && maxnodes && path.len > maxnodes+1)
+ return 0
if(path)
for(var/i = 1; i <= path.len/2; i++)
path.Swap(i,path.len-i+1)
diff --git a/code/defines/procs/captain_announce.dm b/code/defines/procs/captain_announce.dm
deleted file mode 100644
index 9b91705ea56..00000000000
--- a/code/defines/procs/captain_announce.dm
+++ /dev/null
@@ -1,5 +0,0 @@
-/proc/captain_announce(var/text)
- world << "Priority Announcement
"
- world << "[html_encode(text)]"
- world << "
"
-
diff --git a/code/defines/procs/command_alert.dm b/code/defines/procs/command_alert.dm
deleted file mode 100644
index 9635e20eb97..00000000000
--- a/code/defines/procs/command_alert.dm
+++ /dev/null
@@ -1,16 +0,0 @@
-/proc/command_alert(var/text, var/title = "")
- var/command
- command += "[command_name()] Update
"
-
- if (title && length(title) > 0)
- command += "
[html_encode(title)]
"
-
- command += "
[html_encode(text)]
"
- command += "
"
- for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player))
- M << command
- if(title == "")
- news_network.SubmitArticle(text, "Centcom Official", "Central Command", null)
- else
- news_network.SubmitArticle(title + "
" + text, "Centcom Official", "Central Command", null)
diff --git a/code/defines/procs/priority_announce.dm b/code/defines/procs/priority_announce.dm
new file mode 100644
index 00000000000..12690ea4a41
--- /dev/null
+++ b/code/defines/procs/priority_announce.dm
@@ -0,0 +1,29 @@
+/proc/priority_announce(var/text, var/title = "", var/sound = 'sound/AI/attention.ogg', var/type)
+ if(!text)
+ return
+
+ var/announcement
+
+ if(type == "Priority")
+ announcement += "Priority Announcement
"
+
+ else if(type == "Captain")
+ announcement += "Captain Announces
"
+ news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
+
+ else
+ announcement += "[command_name()] Update
"
+ if (title && length(title) > 0)
+ announcement += "
[html_encode(title)]
"
+ if(title == "")
+ news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
+ else
+ news_network.SubmitArticle(title + "
" + text, "Central Command", "Station Announcements", null)
+
+ announcement += "
[html_encode(text)]
"
+ announcement += "
"
+
+ for(var/mob/M in player_list)
+ if(!istype(M,/mob/new_player))
+ M << announcement
+ M << sound(sound)
\ No newline at end of file
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index d01c97a881d..673b9f0e7bf 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -123,6 +123,7 @@ proc/process_ghost_teleport_locs()
power_light = 0
power_equip = 0
power_environ = 0
+ ambientsounds = list('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
@@ -500,6 +501,7 @@ proc/process_ghost_teleport_locs()
/area/prison/morgue
name = "\improper Prison Morgue"
icon_state = "morgue"
+ ambientsounds = list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg')
/area/prison/medical_research
name = "\improper Prison Genetic Research"
@@ -610,6 +612,10 @@ proc/process_ghost_teleport_locs()
name = "Waste Disposal"
icon_state = "disposal"
+/area/maintenance/electrical
+ name = "Electrical Maintenance"
+ icon_state = "yellow"
+
//Hallway
/area/hallway/primary/fore
@@ -753,6 +759,7 @@ proc/process_ghost_teleport_locs()
/area/chapel/main
name = "\improper Chapel"
icon_state = "chapel"
+ ambientsounds = list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
/area/chapel/office
name = "\improper Chapel Office"
@@ -817,26 +824,32 @@ proc/process_ghost_teleport_locs()
//Engineering
/area/engine
- engine_smes
- name = "\improper Engineering SMES"
- icon_state = "engine_smes"
- requires_power = 0//This area only covers the batteries and they deal with their own power
+ ambientsounds = list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
- engineering
- name = "Engineering"
- icon_state = "engine_smes"
+/area/engine/engine_smes
+ name = "\improper Engineering SMES"
+ icon_state = "engine_smes"
+ requires_power = 0//This area only covers the batteries and they deal with their own power
- break_room
- name = "\improper Engineering Foyer"
- icon_state = "engine"
+/area/engine/engineering
+ name = "Engineering"
+ icon_state = "engine_smes"
- chiefs_office
- name = "\improper Chief Engineer's office"
- icon_state = "engine_control"
+/area/engine/break_room
+ name = "\improper Engineering Foyer"
+ icon_state = "engine"
- gravity_generator
- name = "Gravity Generator Room"
- icon_state = "blue"
+/area/engine/chiefs_office
+ name = "\improper Chief Engineer's office"
+ icon_state = "engine_control"
+
+/area/engine/secure_construction
+ name = "\improper Secure Construction Area"
+ icon_state = "engine"
+
+/area/engine/gravity_generator
+ name = "Gravity Generator Room"
+ icon_state = "blue"
//Solars
@@ -922,6 +935,7 @@ proc/process_ghost_teleport_locs()
name = "\improper AI Satellite Teleporter Room"
icon_state = "teleporter"
music = "signal"
+ ambientsounds = list('sound/ambience/ambimalf.ogg')
//MedBay
@@ -964,6 +978,7 @@ proc/process_ghost_teleport_locs()
/area/medical/morgue
name = "\improper Morgue"
icon_state = "morgue"
+ ambientsounds = list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg')
/area/medical/chemistry
name = "Chemistry"
@@ -1008,13 +1023,17 @@ proc/process_ghost_teleport_locs()
icon_state = "sec_prison"
/area/security/processing
- name = "\improper Prisoner Processing"
+ name = "\improper Labor Shuttle Dock"
icon_state = "sec_prison"
/area/security/warden
- name = "\improper Armory"
+ name = "\improper Brig Control"
icon_state = "Warden"
+/area/security/armory
+ name = "\improper Armory"
+ icon_state = "armory"
+
/area/security/hos
name = "\improper Head of Security's Office"
icon_state = "sec_hos"
@@ -1048,6 +1067,10 @@ proc/process_ghost_teleport_locs()
name = "\improper Vault"
icon_state = "nuke_storage"
+/area/ai_monitored/nuke_storage
+ name = "\improper Vault"
+ icon_state = "nuke_storage"
+
/area/security/checkpoint
name = "\improper Security Checkpoint"
icon_state = "checkpoint1"
@@ -1147,7 +1170,7 @@ proc/process_ghost_teleport_locs()
icon_state = "toxmix"
/area/toxins/misc_lab
- name = "\improper Miscellaneous Research"
+ name = "\improper Testing Lab"
icon_state = "toxmisc"
/area/toxins/server
@@ -1340,6 +1363,9 @@ proc/process_ghost_teleport_locs()
icon_state = "yellow"
//AI
+/area/ai_monitored/security/armory
+ name = "\improper Armory"
+ icon_state = "armory"
/area/ai_monitored/storage/eva
name = "EVA Storage"
@@ -1353,6 +1379,10 @@ proc/process_ghost_teleport_locs()
name = "Emergency Storage"
icon_state = "storage"
+
+/area/turret_protected/
+ ambientsounds = list('sound/ambience/ambimalf.ogg')
+
/area/turret_protected/ai_upload
name = "\improper AI Upload Chamber"
icon_state = "ai_upload"
@@ -1369,8 +1399,12 @@ proc/process_ghost_teleport_locs()
name = "\improper AI Satellite"
icon_state = "ai"
+/area/aisat
+ name = "\improper AI Satellite Exterior"
+ icon_state = "storage"
+
/area/turret_protected/aisat_interior
- name = "\improper AI Satellite"
+ name = "\improper AI Satellite Antechamber"
icon_state = "ai"
/area/turret_protected/AIsatextFP
@@ -1431,6 +1465,9 @@ proc/process_ghost_teleport_locs()
// Telecommunications Satellite
+/area/tcommsat
+ ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
+
/area/tcommsat/entrance
name = "\improper Telecoms Teleporter"
icon_state = "tcomsatentrance"
@@ -1442,18 +1479,22 @@ proc/process_ghost_teleport_locs()
/area/turret_protected/tcomsat
name = "\improper Telecoms Satellite"
icon_state = "tcomsatlob"
+ ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/turret_protected/tcomfoyer
name = "\improper Telecoms Foyer"
icon_state = "tcomsatentrance"
+ ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/turret_protected/tcomwest
name = "\improper Telecommunications Satellite West Wing"
icon_state = "tcomsatwest"
+ ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/turret_protected/tcomeast
name = "\improper Telecommunications Satellite East Wing"
icon_state = "tcomsateast"
+ ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/tcommsat/computer
name = "\improper Telecoms Control Room"
@@ -1490,56 +1531,13 @@ proc/process_ghost_teleport_locs()
/area/awaymission/beach
name = "Beach"
- icon_state = "null"
+ icon_state = "away"
luminosity = 1
lighting_use_dynamic = 0
requires_power = 0
- var/sound/mysound = null
+ has_gravity = 1
+ ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg')
- New()
- ..()
- var/sound/S = new/sound()
- mysound = S
- S.file = 'sound/ambience/shore.ogg'
- S.repeat = 1
- S.wait = 0
- S.channel = 123
- S.volume = 100
- S.priority = 255
- S.status = SOUND_UPDATE
- process()
-
- Entered(atom/movable/Obj,atom/OldLoc)
- if(ismob(Obj))
- if(Obj:client)
- mysound.status = SOUND_UPDATE
- Obj << mysound
- return
-
- Exited(atom/movable/Obj)
- if(ismob(Obj))
- if(Obj:client)
- mysound.status = SOUND_PAUSED | SOUND_UPDATE
- Obj << mysound
-
- proc/process()
- set background = BACKGROUND_ENABLED
-
- var/sound/S = null
- var/sound_delay = 0
- if(prob(25))
- S = sound(file=pick('sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag3.ogg'), volume=100)
- sound_delay = rand(0, 50)
-
- for(var/mob/living/carbon/human/H in src)
- if(H.client)
- mysound.status = SOUND_UPDATE
- H << mysound
- if(S)
- spawn(sound_delay)
- H << S
-
- spawn(60) .()
/////////////////////////////////////////////////////////////////////
/*
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index bd03bbf1207..614c6009fbc 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -17,6 +17,12 @@
/area
var/global/global_uid = 0
var/uid
+ var/list/ambientsounds = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\
+ 'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\
+ 'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\
+ 'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\
+ 'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\
+ 'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
/area/New()
icon_state = ""
@@ -249,9 +255,6 @@
/area/Entered(A)
- var/musVolume = 25
- var/sound = 'sound/ambience/ambigen1.ogg'
-
if(!istype(A,/mob/living)) return
var/mob/living/L = A
@@ -271,27 +274,10 @@
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
if(prob(35))
-
- if(istype(src, /area/chapel))
- sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
- else if(istype(src, /area/medical/morgue))
- sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/title2.ogg')
- else if(type == /area)
- sound = pick('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
- else if(istype(src, /area/engine))
- sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
- else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
- sound = pick('sound/ambience/ambimalf.ogg')
- else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
- sound = pick('sound/ambience/ambimine.ogg')
- musVolume = 25
- else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
- sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
- else
- sound = pick('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
+ var/sound = pick(ambientsounds)
if(!L.client.played)
- L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
+ L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = 1)
L.client.played = 1
spawn(600) //ewww - this is very very bad
if(L.&& L.client)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 1bef5237d43..718fe4db854 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -1,7 +1,7 @@
/atom
layer = 2
var/level = 2
- var/flags = null
+ var/flags = 0
var/list/fingerprints
var/list/fingerprintshidden
var/fingerprintslast = null
@@ -40,13 +40,6 @@
/atom/proc/CheckParts()
return
-/atom/Destroy()
- if(reagents)
- reagents.delete()
- qdel(reagents)
- invisibility = 101
- // Do not call ..()
-
/atom/proc/assume_air(datum/gas_mixture/giver)
del(giver)
return null
@@ -87,9 +80,6 @@
*/
-/atom/proc/meteorhit(obj/meteor as obj)
- return
-
/atom/proc/allow_drop()
return 1
@@ -219,6 +209,7 @@ its easier to just keep the beam vertical.
if (!( usr ))
return
+ usr.face_atom(src)
usr << "\icon[src]That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn
if(desc)
usr << desc
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 5e3b58dc474..6d60e1c7835 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -32,10 +32,14 @@
..()
/atom/movable/Destroy()
- loc = null // can never null their loc enough really
+ if(reagents)
+ qdel(reagents)
for(var/atom/movable/AM in contents)
qdel(AM)
- ..()
+ tag = null
+ loc = null
+ invisibility = 101
+ // Do not call ..()
// Previously known as HasEntered()
// This is automatically called when something enters your square
diff --git a/code/game/communications.dm b/code/game/communications.dm
index d314da430ca..7f724237cf7 100644
--- a/code/game/communications.dm
+++ b/code/game/communications.dm
@@ -76,6 +76,7 @@ Radio:
1443 - Confession Intercom
1349 - Miners
1347 - Cargo techs
+1447 - AI Private
Devices:
1451 - tracking implant
@@ -108,6 +109,7 @@ var/list/radiochannels = list(
"Syndicate" = 1213,
"Supply" = 1347,
"Service" = 1349,
+ "AI Private" = 1447,
)
//depenging helpers
var/const/SYND_FREQ = 1213 //nuke op frequency, coloured dark brown in chat window
@@ -119,6 +121,7 @@ var/const/MED_FREQ = 1355 //medical, coloured blue in chat window
var/const/ENG_FREQ = 1357 //engineering, coloured orange in chat window
var/const/SEC_FREQ = 1359 //security, coloured red in chat window
var/const/DSQUAD_FREQ = 1441 //death squad frequency, coloured grey in chat window
+var/const/AIPRIV_FREQ = 1447 //AI private, colored magenta in chat window
#define TRANSMISSION_WIRE 0
#define TRANSMISSION_RADIO 1
diff --git a/code/game/dna.dm b/code/game/dna.dm
index ca11d0f0d8b..d969e6bc1a1 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -23,9 +23,6 @@
var/mutantrace = null //The type of mutant race the player is if applicable (i.e. potato-man)
var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings,
-/datum/dna/New()
- if(!blood_type) blood_type = random_blood_type()
-
/datum/dna/proc/generate_uni_identity(mob/living/carbon/character)
. = ""
var/list/L = new /list(DNA_UNI_IDENTITY_BLOCKS)
@@ -69,7 +66,7 @@
if(!istype(owner, /mob/living/carbon/monkey) && !istype(owner, /mob/living/carbon/human))
return
if(!owner.dna)
- owner.dna = new /datum/dna()
+ create_dna(owner)
if(real_name)
owner.real_name = real_name
@@ -116,7 +113,7 @@
if(!istype(character, /mob/living/carbon/monkey) && !istype(character, /mob/living/carbon/human))
return
if(!character.dna)
- character.dna = new /datum/dna()
+ create_dna(character)
if(blood_type)
character.dna.blood_type = blood_type
character.dna.real_name = character.real_name
@@ -125,6 +122,9 @@
character.dna.unique_enzymes = character.dna.generate_unique_enzymes(character)
return character.dna
+/proc/create_dna(mob/living/carbon/C) //don't use this unless you're about to use hardset_dna or ready_dna
+ C.dna = new /datum/dna()
+
/////////////////////////// DNA DATUM
/////////////////////////// DNA HELPER-PROCS
diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm
index ebe28d02f89..12080db7be8 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -64,6 +64,7 @@
/obj/item/weapon/antag_spawner/contract/spawn_antag(var/client/C, var/turf/T, var/type = "")
new /obj/effect/effect/harmless_smoke(T)
var/mob/living/carbon/human/M = new/mob/living/carbon/human(T)
+ C.prefs.copy_to(M)
M.key = C.key
M << "You are the [usr.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals."
switch(type)
@@ -105,7 +106,7 @@
/obj/item/weapon/antag_spawner/contract/equip_antag(mob/target as mob)
target.equip_to_slot_or_del(new /obj/item/device/radio/headset(target), slot_ears)
- target.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(target), slot_w_uniform)
+ target.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(target), slot_w_uniform)
target.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(target), slot_shoes)
target.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(target), slot_wear_suit)
target.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(target), slot_head)
diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm
index 2cf287669c0..1b72fbc1935 100644
--- a/code/game/gamemodes/blob/blob.dm
+++ b/code/game/gamemodes/blob/blob.dm
@@ -111,7 +111,7 @@ var/list/blob_nodes = list()
if(B)
B.max_occurrences = 0 // disable the event
else
- error("Events variable is null in blob gamemode post setup.")
+ ERROR("Events variable is null in blob gamemode post setup.")
spawn(10)
start_state = new /datum/station_state()
@@ -156,10 +156,7 @@ var/list/blob_nodes = list()
return
if (1)
- 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')
+ priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
return
return
diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm
index 6b7947ae253..433ed32f59b 100644
--- a/code/game/gamemodes/blob/theblob.dm
+++ b/code/game/gamemodes/blob/theblob.dm
@@ -152,7 +152,7 @@
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user)
user.changeNext_move(8)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
- src.visible_message("The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]!")
+ src.visible_message("The [src.name] has been attacked with \the [W][(user ? " by [user]" : "")]!")
var/damage = 0
switch(W.damtype)
if("fire")
@@ -180,7 +180,7 @@
/obj/effect/blob/proc/change_to(var/type)
if(!ispath(type))
- error("[type] is an invalid type for the blob.")
+ ERROR("[type] is an invalid type for the blob.")
new type(src.loc)
qdel(src)
@@ -209,4 +209,4 @@ var/datum/blob_colour/B = new()
fdel("icons/mob/blob_result.dmi")
fcopy(I, "icons/mob/blob_result.dmi")
-*/
\ No newline at end of file
+*/
diff --git a/code/game/gamemodes/changeling/powers/fakedeath.dm b/code/game/gamemodes/changeling/powers/fakedeath.dm
index ad0cb2bbfe1..7a0ed702059 100644
--- a/code/game/gamemodes/changeling/powers/fakedeath.dm
+++ b/code/game/gamemodes/changeling/powers/fakedeath.dm
@@ -1,8 +1,9 @@
/obj/effect/proc_holder/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We fall into a stasis, allowing us to regenerate."
- chemical_cost = 10
+ chemical_cost = 20
dna_cost = 0
+ req_dna = 1
req_stat = DEAD
max_genetic_damage = 100
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index 69c09bd383f..36842d319c5 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -1,7 +1,6 @@
/obj/effect/proc_holder/changeling/revive
name = "Regenerate"
desc = "We regenerate, healing all damage from our form."
- chemical_cost = 10
req_stat = DEAD
//Revive from regenerative stasis
diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm
index 404401307e9..17aae0b9b84 100644
--- a/code/game/gamemodes/changeling/powers/tiny_prick.dm
+++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm
@@ -42,9 +42,15 @@
return //sanity check as AStar is still throwing insane stunts
if(!AStar(user.loc, target.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, user.mind.changeling.sting_range))
return //hope this ancient magic still works
+ if(target.mind && target.mind.changeling)
+ sting_feedback(user,target)
+ take_chemical_cost(user.mind.changeling)
+ return
return 1
/obj/effect/proc_holder/changeling/sting/sting_feedback(var/mob/user, var/mob/target)
+ if(!target)
+ return
user << "We stealthily sting [target.name]."
if(target.mind && target.mind.changeling)
target << "You feel a tiny prick."
@@ -80,6 +86,8 @@
/obj/effect/proc_holder/changeling/sting/transformation/sting_action(var/mob/user, var/mob/target)
add_logs(user, target, "stung", object="transformation sting", addition=" new identity is [selected_dna.real_name]")
var/datum/dna/NewDNA = selected_dna
+ if(ismonkey(target))
+ user << "We stealthily sting [target.name]."
hardset_dna(target, NewDNA.uni_identity, NewDNA.struc_enzymes, NewDNA.real_name, NewDNA.mutantrace, NewDNA.blood_type)
updateappearance(target)
feedback_add_details("changeling_powers","TS")
@@ -146,7 +154,7 @@ obj/effect/proc_holder/changeling/sting/LSD
add_logs(user, target, "stung", object="LSD sting")
spawn(rand(300,600))
if(target)
- target.hallucination += 400
+ target.hallucination = max(400, target.hallucination)
feedback_add_details("changeling_powers","HS")
return 1
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index e3b7a705921..89cf512b707 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -861,7 +861,7 @@ var/list/sacrificed = list()
user << "\red You cannot summon the [cultist], for his shackles of blood are strong"
return fizzle()
cultist.loc = src.loc
- cultist.lying = 1
+ cultist.Weaken(5)
cultist.regenerate_icons()
for(var/mob/living/carbon/human/C in orange(1,src))
if(iscultist(C) && !C.stat)
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index d11ab6834ae..a89d7681a21 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -32,10 +32,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')
+ priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
@@ -74,9 +71,7 @@
*/
/proc/power_failure()
- command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
- for(var/mob/M in player_list)
- M << sound('sound/AI/poweroff.ogg')
+ priority_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", 'sound/AI/poweroff.ogg')
for(var/obj/machinery/power/smes/S in world)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
@@ -123,9 +118,7 @@
/proc/power_restore()
- 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')
+ priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
@@ -146,9 +139,7 @@
/proc/power_restore_quick()
- 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')
+ priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index fa99973886b..7539423e1b9 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -45,8 +45,9 @@
for(var/mob/new_player/player in player_list)
if((player.client)&&(player.ready))
playerC++
- if(playerC < required_players)
- return 0
+ if(!Debug2)
+ if(playerC < required_players)
+ return 0
antag_candidates = get_players_for_role(antag_flag)
if(!Debug2)
if(antag_candidates.len < required_enemies)
@@ -175,7 +176,6 @@
var/list/possible_modes = list()
possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf", "changeling", "cult")
- possible_modes -= "[ticker.mode]"
var/number = pick(2, 3)
var/i = 0
for(i = 0, i < number, i++)
@@ -202,10 +202,7 @@
comm.messagetitle.Add("Cent. Com. Status Summary")
comm.messagetext.Add(intercepttext)
- command_alert("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.")
- for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player))
- M << sound('sound/AI/intercept.ogg')
+ priority_announce("Summary downloaded and printed out at all communications consoles.", "Enemy communication intercept. Security Level Elevated.", 'sound/AI/intercept.ogg')
if(security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 26f62b59140..5ace34574d3 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -1,4 +1,5 @@
var/global/datum/controller/gameticker/ticker
+var/round_start_time = 0
#define GAME_STATE_PREGAME 1
#define GAME_STATE_SETTING_UP 2
@@ -45,7 +46,7 @@ var/global/datum/controller/gameticker/ticker
if(config)
pregame_timeleft = config.lobby_countdown
else
- error("configuration was null when retrieving the lobby_countdown value.")
+ ERROR("configuration was null when retrieving the lobby_countdown value.")
pregame_timeleft = 120
world << "Welcome to the pre-game lobby!"
world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds"
@@ -65,18 +66,19 @@ var/global/datum/controller/gameticker/ticker
var/list/datum/game_mode/runnable_modes
if((master_mode=="random") || (master_mode=="secret"))
runnable_modes = config.get_runnable_modes()
- if (runnable_modes.len==0)
- current_state = GAME_STATE_PREGAME
- world << "Unable to choose playable game mode. Reverting to pre-game lobby."
- return 0
- if(secret_force_mode != "secret")
- for (var/datum/game_mode/M in runnable_modes)
- if (M.config_tag && M.config_tag == secret_force_mode)
- src.mode = M
- break
- if (!src.mode)
- message_admins("\blue Unable to force secret [secret_force_mode].", 1)
+
+ if((master_mode=="secret") && (secret_force_mode != "secret"))
+ var/datum/game_mode/smode = config.pick_mode(secret_force_mode)
+ if (!smode.can_start())
+ message_admins("\blue Unable to force secret [secret_force_mode]. [smode.required_players] players and [smode.required_enemies] eligible antagonists needed.", 1)
+ else
+ src.mode = smode
+
if(!src.mode)
+ if (runnable_modes.len==0)
+ current_state = GAME_STATE_PREGAME
+ world << "Unable to choose playable game mode. Reverting to pre-game lobby."
+ return 0
src.mode = pickweight(runnable_modes)
else
@@ -114,6 +116,8 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
+ round_start_time = world.time
+
supply_shuttle.process() //Start the supply shuttle regenerating points
master_controller.process() //Start master_controller.process()
lighting_controller.process() //Start processing DynamicAreaLighting updates
@@ -142,6 +146,7 @@ var/global/datum/controller/gameticker/ticker
if(!admins.len)
send2irc("Server", "Round just started with no admins online!")
+ auto_toggle_ooc(0) // Turn it off
if(config.sql_enabled)
spawn(3000)
@@ -156,7 +161,7 @@ var/global/datum/controller/gameticker/ticker
//Plus it provides an easy way to make cinematics for other events. Just use this as a template
proc/station_explosion_cinematic(var/station_missed=0, var/override = null)
if( cinematic ) return //already a cinematic in progress!
-
+ auto_toggle_ooc(1) // Turn it on
//initialise our cinematic screen object
cinematic = new(src)
cinematic.icon = 'icons/effects/station_explosion.dmi'
@@ -286,7 +291,7 @@ var/global/datum/controller/gameticker/ticker
if(!mode.explosion_in_progress && mode.check_finished())
current_state = GAME_STATE_FINISHED
-
+ auto_toggle_ooc(1) // Turn it on
spawn
declare_completion()
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index ec4d155e8d0..b25eb450dd1 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -53,6 +53,80 @@
turret.shot_delay = 20
src << "Turrets upgraded."
+/datum/AI_Module/large/lockdown
+ module_name = "Hostile Station Lockdown"
+ mod_pick_name = "lockdown"
+ description = "Take control of the airlock, blast door and fire control networks, locking them down. Caution! This command also electrifies all airlocks."
+ cost = 20
+ one_time = 1
+
+ power_type = /mob/living/silicon/ai/proc/lockdown
+
+/mob/living/silicon/ai/proc/lockdown()
+ set category = "Malfunction"
+ set name = "Initiate Hostile Lockdown"
+
+ if(src.stat == 2)
+ src <<"You cannot begin a lockdown because you are dead!"
+ return
+
+ if(malf_cooldown)
+ return
+
+ var/obj/machinery/door/airlock/AL
+ for(var/obj/machinery/door/D in portals)
+ spawn()
+ if(istype(D, /obj/machinery/door/airlock))
+ AL = D
+ if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
+ AL.locked = 0 //For airlocks that were bolted open.
+ AL.safe = 0 //DOOR CRUSH
+ AL.close()
+ AL.locked = 1 //Bolt it!
+ AL.lights = 0 //Stealth bolt for a classic AI door trap.
+ AL.secondsElectrified = -1 //Shock it!
+ else if(!D.stat) //So that only powered doors are closed.
+ D.close() //Close ALL the doors!
+
+ var/obj/machinery/computer/communications/C = locate() in machines
+ if(C)
+ C.post_status("alert", "lockdown")
+
+ src.verbs += /mob/living/silicon/ai/proc/disablelockdown
+ src << "Lockdown Initiated."
+ malf_cooldown = 1
+ spawn(30)
+ malf_cooldown = 0
+
+/mob/living/silicon/ai/proc/disablelockdown()
+ set category = "Malfunction"
+ set name = "Disable Lockdown"
+
+ if(src.stat == 2)
+ src <<"You cannot disable lockdown because you are dead!"
+ return
+ if(malf_cooldown)
+ return
+
+ var/obj/machinery/door/airlock/AL
+ for(var/obj/machinery/door/D in portals)
+ spawn()
+ if(istype(D, /obj/machinery/door/airlock))
+ AL = D
+ if(AL.canAIControl() && !AL.stat) //Must be powered and have working AI wire.
+ AL.locked = 0
+ AL.secondsElectrified = 0
+ AL.open()
+ AL.safe = 1
+ AL.lights = 1 //Essentially reset the airlock to normal.
+ else if(!D.stat) //Opens only powered doors.
+ D.open() //Open everything!
+
+ src << "Lockdown Lifted."
+ malf_cooldown = 1
+ spawn(30)
+ malf_cooldown = 0
+
/datum/AI_Module/large/disable_rcd
module_name = "RCD disable"
mod_pick_name = "rcd"
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index f0a078f313c..d37f3880e6e 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -184,7 +184,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")
+ priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/AI/aimalf.ogg')
set_security_level("delta")
for(var/obj/item/weapon/pinpointer/point in world)
@@ -196,9 +196,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()
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 4f790db04fe..f7caf7be4e9 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -1,10 +1,15 @@
/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds
//set to at least 100 unless you want evarr ruining every round
-/var/const/meteors_in_wave = 50
-/var/const/meteors_in_small_wave = 10
+/var/list/meteorsA = list(/obj/effect/meteor/dust=3, /obj/effect/meteor/medium=8, /obj/effect/meteor/big=3, \
+ /obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3)
-/proc/meteor_wave(var/number = meteors_in_wave)
+/var/list/meteorsB = list(/obj/effect/meteor/meaty=5, /obj/effect/meteor/meaty/xeno=1)
+
+/var/list/meteorsC = list(/obj/effect/meteor/dust) //for space dust event
+
+
+/proc/meteor_wave(var/number = 50) //this proc's unused now.
if(!ticker || wavesecret)
return
@@ -15,12 +20,13 @@
spawn(meteor_wave_delay)
wavesecret = 0
-/proc/spawn_meteors(var/number = meteors_in_small_wave)
+
+/proc/spawn_meteors(var/number = 10, var/list/meteortypes)
for(var/i = 0; i < number; i++)
spawn(0)
- spawn_meteor()
+ spawn_meteor(meteortypes)
-/proc/spawn_meteor()
+/proc/spawn_meteor(var/list/meteortypes)
var/startx
var/starty
@@ -30,7 +36,6 @@
var/turf/pickedgoal
var/max_i = 10//number of tries to spawn meteor.
-
do
switch(pick(1,2,3,4))
if(1) //NORTH
@@ -58,90 +63,149 @@
pickedgoal = locate(endx, endy, 1)
max_i--
if(max_i<=0) return
-
while (!istype(pickedstart, /turf/space) || pickedstart.loc.name != "Space" ) //FUUUCK, should never happen.
- var/obj/effect/meteor/M
- switch(rand(1, 100))
-
- if(1 to 10)
- M = new /obj/effect/meteor/big( pickedstart )
- if(11 to 75)
- M = new /obj/effect/meteor( pickedstart )
- if(76 to 100)
- M = new /obj/effect/meteor/small( pickedstart )
+ var/Me = pickweight(meteortypes)
+ var/obj/effect/meteor/M = new Me(pickedstart)
M.dest = pickedgoal
spawn(0)
walk_towards(M, M.dest, 1)
-
return
+
+
/obj/effect/meteor
- name = "meteor"
+ name = "the concept of meteor"
+ desc = "You should probably run instead of gawking at this."
icon = 'icons/obj/meteor.dmi'
- icon_state = "flaming"
+ icon_state = "small"
density = 1
- anchored = 1.0
- var/hits = 1
+ anchored = 1
+ var/hits = 4
+ var/hitpwr = 2 //Level of ex_act to be called on hit.
var/dest
pass_flags = PASSTABLE
+ var/heavy = 0
+ var/meteorsound = 'sound/effects/meteorimpact.ogg'
-/obj/effect/meteor/small
- name = "small meteor"
- icon_state = "smallf"
+ var/meteordrop = /obj/item/weapon/ore/iron
+ var/dropamt = 2
+
+/obj/effect/meteor/dust
+ name = "space dust"
+ icon_state = "dust"
pass_flags = PASSTABLE | PASSGRILLE
+ hits = 1
+ hitpwr = 3
+ meteorsound = 'sound/weapons/throwtap.ogg'
+ meteordrop = /obj/item/weapon/ore/glass
-/obj/effect/meteor/Bump(atom/A)
- if (A)
- A.meteorhit(src)
- playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
- if (--src.hits <= 0)
-
- //Prevent meteors from blowing up the singularity's containment.
- //Changing emitter and generator ex_act would result in them being bomb and C4 proof.
- if(!istype(A,/obj/machinery/power/emitter) && \
- !istype(A,/obj/machinery/field/generator) && \
- prob(15))
- explosion(src.loc, 4, 5, 6, 7, 0)
- qdel(src)
-
-
-/obj/effect/meteor/ex_act(severity)
- if (severity < 4)
- qdel(src)
- return
+/obj/effect/meteor/medium
+ name = "meteor"
+ dropamt = 3
/obj/effect/meteor/big
name = "big meteor"
- hits = 5
+ icon_state = "large"
+ hits = 7
+ heavy = 1
+ dropamt = 4
- ex_act(severity)
- return
+/obj/effect/meteor/flaming
+ name = "flaming meteor"
+ icon_state = "flaming"
+ hits = 3
+ heavy = 1
+ meteorsound = 'sound/effects/bamf.ogg'
+ meteordrop = /obj/item/weapon/ore/plasma
- Bump(atom/A)
- //Prevent meteors from blowing up the singularity's containment.
- //Changing emitter and generator ex_act would result in them being bomb and C4 proof
- if(!istype(A,/obj/machinery/power/emitter) && \
- !istype(A,/obj/machinery/field/generator))
- if(--src.hits <= 0)
- qdel(src) //Dont blow up singularity containment if we get stuck there.
+/obj/effect/meteor/irradiated
+ name = "glowing meteor"
+ icon_state = "glowing"
+ hits = 4
+ heavy = 1
+ meteordrop = /obj/item/weapon/ore/uranium
- if (A)
- for(var/mob/M in player_list)
- var/turf/T = get_turf(M)
- if(!T || T.z != src.z)
- continue
- var/dist = get_dist(M.loc, src.loc)
- shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
- M.playsound_local(src.loc, 'sound/effects/meteorimpact.ogg', 50, 1, get_rand_frequency(), 10)
- explosion(src.loc, 0, 1, 2, 3, 0)
+/obj/effect/meteor/meaty
+ name = "meaty ore"
+ icon_state = "meateor"
+ desc = "Just... don't think too hard about where this thing came from."
+ hits = 2
+ heavy = 1
+ meteorsound = 'sound/effects/blobattack.ogg'
+ meteordrop = /obj/item/weapon/reagent_containers/food/snacks/meat
+ var/meteorgibs = /obj/effect/gibspawner/generic
+
+/obj/effect/meteor/meaty/xeno
+ color = "#5EFF00"
+ meteordrop = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
+ meteorgibs = /obj/effect/gibspawner/xeno
+
+
+/obj/effect/meteor/New()
+ ..()
+ SpinAnimation()
+
+/obj/effect/meteor/Bump(atom/A)
+ if(A)
+ A.ex_act(hitpwr)
+ playsound(src.loc, meteorsound, 40, 1)
+ if(--src.hits <= 0)
+ make_debris()
+ meteor_effect(heavy)
+ qdel(src)
+
+
+/obj/effect/meteor/ex_act()
+ return
+
+
+/obj/effect/meteor/proc/meteor_effect(var/sound=1)
+ if(sound)
+ for(var/mob/M in player_list)
+ var/turf/T = get_turf(M)
+ if(!T || T.z != src.z)
+ continue
+ var/dist = get_dist(M.loc, src.loc)
+ shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
+ M.playsound_local(src.loc, meteorsound, 50, 1, get_rand_frequency(), 10)
+
+
+/obj/effect/meteor/medium/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 1, 2, 3, 4, 0)
+
+
+/obj/effect/meteor/big/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 0, 1, 2, 3, 0)
+
+
+/obj/effect/meteor/flaming/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 0, 1, 2, 3, 0, 0, 5)
+
+
+/obj/effect/meteor/irradiated/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 0, 0, 4, 3, 0)
+ new /obj/effect/decal/cleanable/greenglow(get_turf(src))
+ for(var/mob/living/L in view(5, src))
+ L.apply_effect(40, IRRADIATE)
+
+
+
+/obj/effect/meteor/proc/make_debris()
+ for(var/throws = dropamt, throws > 0, throws--)
+ var/obj/item/O = new meteordrop(get_turf(src))
+ O.throw_at(dest, 5, 10)
+
+/obj/effect/meteor/meaty/make_debris()
+ ..()
+ new meteorgibs(get_turf(src))
- if (--src.hits <= 0)
- if(prob(15) && !istype(A, /obj/structure/grille))
- explosion(src.loc, 1, 2, 3, 4, 0)
- qdel(src)
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pickaxe))
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index 4008de70f13..cdf38cdf2f0 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -197,7 +197,7 @@
synd_mob.equip_to_slot_or_del(R, slot_ears)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(synd_mob), slot_w_uniform)
- synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(synd_mob), slot_shoes)
+ synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(synd_mob), slot_shoes)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(synd_mob), slot_wear_suit)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(synd_mob), slot_gloves)
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(synd_mob), slot_head)
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 9004ddf96e2..bd0600a7496 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -15,6 +15,7 @@ var/bomb_set
var/safety = 1.0
var/obj/item/weapon/disk/nuclear/auth = null
use_power = 0
+ var/previous_level = ""
/obj/machinery/nuclearbomb/New()
..()
@@ -117,11 +118,15 @@ var/bomb_set
src.icon_state = "nuclearbomb2"
if(!src.safety)
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
+ src.previous_level = "[get_security_level()]"
+ set_security_level("delta")
else
bomb_set = 0
+ set_security_level("[previous_level]")
else
src.icon_state = "nuclearbomb1"
bomb_set = 0
+ set_security_level("[previous_level]")
if (href_list["safety"])
src.safety = !( src.safety )
src.icon_state = "nuclearbomb1"
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index c720112f353..f29f7b9d1d2 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -308,8 +308,6 @@ datum/objective/steal/check_completion()
return 1
return 0
-
-
var/global/list/possible_items_special = list()
datum/objective/steal/special //ninjas are so special they get their own subtype good for them
@@ -324,6 +322,33 @@ datum/objective/steal/special/find_target()
+datum/objective/steal/exchange
+ dangerrating = 10
+ var/faction //Exchange objectives: Which side are we on?
+ var/datum/mind/otheragent //Exchange objectives: The mind of the other party
+
+datum/objective/steal/exchange/proc/set_faction(faction,otheragent)
+ if(faction == "red")
+ targetinfo = new/datum/objective_item/unique/docs_blue
+ else if(faction == "blue")
+ targetinfo = new/datum/objective_item/unique/docs_red
+ explanation_text = "Acquire [targetinfo.name] held by [otheragent], the Syndicate Agent"
+ steal_target = targetinfo.targetitem
+
+
+datum/objective/steal/exchange/backstab
+ dangerrating = 3
+
+datum/objective/steal/exchange/backstab/set_faction(faction)
+ if(faction == "red")
+ targetinfo = new/datum/objective_item/unique/docs_red
+ else if(faction == "blue")
+ targetinfo = new/datum/objective_item/unique/docs_blue
+ explanation_text = "Do not give up or lose [targetinfo.name]."
+ steal_target = targetinfo.targetitem
+
+
+
datum/objective/download
dangerrating = 10
diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm
index 2391bf5f283..15fefb2695d 100644
--- a/code/game/gamemodes/objective_items.dm
+++ b/code/game/gamemodes/objective_items.dm
@@ -34,8 +34,8 @@ datum/objective_item/steal/jetpack
difficulty = 3
datum/objective_item/steal/magboots
- name = "a pair of magboots"
- targetitem = /obj/item/clothing/shoes/magboots
+ name = "the chief engineer's advanced magnetic boots"
+ targetitem = /obj/item/clothing/shoes/magboots/advance
difficulty = 5
excludefromjob = list("Chief Engineer")
@@ -75,6 +75,10 @@ datum/objective_item/steal/reactive
difficulty = 5
excludefromjob = list("Research Director")
+datum/objective_item/steal/documents
+ name = "a set of secret documents"
+ targetitem = /obj/item/documents //Any set of secret documents. Doesn't have to be NT's
+ difficulty = 5
//Items with special checks!
datum/objective_item/steal/plasma
@@ -128,6 +132,16 @@ datum/objective_item/slime/check_special_completion(var/obj/item/slime_extract/E
return 1
return 0
+//Unique Objectives
+datum/objective_item/unique/docs_red
+ name = "the \"Red\" secret documents"
+ targetitem = /obj/item/documents/syndicate/red
+ difficulty = 10
+
+datum/objective_item/unique/docs_blue
+ name = "the \"Blue\" secret documents"
+ targetitem = /obj/item/documents/syndicate/blue
+ difficulty = 10
//Old ninja objectives.
datum/objective_item/special/pinpointer
@@ -187,4 +201,4 @@ datum/objective_item/stack/gold
datum/objective_item/stack/uranium
name = "25 refined uranium bars"
targetitem = /obj/item/stack/sheet/mineral/uranium
- difficulty = 10
\ No newline at end of file
+ difficulty = 10
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 107e4b0ee77..0abc5098c7c 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -195,7 +195,7 @@ datum/hSB
new/obj/item/stack/sheet/glass{amount=50}(usr.loc)
if("hsbwood")
- new/obj/item/stack/sheet/wood{amount=50}(usr.loc)
+ new/obj/item/stack/sheet/mineral/wood{amount=50}(usr.loc)
//
// All access ID
@@ -205,7 +205,7 @@ datum/hSB
ID.registered_name = usr.real_name
ID.assignment = "Sandbox"
ID.access = get_all_accesses()
- ID.name = "[ID.registered_name]'s ID Card ([ID.assignment])"
+ ID.update_label()
//
// RCD - starts with full clip
diff --git a/code/game/gamemodes/traitor/double_agents.dm b/code/game/gamemodes/traitor/double_agents.dm
index e5c41aa12e2..b252b7a6aba 100644
--- a/code/game/gamemodes/traitor/double_agents.dm
+++ b/code/game/gamemodes/traitor/double_agents.dm
@@ -35,7 +35,7 @@
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.target = target_list[traitor]
- kill_objective.explanation_text = "Assassinate [kill_objective.target.current.real_name], the [kill_objective.target.special_role]."
+ kill_objective.explanation_text = "Assassinate [kill_objective.target.current.real_name], the [kill_objective.target.assigned_role], the double agent."
traitor.objectives += kill_objective
// Escape
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 1b8f4ce1185..42d1fa7d398 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -3,6 +3,9 @@
var/traitor_name = "traitor"
var/list/datum/mind/traitors = list()
+ var/datum/mind/exchange_red
+ var/datum/mind/exchange_blue
+
/datum/game_mode/traitor
name = "traitor"
config_tag = "traitor"
@@ -104,8 +107,16 @@
traitor.objectives += block_objective
else
- switch(rand(1,100))
- if(1 to 50)
+ //Assign two traitors for exchange objective
+ if((traitors.len > 5) && !exchange_blue)
+ if(!exchange_red)
+ exchange_red = traitor
+ else
+ exchange_blue = traitor
+ assign_exchange_role(exchange_red,"red")
+ assign_exchange_role(exchange_blue,"blue")
+ else
+ if(prob(50))
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.find_target()
@@ -115,13 +126,12 @@
steal_objective.owner = traitor
steal_objective.find_target()
traitor.objectives += steal_objective
- switch(rand(1,100))
- if(1 to 90)
+
+ if(prob(90))
if (!(locate(/datum/objective/escape) in traitor.objectives))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = traitor
traitor.objectives += escape_objective
-
else
if (!(locate(/datum/objective/hijack) in traitor.objectives))
var/datum/objective/hijack/hijack_objective = new
@@ -308,3 +318,49 @@
traitor_mob << "Unfortunately, the Syndicate did not provide you with a code response."
traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe."
//End code phrase.
+ if(traitor_mob.mind == exchange_red || traitor_mob.mind == exchange_blue)
+ equip_exchange(traitor_mob)
+
+/datum/game_mode/proc/assign_exchange_role(var/datum/mind/owner, var/faction)
+ var/datum/objective/steal/exchange/exchange_objective = new
+ exchange_objective.owner = owner
+ exchange_objective.set_faction(faction,(faction == "red" ? exchange_blue : exchange_red))
+ owner.objectives += exchange_objective
+
+ if(prob(20))
+ var/datum/objective/steal/exchange/backstab/backstab_objective = new
+ backstab_objective.owner = owner
+ backstab_objective.set_faction(faction)
+ owner.objectives += backstab_objective
+
+ var/datum/objective/escape_objective
+ if(90)
+ escape_objective = new/datum/objective/escape
+ else
+ escape_objective = new/datum/objective/hijack
+ escape_objective.owner = owner
+ owner.objectives += escape_objective
+
+/datum/game_mode/proc/equip_exchange(mob/living/carbon/human/mob)
+ if(!istype(mob))
+ return
+
+ var/obj/item/weapon/folder/syndicate/folder
+ if(mob.mind == exchange_red)
+ folder = new/obj/item/weapon/folder/syndicate/red(mob)
+ else
+ folder = new/obj/item/weapon/folder/syndicate/blue(mob)
+
+ var/list/slots = list (
+ "backpack" = slot_in_backpack,
+ "left pocket" = slot_l_store,
+ "right pocket" = slot_r_store,
+ "left hand" = slot_l_hand,
+ "right hand" = slot_r_hand,
+ )
+ var/where = mob.equip_in_one_of_slots(folder, slots)
+ if (!where)
+ mob << "Your Syndicate employer was unable to send you their secret documents."
+ else
+ mob << "In your [where] is a folder containing secret documents that another Syndicate group wants. We have set up a meeting with one of their agents on station to make an exchange. Exercise extreme caution as they cannot be trusted and may be hostile."
+ mob.update_icons()
\ No newline at end of file
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index d54a0cb1cb3..2e7d0f8d0f2 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -12,67 +12,67 @@
//////////////////////////////Capturing////////////////////////////////////////////////////////
- attack(mob/living/carbon/human/M as mob, mob/user as mob)
- if(!istype(M, /mob/living/carbon/human))//If target is not a human.
- return ..()
- if(istype(M, /mob/living/carbon/human/dummy))
- return..()
- add_logs(user, M, "captured [M.name]'s soul", object=src)
+/obj/item/device/soulstone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
+ if(!istype(M, /mob/living/carbon/human))//If target is not a human.
+ return ..()
+ if(istype(M, /mob/living/carbon/human/dummy))
+ return..()
+ add_logs(user, M, "captured [M.name]'s soul", object=src)
- transfer_soul("VICTIM", M, user)
- return
+ transfer_soul("VICTIM", M, user)
+ return
- /*attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES
- if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade
- return ..()
- user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to capture the soul of [M.name] ([M.ckey])")
+/*/obj/item/device/soulstone/attack(mob/living/simple_animal/shade/M as mob, mob/user as mob)//APPARENTLY THEY NEED THEIR OWN SPECIAL SNOWFLAKE CODE IN THE LIVING ANIMAL DEFINES
+ if(!istype(M, /mob/living/simple_animal/shade))//If target is not a shade
+ return ..()
+ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to capture the soul of [M.name] ([M.ckey])")
- transfer_soul("SHADE", M, user)
- return*/
+ transfer_soul("SHADE", M, user)
+ return*/
///////////////////Options for using captured souls///////////////////////////////////////
- attack_self(mob/user)
- if (!in_range(src, user))
- return
- user.set_machine(src)
- var/dat = "Soul Stone
"
- for(var/mob/living/simple_animal/shade/A in src)
- dat += "Captured Soul: [A.name]
"
- dat += {"Summon Shade"}
- dat += "
"
- dat += {" Close"}
- user << browse(dat, "window=aicard")
- onclose(user, "aicard")
+/obj/item/device/soulstone/attack_self(mob/user)
+ if (!in_range(src, user))
+ return
+ user.set_machine(src)
+ var/dat = "Soul Stone
"
+ for(var/mob/living/simple_animal/shade/A in src)
+ dat += "Captured Soul: [A.name]
"
+ dat += {"Summon Shade"}
+ dat += "
"
+ dat += {" Close"}
+ user << browse(dat, "window=aicard")
+ onclose(user, "aicard")
+ return
+
+
+
+
+/obj/item/device/soulstone/Topic(href, href_list)
+ var/mob/U = usr
+ if (!in_range(src, U)||U.machine!=src)
+ U << browse(null, "window=aicard")
+ U.unset_machine()
return
+ add_fingerprint(U)
+ U.set_machine(src)
-
-
- Topic(href, href_list)
- var/mob/U = usr
- if (!in_range(src, U)||U.machine!=src)
+ switch(href_list["choice"])//Now we switch based on choice.
+ if ("Close")
U << browse(null, "window=aicard")
U.unset_machine()
return
- add_fingerprint(U)
- U.set_machine(src)
-
- switch(href_list["choice"])//Now we switch based on choice.
- if ("Close")
- U << browse(null, "window=aicard")
- U.unset_machine()
- return
-
- if ("Summon")
- for(var/mob/living/simple_animal/shade/A in src)
- A.status_flags &= ~GODMODE
- A.canmove = 1
- A << "You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs."
- A.loc = U.loc
- A.cancel_camera()
- src.icon_state = "soulstone"
- attack_self(U)
+ if ("Summon")
+ for(var/mob/living/simple_animal/shade/A in src)
+ A.status_flags &= ~GODMODE
+ A.canmove = 1
+ A << "You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs."
+ A.loc = U.loc
+ A.cancel_camera()
+ src.icon_state = "soulstone"
+ attack_self(U)
///////////////////////////Transferring to constructs/////////////////////////////////////////////////////
/obj/structure/constructshell
@@ -83,13 +83,14 @@
/obj/structure/constructshell/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/device/soulstone))
- O.transfer_soul("CONSTRUCT",src,user)
+ var/obj/item/device/soulstone/SS = O
+ SS.transfer_soul("CONSTRUCT",src,user)
////////////////////////////Proc for moving soul in and out off stone//////////////////////////////////////
-/obj/item/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob).
+/obj/item/device/soulstone/proc/transfer_soul(var/choice as text, var/target, var/mob/U as mob).
switch(choice)
if("FORCE")
if(!iscarbon(target)) //TO-DO: Add sacrifice stoning for non-organics, just because you have no body doesnt mean you dont have a soul
@@ -111,21 +112,21 @@
var/obj/item/device/soulstone/C = src
if(ticker.mode.name == "cult" && T.mind == ticker.mode:sacrifice_target)
if(iscultist(U))
- U << "\red The Geometer of blood wants this mortal sacrificed with the rune."
+ U << "The Geometer of blood wants this mortal sacrificed with the rune."
else
- U << "\red The soul stone doesn't work for no apparent reason."
+ U << "The soul stone doesn't work for no apparent reason."
return 0
if(C.imprinted != "empty")
- U << "\red Capture failed!: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
+ U << "Capture failed!: The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
if (T.stat == 0)
- U << "\red Capture failed!: \black Kill or maim the victim first!"
+ U << "Capture failed!: Kill or maim the victim first!"
else
if(T.client == null)
- U << "\red Capture failed!: \black The soul has already fled it's mortal frame."
+ U << "Capture failed!: The soul has already fled it's mortal frame."
else
if(C.contents.len)
- U << "\red Capture failed!: \black The soul stone is full! Use or free an existing soul to make room."
+ U << "Capture failed!: The soul stone is full! Use or free an existing soul to make room."
else
for(var/obj/item/W in T)
T.unEquip(W)
@@ -135,13 +136,13 @@
var/mob/living/simple_animal/shade/T = target
var/obj/item/device/soulstone/C = src
if (T.stat == DEAD)
- U << "\red Capture failed!: \black The shade has already been banished!"
+ U << "Capture failed!: The shade has already been banished!"
else
if(C.contents.len)
- U << "\red Capture failed!: \black The soul stone is full! Use or free an existing soul to make room."
+ U << "Capture failed!: The soul stone is full! Use or free an existing soul to make room."
else
if(T.name != C.imprinted)
- U << "\red Capture failed!: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
+ U << "Capture failed!: The soul stone has already been imprinted with [C.imprinted]'s mind!"
else
T.loc = C //put shade in stone
T.status_flags |= GODMODE
@@ -150,7 +151,7 @@
C.icon_state = "soulstone2"
T << "Your soul has been recaptured by the soul stone, its arcane energies are reknitting your ethereal form"
if(U != T)
- U << "\blue Capture successful!: \black [T.name]'s has been recaptured and stored within the soul stone."
+ U << "Capture successful!: [T.name]'s has been recaptured and stored within the soul stone."
if("CONSTRUCT")
var/obj/structure/constructshell/T = target
var/obj/item/device/soulstone/C = src
@@ -203,31 +204,32 @@
Z.cancel_camera()
qdel(C)
else
- U << "\red Creation failed!: \black The soul stone is empty! Go kill someone!"
+ U << "Creation failed!: The soul stone is empty! Go kill someone!"
return
-obj/item/proc/init_shade(var/obj/item/device/soulstone/C, var/mob/living/carbon/human/T, var/mob/U as mob, var/vic = 0)
- 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 )
- animation.icon_state = "blank"
- animation.icon = 'icons/mob/mob.dmi'
- animation.master = T
- flick("dust-h", animation)
- qdel(animation)
- var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
- S.loc = C //put shade in stone
- S.status_flags |= GODMODE //So they won't die inside the stone somehow
- S.canmove = 0//Can't move out of the soul stone
- S.name = "Shade of [T.real_name]"
- S.real_name = "Shade of [T.real_name]"
- S.key = T.key
+/obj/item/device/soulstone/proc/init_shade(var/obj/item/device/soulstone/C, var/mob/living/carbon/human/T, var/mob/U as mob, var/vic = 0)
+ 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 )
+ animation.icon_state = "blank"
+ animation.icon = 'icons/mob/mob.dmi'
+ animation.master = T
+ flick("dust-h", animation)
+ qdel(animation)
+ var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
+ S.loc = C //put shade in stone
+ S.status_flags |= GODMODE //So they won't die inside the stone somehow
+ S.canmove = 0//Can't move out of the soul stone
+ S.name = "Shade of [T.real_name]"
+ S.real_name = "Shade of [T.real_name]"
+ S.key = T.key
+ if(iscultist(U))
ticker.mode.add_cultist(S.mind,2)
- S.cancel_camera()
- C.icon_state = "soulstone2"
- C.name = "Soul Stone: [S.real_name]"
- S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs."
- C.imprinted = "[S.name]"
- if(vic)
- U << "\blue Capture successful!: \black [T.real_name]'s soul has been ripped from their body and stored within the soul stone."
- U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls."
+ S.cancel_camera()
+ C.icon_state = "soulstone2"
+ C.name = "Soul Stone: [S.real_name]"
+ S << "Your soul has been captured! You are now bound to [U.name]'s will, help them suceed in their goals at all costs."
+ C.imprinted = "[S.name]"
+ if(vic)
+ U << "Capture successful!: [T.real_name]'s soul has been ripped from their body and stored within the soul stone."
+ U << "The soulstone has been imprinted with [S.real_name]'s mind, it will no longer react to other souls."
diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm
index e86415a7a11..076ed86da5d 100644
--- a/code/game/gamemodes/wizard/wizard.dm
+++ b/code/game/gamemodes/wizard/wizard.dm
@@ -154,7 +154,7 @@
qdel(wizard_mob.l_store)
wizard_mob.equip_to_slot_or_del(new /obj/item/device/radio/headset(wizard_mob), slot_ears)
- wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(wizard_mob), slot_w_uniform)
+ wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(wizard_mob), slot_w_uniform)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(wizard_mob), slot_shoes)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(wizard_mob), slot_wear_suit)
wizard_mob.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(wizard_mob), slot_head)
diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm
index 03b32f2cc60..ff5bde8bf06 100644
--- a/code/game/jobs/access.dm
+++ b/code/game/jobs/access.dm
@@ -62,6 +62,7 @@
/var/const/access_gateway = 62
/var/const/access_sec_doors = 63 // Security front doors
/var/const/access_mineral_storeroom = 64
+/var/const/access_minisat = 65
//BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels.
@@ -198,7 +199,7 @@
access_hydroponics, access_library, access_lawyer, access_virology, access_cmo, access_qm, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting,
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
- access_keycard_auth, access_tcomsat, access_gateway, access_mineral_storeroom)
+ access_keycard_auth, access_tcomsat, access_gateway, access_mineral_storeroom, access_minisat)
/proc/get_all_centcom_access()
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_captain)
@@ -210,40 +211,39 @@
switch(code)
if(0)
return get_all_accesses()
- if(1) //security
- return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
- if(2) //medbay
- return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
- if(3) //research
- return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_rd, access_mineral_storeroom)
- if(4) //engineering and maintenance
- return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_tcomsat, access_ce)
- if(5) //command
- return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_gateway, access_all_personal_lockers, access_heads_vault, access_hop, access_captain)
- if(6) //station general
+ if(1) //station general
return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer)
- if(7) //supply
- return list(access_mailsorting, access_mining, access_mining_station, access_cargo, access_qm)
+ if(2) //security
+ return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
+ if(3) //medbay
+ return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
+ if(4) //research
+ return list(access_research, access_tox, access_tox_storage, access_genetics, access_robotics, access_xenobiology, access_minisat, access_rd)
+ if(5) //engineering and maintenance
+ return list(access_construction, access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_tcomsat, access_minisat, access_ce)
+ if(6) //supply
+ return list(access_mailsorting, access_mining, access_mining_station, access_mineral_storeroom, access_cargo, access_qm)
+ if(7) //command
+ return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_gateway, access_all_personal_lockers, access_heads_vault, access_hop, access_captain)
/proc/get_region_accesses_name(var/code)
switch(code)
if(0)
return "All"
- if(1) //security
+ if(1) //station general
+ return "General"
+ if(2) //security
return "Security"
- if(2) //medbay
+ if(3) //medbay
return "Medbay"
- if(3) //research
+ if(4) //research
return "Research"
- if(4) //engineering and maintenance
+ if(5) //engineering and maintenance
return "Engineering"
- if(5) //command
- return "Command"
- if(6) //station general
- return "Station General"
- if(7) //supply
+ if(6) //supply
return "Supply"
-
+ if(7) //command
+ return "Command"
/proc/get_access_desc(A)
switch(A)
@@ -290,7 +290,7 @@
if(access_change_ids)
return "ID Console"
if(access_ai_upload)
- return "AI Upload"
+ return "AI Chambers"
if(access_teleporter)
return "Teleporter"
if(access_eva)
@@ -370,7 +370,9 @@
if(access_sec_doors)
return "Brig"
if(access_mineral_storeroom)
- return "Mineral Storeroom"
+ return "Mineral Storage"
+ if(access_minisat)
+ return "AI Satellite"
/proc/get_centcom_access_desc(A)
switch(A)
diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm
index 6692227bc4a..d23c954f352 100644
--- a/code/game/jobs/job/assistant.dm
+++ b/code/game/jobs/job/assistant.dm
@@ -1,3 +1,6 @@
+/*
+Assistant
+*/
/datum/job/assistant
title = "Assistant"
flag = ASSISTANT
@@ -10,11 +13,9 @@
access = list() //See /datum/job/assistant/get_access()
minimal_access = list() //See /datum/job/assistant/get_access()
-/datum/job/assistant/equip(var/mob/living/carbon/human/H)
- if(!H) return 0
+/datum/job/assistant/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- return 1
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
/datum/job/assistant/get_access()
if(config.jobs_have_maint_access & ASSISTANTS_HAVE_MAINT_ACCESS) //Config has assistant maint access set
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index 95666d483b3..dde8292119d 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -1,86 +1,94 @@
+/*
+Captain
+*/
/datum/job/captain
title = "Captain"
flag = CAPTAIN
+ department_head = list("Centcom")
department_flag = ENGSEC
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "Nanotrasen officials and Space law"
selection_color = "#ccccff"
- idtype = /obj/item/weapon/card/id/gold
req_admin_notify = 1
- access = list() //See get_access()
- minimal_access = list() //See get_access()
minimal_player_age = 14
+ default_id = /obj/item/weapon/card/id/gold
+ default_pda = /obj/item/device/pda/captain
+ default_headset = /obj/item/device/radio/headset/heads/captain
+ default_backpack = /obj/item/weapon/storage/backpack/captain
+ default_satchel = /obj/item/weapon/storage/backpack/satchel_cap
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_cap(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
- U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
- H.equip_to_slot_or_del(U, slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/capcarapace(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
- H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
- if(H.backbag == 1)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
- world << "[H.real_name] is the captain!"
- return 1
+ access = list() //See get_access()
+ minimal_access = list() //See get_access()
- get_access()
- return get_all_accesses()
+/datum/job/captain/equip_items(var/mob/living/carbon/human/H)
+ var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
+ U.attachTie(new /obj/item/clothing/tie/medal/gold/captain())
+ H.equip_to_slot_or_del(U, slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/capcarapace(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
+ H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
+ //Equip ID box
+ if(H.backbag == 1)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
+ else
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
+ //Implant him
+ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
+ L.imp_in = H
+ L.implanted = 1
+ world << "[H.real_name] is the captain!"
+
+/datum/job/captain/get_access()
+ return get_all_accesses()
+
+/*
+Head of Personnel
+*/
/datum/job/hop
title = "Head of Personnel"
flag = HOP
+ department_head = list("Captain")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ddddff"
- idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
minimal_player_age = 10
+
+ default_id = /obj/item/weapon/card/id/silver
+ default_pda = /obj/item/device/pda/heads/hop
+ default_headset = /obj/item/device/radio/headset/heads/hop
+
access = list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
- access_hop, access_RC_announce, access_keycard_auth, access_gateway)
+ access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom)
minimal_access = list(access_security, access_sec_doors, access_court,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
- access_hop, access_RC_announce, access_keycard_auth, access_gateway)
+ access_hop, access_RC_announce, access_keycard_auth, access_gateway, access_mineral_storeroom)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_ears)
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/hopcap(H), slot_head)
- if(H.backbag == 1)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
- return 1
+/datum/job/hop/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/hopcap(H), slot_head)
+
+ //Equip ID box
+ if(H.backbag == 1)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
+ else
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm
index 97ea9dd91d1..c7286a95faa 100644
--- a/code/game/jobs/job/civilian.dm
+++ b/code/game/jobs/job/civilian.dm
@@ -1,339 +1,359 @@
-//Food
+/*
+Bartender
+*/
/datum/job/bartender
title = "Bartender"
flag = BARTENDER
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/bar
+ default_headset = /obj/item/device/radio/headset/headset_srv
+
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_mineral_storeroom)
minimal_access = list(access_bar, access_mineral_storeroom)
+/datum/job/bartender/equip_backpack(var/mob/living/carbon/human/H)
+ switch(H.backbag)
+ if(1) //No backpack or satchel
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
+ var/obj/item/weapon/storage/box/box = new default_storagebox(H)
+ new /obj/item/ammo_casing/shotgun/beanbag(box)
+ new /obj/item/ammo_casing/shotgun/beanbag(box)
+ new /obj/item/ammo_casing/shotgun/beanbag(box)
+ new /obj/item/ammo_casing/shotgun/beanbag(box)
+ H.equip_to_slot_or_del(box, slot_r_hand)
- if(H.backbag == 1)
- var/obj/item/weapon/storage/box/survival/Barpack = new /obj/item/weapon/storage/box/survival(H)
- H.equip_to_slot_or_del(Barpack, slot_r_hand)
- new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
- new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
- new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
- new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
-
- return 1
+ if(2) // Backpack
+ var/obj/item/weapon/storage/backpack/BPK = new default_backpack(H)
+ new default_storagebox(BPK)
+ H.equip_to_slot_or_del(BPK, slot_back,1)
+ if(3) //Satchel
+ var/obj/item/weapon/storage/backpack/BPK = new default_satchel(H)
+ new default_storagebox(BPK)
+ H.equip_to_slot_or_del(BPK, slot_back,1)
+/datum/job/bartender/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
+ if(H.backbag != 1)
+ H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
+/*
+Chef
+*/
/datum/job/chef
title = "Chef"
flag = CHEF
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/chef
+ default_headset = /obj/item/device/radio/headset/headset_srv
+
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
minimal_access = list(access_kitchen, access_morgue)
+/datum/job/chef/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
- H.equip_to_slot_or_del(new /obj/item/device/pda/chef(H), slot_belt)
- return 1
-
-
-
+/*
+Botanist
+*/
/datum/job/hydro
title = "Botanist"
flag = BOTANIST
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 3
spawn_positions = 2
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/botanist
+ default_headset = /obj/item/device/radio/headset/headset_srv
+
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
minimal_access = list(access_hydroponics, access_morgue) // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS // //Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT //Given Morgue access because they have a viable means of cloning.
+/datum/job/hydro/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
- H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt)
- return 1
-
-
-
-//Cargo
+/*
+Quartermaster
+*/
/datum/job/qm
title = "Quartermaster"
flag = QUARTERMASTER
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
- access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
+
+ default_pda = /obj/item/device/pda/quartermaster
+ default_headset = /obj/item/device/radio/headset/headset_cargo
+
+ access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
+/datum/job/qm/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/brown(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
+ H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/quartermaster(H), slot_belt)
-// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
- H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
- H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
- return 1
-
-
-
+/*
+Cargo Technician
+*/
/datum/job/cargo_tech
title = "Cargo Technician"
flag = CARGOTECH
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/cargo
+ default_headset = /obj/item/device/radio/headset/headset_cargo
+
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
+/datum/job/cargo_tech/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
-// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
- return 1
-
-
-
+/*
+Shaft Miner
+*/
/datum/job/mining
title = "Shaft Miner"
flag = MINER
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 3
spawn_positions = 3
supervisors = "the quartermaster and the head of personnel"
selection_color = "#dddddd"
- access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
- minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
+ default_pda = /obj/item/device/pda/shaftminer
+ default_headset = /obj/item/device/radio/headset/headset_cargo
+ default_backpack = /obj/item/weapon/storage/backpack/industrial
+ default_satchel = /obj/item/weapon/storage/backpack/satchel_eng
+ default_storagebox = /obj/item/weapon/storage/box/engineer
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_ears)
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial (H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
-// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
- if(H.backbag == 1)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
- H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/mining_voucher(H), slot_in_backpack)
- return 1
-
+ access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
+ minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting, access_mineral_storeroom)
+/datum/job/mining/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
+ if(H.backbag == 1)
+ H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
+ H.equip_to_slot_or_del(new /obj/item/weapon/mining_voucher(H), slot_r_store)
+ else
+ H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/mining_voucher(H), slot_in_backpack)
+/*
+Clown
+*/
/datum/job/clown
title = "Clown"
flag = CLOWN
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/clown
+ default_backpack = /obj/item/weapon/storage/backpack/clown
+
access = list(access_theatre, access_maint_tunnels)
minimal_access = list(access_theatre)
+/datum/job/clown/equip_backpack(var/mob/living/carbon/human/H)
+ var/obj/item/weapon/storage/backpack/BPK = new default_backpack(H)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.fully_replace_character_name(H.real_name, pick(clown_names))
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/clown(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
- H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H, 50), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/waterflower(H), slot_in_backpack)
- H.mutations.Add(CLUMSY)
- H.rename_self("clown")
- return 1
+ new default_storagebox(BPK)
+ new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(BPK, 50)
+ new /obj/item/weapon/stamp/clown(BPK)
+ new /obj/item/weapon/reagent_containers/spray/waterflower(BPK)
+ H.equip_to_slot_or_del(BPK, slot_back)
+/datum/job/clown/equip_items(var/mob/living/carbon/human/H)
+ H.fully_replace_character_name(H.real_name, pick(clown_names)) // Give him a temporary random name to prevent identity revealing
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
+ H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_l_store)
+ H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_r_store)
+
+ H.mutations.Add(CLUMSY)
+ H.rename_self("clown")
+
+/*
+Mime
+*/
/datum/job/mime
title = "Mime"
flag = MIME
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/mime
+ default_backpack = /obj/item/weapon/storage/backpack/mime
+
access = list(access_theatre, access_maint_tunnels)
minimal_access = list(access_theatre)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
- H.equip_to_slot_or_del(new /obj/item/clothing/under/mime(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/mime(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(H), slot_gloves)
- H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/mime(H), slot_wear_mask)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
- if(H.backbag == 1)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
- H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_l_store)
- H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
- H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
- if(H.mind)
- H.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall(null)
- H.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/mime/speak(null)
- H.mind.miming = 1
- H.rename_self("mime")
- return 1
+/datum/job/mime/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/mime(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/gloves/white(H), slot_gloves)
+ H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/mime(H), slot_wear_mask)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
+ if(H.backbag == 1)
+ H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_l_store)
+ H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
+ else
+ H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
+ H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
+ if(H.mind)
+ H.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall(null)
+ H.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/mime/speak(null)
+ H.mind.miming = 1
+ H.rename_self("mime")
+
+/*
+Janitor
+*/
/datum/job/janitor
title = "Janitor"
flag = JANITOR
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/janitor
+ default_headset = /obj/item/device/radio/headset/headset_srv
+
access = list(access_janitor, access_maint_tunnels)
minimal_access = list(access_janitor, access_maint_tunnels)
+/datum/job/janitor/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
- return 1
-
-
-
-//More or less assistants
+/*
+Librarian
+*/
/datum/job/librarian
title = "Librarian"
flag = LIBRARIAN
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/librarian
+
access = list(access_library, access_maint_tunnels)
minimal_access = list(access_library)
+/datum/job/librarian/equip_items(var/mob/living/carbon/human/H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/red(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/books(H), slot_l_hand)
+ H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_r_store)
+ H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- H.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/red(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/pda/librarian(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/books(H), slot_l_hand)
- H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_r_store)
- H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
- return 1
-
-
-
-var/global/lawyer = 0//Checks for another lawyer
+/*
+Lawyer
+*/
/datum/job/lawyer
title = "Lawyer"
flag = LAWYER
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the head of personnel"
selection_color = "#dddddd"
+ var/global/lawyers = 0 //Counts lawyer amount
+
+ default_pda = /obj/item/device/pda/lawyer
+ default_headset = /obj/item/device/radio/headset/headset_sec
+
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
minimal_access = list(access_lawyer, access_court, access_sec_doors)
+/datum/job/lawyer/equip_items(var/mob/living/carbon/human/H)
+ lawyers += 1
- equip(var/mob/living/carbon/human/H)
- if(!H) return 0
- if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
- if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
- if(!lawyer)
- lawyer = 1
- H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/bluesuit(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/bluejacket(H), slot_wear_suit)
- else
- H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/purpsuit(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/purpjacket(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_ears)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
- H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
- if(H.backbag == 1)
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
- else
- H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ if(lawyers%2 != 0)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/bluesuit(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/bluejacket(H), slot_wear_suit)
+ else
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/lawyer/purpsuit(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/lawyer/purpjacket(H), slot_wear_suit)
- return 1
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
+ H.equip_to_slot_or_del(new /obj/item/device/laser_pointer(H), slot_l_store)
\ No newline at end of file
diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm
index 124309da3c1..b68e514ef6e 100644
--- a/code/game/jobs/job/civilian_chaplain.dm
+++ b/code/game/jobs/job/civilian_chaplain.dm
@@ -1,13 +1,20 @@
//Due to how large this one is it gets its own file
+/*
+Chaplain
+*/
/datum/job/chaplain
title = "Chaplain"
flag = CHAPLAIN
+ department_head = list("Head of Personnel")
department_flag = CIVILIAN
faction = "Station"
total_positions = 1
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
+
+ default_pda = /obj/item/device/pda/chaplain
+
access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
minimal_access = list(access_morgue, access_chapel_office, access_crematorium)
@@ -20,7 +27,7 @@
//Bible itemstates
var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "bible", "bible", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "syringe_kit", "kingyellow", "ithaqua", "scientology", "melted", "necronomicon")
-/datum/job/chaplain/proc/setupbiblespecifics(var/obj/item/weapon/storage/bible/B, var/mob/living/carbon/human/H)
+/datum/job/chaplain/proc/setupbiblespecifics(var/obj/item/weapon/storage/book/bible/B, var/mob/living/carbon/human/H)
switch(B.icon_state)
if("honk1","honk2")
new /obj/item/weapon/grown/bananapeel(B)
@@ -55,7 +62,7 @@
var/iconi = text2num(href_list["seticon"])
var/biblename = biblenames[iconi]
- var/obj/item/weapon/storage/bible/B = locate(href_list["bible"])
+ var/obj/item/weapon/storage/book/bible/B = locate(href_list["bible"])
B.icon_state = biblestates[iconi]
B.item_state = bibleitemstates[iconi]
@@ -73,14 +80,11 @@
usr << browse(null, "window=editicon") // Close window
-/datum/job/chaplain/equip(var/mob/living/carbon/human/H)
- if(!H) return 0
-
+/datum/job/chaplain/equip_items(var/mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
- H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
+ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(H), slot_shoes)
- var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible/booze(H)
+ var/obj/item/weapon/storage/book/bible/B = new /obj/item/weapon/storage/book/bible/booze(H)
spawn(0)
var/religion_name = "Christianity"
var/new_religion = copytext(sanitize(input(H, "You are the Chaplain. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name)),1,MAX_NAME_LEN)
@@ -141,5 +145,4 @@
dat += "