Resolves merge conflicts

This commit is contained in:
Krausus
2015-07-26 06:56:24 -04:00
61 changed files with 2495 additions and 2337 deletions
+1 -1
View File
@@ -2055,7 +2055,7 @@
"aNA" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor{dir = 4; icon_state = "arrival"},/area/hallway/secondary/entry)
"aNB" = (/obj/machinery/camera{c_tag = "Security Checkpoint"; dir = 1},/obj/machinery/alarm{dir = 4; icon_state = "alarm0"; pixel_x = -22},/obj/machinery/atmospherics/unary/vent_pump/on{dir = 4},/turf/simulated/floor{icon_state = "red"; dir = 10},/area/security/checkpoint2)
"aNC" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor{icon_state = "red"},/area/security/checkpoint2)
"aND" = (/obj/structure/table/reinforced,/obj/machinery/computer/skills{icon_state = "medlaptop"},/turf/simulated/floor{icon_state = "red"},/area/security/checkpoint2)
"aND" = (/obj/structure/table/reinforced,/obj/machinery/computer/skills,/turf/simulated/floor{icon_state = "red"},/area/security/checkpoint2)
"aNE" = (/obj/structure/table/reinforced,/obj/item/weapon/paper_bin{pixel_x = 1; pixel_y = 9},/obj/item/weapon/pen,/turf/simulated/floor{icon_state = "red"},/area/security/checkpoint2)
"aNF" = (/obj/machinery/recharger{pixel_y = 4},/obj/structure/table/reinforced,/turf/simulated/floor{icon_state = "red"},/area/security/checkpoint2)
"aNG" = (/obj/item/device/radio/intercom{name = "Station Intercom (General)"; pixel_y = -29},/obj/item/device/radio,/turf/simulated/floor{icon_state = "red"; dir = 6},/area/security/checkpoint2)
File diff suppressed because it is too large Load Diff
-4
View File
@@ -3,12 +3,8 @@
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
#define LIGHTING_TRANSITIONS 0 // smooth, animated transitions, similar to /tg/station
#define LIGHTING_LAYER 10 // drawing layer for lighting overlays
#define LIGHTING_ICON 'icons/effects/lighting_overlay.dmi' // icon used for lighting shading effects
#ifdef LIGHTING_TRANSITIONS
#define LIGHTING_TRANSITION_SPEED (LIGHTING_INTERVAL - 1)
#endif
#define LIGHTING_ROUND_VALUE (1 / 128) //Value used to round lumcounts, values smaller than 1/255 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
+6 -1
View File
@@ -137,4 +137,9 @@
#define STAGE_THREE 5
#define STAGE_FOUR 7
#define STAGE_FIVE 9
#define STAGE_SIX 11 //From supermatter shard
#define STAGE_SIX 11 //From supermatter shard
#define FOR_DVIEW(type, range, center, invis_flags) \
dview_mob.loc = center; \
dview_mob.see_invisible = invis_flags; \
for(type in view(range, dview_mob))
+1 -1
View File
@@ -44,7 +44,7 @@ var/religion_name = null
return capitalize(name)
/proc/system_name()
return "Tau Ceti"
return "Nyx"
/proc/station_name()
if (station_name)
+11 -9
View File
@@ -1685,23 +1685,25 @@ atom/proc/GetTypeInAllContents(typepath)
return locate(dest_x,dest_y,dest_z)
var/mob/dview/dview_mob = new
//Version of view() which ignores darkness, because BYOND doesn't have it.
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
if(!center)
return
var/global/mob/dview/DV
if(!DV)
DV = new
dview_mob.loc = center
DV.loc = center
dview_mob.see_invisible = invis_flags
DV.see_in_dark = range
DV.see_invisible = invis_flags
. = view(range, DV)
DV.loc = null
. = view(range, dview_mob)
dview_mob.loc = null
/mob/dview
invisibility = 101
density = 0
anchored = 1
simulated = 0
see_in_dark = 1e6
+15 -1
View File
@@ -193,12 +193,19 @@
A.point()
return
// See click_override.dm
/mob/living/MiddleClickOn(var/atom/A)
if(src.middleClickOverride)
middleClickOverride.onClick(A, src)
else
..()
/mob/living/carbon/MiddleClickOn(var/atom/A)
if(!src.stat && src.mind && src.mind.changeling && src.mind.changeling.chosen_sting && (istype(A, /mob/living/carbon)) && (A != src))
next_click = world.time + 5
mind.changeling.chosen_sting.try_to_sting(src, A)
else
A.point()
..()
// In case of use break glass
/*
@@ -242,6 +249,13 @@
A.AltClick(src)
return
// See click_override.dm
/mob/living/AltClickOn(var/atom/A)
if(src.middleClickOverride)
middleClickOverride.onClick(A, src)
else
..()
/mob/living/carbon/AltClickOn(var/atom/A)
if(!src.stat && src.mind && src.mind.changeling && src.mind.changeling.chosen_sting && (istype(A, /mob/living/carbon)) && (A != src))
next_click = world.time + 5
+43
View File
@@ -0,0 +1,43 @@
/*
Click Overrides
These are overrides for a living mob's middle and alt clicks.
If the mob in question has their middleClickOverride var set to one of these datums, when they middle or alt click the onClick proc for the datum their clickOverride var is
set equal to will be called.
See click.dm 251 and 196.
If you have any questions, contact me on the Paradise forums.
- DaveTheHeacrab
*/
/datum/middleClickOverride/
/datum/middleClickOverride/proc/onClick(var/atom/A, var/mob/living/user)
user.middleClickOverride = null
return 1
/* Note, when making a new click override it is ABSOLUTELY VITAL that you set the source's clickOverride to null at some point if you don't want them to be stuck with it forever.
Calling the super will do this for you automatically, but if you want a click override to NOT clear itself after the first click, you must do it at some other point in the code*/
/obj/item/weapon/badminBook/
name = "old book"
desc = "An old, leather bound tome."
icon = 'icons/obj/library.dmi'
icon_state = "book"
var/datum/middleClickOverride/clickBehavior = new /datum/middleClickOverride/badminClicker
/obj/item/weapon/badminBook/attack_self(mob/living/user as mob)
if(user.middleClickOverride)
user<< "<span class='warning'>You try to draw power from the [src], but you cannot hold the power at this time!</span>"
return
user.middleClickOverride = clickBehavior
user << "<span class='notice'>You draw a bit of power from the [src], you can use <b>middle click</b> or <b>alt click</b> to release the power!</span>"
/datum/middleClickOverride/badminClicker
var/summon_path = /obj/item/weapon/reagent_containers/food/snacks/cookie
/datum/middleClickOverride/badminClicker/onClick(var/atom/A, var/mob/living/user)
var/atom/movable/newObject = new summon_path
newObject.loc = get_turf(A)
user << "<span class='notice'>You release the power you had stored up, summoning \a [newObject.name]! </span>"
usr.loc.visible_message("<span class='notice'>[user] waves \his hand and summons \a [newObject.name]</span>")
..()
+4 -1
View File
@@ -1,6 +1,7 @@
/datum/ai_laws
var/name = "Unknown Laws"
var/zeroth = null
var/zeroth_type = null // In order to override zeroth laws
var/zeroth_borg = null
var/list/inherent = list()
var/list/supplied = list()
@@ -152,8 +153,9 @@ datum/ai_laws/tyrant //This probably shouldn't be a default lawset.
/* General ai_law functions */
/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null)
/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null, law_type)
src.zeroth = law
src.zeroth_type = law_type
if(law_borg) //Making it possible for slaved borgs to see a different law 0 than their AI. --NEO
src.zeroth_borg = law_borg
@@ -182,6 +184,7 @@ datum/ai_laws/tyrant //This probably shouldn't be a default lawset.
/datum/ai_laws/proc/clear_zeroth_law(var/law_borg = null)
src.zeroth = null
src.zeroth_type = null
if(law_borg)
src.zeroth_borg = null
-12
View File
@@ -170,22 +170,10 @@
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("<span class='warning'>The portal rejects [teleatom]!</span>")
return 0
if(istype(teleatom, /obj/item/flag/nation)) // Don't let nation's flags get teleported either --Fox
teleatom.visible_message("<span class='warning'>The portal rejects [teleatom]!</span>")
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("<span class='warning'>The portal rejects [MM]!","<span class='warning'>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.</span>")
else
teleatom.visible_message("<span class='warning'>The portal rejects [teleatom]!</span>")
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/flag/nation)))
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
+6 -6
View File
@@ -6,7 +6,7 @@
round_time // time of the round at which this should be announced, in seconds
message // body of the message
author = "Nanotrasen Editor"
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
can_be_redacted = 0
message_type = "Story"
@@ -66,7 +66,7 @@
round_time = 60 * 50
found_ssd
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Doctor Eric Hanfield"
message = {"Several people have been found unconscious at their terminals. It is thought that it was due
@@ -78,7 +78,7 @@
lotus_tree
explosions
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Reporter Leland H. Howards"
message = {"The newly-christened civillian transport Lotus Tree suffered two very large explosions near the
@@ -92,7 +92,7 @@
food_riots
breaking_news
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Reporter Ro'kii Ar-Raqis"
message = {"Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae
@@ -103,7 +103,7 @@
round_time = 60 * 10
more
channel_name = "Tau Ceti Daily"
channel_name = "Nyx Daily"
author = "Reporter Ro'kii Ar-Raqis"
message = {"More on the Refuge food riots: The Refuge Council has condemned Nanotrasen's withdrawal from
@@ -143,7 +143,7 @@ proc/announce_newscaster_news(datum/news_announcement/news)
sendto.locked = 1
sendto.is_admin_channel = 1
news_network.network_channels += sendto
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = news.author ? news.author : sendto.author
newMsg.is_admin_message = !news.can_be_redacted
+2 -2
View File
@@ -586,7 +586,7 @@ var/list/uplink_items = list()
name = "Syndicate Encryption Key"
desc = "A key, that when inserted into a radio headset, allows you to listen to all station department channels as well as talk on an encrypted Syndicate channel."
item = /obj/item/device/encryptionkey/syndicate
cost = 5
cost = 2 //Nowhere near as useful as the Binary Key!
surplus = 75
/datum/uplink_item/device_tools/hacked_module
@@ -679,7 +679,7 @@ var/list/uplink_items = list()
name = "Uplink Implant"
desc = "An implant injected into the body, and later activated using a bodily gesture to open an uplink with 5 telecrystals. The ability for an agent to open an uplink after their posessions have been stripped from them makes this implant excellent for escaping confinement."
item = /obj/item/weapon/implanter/uplink
cost = 20
cost = 14
surplus = 0
/datum/uplink_item/implants/explosive
+2 -1
View File
@@ -106,7 +106,7 @@
if(overmind && overmind.blob_reagent_datum)
reagents.add_reagent(overmind.blob_reagent_datum.id, 25)
else
reagents.add_reagent("spore", 25)
reagents.add_reagent("spores", 25)
// Attach the smoke spreader and setup/start it.
S.attach(location)
@@ -173,4 +173,5 @@
return
/mob/living/simple_animal/hostile/blob/blobbernaut/Die()
..()
flick("blobbernaut_death", src)
@@ -20,18 +20,12 @@
spores = null
return ..()
/obj/effect/blob/factory/PulseAnimation(var/activate = 0)
if(activate)
..()
return
/obj/effect/blob/factory/run_action()
if(spores.len >= max_spores)
return 0
if(spore_delay > world.time)
return 0
spore_delay = world.time + 100 // 10 seconds
PulseAnimation(1)
var/mob/living/simple_animal/hostile/blob/blobspore/BS = new/mob/living/simple_animal/hostile/blob/blobspore(src.loc, src)
BS.color = color
BS.overmind = overmind
@@ -11,18 +11,11 @@
if(health <= 0)
qdel(src)
/obj/effect/blob/resource/PulseAnimation(var/activate = 0)
if(activate)
..()
return
/obj/effect/blob/resource/run_action()
if(resource_delay > world.time)
return 0
PulseAnimation(1)
resource_delay = world.time + 40 // 4 seconds
if(overmind)
@@ -11,11 +11,6 @@
overmind.max_blob_points -= 50
qdel(src)
/obj/effect/blob/storage/PulseAnimation(var/activate = 0)
if(activate)
..()
return
/obj/effect/blob/storage/proc/update_max_blob_points(var/new_point_increase)
if(overmind)
overmind.max_blob_points += new_point_increase
-7
View File
@@ -48,11 +48,6 @@
/obj/effect/blob/proc/Life()
return
/obj/effect/blob/proc/PulseAnimation()
if(!istype(src, /obj/effect/blob/core) || !istype(src, /obj/effect/blob/node))
flick("[icon_state]_glow", src)
return
/obj/effect/blob/proc/RegenHealth()
// All blobs heal over time when pulsed, but it has a cool down
if(health_timestamp > world.time)
@@ -67,8 +62,6 @@
set background = BACKGROUND_ENABLED
PulseAnimation()
RegenHealth()
if(run_action())//If we can do something here then we dont need to pulse more
@@ -105,3 +105,58 @@
protected_dna |= new_dna
return
absorbed_dna |= new_dna
/obj/effect/proc_holder/changeling/swap_form
name = "Swap Forms"
desc = "We force ourselves into the body of another form, pushing their consciousness into the form we left behind."
helptext = "We will bring all our abilities with us, but we will lose our old form DNA in exchange for the new one. The process will seem suspicious to any observers."
chemical_cost = 40
dna_cost = 1
req_human = 1 //Monkeys can't grab
/obj/effect/proc_holder/changeling/swap_form/can_sting(var/mob/living/carbon/user)
if(!..())
return
var/obj/item/weapon/grab/G = user.get_active_hand()
if(!istype(G) || (G.state < GRAB_AGGRESSIVE))
user << "<span class='warning'>We must have an aggressive grab on creature in our active hand to do this!</span>"
return
var/mob/living/carbon/human/target = G.affecting
if((NOCLONE || SKELETON || HUSK) in target.mutations)
user << "<span class='warning'>DNA of [target] is ruined beyond usability!</span>"
return
if(!istype(target) || issmall(target) || target.species.flags & IS_SYNTHETIC || target.species.flags & NO_SCAN || target.species.flags & NO_BLOOD)
user << "<span class='warning'>[target] is not compatible with this ability.</span>"
return
return 1
/obj/effect/proc_holder/changeling/swap_form/sting_action(var/mob/living/carbon/user)
var/obj/item/weapon/grab/G = user.get_active_hand()
var/mob/living/carbon/human/target = G.affecting
var/datum/changeling/changeling = user.mind.changeling
user << "<span class='notice'>We tighen our grip. We must hold still....</span>"
target.do_jitter_animation(500)
user.do_jitter_animation(500)
if(!do_mob(user,target,20))
user << "<span class='warning'>The body swap has been interrupted!</span>"
return
target << "<span class='userdanger'>[user] tightens their grip as a painful sensation invades your body.</span>"
if(!changeling.has_dna(target.dna))
changeling.absorb_dna(target, user)
changeling.protected_dna -= user.dna
changeling.absorbed_dna -= user.dna
var/mob/dead/observer/ghost = target.ghostize(0)
user.mind.transfer_to(target)
if(ghost && ghost.mind)
ghost.mind.transfer_to(user)
user.key = ghost.key
user.Paralyse(2)
target << "<span class='warning'>Our genes cry out as we swap our [user] form for [target].</span>"
+1
View File
@@ -465,6 +465,7 @@ var/global/datum/controller/gameticker/ticker
/datum/controller/gameticker/proc/declare_completion()
nologevent = 1 //end of round murder and shenanigans are legal; there's no need to jam up attack logs past this point.
//Round statistics report
var/datum/station_state/end_state = new /datum/station_state()
end_state.count()
+29 -4
View File
@@ -449,9 +449,34 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
return
return
//==========DAT FUKKEN DISK===============
/obj/item/weapon/disk/nuclear
name = "nuclear authentication disk"
desc = "Better keep this safe."
icon = 'icons/obj/items.dmi'
icon_state = "nucleardisk"
item_state = "card-id"
w_class = 1.0
/obj/item/weapon/disk/nuclear/New()
..()
processing_objects.Add(src)
/obj/item/weapon/disk/nuclear/process()
var/turf/disk_loc = get_turf(src)
if(disk_loc.z > ZLEVEL_CENTCOMM)
get(src, /mob) << "<span class='danger'>You can't help but feel that you just lost something back there...</span>"
qdel(src)
/obj/item/weapon/disk/nuclear/Destroy()
if(blobstart.len > 0)
var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart))
message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
log_game("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
return ..()
var/obj/item/weapon/disk/nuclear/NEWDISK = new(pick(blobstart))
transfer_fingerprints_to(NEWDISK)
var/turf/diskturf = get_turf(src)
message_admins("[src] has been destroyed in ([diskturf.x], [diskturf.y] ,[diskturf.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[diskturf.x];Y=[diskturf.y];Z=[diskturf.z]'>JMP</a>). Moving it to ([NEWDISK.x], [NEWDISK.y], [NEWDISK.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[NEWDISK.x];Y=[NEWDISK.y];Z=[NEWDISK.z]'>JMP</a>).")
log_game("[src] has been destroyed in ([diskturf.x], [diskturf.y] ,[diskturf.z]). Moving it to ([NEWDISK.x], [NEWDISK.y], [NEWDISK.z]).")
return QDEL_HINT_HARDDEL_NOW
else
error("[src] was supposed to be destroyed, but we were unable to locate a blobstart landmark to spawn a new one.")
return QDEL_HINT_LETMELIVE // Cancel destruction.
+2 -1
View File
@@ -73,7 +73,8 @@
var/overlay_layer = LIGHTING_LAYER+0.1
if(stat & NOPOWER)
overlays += image(icon,"[icon_keyboard]_off",overlay_layer)
if(icon_keyboard)
overlays += image(icon,"[icon_keyboard]_off",overlay_layer)
return
overlays += image(icon, icon_keyboard ,overlay_layer)
if(stat & BROKEN)
+1 -1
View File
@@ -92,7 +92,7 @@ var/const/SAFETY_COOLDOWN = 100
/obj/machinery/recycler/proc/recycle(var/obj/item/I, var/sound = 1)
I.loc = src.loc
if(!istype(I, /obj/item/weapon/disk/nuclear) && !istype(I,/obj/item/flag/nation))
if(!istype(I,/obj/item/flag/nation))
qdel(I)
if(prob(15))
new /obj/item/stack/sheet/metal(loc)
+2 -2
View File
@@ -19,7 +19,7 @@
/obj/machinery/syndicatebomb/process()
if(active && !defused && (timer > 0)) //Tick Tock
var/volume = (timer <= 10 ? 30 : 5) // Tick louder when the bomb is closer to being detonated.
var/volume = (timer <= 10 ? 40 : 10) // Tick louder when the bomb is closer to being detonated.
playsound(loc, beepsound, volume, 0)
timer--
if(active && !defused && (timer <= 0)) //Boom
@@ -187,7 +187,7 @@
if(adminlog)
message_admins(adminlog)
log_game(adminlog)
explosion(get_turf(src),2,5,11, flame_range = 11)
explosion(get_turf(src),3,9,17, flame_range = 17)
if(src.loc && istype(src.loc,/obj/machinery/syndicatebomb/))
qdel(src.loc)
qdel(src)
+1
View File
@@ -21,6 +21,7 @@
/obj/machinery/computer/teleporter/initialize()
link_power_station()
update_icon()
/obj/machinery/computer/teleporter/Destroy()
if (power_station)
+10 -9
View File
@@ -106,18 +106,18 @@ AI MODULES
/obj/item/weapon/aiModule/zeroth/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
if(target.laws.zeroth)
if(removeownlaw && (laws[1] == target.laws.zeroth))
if(removeownlaw && (src.type == target.laws.zeroth_type))
target.clear_zeroth_law()
return 2
return 1
else
target << "[sender.real_name] attempted to modify your zeroth law."
target << "It would be in your best interest to play along with [sender.real_name] that:"
for(var/failedlaw in laws)
target << "[failedlaw]"
return 1
return 2
for(var/templaw in laws)
target.set_zeroth_law(templaw)
target.set_zeroth_law(templaw, null, src.type)
/obj/item/weapon/aiModule/ion/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
for(var/templaw in laws)
@@ -175,10 +175,11 @@ AI MODULES
..()
/obj/item/weapon/aiModule/zeroth/oneHuman/transmitInstructions(var/mob/living/silicon/target, var/mob/sender)
if(..() == 1)
return "[targetName], but the AI's existing zeroth law cannot be overriden."
if(..() == 2)
var/result = ..()
if(result == 1)
return "The AI's zeroth law has been overridden."
if(result == 2)
return "[targetName], but the AI's existing zeroth law cannot be overriden."
return targetName
@@ -204,9 +205,9 @@ AI MODULES
/obj/item/weapon/aiModule/zeroth/quarantine/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
var/result = ..()
if(result == 1)
return "The AI's existing zeroth law cannot be overriden."
if(result == 2)
return "The AI's zeroth law has been overridden."
if(result == 2)
return "The AI's existing zeroth law cannot be overriden."
return laws[1]
/******************** OxygenIsToxicToHumans ********************/
-12
View File
@@ -1,15 +1,3 @@
/obj/item/weapon/disk
name = "disk"
icon = 'icons/obj/items.dmi'
/obj/item/weapon/disk/nuclear
name = "nuclear authentication disk"
desc = "Better keep this safe."
icon_state = "nucleardisk"
item_state = "card-id"
w_class = 1.0
/*
/obj/item/weapon/disk/nuclear/pickup(mob/living/user as mob)
if(issyndicate(user))
set_security_level(3)*/ //Nuke Ops rework makes stealth approach significantly harder; this makes it damn near impossible; besides, it's horrendously meta.
@@ -155,6 +155,7 @@
name = "combat knife"
force = 15.0
throwforce = 10.0
w_class = 2
origin_tech = "materials=2;combat=2"
desc = "A razor sharp knife, built from advanced alloys, designed for quick, melee killing. Also not half bad as a kitchen knife."
slot_flags = SLOT_BELT
@@ -101,6 +101,18 @@
"/obj/item/device/sensor_device"
)
/obj/item/weapon/storage/belt/medical/response_team
/obj/item/weapon/storage/belt/medical/response_team/New()
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
new /obj/item/weapon/reagent_containers/pill/salbutamol(src)
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
new /obj/item/weapon/reagent_containers/pill/charcoal(src)
new /obj/item/weapon/reagent_containers/pill/salicylic(src)
new /obj/item/weapon/reagent_containers/pill/salicylic(src)
new /obj/item/weapon/reagent_containers/pill/salicylic(src)
/obj/item/weapon/storage/belt/botany
name = "botanist belt"
desc = "Can hold various botanical supplies."
@@ -150,6 +150,28 @@
new /obj/item/clothing/glasses/hud/health/night(src)
return
/obj/item/weapon/storage/firstaid/surgery
name = "field surgery kit"
icon_state = "duffel-med"
desc = "A kit for surgery in the field."
max_w_class = 4
storage_slots = 10
can_hold = list("/obj/item/roller","/obj/item/weapon/bonesetter","/obj/item/weapon/bonegel", "/obj/item/weapon/scalpel", "/obj/item/weapon/hemostat",
"/obj/item/weapon/cautery", "/obj/item/weapon/retractor", "/obj/item/weapon/FixOVein", "/obj/item/weapon/surgicaldrill", "/obj/item/weapon/circular_saw")
/obj/item/weapon/storage/firstaid/surgery/New()
..()
new /obj/item/roller(src)
new /obj/item/weapon/bonesetter(src)
new /obj/item/weapon/bonegel(src)
new /obj/item/weapon/scalpel(src)
new /obj/item/weapon/hemostat(src)
new /obj/item/weapon/cautery(src)
new /obj/item/weapon/retractor(src)
new /obj/item/weapon/FixOVein(src)
new /obj/item/weapon/surgicaldrill(src)
new /obj/item/weapon/circular_saw(src)
/*
* Pill Bottles
*/
-3
View File
@@ -318,9 +318,6 @@
return
else
if(!isemptylist(search_contents_for(/obj/item/weapon/disk/nuclear)))
usr << "You get the feeling that you shouldn't cremate one of the items in the cremator."
return
if(!isemptylist(search_contents_for(/obj/item/flag/nation)))
usr << "You get the feeling that you shouldn't cremate one of the items in the cremator."
return
+387 -431
View File
@@ -1,19 +1,19 @@
//STRIKE TEAMS
//Thanks to Kilakk for the admin-button portion of this code.
#define ERT_TYPE_AMBER 1
#define ERT_TYPE_RED 2
#define ERT_TYPE_GAMMA 3
var/list/response_team_members = list()
var/list/response_team_types = list("Security","Medical","Engineering","Janitorial")
var/list/response_team_chosen_types = list()
var/responseteam_age = 21 // Minimum account age to play as an ERT member
var/global/send_emergency_team = 0 // Used for automagic response teams
// 'admin_emergency_team' for admin-spawned response teams
var/ert_base_chance = 10 // Default base chance. Will be incremented by increment ERT chance.
var/can_call_ert
var/datum/response_team/active_team = null
var/send_emergency_team
/client/proc/response_team()
set name = "Dispatch Emergency Response Team"
set name = "Dispatch CentComm Response Team"
set category = "Event"
set desc = "Send an emergency response team to the station."
set desc = "Send an CentComm response team to the station."
if(!check_rights(R_EVENT))
return
@@ -43,22 +43,33 @@ var/can_call_ert
usr << "\red Central Command has already dispatched an emergency response team!"
return
if(pick_ert_type())
var/ert_type = pick_ert_type()
if(!ert_type)
return
message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
log_admin("[key_name(usr)] used Dispatch Response Team.")
trigger_armed_response_team(1)
message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team", 1)
log_admin("[key_name(usr)] used Dispatch Emergency Response Team..")
trigger_armed_response_team(ert_type)
/client/proc/pick_ert_type()
var/erttype = input("Which type of Emergency Response Team would you like to dispatch?","Emergency Response Team Type", "") as null|anything in response_team_types
if(!erttype)
return 1
response_team_chosen_types |= erttype
if(alert(usr, "Would you like to add another Emergency Response Team type?", "Emergency Response Team Type", "Yes", "No") == "Yes")
pick_ert_type()
else
return 0
switch(alert("Please select the ERT type you wish to deploy.", "Emergency Response Team", "Code Amber", "Code Red", "Code Gamma", "Cancel"))
if("Code Amber")
if(alert("Confirm: Deploy code 'AMBER' light ERT?", "Emergency Response Team", "Confirm", "Cancel") == "Confirm")
return new /datum/response_team/amber
else
return pick_ert_type()
if("Code Red")
if(alert("Confirm: Deploy code 'RED' <b>medium ERT</b>?", "Emergency Response Team", "Confirm", "Cancel") == "Confirm")
return new /datum/response_team/red
else
return pick_ert_type()
if("Code Gamma")
if(alert("Confirm: Deploy code 'GAMMA' <b>elite ERT</b>?", "Emergency Response Team", "Confirm", "Cancel") == "Confirm")
return new /datum/response_team/gamma
else
return pick_ert_type()
return 0
/mob/dead/observer/verb/JoinResponseTeam()
set category = "Ghost"
@@ -98,95 +109,23 @@ var/can_call_ert
L.name = "Response Team"
return
var/leader_selected = isemptylist(response_team_members)
if(!src.client)
return
var/client/C = src.client
var/mob/living/carbon/human/new_commando = C.create_response_team(L.loc, leader_selected)
var/mob/living/carbon/human/new_commando = C.create_response_team(L.loc)
del(L) // Do not qdel landmarks!
new_commando.mind.key = usr.key
new_commando.key = usr.key
new_commando.update_icons()
new_commando << "\blue You are [!leader_selected?"a member":"the <B>LEADER</B>"] of an Emergency Response Team, a type of military division, under Central Command's service. There is an emergency on [station_name()], and you are tasked to go and fix the problem."
new_commando << "<b>You should first gear up and discuss a plan with your team. More members may be joining, so don't move out before you're ready."
if(!leader_selected)
new_commando << "<b>As member of the Emergency Response Team, you answer only to your leader and Central Command officials.</b>"
else
new_commando << "<b>As leader of the Emergency Response Team, you answer only to Central Command, and have authority to override the Captain where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the captain where possible, however."
return
// returns a number of dead players in %
/proc/percentage_dead()
var/total = 0
var/deadcount = 0
for(var/mob/living/carbon/human/H in mob_list)
if(H.client) // Monkeys and mice don't have a client, amirite?
if(H.stat == 2)
deadcount++
total++
/proc/trigger_armed_response_team(var/datum/response_team/response_team_type)
if(total == 0)
return 0
else
return round(100 * deadcount / total)
active_team = response_team_type
active_team.announce_team()
// counts the number of antagonists in %
/proc/percentage_antagonists()
var/total = 0
var/antagonists = 0
for(var/mob/living/carbon/human/H in mob_list)
if(is_special_character(H) >= 1)
antagonists++
total++
if(total == 0)
return 0
else
return round(100 * antagonists / total)
// Increments the ERT chance automatically, so that the later it is in the round,
// the more likely an ERT is to be able to be called.
/proc/increment_ert_chance()
while(send_emergency_team == 0) // There is no ERT at the time.
if(get_security_level() == "green")
ert_base_chance += 1
if(get_security_level() == "blue")
ert_base_chance += 2
if(get_security_level() == "red")
ert_base_chance += 3
if(get_security_level() == "gamma")
ert_base_chance += 7
if(get_security_level() == "epsilon")
ert_base_chance += 9
if(get_security_level() == "delta")
ert_base_chance += 10 // Need those big guns
sleep(600 * 3) // Minute * Number of Minutes
/proc/trigger_armed_response_team(var/force = 0)
if(!can_call_ert && !force)
return
if(send_emergency_team)
return
var/send_team_chance = ert_base_chance // Is incremented by increment_ert_chance.
send_team_chance += 2*percentage_dead() // the more people are dead, the higher the chance
send_team_chance += percentage_antagonists() // the more antagonists, the higher the chance
send_team_chance = min(send_team_chance, 100)
if(force)
send_team_chance = 100
// there's only a certain chance a team will be sent
if(!prob(send_team_chance))
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. Unfortunately, we were unable to send one at this time.", "Central Command")
can_call_ert = 0 // Only one call per round, ladies.
return
command_announcement.Announce("It would appear that an emergency response team was requested for [station_name()]. We will prepare and send one as soon as possible.", "Central Command")
can_call_ert = 0 // Only one call per round, gentlemen.
send_emergency_team = 1
sleep(600 * 5)
send_emergency_team = 0 // Can no longer join the ERT.
@@ -205,93 +144,10 @@ var/can_call_ert
continue
*/
/client/proc/create_response_team(obj/spawn_location, leader_selected = 0)
/client/proc/create_response_team(obj/spawn_location)
var/mob/living/carbon/human/M = new(null)
response_team_members |= M
/*
var/new_facial = input("Please select facial hair color.", "Character Generation") as color
if(new_facial)
M.r_facial = hex2num(copytext(new_facial, 2, 4))
M.g_facial = hex2num(copytext(new_facial, 4, 6))
M.b_facial = hex2num(copytext(new_facial, 6, 8))
var/new_hair = input("Please select hair color.", "Character Generation") as color
if(new_facial)
M.r_hair = hex2num(copytext(new_hair, 2, 4))
M.g_hair = hex2num(copytext(new_hair, 4, 6))
M.b_hair = hex2num(copytext(new_hair, 6, 8))
var/new_eyes = input("Please select eye color.", "Character Generation") as color
if(new_eyes)
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
var/new_tone = input("Please select skin tone level: 1-220 (1 = albino, 35 = caucasian, 150 = black, 220 = 'very' black)", "Character Generation") as text
if (!new_tone)
new_tone = 35
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
M.s_tone = -M.s_tone + 35
// hair
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
var/list/hairs = list()
// loop through potential hairs
for(var/x in all_hairs)
var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x
hairs.Add(H.name) // add hair name to hairs
del(H) // delete the hair after it's all done
// var/new_style = input("Please select hair style.", "Character Generation") as null|anything in hairs
//hair
var/new_hstyle = input(usr, "Select a hair style.", "Grooming") as null|anything in hair_styles_list
if(new_hstyle)
M.h_style = new_hstyle
// facial hair
var/new_fstyle = input(usr, "Select a facial hair style.", "Grooming") as null|anything in facial_hair_styles_list
if(new_fstyle)
M.f_style = new_fstyle
// if new style selected (not cancel)
if (new_style)
M.h_style = new_style
for(var/x in all_hairs) // loop through all_hairs again. Might be slightly CPU expensive, but not significantly.
var/datum/sprite_accessory/hair/H = new x // create new hair datum
if(H.name == new_style)
M.h_style = H // assign the hair_style variable a new hair datum
break
else
del(H) // if hair H not used, delete. BYOND can garbage collect, but better safe than sorry
// facial hair
var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
var/list/fhairs = list()
for(var/x in all_fhairs)
var/datum/sprite_accessory/facial_hair/H = new x
fhairs.Add(H.name)
del(H)
new_style = input("Please select facial hair style.", "Character Generation") as null|anything in fhairs
if(new_style)
M.f_style = new_style
for(var/x in all_fhairs)
var/datum/sprite_accessory/facial_hair/H = new x
if(H.name == new_style)
M.f_style = H
break
else
del(H)
//M.rebuild_appearance()
*/
var/new_gender = alert(usr, "Please select your gender.", "Character Generation", "Male", "Female")
if (new_gender)
if(new_gender == "Male")
@@ -328,9 +184,9 @@ var/can_call_ert
M.h_style = hair_style
M.f_style = facial_hair_style
M.real_name = "[!leader_selected ? pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major") : pick("Lieutenant", "Captain", "Major")] [pick(last_names)]"
M.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]"
M.name = M.real_name
M.age = !leader_selected ? rand(23,35) : rand(35,45)
M.age = rand(23,45)
//Creates mind stuff.
M.mind = new
@@ -342,207 +198,68 @@ var/can_call_ert
ticker.minds += M.mind //Adds them to regular mind list.
M.loc = spawn_location
var/class = input("Which class would you like to choose?") in response_team_chosen_types
if(leader_selected)
equip_emergencyresponsesquad(M, "Commander", class)
else
equip_emergencyresponsesquad(M, class)
var/class = 0
while (!class)
class = input("Which loadout would you like to choose?") in active_team.get_slot_list()
if(!active_team.check_slot_available(class)) // Because the prompt does not update automatically when a slot gets filled.
class = 0
active_team.equip_officer(class, M)
return M
/proc/equip_emergencyresponsesquad(var/mob/living/carbon/human/M, var/role, var/role2)
/datum/response_team
var/command_slots = 1
var/engineer_slots = 3
var/medical_slots = 3
var/security_slots = 3
/datum/response_team/proc/get_slot_list()
var/list/slots_available = list()
if(command_slots)
slots_available |= "Commander"
if(security_slots)
slots_available |= "Security"
if(engineer_slots)
slots_available |= "Engineer"
if(medical_slots)
slots_available |= "Medic"
return slots_available
/datum/response_team/proc/check_slot_available(var/slot)
switch(slot)
if("Commander")
return command_slots
if("Security")
return security_slots
if("Engineer")
return engineer_slots
if("Medic")
return medical_slots
return 0
/datum/response_team/proc/equip_officer(var/officer_type, var/mob/living/carbon/human/M)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(src), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
L.imp_in = M
L.implanted = 1
switch(role)
if("Commander")
if(role2 == "Janitorial")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/galoshes(M), slot_shoes)
else
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(M), slot_shoes)
switch(officer_type)
if("Engineer")
engineer_slots -= 1
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/responseteam(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/commander(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/commander(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/commander(M), slot_back)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Leader"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Commander)"
W.icon_state = "centcom"
W.access = get_centcom_access(W.assignment)
M.equip_to_slot_or_del(W, slot_wear_id)
var/obj/item/device/pda/heads/pda = new(src)
pda.owner = M.real_name
pda.ownjob = "Emergency Response Team Leader"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer/advpinpointer(M), slot_in_backpack)
switch(role2)
if("Security")
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/response_team(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/night(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/shield/riot/tele(M), slot_in_backpack)
if("Medical")
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex/nitrile(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/combat/loaded(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/fire(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/o2(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/toxin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_r_hand)
if("Engineering")
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal(M, amount=50), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass(M, amount=50), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel(M, amount=50), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/inflatable(M), slot_r_hand)
if("Janitorial")
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/purple(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/janitor, slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/janitor/full, slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/lights/mixed(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/scythe/tele(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/glass/bucket(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/mop/advanced(M), slot_r_hand)
new /obj/structure/mopbucket/full(get_turf(M))
if("Security")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/security(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/security(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/security(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Officer)"
W.icon_state = "centcom"
W.access = get_centcom_access(W.assignment)
M.equip_to_slot_or_del(W, slot_wear_id)
var/obj/item/device/pda/heads/pda = new(src)
pda.owner = M.real_name
pda.ownjob = "Emergency Response Team Member"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-security"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs, slot_l_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/night(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/shield/riot/tele(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/response_team(M), slot_belt)
if("Medical")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex/nitrile(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/medical(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/medical(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/medical(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/night(M), slot_glasses)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Medic)"
W.icon_state = "centcom"
W.access = get_centcom_access(W.assignment)
M.equip_to_slot_or_del(W, slot_wear_id)
var/obj/item/device/pda/heads/pda = new(src)
pda.owner = M.real_name
pda.ownjob = "Emergency Response Team Member"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-medical"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/fire(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/o2(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/toxin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/combat/loaded(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_r_hand)
if("Engineering")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/engineer(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/engineer(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/engineer(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/night(M), slot_glasses)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Engineer)"
W.name = "[M.real_name]'s ID Card (Emergency Response Team Engineer)"
W.icon_state = "centcom"
W.access = get_centcom_access(W.assignment)
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -554,36 +271,19 @@ var/can_call_ert
pda.icon_state = "pda-engineer"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal(M, amount=50), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass(M, amount=50), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel(M, amount=50), slot_in_backpack)
if("Security")
security_slots -= 1
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/responseteam(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
if("Janitorial")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/galoshes(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/purple(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/janitor(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/janitor(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/janitor(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/janitor(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/response_team(M), slot_belt)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Janitor)"
W.name = "[M.real_name]'s ID Card (Emergency Response Team Officer)"
W.icon_state = "centcom"
W.access = get_centcom_access(W.assignment)
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -592,55 +292,311 @@ var/can_call_ert
pda.owner = M.real_name
pda.ownjob = "Emergency Response Team Member"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-janitor"
pda.icon_state = "pda-security"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/lights/mixed(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/scythe/tele(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/glass/bucket(src), slot_in_backpack)
if("Medic")
medical_slots -= 1
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/responseteam(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/janitor/full, slot_belt)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team Medic)"
W.icon_state = "centcom"
W.access = get_centcom_access(W.assignment)
M.equip_to_slot_or_del(W, slot_wear_id)
M.equip_to_slot_or_del(new /obj/item/weapon/mop/advanced(M), slot_r_hand)
var/obj/item/device/pda/heads/pda = new(src)
pda.owner = M.real_name
pda.ownjob = "Emergency Response Team Member"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-medical"
M.equip_to_slot_or_del(pda, slot_wear_pda)
new /obj/structure/mopbucket/full(get_turf(M))
/*/mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0) Old ERT equip verb.
if("Commander")
command_slots = 0
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/responseteam(M), slot_in_backpack)
//Special radio setup
equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(src), slot_l_ear)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Leader"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team Leader)"
W.icon_state = "centcom"
W.access = get_centcom_access(W.assignment)
M.equip_to_slot_or_del(W, slot_wear_id)
//Replaced with new ERT uniform
equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(src), slot_back)
var/obj/item/device/pda/heads/pda = new(src)
pda.owner = M.real_name
pda.ownjob = "Emergency Response Team Leader"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_wear_pda)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team[leader_selected ? " Leader" : ""]"
W.registered_name = real_name
W.name = "[real_name]'s ID Card ([W.assignment])"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access += list(access_cent_general, access_cent_living, access_cent_storage)
var/obj/item/device/pda/heads/pda = new(src)
pda.owner = real_name
pda.ownjob = "Emergency Response Team[leader_selected ? " Leader" : ""]"
pda.name = "PDA-[real_name] ([pda.ownjob])"
equip_to_slot_or_del(pda, slot_wear_pda)
/datum/response_team/proc/announce_team()
command_announcement.Announce("Attention, [station_name()]. We are attempting to assemble a team of highly trained assistants to aid(?) you. Standby.", "Central Command")
if (leader_selected)
W.access += access_cent_teleporter
equip_to_slot_or_del(W, slot_wear_id)
// -- AMBER TEAM --
// Loyalty implant
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)
L.imp_in = src
L.implanted = 1
/datum/response_team/amber
return 1*/
/datum/response_team/amber/announce_team()
command_announcement.Announce("Attention, [station_name()]. We are attempting to assemble a code AMBER light Emergency Response Team. Standby.", "Central Command")
/datum/response_team/amber/equip_officer(var/officer_type, var/mob/living/carbon/human/M)
..()
switch(officer_type)
if("Engineer")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/engineer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/engi(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass(M, amount=50), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal(M, amount=50), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
if("Security")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/ert/security(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/advtaser(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/ert/security(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/zipties(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/laser(M), slot_r_hand)
if("Medic")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/ert/medical(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/response_team(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/ert/medical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/o2(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/brute(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
if("Commander")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/ert/command(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/ert/command(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/lockbox/loyalty(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
// -- RED TEAM --
/datum/response_team/red
/datum/response_team/red/announce_team()
command_announcement.Announce("Attention, [station_name()]. We are attempting to assemble a code RED Emergency Response Team. Standby.", "Central Command")
/datum/response_team/red/equip_officer(var/officer_type, var/mob/living/carbon/human/M)
..()
switch(officer_type)
if("Engineer")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/engineer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/engi(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_in_backpack)
var/obj/item/weapon/rcd/R = new /obj/item/weapon/rcd(src)
R.matter = 100
M.equip_to_slot_or_del(R, slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/t_scanner/extended_range(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
if("Security")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/security(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/advtaser(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/security(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/handcuffs(M), slot_in_backpack)
if(prob(50))
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/teargas(M), slot_in_backpack)
else
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/ionrifle/carbine(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/lasercannon(M), slot_r_hand)
if("Medic")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex/nitrile(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/medical(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health_advanced(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/loaded(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/medical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/o2(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/toxin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/surgery(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
if("Commander")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/commander(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/commander(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/lockbox/loyalty(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
// -- GAMMA TEAM --
/datum/response_team/gamma
/datum/response_team/gamma/announce_team()
command_announcement.Announce("Attention, [station_name()]. We are attempting to assemble a code GAMMA elite Emergency Response Team. Standby.", "Central Command")
/datum/response_team/gamma/equip_officer(var/officer_type, var/mob/living/carbon/human/M)
..()
switch(officer_type)
if("Engineer")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/engineer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat, slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/pistol(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/t_scanner/extended_range(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
if("Security")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/security(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/security(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/handcuffs(M), slot_in_backpack)
if(prob(50))
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/teargas(M), slot_in_backpack)
else
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/ionrifle/carbine(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/carbine(M), slot_r_hand)
if("Medic")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/medical(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/loaded(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/medical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/surgery(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/pistol(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
if("Commander")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/commander(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/commander(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/lockbox/loyalty(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/pistol(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
/obj/item/device/radio/centcom
name = "centcomm bounced radio"
freerange = 1
frequency = ERT_FREQ
icon_state = "radio"
/obj/item/weapon/storage/box/responseteam/
name = "boxed survival kit"
/obj/item/weapon/storage/box/responseteam/New()
..()
contents = list()
sleep(1)
new /obj/item/clothing/mask/breath( src )
new /obj/item/weapon/tank/emergency_oxygen/engi( src )
new /obj/item/device/flashlight/flare( src )
new /obj/item/weapon/kitchenknife/combat( src )
new /obj/item/device/radio/centcom( src )
new /obj/item/weapon/reagent_containers/pill/salicylic( src )
new /obj/item/weapon/reagent_containers/pill/patch/synthflesh( src )
return
-20
View File
@@ -106,31 +106,11 @@
if(destination_y)
A.y = destination_y
var/mob/living/MM = null
var/fukkendisk = A.GetTypeInAllContents(/obj/item/weapon/disk/nuclear)
var/obj/item/flag/nation/fukkenflag = A.GetTypeInAllContents(/obj/item/flag/nation)
if(fukkenflag)
fukkenflag.loc = fukkenflag.startloc
if(isliving(A))
A << "<span class='warning'>The flag you were carrying was just returned to it's base. Nice try.</span>"
if(fukkendisk)
if(isliving(A))
MM = A
if(MM.client && !MM.stat)
MM << "<span class='warning'>Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is.</span>"
if(MM.x <= TRANSITIONEDGE)
MM.inertia_dir = 4
else if(MM.x >= world.maxx -TRANSITIONEDGE)
MM.inertia_dir = 8
else if(MM.y <= TRANSITIONEDGE)
MM.inertia_dir = 1
else if(MM.y >= world.maxy -TRANSITIONEDGE)
MM.inertia_dir = 2
else
qdel(fukkendisk)//Make the disk respawn if it is on a clientless mob or corpse
else
qdel(fukkendisk)//Make the disk respawn if it is floating on its own
return
A.z = text2num(transition)
+26
View File
@@ -1646,6 +1646,32 @@
log_admin("[src.owner] replied to [key_name(H)]'s HONKplanet message with the message [input].")
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your HONKbrothers. Message as follows, HONK. [input]. Message ends, HONK.\""
else if(href_list["ErtReply"])
if(!check_rights(R_ADMIN))
return
if(alert(src.owner, "Accept or Deny ERT request?", "CentComm Response", "Accept", "Deny") == "Deny")
var/mob/living/carbon/human/H = locate(href_list["ErtReply"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
if(H.stat != 0)
usr << "The person you are trying to contact is not conscious."
return
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
return
var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "")
if(!input) return
src.owner << "You sent [input] to [H] via a secure channel."
log_admin("[src.owner] denied [key_name(H)]'s ERT request with the message [input].")
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Your ERT request has been denied for the following reasons: [input]. Message ends.\""
else
src.owner.response_team()
else if(href_list["AdminFaxView"])
if(!check_rights(R_ADMIN))
return
+8
View File
@@ -44,6 +44,14 @@
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "\blue <b><font color=pink>HONK:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;HONKReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
for(var/client/X in admins)
if(R_EVENT & X.holder.rights)
X << msg
/proc/ERT_Announce(var/text , var/mob/Sender)
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "\blue <b><font color=orange>ERT REQUEST:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
for(var/client/X in admins)
if(R_EVENT & X.holder.rights)
X << msg
+1
View File
@@ -148,6 +148,7 @@ obj/item/clothing/head/blob
/obj/item/clothing/head/helmet/ert/command
name = "emergency response team commander helmet"
desc = "An in-atmosphere helmet worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights."
icon_state = "erthelmet_cmd"
//Security
/obj/item/clothing/head/helmet/ert/security
+4 -4
View File
@@ -67,16 +67,16 @@ var/setup_economy = 0
/proc/setup_economy()
if(setup_economy)
return
var/datum/feed_channel/newChannel = new /datum/feed_channel
newChannel.channel_name = "Public Station Announcements"
newChannel.author = "Automated Announcement Listing"
newChannel.locked = 1
newChannel.is_admin_channel = 1
news_network.network_channels += newChannel
news_network.network_channels += newChannel
newChannel = new /datum/feed_channel
newChannel.channel_name = "Tau Ceti Daily"
newChannel.channel_name = "Nyx Daily"
newChannel.author = "CentComm Minister of Information"
newChannel.locked = 1
newChannel.is_admin_channel = 1
+3 -3
View File
@@ -57,7 +57,7 @@
/datum/event/economic_event/announce()
//copy-pasted from the admin verbs to submit new newscaster messages
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "Tau Ceti Daily"
newMsg.author = "Nyx Daily"
newMsg.is_admin_message = 1
//see if our location has custom event info for this event
@@ -95,11 +95,11 @@
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "Tau Ceti Daily")
if(FC.channel_name == "Nyx Daily")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("Tau Ceti Daily")
NEWSCASTER.newsAlert("Nyx Daily")
/datum/event/economic_event/end()
for(var/good_type in dearer_goods)
+11 -15
View File
@@ -13,15 +13,14 @@
//copy-pasted from the admin verbs to submit new newscaster messages
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "Tau Ceti Daily"
newMsg.author = "Nyx Daily"
newMsg.is_admin_message = 1
//see if our location has custom event info for this event
newMsg.body = affected_dest.get_custom_eventstring()
if(!newMsg.body)
newMsg.body = "[affected_dest.name] doesn't have custom events. Bug a coder."
// Too many goddamn strings, Bay. - N3X
/*
newMsg.body = ""
switch(event_type)
if(RESEARCH_BREAKTHROUGH)
newMsg.body = "A major breakthough in the field of [pick("plasma research","super-compressed materials","nano-augmentation","bluespace research","volatile power manipulation")] \
@@ -96,7 +95,7 @@
if(prob(33))
newMsg.body += "were surprised when an unusual species experts have since identified as \
[pick("a subclass of mammal","a divergent abhuman species","an intelligent species of lemur","organic/cyborg hybrids")] turned up. Believed to have been brought in by \
[pick("alien smugglers","early colonists","syndicate raiders","unwitting tourists")], this is the first such specimen discovered in the wild."
[pick("alien smugglers","early colonists","Syndicate raiders","unwitting tourists")], this is the first such specimen discovered in the wild."
else if(prob(50))
newMsg.body += "were attacked by a vicious [pick("nas'r","diyaab","samak","predator which has not yet been identified")]\
. Officials urge caution, and locals are advised to stock up on armaments."
@@ -118,24 +117,21 @@
newMsg.body += "announced their [pick("split","break up","marriage","engagement")] with [pick("TV host","webcast personality","superstar","model","actor","singer")] \
[random_name(pick(MALE,FEMALE))] at [pick("a society ball","a new opening","a launch","a club")] on [affected_dest.name] yesterday, pundits are shocked."
else
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Economy_Events_Mundane.dm:119: newMsg.body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to "
newMsg.body += {"is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to
[pick("unkind comments by an ex","rumours started by jealous friends","the decision to be dropped by a major sponsor","a disasterous interview on Tau Ceti Tonight")]."}
// END AUTOFIX
newMsg.body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to "
newMsg.body += "[pick("unkind comments by an ex","rumours started by jealous friends",\
"the decision to be dropped by a major sponsor","a disasterous interview on Nyx Tonight")]."
if(TOURISM)
newMsg.body += "Tourists are flocking to [affected_dest.name] after the surprise announcement of [pick("major shopping bargains by a wily retailer",\
"a huge new ARG by a popular entertainment company","a secret tour by popular artiste [random_name(pick(MALE,FEMALE))]")]. \
Tau Ceti Daily is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage."
*/
Nyx Daily is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage."
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == "Tau Ceti Daily")
if(FC.channel_name == "Nyx Daily")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("Tau Ceti Daily")
NEWSCASTER.newsAlert("Nyx Daily")
/datum/event/trivial_news
endWhen = 10
+3 -3
View File
@@ -127,9 +127,9 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "PDA Spam", /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 0, 25, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 1, 10, 25),
// new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
// new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
// new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
+3 -3
View File
@@ -46,10 +46,10 @@ var/global/list/possibleEvents = list()
// Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events_Mundane.dm
possibleEvents[/datum/event/economic_event] = 300
//possibleEvents[/datum/event/trivial_news] = 400
//possibleEvents[/datum/event/mundane_news] = 300
possibleEvents[/datum/event/trivial_news] = 400
possibleEvents[/datum/event/mundane_news] = 300
possibleEvents[/datum/event/cargo_bonus] = 150
possibleEvents[/datum/event/cargo_bonus] = 100
possibleEvents[/datum/event/revenant] = 75
possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200)
+111 -42
View File
@@ -11,13 +11,16 @@
var/lum_g
var/lum_b
var/list/effect_r
var/list/effect_g
var/list/effect_b
var/tmp/old_lum_r
var/tmp/old_lum_g
var/tmp/old_lum_b
var/list/effect_str
var/list/effect_turf
var/applied
var/vis_update //Whetever we should smartly recalculate visibility. and then only update tiles that became (in) visible to us
var/needs_update
var/destroyed
var/force_update
@@ -38,9 +41,7 @@
parse_light_color()
effect_r = list()
effect_g = list()
effect_b = list()
effect_str = list()
effect_turf = list()
update()
@@ -71,6 +72,13 @@
needs_update = 1
lighting_update_lights += src
/datum/light_source/proc/vis_update()
if(!needs_update)
needs_update = 1
lighting_update_lights += src
vis_update = 1
/datum/light_source/proc/check()
if(!source_atom || !light_range || !light_power)
destroy()
@@ -96,14 +104,19 @@
light_range = source_atom.light_range
. = 1
if(light_range && light_power && !applied)
. = 1
if(. || source_atom.light_color != light_color)//Save the old lumcounts if we need to update, if the colour changed DO IT BEFORE we parse the colour and LOSE the old lumcounts!
old_lum_r = lum_r
old_lum_g = lum_g
old_lum_b = lum_b
if(source_atom.light_color != light_color)
light_color = source_atom.light_color
parse_light_color()
. = 1
if(light_range && light_power && !applied)
. = 1
/datum/light_source/proc/parse_light_color()
if(light_color)
lum_r = GetRedPart(light_color) / 255
@@ -114,49 +127,50 @@
lum_g = 1
lum_b = 1
/datum/light_source/proc/falloff(atom/movable/lighting_overlay/O)
#if LIGHTING_FALLOFF == 1 // circular
. = (O.x - source_turf.x)**2 + (O.y - source_turf.y)**2 + LIGHTING_HEIGHT
#if LIGHTING_LAMBERTIAN == 1
. = CLAMP01((1 - CLAMP01(sqrt(.) / max(1,light_range))) * (1 / (sqrt(. + 1))))
#else
. = 1 - CLAMP01(sqrt(.) / max(1,light_range))
#endif
#elif LIGHTING_FALLOFF == 2 // square
. = abs(O.x - source_turf.x) + abs(O.y - source_turf.y) + LIGHTING_HEIGHT
#if LIGHTING_LAMBERTIAN == 1
. = CLAMP01((1 - CLAMP01(. / max(1,light_range))) * (1 / (sqrt(.)**2 + )))
#else
. = 1 - CLAMP01(. / max(1,light_range))
#endif
#if LIGHTING_FALLOFF == 1 //circular
#define LUM_DISTANCE(swapvar, O, T) swapvar = (O.x - T.x)**2 + (O.y - T.y)**2 + LIGHTING_HEIGHT
#if LIGHTING_LAMBERTIAN == 1
#define LUM_ATTENUATION(swapvar) swapvar = CLAMP01((1 - CLAMP01(sqrt(swapvar) / light_range)) * (1 / sqrt(swapvar + 1)))
#else
#define LUM_ATTENUATION(swapvar) swapvar = 1 - CLAMP01(sqrt(swapvar) / light_range)
#endif
#elif LIGHTING_FALLOFF == 2 //square
#define LUM_DISTANCE(swapvar, O, T) swapvar = abs(O.x - T.x) + abs(O.y - T.y) + LIGHTING_HEIGHT
#if LIGHTING_LAMBERTIAN == 1
#define LUM_ATTENUATION(swapvar) swapvar = CLAMP01((1 - CLAMP01(swapvar / light_range)) * (1 / sqrt(swapvar**2 + 1)))
#else
#define LUM_ATTENUATION(swapvar) swapvar = CLAMP01(swapvar / light_range)
#endif
#endif
#define LUM_FALLOFF(swapvar, O, T) \
LUM_DISTANCE(swapvar, O, T); \
LUM_ATTENUATION(swapvar);
/datum/light_source/proc/apply_lum()
applied = 1
if(istype(source_turf))
for(var/turf/T in dview(light_range, source_turf, INVISIBILITY_LIGHTING))
FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING)
if(T.lighting_overlay)
var/strength = light_power * falloff(T.lighting_overlay)
var/strength
LUM_FALLOFF(strength, T, source_turf)
strength *= light_power
if(!strength) //Don't add turfs that aren't affected to the affected turfs.
continue
effect_r += round(lum_r * strength, LIGHTING_ROUND_VALUE)
effect_g += round(lum_g * strength, LIGHTING_ROUND_VALUE)
effect_b += round(lum_b * strength, LIGHTING_ROUND_VALUE)
strength = round(strength, LIGHTING_ROUND_VALUE) //Screw sinking points.
effect_str += strength
T.lighting_overlay.update_lumcount(
round(lum_r * strength, LIGHTING_ROUND_VALUE),
round(lum_g * strength, LIGHTING_ROUND_VALUE),
round(lum_b * strength, LIGHTING_ROUND_VALUE)
lum_r * strength,
lum_g * strength,
lum_b * strength
)
else
effect_r += 0
effect_g += 0
effect_b += 0
effect_str += 0
if(!T.affecting_lights)
T.affecting_lights = list()
@@ -172,11 +186,66 @@
T.affecting_lights -= src
if(T.lighting_overlay)
T.lighting_overlay.update_lumcount(-effect_r[i], -effect_g[i], -effect_b[i])
var/str = effect_str[i]
T.lighting_overlay.update_lumcount(-str * old_lum_r, -str * old_lum_g, -str * old_lum_b)
i++
effect_r.Cut()
effect_g.Cut()
effect_b.Cut()
effect_str.Cut()
effect_turf.Cut()
//Smartly updates the lighting, only removes lum from and adds lum to turfs that actually got changed.
//This is for lights that need to reconsider due to nearby opacity changes.
//Stupid dumb copy pasta because BYOND and speed.
/datum/light_source/proc/smart_vis_update()
var/list/view[0]
FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING)
view += T //Filter out turfs.
//This is the part where we calculate new turfs (if any)
var/list/new_turfs = view - effect_turf //This will result with all the tiles that are added.
for(var/turf/T in new_turfs)
//Big huge copy paste from apply_lum() incoming because screw unreadable defines and screw proc call overhead.
if(T.lighting_overlay)
LUM_FALLOFF(., T, source_turf)
. *= light_power
if(!.) //Don't add turfs that aren't affected to the affected turfs.
continue
. = round(., LIGHTING_ROUND_VALUE)
effect_str += .
T.lighting_overlay.update_lumcount(
lum_r * .,
lum_g * .,
lum_b * .
)
else
effect_str += 0
if(!T.affecting_lights)
T.affecting_lights = list()
T.affecting_lights += src
effect_turf += T
var/list/old_turfs = effect_turf - view
for(var/turf/T in old_turfs)
//Insert not-so-huge copy paste from remove_lum().
var/idx = effect_turf.Find(T) //Get the index, luckily Find() is cheap in small lists like this. (with small I mean under a couple thousand len)
if(T.affecting_lights)
T.affecting_lights -= src
if(T.lighting_overlay)
var/str = effect_str[idx]
T.lighting_overlay.update_lumcount(-str * lum_r, -str * lum_g, -str * lum_b)
effect_turf.Cut(idx, idx + 1)
effect_str.Cut(idx, idx + 1)
#undef LUM_FALLOFF
#undef LUM_DISTANCE
#undef LUM_ATTENUATION
+22 -28
View File
@@ -7,7 +7,6 @@
icon = LIGHTING_ICON
layer = LIGHTING_LAYER
invisibility = INVISIBILITY_LIGHTING
blend_mode = BLEND_MULTIPLY
color = "#000000"
icon_state = "light1"
@@ -62,34 +61,33 @@
lighting_update_overlays += src
/atom/movable/lighting_overlay/proc/update_overlay()
var/mx = max(lum_r, lum_g, lum_b)
. = 1 // factor
if(mx > 1)
. = 1/mx
#if LIGHTING_TRANSITIONS == 1
animate(src,
color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .),
LIGHTING_TRANSITION_SPEED
)
#else
color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .)
#endif
var/turf/T = loc
if(istype(T)) //Incase we're not on a turf, pool ourselves, something happened.
if(color != "#000000")
T.luminosity = 1
else //No light, set the turf's luminosity to 0 to remove it from view()
#if LIGHTING_TRANSITIONS == 1
spawn(LIGHTING_TRANSITION_SPEED)
if(lum_r == lum_g && lum_r == lum_b) //greyscale
blend_mode = BLEND_OVERLAY
if(lum_r <= 0)
T.luminosity = 0
color = "#000000"
alpha = 255
else
T.luminosity = 1
color = "#000000"
alpha = (1 - min(lum_r, 1)) * 255
else
alpha = 255
var/mx = max(lum_r, lum_g, lum_b)
. = 1 // factor
if(mx > 1)
. = 1/mx
blend_mode = BLEND_MULTIPLY
color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .)
if(color != "#000000")
T.luminosity = 1
else //No light, set the turf's luminosity to 0 to remove it from view()
T.luminosity = 0
#else
T.luminosity = 0
#endif
else
warning("A lighting overlay realised it's loc was NOT a turf (actual loc: [loc], [loc.type]) in update_overlay() and got qdel'd!")
warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : ""]) in update_overlay() and got qdel'ed!")
qdel(src)
/atom/movable/lighting_overlay/singularity_act()
@@ -104,9 +102,5 @@
var/turf/T = loc
if(istype(T))
T.lighting_overlay = null
for(var/datum/light_source/D in T.affecting_lights) //Remove references to us on the light sources affecting us.
D.effect_r -= src
D.effect_g -= src
D.effect_b -= src
return ..()
+15 -9
View File
@@ -5,25 +5,31 @@
/datum/controller/process/lighting/doWork()
var/list/lighting_update_lights_old = lighting_update_lights //We use a different list so any additions to the update lists during a delay from scheck() don't cause things to be cut from the list without being updated.
last_light_count = lighting_update_lights.len
lighting_update_lights = null //Nulling it first because of http://www.byond.com/forum/?post=1854520
lighting_update_lights = list()
for(var/datum/light_source/L in lighting_update_lights_old)
if(L.needs_update)
if(L.destroyed || L.check() || L.force_update)
L.remove_lum()
if(!L.destroyed) L.apply_lum()
L.force_update = 0
L.needs_update = 0
if(L.destroyed || L.check() || L.force_update)
L.remove_lum()
if(!L.destroyed)
L.apply_lum()
else if(L.vis_update) //We smartly update only tiles that became (in) visible to use.
L.smart_vis_update()
L.vis_update = 0
L.force_update = 0
L.needs_update = 0
scheck()
var/list/lighting_update_overlays_old = lighting_update_overlays //Same as above.
last_overlay_count = lighting_update_overlays.len
lighting_update_overlays = null //Same as above
lighting_update_overlays = list()
for(var/atom/movable/lighting_overlay/O in lighting_update_overlays_old)
if(O.needs_update)
O.update_overlay()
O.needs_update = 0
O.update_overlay()
O.needs_update = 0
scheck()
+1 -1
View File
@@ -4,7 +4,7 @@
/turf/proc/reconsider_lights()
for(var/datum/light_source/L in affecting_lights)
L.force_update()
L.vis_update()
/turf/proc/lighting_clear_overlays()
if(lighting_overlay)
@@ -3,7 +3,6 @@
#undef LIGHTING_FALLOFF
#undef LIGHTING_LAMBERTIAN
#undef LIGHTING_HEIGHT
#undef LIGHTING_TRANSITIONS
#undef LIGHTING_RESOLUTION
#undef LIGHTING_LAYER
@@ -1,6 +1,6 @@
//unequip
/mob/living/carbon/alien/humanoid/unEquip(obj/item/I as obj)
. = ..()
/mob/living/carbon/alien/humanoid/unEquip(var/obj/item/I, var/force)
. = ..(I, force)
if(!. || !I)
return
@@ -45,8 +45,8 @@
icon_state = "alien[caste]_leap"
pixel_x = -32
pixel_y = -32
else
icon = initial(icon)
else if(icon == 'icons/mob/alienleap.dmi' && icon_state == "alien[caste]_leap" && pixel_x == -32 && pixel_y == -32)
icon = initial(icon)// ^ this looks odd, but in theory it will prevent the icon and pixel_xy from being reset unless it needs to be
pixel_x = initial(pixel_x)
pixel_y = initial(pixel_y)
+1
View File
@@ -1,5 +1,6 @@
mob/living
var/canEnterVentWith = "/obj/item/weapon/implant=0&/obj/item/clothing/mask/facehugger=0&/obj/item/device/radio/borg=0&/obj/machinery/camera=0"
var/datum/middleClickOverride/middleClickOverride = null
/mob/living/carbon/Login()
..()
@@ -7,20 +7,7 @@
if ("help")
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
if ("grab")
if(M == src || anchored)
return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G)
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message(text("\red [] has grabbed [] passively!", M, src))
grabbedby(M)
if("harm")
M.do_attack_animation(src)
+2 -2
View File
@@ -20,9 +20,9 @@
if (!src.laws)
make_laws()
/mob/living/silicon/ai/proc/set_zeroth_law(var/law, var/law_borg)
/mob/living/silicon/ai/proc/set_zeroth_law(var/law, var/law_borg, var/law_type)
src.laws_sanity_check()
src.laws.set_zeroth_law(law, law_borg)
src.laws.set_zeroth_law(law, law_borg, law_type)
/mob/living/silicon/ai/proc/clear_zeroth_law(var/law_borg)
src.laws_sanity_check()
+24 -2
View File
@@ -27,8 +27,13 @@
w_class = 5.0
/obj/item/weapon/grab/New(mob/user, mob/victim)
/obj/item/weapon/grab/New(var/mob/user, var/mob/victim)
..()
//Okay, first off, some fucking sanity checking. No user, or no victim, or they are not mobs, no grab.
if(!istype(user) || !istype(victim))
return
loc = user
assailant = user
affecting = victim
@@ -52,8 +57,25 @@
G.dancing = 1
G.adjust_position()
dancing = 1
clean_grabbed_by(assailant, affecting)
adjust_position()
/obj/item/weapon/grab/proc/clean_grabbed_by(var/mob/user, var/mob/victim) //Cleans up any nulls in the grabbed_by list.
if(istype(user))
for(var/entry in user.grabbed_by)
if(isnull(entry) || !istype(entry, /obj/item/weapon/grab)) //the isnull() here is probably redundant- but it might outperform istype, who knows. Better safe than sorry.
user.grabbed_by -= entry
if(istype(victim))
for(var/entry in victim.grabbed_by)
if(isnull(entry) || !istype(entry, /obj/item/weapon/grab))
victim.grabbed_by -= entry
return 1
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
/obj/item/weapon/grab/proc/get_mob_if_throwable()
if(affecting && assailant.Adjacent(affecting))
@@ -73,7 +95,7 @@
/obj/item/weapon/grab/process()
confirm()
if(!confirm()) return //If the confirm fails, the grab is about to be deleted. That means it shouldn't continue processing.
if(assailant.client)
if(!hud) return //this somehow can runtime under the right circumstances
+2
View File
@@ -37,6 +37,7 @@
health = 100
min_broken_damage = 50
body_part = LOWER_TORSO
vital = 1
parent_organ = "chest"
/obj/item/organ/external/diona/arm
@@ -117,6 +118,7 @@
health = 50
min_broken_damage = 25
body_part = HEAD
vital = 1
parent_organ = "chest"
/obj/item/organ/external/diona/head/removed()
+2 -2
View File
@@ -197,7 +197,7 @@
return 0
if(targloc == curloc) //Fire the projectile
user.bullet_act(in_chamber)
qdel(in_chamber)
del(in_chamber)
update_icon()
return 1
@@ -285,7 +285,7 @@
else
user << "<span class = 'notice'>Ow...</span>"
user.apply_effect(110,AGONY,0)
qdel(in_chamber)
del(in_chamber)
mouthshoot = 0
return
else
+5 -5
View File
@@ -80,7 +80,7 @@
proc/on_range() //if we want there to be effects when they reach the end of their range
proj_hit = 1
qdel(src)
del(src)
proc/on_hit(var/atom/target, var/blocked = 0, var/hit_zone)
if(!isliving(target)) return 0
@@ -97,7 +97,7 @@
in_chamber.pass_flags = pass_flags //And the pass flags to that of the real projectile...
in_chamber.firer = user
var/output = in_chamber.process() //Test it!
qdel(in_chamber) //No need for it anymore
del(in_chamber) //No need for it anymore
return output //Send it back to the gun!
Bump(atom/A as mob|obj|turf|area)
@@ -168,7 +168,7 @@
if(!istype(src, /obj/item/projectile/beam/lightning))
density = 0
invisibility = 101
qdel(src)
del(src)
return 1
@@ -187,7 +187,7 @@
spawn() //New projectile system
while(loc)
if(kill_count < 1)
qdel(src)
del(src)
return
kill_count--
if((!( current ) || loc == current))
@@ -262,7 +262,7 @@
spawn() //Old projectile system
while(loc)
if(kill_count < 1)
qdel(src)
del(src)
return
kill_count--
if((!( current ) || loc == current))
+8 -1
View File
@@ -28,4 +28,11 @@
desc = "Helps with burn injuries."
New()
..()
reagents.add_reagent("silver_sulfadiazine", 40)
reagents.add_reagent("silver_sulfadiazine", 40)
/obj/item/weapon/reagent_containers/pill/patch/synthflesh
name = "syntheflesh patch"
desc = "Helps with burn injuries."
New()
..()
reagents.add_reagent("synthflesh", 20)
@@ -13,6 +13,7 @@
var/obj/machinery/keycard_auth/event_source
var/mob/event_triggered_by
var/mob/event_confirmed_by
var/ert_reason = "Reason for ERT"
//1 = select event
//2 = authenticate
anchored = 1.0
@@ -38,8 +39,8 @@
event_source.confirmed = 1
event_source.event_confirmed_by = usr
else if(screen == 2)
if(event == "Emergency Response Team" && !ert_chosen.len)
user << "<span class='notice'>Pick the Emergency Response Team type first!</span>"
if(event == "Emergency Response Team" && ert_reason == "Reason for ERT")
user << "<span class='notice'>Supply a reason for calling the ERT first!</span>"
return
event_triggered_by = usr
broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices
@@ -69,12 +70,7 @@
var/data[0]
data["screen"] = screen
data["event"] = event
data["erttypes"] = list()
for(var/type in response_team_types)
var/active = 0
if((type in ert_chosen))
active = 1
data["erttypes"] += list(list("name" = type, "active" = active))
data["ertreason"] = ert_reason
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -92,17 +88,12 @@
usr << "This device is without power."
return
if(href_list["triggerevent"])
ert_chosen.Cut()
event = href_list["triggerevent"]
screen = 2
if(href_list["reset"])
reset()
if(href_list["ert"])
var/chosen = href_list["ert"]
if((chosen in response_team_types) && !(chosen in ert_chosen))
ert_chosen |= chosen
else
ert_chosen -= chosen
ert_reason = input(usr, "Reason for ERT Call:", "", "")
nanomanager.update_uis(src)
add_fingerprint(usr)
@@ -165,9 +156,13 @@
usr << "\red All Emergency Response Teams are dispatched and can not be called at this time."
return
response_team_chosen_types += ert_chosen
trigger_armed_response_team(1)
feedback_inc("alert_keycard_auth_ert",1)
usr << "<span class = 'notice'>ERT request transmitted.</span>"
if(admins.len)
ERT_Announce(ert_reason , event_triggered_by)
ert_reason = "Reason for ERT"
feedback_inc("alert_keycard_auth_ert",1)
else
trigger_armed_response_team(new /datum/response_team/amber) // No admins? No problem. Automatically send a code amber ERT.
/obj/machinery/keycard_auth/proc/is_ert_blocked()
return ticker.mode && ticker.mode.ert_disabled
Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

After

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 KiB

After

Width:  |  Height:  |  Size: 381 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

+2 -4
View File
@@ -23,11 +23,9 @@ Used In File(s): \code\modules\security_levels\keycard_authentication.dm
{{else data.screen == 2}}
{{if data.event == 'Emergency Response Team'}}
<div class="item">
<div class="itemLabel">Select ERT Type:</div>
<div class="itemLabel">Reason for ERT Call:</div>
<div class="itemContent">
{{for data.erttypes}}
{{:helper.link(value.name, value.active ? 'minus' : 'plus', { 'ert' : value.name }, '', value.active ? 'linkOn' : '')}}
{{/for}}
{{:helper.link(data.ertreason, 'alert', { 'ert' : 'callreason' })}}
</div>
</div>
{{/if}}
+1
View File
@@ -72,6 +72,7 @@
#include "code\_onclick\adjacent.dm"
#include "code\_onclick\ai.dm"
#include "code\_onclick\click.dm"
#include "code\_onclick\click_override.dm"
#include "code\_onclick\cyborg.dm"
#include "code\_onclick\drag_drop.dm"
#include "code\_onclick\item_attack.dm"