This commit is contained in:
Markolie
2015-07-28 18:40:44 +02:00
101 changed files with 3932 additions and 3230 deletions
+2 -1
View File
@@ -85,7 +85,8 @@
if(item && item != src) // It's possible that the item is deleted in temperature_expose
item.fire_act(null, temperature, volume)
animate(src, color = heat2color(temperature), 5)
// animate(src, color = heat2color(temperature), 5)
color = heat2color(temperature)
set_light(l_color = color)
return 0
+1 -5
View File
@@ -1,14 +1,10 @@
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
#define LIGHTING_LAMBERTIAN 1 // use lambertian shading for light sources
#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 1 // 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)
+13 -9
View File
@@ -1685,23 +1685,27 @@ 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
/mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox
+3 -1
View File
@@ -62,4 +62,6 @@ var/score_richestkey = null
var/score_dmgestname = null // who had the most damage on the shuttle (but was still alive)
var/score_dmgestjob = null
var/score_dmgestdamage = 0
var/score_dmgestkey = null
var/score_dmgestkey = null
var/TAB = "    "
+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>")
..()
+1 -1
View File
@@ -673,7 +673,7 @@
id = "people"
whitelist = null
blacklist = list(/mob/camera,/mob/new_player,/mob/living/simple_animal/hostile/blobspore,/mob/living/simple_animal/hostile/creature,
blacklist = list(/mob/camera,/mob/new_player,/mob/living/simple_animal/hostile/blob/blobspore,/mob/living/simple_animal/hostile/creature,
/mob/living/simple_animal/hostile/spaceWorm,/mob/living/simple_animal/shade,/mob/living/simple_animal/hostile/faithless,/mob/dead)
universal = 1
mobcheck = 1
-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
@@ -659,7 +659,7 @@ var/list/uplink_items = list()
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."
reference = "SEK"
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
@@ -765,7 +765,7 @@ var/list/uplink_items = list()
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."
reference = "UI"
item = /obj/item/weapon/implanter/uplink
cost = 20
cost = 14
surplus = 0
/datum/uplink_item/implants/explosive
+77 -66
View File
@@ -10,21 +10,23 @@ var/list/blob_nodes = list()
name = "blob"
config_tag = "blob"
required_players = 15
required_players_secret = 15
required_players = 30
required_players_secret = 30
required_enemies = 1
recommended_enemies = 1
restricted_jobs = list("Cyborg", "AI")
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/declared = 0
var/burst = 0
var/cores_to_spawn = 1
var/players_per_core = 20
var/players_per_core = 30
var/blob_point_rate = 3
var/blobwincount = 700
var/stage_2_threshold = 0.60
var/blobwincount = 350
var/list/infected_crew = list()
@@ -56,12 +58,37 @@ var/list/blob_nodes = list()
return 1
/datum/game_mode/blob/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && (bomb.z in config.station_levels))
nukecode = bomb.r_code
return nukecode
/datum/game_mode/blob/proc/get_blob_candidates()
var/list/candidates = list()
for(var/mob/living/carbon/human/player in player_list)
if(!player.stat && player.mind && !player.mind.special_role && !jobban_isbanned(player, "Syndicate") && (player.client.prefs.be_special & BE_BLOB))
candidates += player
return candidates
/datum/game_mode/blob/proc/blobize(var/mob/living/carbon/human/blob)
var/datum/mind/blobmind = blob.mind
if(!istype(blobmind))
return 0
infected_crew += blobmind
blobmind.special_role = "Blob"
log_game("[blob.key] (ckey) has been selected as a Blob")
greet_blob(blobmind)
blob << "<span class='userdanger'>You feel very tired and bloated! You don't have long before you burst!</span>"
spawn(600)
burst_blob(blobmind)
return 1
/datum/game_mode/blob/proc/make_blobs(var/count)
var/list/candidates = get_blob_candidates()
var/mob/living/carbon/human/blob = null
count=min(count, candidates.len)
for(var/i = 0, i < count, i++)
blob = pick(candidates)
candidates -= blob
blobize(blob)
return count
/datum/game_mode/blob/announce()
@@ -71,7 +98,7 @@ var/list/blob_nodes = list()
/datum/game_mode/blob/proc/greet_blob(var/datum/mind/blob)
blob.current << "<B>\red You are infected by the Blob!</B>"
blob.current << "<span class='userdanger'>You are infected by the Blob!</span>"
blob.current << "<b>Your body is ready to give spawn to a new blob core which will eat this station.</b>"
blob.current << "<b>Find a good location to spawn the core and then take control and overwhelm the station!</b>"
blob.current << "<b>When you have found a location, wait until you spawn; this will happen automatically and you cannot speed up the process.</b>"
@@ -84,27 +111,40 @@ var/list/blob_nodes = list()
/datum/game_mode/blob/proc/burst_blobs()
for(var/datum/mind/blob in infected_crew)
burst_blob(blob)
var/client/blob_client = null
var/turf/location = null
/datum/game_mode/blob/proc/burst_blob(var/datum/mind/blob, var/warned=0)
var/client/blob_client = null
var/turf/location = null
if(iscarbon(blob.current))
var/mob/living/carbon/C = blob.current
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
if(!(location.z in config.station_levels) || istype(location, /turf/space))
location = null
if(iscarbon(blob.current))
var/mob/living/carbon/C = blob.current
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
if(location.z != ZLEVEL_STATION || istype(location, /turf/space))
if(!warned)
C << "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>"
message_admins("[key_name(C)] was in space when the blobs burst, and will die if he doesn't return to the station.")
spawn(300)
burst_blob(blob, 1)
else
burst ++
log_admin("[key_name(C)] was in space when attempting to burst as a blob.")
message_admins("[key_name(C)] was in space when attempting to burst as a blob.")
C.gib()
make_blobs(1)
check_finished() //Still needed in case we can't make any blobs
else if(blob_client && location)
burst ++
C.gib()
if(blob_client && location)
var/obj/effect/blob/core/core = new(location, 200, blob_client, blob_point_rate)
if(core.overmind && core.overmind.mind)
core.overmind.mind.name = blob.name
infected_crew -= blob
infected_crew += core.overmind.mind
var/obj/effect/blob/core/core = new(location, 200, blob_client, blob_point_rate)
if(core.overmind && core.overmind.mind)
core.overmind.mind.name = blob.name
infected_crew -= blob
infected_crew += core.overmind.mind
core.overmind.mind.special_role = "Blob Overmind"
/datum/game_mode/blob/post_setup()
@@ -114,18 +154,6 @@ var/list/blob_nodes = list()
if(emergency_shuttle)
emergency_shuttle.auto_recall = 1
/*// Disable the blob event for this round.
if(events)
var/datum/round_event_control/blob/B = locate() in events.control
if(B)
B.max_occurrences = 0 // disable the event
else
error("Events variable is null in blob gamemode post setup.")*/
spawn(10)
start_state = new /datum/station_state()
start_state.count()
spawn(0)
var/wait_time = rand(waittime_l, waittime_h)
@@ -136,30 +164,29 @@ var/list/blob_nodes = list()
sleep(100)
show_message("<span class='alert'>You feel tired and bloated.</span>")
show_message("<span class='userdanger'>You feel tired and bloated.</span>")
sleep(wait_time)
show_message("<span class='alert'>You feel like you are about to burst.</span>")
show_message("<span class='userdanger'>You feel like you are about to burst.</span>")
sleep(wait_time / 2)
burst_blobs()
// Stage 0
sleep(40)
sleep(wait_time)
stage(0)
// Stage 1
sleep(2000)
sleep(wait_time)
stage(1)
// Stage 2
while(blobs.len < blobwincount*stage_2_threshold)
sleep(10)
sleep(30000)
stage(2)
..()
return ..()
/datum/game_mode/blob/proc/stage(var/stage)
@@ -167,27 +194,11 @@ var/list/blob_nodes = list()
if (0)
send_intercept(1)
declared = 1
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs while minimizing collateral damage."
aiPlayer.set_zeroth_law(law)
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: [law]"
return
if (1)
command_announcement.Announce("Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
return
command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
if (2)
command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert", new_sound = 'sound/effects/siren.ogg')
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
send_intercept(2)
return
return
+10 -46
View File
@@ -1,78 +1,42 @@
/datum/game_mode/blob/check_finished()
if(!declared)//No blobs have been spawned yet
if(infected_crew.len > burst)//Some blobs have yet to burst
return 0
if(blobwincount <= blobs.len)//Blob took over
return 1
if(!blob_cores.len) // blob is dead
return 1
if(station_was_nuked)//Nuke went off
return 1
return 0
return ..()
/datum/game_mode/blob/declare_completion()
if(blobwincount <= blobs.len)
feedback_set_details("round_end_result","loss - blob took over")
feedback_set_details("round_end_result","win - blob took over")
world << "<FONT size = 3><B>The blob has taken over the station!</B></FONT>"
world << "<B>The entire station was eaten by the Blob</B>"
check_quarantine()
log_game("Blob mode completed with a blob victory.")
else if(station_was_nuked)
feedback_set_details("round_end_result","halfwin - nuke")
world << "<FONT size = 3><B>Partial Win: The station has been destroyed!</B></FONT>"
world << "<B>Directive 7-12 has been successfully carried out preventing the Blob from spreading.</B>"
log_game("Blob mode completed with a tie (station destroyed).")
else if(!blob_cores.len)
feedback_set_details("round_end_result","win - blob eliminated")
feedback_set_details("round_end_result","loss - blob eliminated")
world << "<FONT size = 3><B>The staff has won!</B></FONT>"
world << "<B>The alien organism has been eradicated from the station</B>"
var/datum/station_state/end_state = new /datum/station_state()
end_state.count()
var/percent = round( 100.0 * start_state.score(end_state), 0.1)
world << "<B>The station is [percent]% intact.</B>"
log_game("Blob mode was won with station [percent]% intact.")
world << "\blue Rebooting in 30s"
log_game("Blob mode completed with a crew victory.")
world << "<span class='notice'>Rebooting in 30s</span>"
..()
return 1
datum/game_mode/proc/auto_declare_completion_blob()
/datum/game_mode/proc/auto_declare_completion_blob()
if(istype(ticker.mode,/datum/game_mode/blob) )
var/datum/game_mode/blob/blob_mode = src
if(blob_mode.infected_crew.len)
var/text = "<FONT size = 2><B>The blob[(blob_mode.infected_crew.len > 1 ? "s were" : " was")]:</B></FONT>"
for(var/datum/mind/blob in blob_mode.infected_crew)
text += "<br>[blob.key] was [blob.name]"
text += "<br><b>[blob.key]</b> was <b>[blob.name]</b>"
world << text
return 1
/datum/game_mode/blob/proc/check_quarantine()
var/numDead = 0
var/numAlive = 0
var/numSpace = 0
var/numOffStation = 0
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
for(var/mob/living/carbon/human/M in mob_list)
if ((M != aiPlayer && M.client))
if (M.stat == 2)
numDead += 1
else
var/T = M.loc
if (istype(T, /turf/space))
numSpace += 1
else if(istype(T, /turf))
if (!(M.z in config.station_levels))
numOffStation += 1
else
numAlive += 1
if (numSpace==0 && numOffStation==0)
world << "<FONT size = 3><B>The AI has won!</B></FONT>"
world << "<B>The AI successfully maintained the quarantine - no players were in space or were off-station (as far as we can tell).</B>"
log_game("AI won at Blob mode despite overall loss.")
else
world << "<FONT size = 3><B>The AI has lost!</B></FONT>"
world << text("<B>The AI failed to maintain the quarantine - [] were in space and [] were off-station (as far as we can tell).</B>", numSpace, numOffStation)
log_game("AI lost at Blob mode.")
log_game("Blob mode was lost.")
return 1
+42 -45
View File
@@ -2,16 +2,15 @@
/datum/game_mode/blob/send_intercept(var/report = 1)
var/intercepttext = ""
var/interceptname = "Error"
var/interceptname = ""
switch(report)
if(0)
..()
return
if(1)
interceptname = "Biohazard Alert"
intercepttext += "<FONT size = 3><B>Nanotrasen Update</B>: Biohazard Alert.</FONT><HR>"
intercepttext += "Reports indicate the probable transfer of a biohazardous agent onto [station_name()] during the last crew deployment cycle.<BR>"
intercepttext += "Preliminary analysis of the organism classifies it as a level 7 biohazard. Its origin is unknown.<BR>"
intercepttext += "Preliminary analysis of the organism classifies it as a level 5 biohazard. Its origin is unknown.<BR>"
intercepttext += "Nanotrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.<BR>"
intercepttext += "Orders for all [station_name()] personnel follows:<BR>"
intercepttext += " 1. Do not leave the quarantine area.<BR>"
@@ -21,20 +20,25 @@
intercepttext += "<BR>Note in the event of a quarantine breach or uncontrolled spread of the biohazard, the directive 7-10 may be upgraded to a directive 7-12.<BR>"
intercepttext += "Message ends."
if(2)
interceptname = "Directive 7-12"
var/nukecode = rand(10000, 99999)
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code)
if(bomb.z == ZLEVEL_STATION)
bomb.r_code = nukecode
intercepttext += "<FONT size = 3><B>Nanotrasen Update</B>: Biohazard Alert.</FONT><HR>"
intercepttext += "Directive 7-12 has been issued for [station_name()].<BR>"
intercepttext += "The biohazard has grown out of control and will soon reach critical mass.<BR>"
intercepttext += "Your orders are as follows:<BR>"
intercepttext += "1. Secure the Nuclear Authentication Disk.<BR>"
intercepttext += "2. Detonate the Nuke located in the Station's Vault.<BR>"
intercepttext += "Nuclear Authentication Code: [get_nuke_code()] <BR>"
intercepttext += "Nuclear Authentication Code: [nukecode] <BR>"
intercepttext += "Message ends."
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs. The nuclear failsafe must be activated at any cost, the code is: [get_nuke_code()]."
var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. The nuclear failsafe must be activated at any cost, the code is: [nukecode]."
aiPlayer.set_zeroth_law(law)
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: [law]"
for(var/obj/machinery/computer/communications/comm in world)
@@ -42,13 +46,12 @@
comm.messagetext.Add(intercepttext)
if(!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper- [interceptname]"
intercept.name = "Classified Central Command Update"
intercept.info = intercepttext
world << sound('sound/AI/commandreport.ogg')
command_announcement.Announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/AI/commandreport.ogg')
return
/datum/station_state
var/floor = 0
var/wall = 0
@@ -59,33 +62,29 @@
var/mach = 0
proc/count()
for(var/turf/T in world)
if(!(T.z in config.station_levels))
continue
/datum/station_state/proc/count()
for(var/turf/T in block(locate(1,1,1), locate(world.maxx,world.maxy,1)))
if(istype(T,/turf/simulated/floor))
if(!(T:burnt))
src.floor += 12
else
src.floor += 1
if(istype(T,/turf/simulated/floor))
if(!(T:burnt))
src.floor += 12
else
src.floor += 1
if(istype(T, /turf/simulated/wall))
if(T:intact)
src.wall += 2
else
src.wall += 1
if(istype(T, /turf/simulated/wall))
if(T:intact)
src.wall += 2
else
src.wall += 1
if(istype(T, /turf/simulated/wall/r_wall))
if(T:intact)
src.r_wall += 2
else
src.r_wall += 1
if(istype(T, /turf/simulated/wall/r_wall))
if(T:intact)
src.r_wall += 2
else
src.r_wall += 1
for(var/obj/O in world)
if(!(O.z in config.station_levels))
continue
for(var/obj/O in T.contents)
if(istype(O, /obj/structure/window))
src.window += 1
else if(istype(O, /obj/structure/grille) && (!O:destroyed))
@@ -94,17 +93,15 @@
src.door += 1
else if(istype(O, /obj/machinery))
src.mach += 1
return
proc/score(var/datum/station_state/result)
if(!result) return 0
var/output = 0
output += (result.floor / max(floor,1))
output += (result.r_wall/ max(r_wall,1))
output += (result.wall / max(wall,1))
output += (result.window / max(window,1))
output += (result.door / max(door,1))
output += (result.grille / max(grille,1))
output += (result.mach / max(mach,1))
return (output/7)
/datum/station_state/proc/score(var/datum/station_state/result)
if(!result) return 0
var/output = 0
output += (result.floor / max(floor,1))
output += (result.r_wall/ max(r_wall,1))
output += (result.wall / max(wall,1))
output += (result.window / max(window,1))
output += (result.door / max(door,1))
output += (result.grille / max(grille,1))
output += (result.mach / max(mach,1))
return (output/7)
+177
View File
@@ -0,0 +1,177 @@
////////////////
// BASE TYPE //
////////////////
//Do not spawn
/mob/living/simple_animal/hostile/blob
icon = 'icons/mob/blob.dmi'
pass_flags = PASSBLOB
faction = list("blob")
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
maxbodytemp = 360
universal_speak = 1 //So mobs can understand them when a blob uses Blob Broadcast
var/mob/camera/blob/overmind = null
/mob/living/simple_animal/hostile/blob/proc/adjustcolors(var/a_color)
if(a_color)
color = a_color
/mob/living/simple_animal/hostile/blob/blob_act()
return
////////////////
// BLOB SPORE //
////////////////
/mob/living/simple_animal/hostile/blob/blobspore
name = "blob"
desc = "Some blob thing."
icon_state = "blobpod"
icon_living = "blobpod"
health = 40
maxHealth = 40
melee_damage_lower = 2
melee_damage_upper = 4
attacktext = "hits"
attack_sound = 'sound/weapons/genhit1.ogg'
speak_emote = list("pulses")
var/obj/effect/blob/factory/factory = null
var/list/human_overlays = list()
var/is_zombie = 0
/mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
adjustBruteLoss(Clamp(0.01 * exposed_temperature, 1, 5))
/mob/living/simple_animal/hostile/blob/blobspore/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover, /obj/effect/blob))
return 1
return ..()
/mob/living/simple_animal/hostile/blob/blobspore/New(loc, var/obj/effect/blob/factory/linked_node)
if(istype(linked_node))
factory = linked_node
factory.spores += src
..()
/mob/living/simple_animal/hostile/blob/blobspore/Life()
if(!is_zombie && isturf(src.loc))
for(var/mob/living/carbon/human/H in oview(src,1)) //Only for corpse right next to/on same tile
if(H.stat == DEAD)
Zombify(H)
break
..()
/mob/living/simple_animal/hostile/blob/blobspore/proc/Zombify(var/mob/living/carbon/human/H)
is_zombie = 1
if(H.wear_suit)
var/obj/item/clothing/suit/armor/A = H.wear_suit
if(A.armor && A.armor["melee"])
maxHealth += A.armor["melee"] //That zombie's got armor, I want armor!
maxHealth += 40
health = maxHealth
name = "blob zombie"
desc = "A shambling corpse animated by the blob."
melee_damage_lower = 10
melee_damage_upper = 15
icon = H.icon
speak_emote = list("groans")
icon_state = "zombie2_s"
H.h_style = null
H.update_hair()
human_overlays = H.overlays
update_icons()
H.loc = src
loc.visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
/mob/living/simple_animal/hostile/blob/blobspore/Die()
// On death, create a small smoke of harmful gas (s-Acid)
var/datum/effect/effect/system/chem_smoke_spread/S = new
var/turf/location = get_turf(src)
// Create the reagents to put into the air
create_reagents(25)
if(overmind && overmind.blob_reagent_datum)
reagents.add_reagent(overmind.blob_reagent_datum.id, 25)
else
reagents.add_reagent("spores", 25)
// Attach the smoke spreader and setup/start it.
S.attach(location)
S.set_up(reagents, 1, 1, location, 15, 1) // only 1-2 smoke cloud
S.start()
ghostize()
qdel(src)
/mob/living/simple_animal/hostile/blob/blobspore/Destroy()
if(factory)
factory.spores -= src
factory = null
if(contents)
for(var/mob/M in contents)
M.loc = get_turf(src)
return ..()
/mob/living/simple_animal/hostile/blob/blobspore/update_icons()
..()
if(overmind && overmind.blob_reagent_datum)
adjustcolors(overmind.blob_reagent_datum.color)
else
adjustcolors(color) //to ensure zombie/other overlays update
/mob/living/simple_animal/hostile/blob/blobspore/adjustcolors(var/a_color)
color = a_color
if(is_zombie)
overlays.Cut()
overlays = human_overlays
var/image/I = image('icons/mob/blob.dmi', icon_state = "blob_head")
I.color = color
color = initial(color)//looks better.
overlays += I
/////////////////
// BLOBBERNAUT //
/////////////////
/mob/living/simple_animal/hostile/blob/blobbernaut
name = "blobbernaut"
desc = "Some HUGE blob thing."
icon_state = "blobbernaut"
icon_living = "blobbernaut"
icon_dead = "blobbernaut_dead"
health = 240
maxHealth = 240
melee_damage_lower = 20
melee_damage_upper = 20
attacktext = "hits"
attack_sound = 'sound/effects/blobattack.ogg'
speak_emote = list("gurgles")
minbodytemp = 0
maxbodytemp = 360
force_threshold = 10
environment_smash = 3
/mob/living/simple_animal/hostile/blob/blobbernaut/blob_act()
return
/mob/living/simple_animal/hostile/blob/blobbernaut/Die()
..()
flick("blobbernaut_death", src)
+103 -73
View File
@@ -1,93 +1,123 @@
/obj/effect/blob/core
name = "blob core"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_core"
icon_state = "blank_blob"
health = 200
fire_resist = 2
var/mob/camera/blob/overmind = null // the blob core's overmind
var/overmind_get_delay = 0 // we don't want to constantly try to find an overmind, do it every 30 seconds
var/resource_delay = 0
var/point_rate = 2
var/mob/camera/blob/creator = null
var/is_offspring = null
New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2, var/mob/camera/blob/C = null)
blob_cores += src
processing_objects.Add(src)
creator = C
if(!overmind)
create_overmind(new_overmind)
point_rate = new_rate
..(loc, h)
/obj/effect/blob/core/New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2, offspring)
blob_cores += src
processing_objects.Add(src)
adjustcolors(color) //so it atleast appears
if(!overmind)
create_overmind(new_overmind)
if(overmind)
adjustcolors(overmind.blob_reagent_datum.color)
if(offspring)
is_offspring = 1
point_rate = new_rate
..(loc, h)
Destroy()
blob_cores -= src
if(overmind)
qdel(overmind)
processing_objects.Remove(src)
return ..()
/obj/effect/blob/core/adjustcolors(var/a_color)
overlays.Cut()
color = null
var/image/I = new('icons/mob/blob.dmi', "blob")
I.color = a_color
overlays += I
var/image/C = new('icons/mob/blob.dmi', "blob_core_overlay")
overlays += C
update_icon()
if(health <= 0)
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
Delete()
return
/obj/effect/blob/core/Destroy()
blob_cores -= src
if(overmind)
overmind.blob_core = null
overmind = null
processing_objects.Remove(src)
return ..()
/obj/effect/blob/core/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
/obj/effect/blob/core/update_icon()
if(health <= 0)
qdel(src)
return
// update_icon is called when health changes so... call update_health in the overmind
if(overmind)
overmind.update_health()
return
/obj/effect/blob/core/RegenHealth()
return // Don't regen, we handle it in Life()
/obj/effect/blob/core/Life()
if(!overmind)
create_overmind()
else
if(resource_delay <= world.time)
resource_delay = world.time + 10 // 1 second
overmind.add_points(point_rate)
health = min(initial(health), health + 1)
if(overmind)
overmind.update_health()
if(overmind)
for(var/i = 1; i < 8; i += i)
Pulse(0, i, overmind.blob_reagent_datum.color)
else
for(var/i = 1; i < 8; i += i)
Pulse(0, i, color)
for(var/b_dir in alldirs)
if(!prob(5))
continue
var/obj/effect/blob/normal/B = locate() in get_step(src, b_dir)
if(B)
B.change_to(/obj/effect/blob/shield)
if(B && overmind)
B.color = overmind.blob_reagent_datum.color
else
B.color = color
color = null
..()
/obj/effect/blob/core/proc/create_overmind(var/client/new_overmind, var/override_delay)
if(overmind_get_delay > world.time && !override_delay)
return
Life()
if(!overmind)
create_overmind()
else
if(resource_delay <= world.time)
resource_delay = world.time + 10 // 1 second
overmind.add_points(point_rate)
health = min(initial(health), health + 1)
for(var/i = 1; i < 8; i += i)
Pulse(0, i)
for(var/b_dir in alldirs)
if(!prob(5))
continue
var/obj/effect/blob/normal/B = locate() in get_step(src, b_dir)
if(B)
B.change_to(/obj/effect/blob/shield)
..()
overmind_get_delay = world.time + 300 // 30 seconds
if(overmind)
qdel(overmind)
run_action()
return 0
var/client/C = null
var/list/candidates = list()
if(!new_overmind)
candidates = get_candidates(BE_BLOB)
if(candidates.len)
C = pick(candidates)
else
C = new_overmind
proc/create_overmind(var/client/new_overmind)
if(overmind_get_delay > world.time)
return
overmind_get_delay = world.time + 300 // 30 seconds
if(overmind)
qdel(overmind)
var/client/C = null
var/list/candidates = list()
if(!new_overmind)
candidates = get_candidates(BE_BLOB)
if(candidates.len)
C = pick(candidates)
else
C = new_overmind
if(C)
respawnable_list -= C
var/mob/camera/blob/B = new(src.loc)
B.key = C.key
B.blob_core = src
src.overmind = B
if(!B.blob_core.creator)
B.verbs += /mob/camera/blob/proc/create_core
if(istype(ticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/mode = ticker.mode
mode.infected_crew += B.mind
return 1
return 0
if(C)
var/mob/camera/blob/B = new(src.loc)
B.key = C.key
B.blob_core = src
src.overmind = B
color = overmind.blob_reagent_datum.color
if(B.mind && !B.mind.special_role)
B.mind.special_role = "Blob Overmind"
spawn(0)
if(is_offspring)
B.verbs -= /mob/camera/blob/verb/split_consciousness
return 1
return 0
+22 -117
View File
@@ -7,123 +7,28 @@
var/list/spores = list()
var/max_spores = 3
var/spore_delay = 0
var/mob/camera/blob/overmind
update_icon()
if(health <= 0)
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
Delete()
return
return
/obj/effect/blob/factory/update_icon()
if(health <= 0)
qdel(src)
run_action()
if(spores.len >= max_spores)
return 0
if(spore_delay > world.time)
return 0
spore_delay = world.time + 100 // 10 seconds
new/mob/living/simple_animal/hostile/blobspore(src.loc, src)
return 1
/mob/living/simple_animal/hostile/blobspore
name = "blob"
desc = "Some blob thing."
icon = 'icons/mob/blob.dmi'
icon_state = "blobpod"
icon_living = "blobpod"
pass_flags = PASSBLOB
health = 40
maxHealth = 40
melee_damage_lower = 2
melee_damage_upper = 4
attacktext = "hits"
attack_sound = 'sound/weapons/genhit1.ogg'
var/obj/effect/blob/factory/factory = null
var/is_zombie = 0
faction = list("blob")
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
maxbodytemp = 360
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
adjustBruteLoss(Clamp(0.01 * exposed_temperature, 1, 5))
blob_act()
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover, /obj/effect/blob))
return 1
return ..()
New(loc, var/obj/effect/blob/factory/linked_node)
if(istype(linked_node))
factory = linked_node
factory.spores += src
..()
/mob/living/simple_animal/hostile/blobspore/Life()
if(!is_zombie && isturf(src.loc))
for(var/mob/living/carbon/human/H in oview(src,1)) //Only for corpse right next to/on same tile
if(H.stat == DEAD)
Zombify(H)
break
..()
/mob/living/simple_animal/hostile/blobspore/proc/Zombify(var/mob/living/carbon/human/H)
is_zombie = 1
if(H.wear_suit)
var/obj/item/clothing/suit/armor/A = H.wear_suit
if(A.armor && A.armor["melee"])
maxHealth += A.armor["melee"] //That zombie's got armor, I want armor!
maxHealth += 40
health = maxHealth
name = "blob zombie"
desc = "A shambling corpse animated by the blob."
melee_damage_lower = 10
melee_damage_upper = 15
icon = H.icon
speak_emote = list("groans")
icon_state = "zombie2_s"
H.h_style = null
H.update_hair()
overlays = H.overlays
overlays += image('icons/mob/blob.dmi', icon_state = "blob_head")
H.loc = src
loc.visible_message("<span class='warning'> The corpse of [H.name] suddenly rises!</span>")
/mob/living/simple_animal/hostile/blobspore/Die()
// On death, create a small smoke of harmful gas (s-Acid)
var/datum/effect/effect/system/chem_smoke_spread/S = new
var/turf/location = get_turf(src)
// Create the reagents to put into the air, s-acid is yellow and stings a little
create_reagents(25)
reagents.add_reagent("spores", 25)
// Attach the smoke spreader and setup/start it.
S.attach(location)
S.set_up(reagents, 1, 1, location, 15, 1) // only 1-2 smoke cloud
S.start()
qdel(src)
/mob/living/simple_animal/hostile/blobspore/Destroy()
if(factory)
factory.spores -= src
if(contents)
for(var/mob/M in contents)
M.loc = src.loc
/obj/effect/blob/factory/Destroy()
for(var/mob/living/simple_animal/hostile/blob/blobspore/spore in spores)
if(spore.factory == src)
spore.factory = null
spores = null
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
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
overmind.blob_mobs.Add(BS)
return 0
+33 -21
View File
@@ -1,33 +1,45 @@
/obj/effect/blob/node
name = "blob node"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_node"
icon_state = "blank_blob"
health = 100
fire_resist = 2
var/mob/camera/blob/overmind
/obj/effect/blob/node/New(loc, var/h = 100)
blob_nodes += src
processing_objects.Add(src)
..(loc, h)
New(loc, var/h = 100)
blob_nodes += src
processing_objects.Add(src)
..(loc, h)
/obj/effect/blob/node/adjustcolors(var/a_color)
overlays.Cut()
color = null
var/image/I = new('icons/mob/blob.dmi', "blob")
I.color = a_color
src.overlays += I
var/image/C = new('icons/mob/blob.dmi', "blob_node_overlay")
src.overlays += C
Destroy()
blob_nodes -= src
processing_objects.Remove(src)
return ..()
/obj/effect/blob/node/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
Life()
/obj/effect/blob/node/Destroy()
blob_nodes -= src
processing_objects.Remove(src)
return ..()
/obj/effect/blob/node/Life()
if(overmind)
for(var/i = 1; i < 8; i += i)
Pulse(5, i)
health = min(initial(health), health + 1)
Pulse(5, i, overmind.blob_reagent_datum.color)
else
for(var/i = 1; i < 8; i += i)
Pulse(5, i, color)
health = min(initial(health), health + 1)
color = null
update_icon()
if(health <= 0)
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
Delete()
return
/obj/effect/blob/node/update_icon()
if(health <= 0)
qdel(src)
return
run_action()
return 0
return
+11 -13
View File
@@ -7,20 +7,18 @@
var/mob/camera/blob/overmind = null
var/resource_delay = 0
update_icon()
if(health <= 0)
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
Delete()
return
return
/obj/effect/blob/resource/update_icon()
if(health <= 0)
qdel(src)
run_action()
if(resource_delay > world.time)
return 0
/obj/effect/blob/resource/run_action()
resource_delay = world.time + 40 // 4 seconds
if(resource_delay > world.time)
return 0
if(overmind)
overmind.add_points(1)
return 1
resource_delay = world.time + 40 // 4 seconds
if(overmind)
overmind.add_points(1)
return 0
+11 -10
View File
@@ -3,18 +3,19 @@
icon = 'icons/mob/blob.dmi'
icon_state = "blob_idle"
desc = "Some blob creature thingy"
health = 60
brute_resist = 4
health = 75
fire_resist = 2
update_icon()
if(health <= 0)
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
Delete()
return
/obj/effect/blob/shield/update_icon()
if(health <= 0)
qdel(src)
return
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
return 0
/obj/effect/blob/shield/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
/obj/effect/blob/shield/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
return 0
+16
View File
@@ -0,0 +1,16 @@
/obj/effect/blob/storage
name = "storage blob"
icon = 'icons/mob/blob.dmi'
icon_state = "blob_resource"
health = 30
fire_resist = 2
var/mob/camera/blob/overmind = null
/obj/effect/blob/storage/update_icon()
if(health <= 0)
overmind.max_blob_points -= 50
qdel(src)
/obj/effect/blob/storage/proc/update_max_blob_points(var/new_point_increase)
if(overmind)
overmind.max_blob_points += new_point_increase
-17
View File
@@ -1,17 +0,0 @@
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
blobpwrdisplay = new /obj/screen()
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
blobpwrdisplay.layer = 20
blobhealthdisplay = new /obj/screen()
blobhealthdisplay.name = "blob health"
blobhealthdisplay.icon_state = "block"
blobhealthdisplay.screen_loc = ui_internal
blobhealthdisplay.layer = 20
mymob.client.screen = null
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
+24 -20
View File
@@ -14,17 +14,31 @@
var/obj/effect/blob/core/blob_core = null // The blob overmind's core
var/blob_points = 0
var/max_blob_points = 100
var/last_attack = 0
var/datum/reagent/blob/blob_reagent_datum = new/datum/reagent/blob()
var/list/blob_mobs = list()
var/ghostimage = null
/mob/camera/blob/New()
var/new_name = "[initial(name)] ([rand(1, 999)])"
name = new_name
real_name = new_name
last_attack = world.time
var/list/possible_reagents = list()
for(var/type in (typesof(/datum/reagent/blob) - /datum/reagent/blob))
possible_reagents.Add(new type)
blob_reagent_datum = pick(possible_reagents)
if(blob_core)
blob_core.adjustcolors(blob_reagent_datum.color)
ghostimage = image(src.icon,src,src.icon_state)
ghost_darkness_images |= ghostimage //so ghosts can see the blob cursor when they disable darkness
updateallghostimages()
..()
/mob/camera/blob/Life()
if(!blob_core)
qdel(src)
..()
/mob/camera/blob/Destroy()
@@ -38,8 +52,8 @@
/mob/camera/blob/Login()
..()
sync_mind()
src << "<span class='notice'>You are the overmind!</span>"
src << "Your randomly chosen reagent is: <b>[blob_reagent_datum.name]</b>!"
src << "You are the overmind and can control the blob! You can expand, which will attack people, and place new blob pieces such as..."
src << "<b>Normal Blob</b> will expand your reach and allow you to upgrade into special blobs that perform certain functions."
src << "<b>Shield Blob</b> is a strong and expensive blob which can take more damage. It is fireproof and can block air, use this to protect yourself from station fires."
@@ -51,14 +65,12 @@
/mob/camera/blob/proc/update_health()
if(blob_core)
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#e36600'>[blob_core.health]</font></div>"
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#e36600'>[round(blob_core.health)]</font></div>"
/mob/camera/blob/proc/add_points(var/points)
if(points != 0)
blob_points = Clamp(blob_points + points, 0, max_blob_points)
//sanity for manual spawned blob cameras
if(hud_used)
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#82ed00'>[src.blob_points]</font></div>"
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(src.blob_points)]</font></div>"
/mob/camera/blob/say(var/message)
if (!message)
@@ -79,21 +91,16 @@
/mob/camera/blob/proc/blob_talk(message)
log_say("[key_name(src)] : [message]")
message = trim(sanitize(copytext(message, 1, MAX_MESSAGE_LEN)))
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (!message)
return
var/verb = "states,"
var/rendered = "<font color=\"#EE4000\"><i><span class='game say'>Blob Telepathy, <span class='name'>[name]</span> <span class='message'>[verb] \"[message]\"</span></span></i></font>"
var/rendered = "<font color=\"#EE4000\"><i><span class='game say'>Blob Telepathy, <span class='name'>[name]([blob_reagent_datum.name])</span> <span class='message'>[verb] \"[message]\"</span></span></i></font>"
for (var/mob/camera/blob/S in world)
if(istype(S))
S.show_message(rendered, 2)
for (var/mob/M in dead_mob_list)
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
rendered = "<font color=\"#EE4000\"><i><span class='game say'>Blob Telepathy, <span class='name'>[name]</span> ([ghost_follow_link(src, ghost=M)]) <span class='message'>[verb] \"[message]\"</span></span></i></font>"
for (var/mob/M in mob_list)
if(isovermind(M) || isobserver(M))
M.show_message(rendered, 2)
/mob/camera/blob/emote(var/act,var/m_type=1,var/message = null)
@@ -103,14 +110,11 @@
return
/mob/camera/blob/Stat()
statpanel("Status")
..()
if (client.statpanel == "Status")
if(statpanel("Status"))
if(blob_core)
stat(null, "Core Health: [blob_core.health]")
stat(null, "Power Stored: [blob_points]/[max_blob_points]")
return
/mob/camera/blob/Move(var/NewLoc, var/Dir = 0)
var/obj/effect/blob/B = locate() in range("3x3", NewLoc)
@@ -119,5 +123,5 @@
else
return 0
/mob/camera/experience_pressure_difference()
return 0
/mob/camera/blob/proc/can_attack()
return (world.time > (last_attack + CLICK_CD_RANGE))
+179 -46
View File
@@ -2,7 +2,7 @@
/mob/camera/blob/proc/can_buy(var/cost = 15)
if(blob_points < cost)
src << "<span class='warning'>You cannot afford this.</span>"
src << "<span class='warning'>You cannot afford this!</span>"
return 0
add_points(-cost)
return 1
@@ -54,8 +54,9 @@
if(!can_buy(10))
return
B.color = blob_reagent_datum.color
B.change_to(/obj/effect/blob/shield)
return
@@ -88,7 +89,7 @@
if(!can_buy(40))
return
B.color = blob_reagent_datum.color
B.change_to(/obj/effect/blob/resource)
var/obj/effect/blob/resource/R = locate() in T
if(R)
@@ -96,39 +97,6 @@
return
/mob/camera/blob/proc/create_core()
set category = "Blob"
set name = "Create Core Blob (100)"
set desc = "Create another Core Blob to aid in the station takeover"
var/turf/T = get_turf(src)
if(!T)
return
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)//We are on a blob
src << "There is no blob here!"
return
if(!istype(B, /obj/effect/blob/normal))
src << "Unable to use this blob, find a normal one."
return
for(var/obj/effect/blob/core/blob in orange(15))
src << "There is another core blob nearby, move more than 15 tiles away from it!"
return
if(!can_buy(100))
return
B.change_to(/obj/effect/blob/core, src)
return
/mob/camera/blob/verb/create_node()
set category = "Blob"
set name = "Create Node Blob (60)"
@@ -157,8 +125,11 @@
if(!can_buy(60))
return
B.change_to(/obj/effect/blob/node)
var/obj/effect/blob/node/R = locate() in T
if(R)
R.adjustcolors(blob_reagent_datum.color)
R.overmind = src
return
@@ -190,6 +161,67 @@
return
B.change_to(/obj/effect/blob/factory)
B.color = blob_reagent_datum.color
var/obj/effect/blob/factory/R = locate() in T
if(R)
R.overmind = src
return
/mob/camera/blob/verb/create_blobbernaut()
set category = "Blob"
set name = "Create Blobbernaut (20)"
set desc = "Create a powerful blob-being, a Blobbernaut"
var/turf/T = get_turf(src)
if(!T)
return
var/obj/effect/blob/B = locate(/obj/effect/blob) in T
if(!B)
src << "You must be on a blob!"
return
if(!istype(B, /obj/effect/blob/factory))
src << "Unable to use this blob, find a factory blob."
return
if(!can_buy(20))
return
var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new /mob/living/simple_animal/hostile/blob/blobbernaut (get_turf(B))
if(blobber)
qdel(B)
blobber.color = blob_reagent_datum.color
blobber.overmind = src
blob_mobs.Add(blobber)
return
/mob/camera/blob/verb/relocate_core()
set category = "Blob"
set name = "Relocate Core (80)"
set desc = "Relocates your core to the node you are on, your old core will be turned into a node."
var/turf/T = get_turf(src)
if(!T)
return
var/obj/effect/blob/node/B = locate(/obj/effect/blob/node) in T
if(!B)
src << "You must be on a blob node!"
return
if(!can_buy(80))
return
// The old switcharoo.
var/turf/old_turf = blob_core.loc
blob_core.loc = T
B.loc = old_turf
return
@@ -211,7 +243,7 @@
src << "Unable to remove this blob."
return
B.Delete()
qdel(B)
return
@@ -227,6 +259,8 @@
if(!T)
return
if(!can_attack())
return
var/obj/effect/blob/B = locate() in T
if(B)
src << "There is a blob here!"
@@ -237,14 +271,14 @@
src << "There is no blob adjacent to you."
return
for (var/mob/living/M in T.contents)
if(M && !(M.stat))
src << "You can't expand to a tile containing a living entity."
return
if(!can_buy(5))
return
OB.expand(T, 0)
last_attack = world.time
OB.expand(T, 0, blob_reagent_datum.color)
for(var/mob/living/L in T)
blob_reagent_datum.reaction_mob(L, TOUCH, 25)
blob_reagent_datum.send_message(L)
OB.color = blob_reagent_datum.color
return
@@ -267,8 +301,107 @@
if(!surrounding_turfs.len)
return
for(var/mob/living/simple_animal/hostile/blobspore/BS in living_mob_list)
for(var/mob/living/simple_animal/hostile/blob/blobspore/BS in living_mob_list)
if(isturf(BS.loc) && get_dist(BS, T) <= 35)
BS.LoseTarget()
BS.Goto(pick(surrounding_turfs), BS.move_to_delay)
return
return
/mob/camera/blob/verb/split_consciousness()
set category = "Blob"
set name = "Split consciousness (100) (One use)"
set desc = "Expend resources to attempt to produce another sentient overmind"
if(!blob_nodes || !blob_nodes.len)
src << "<span class='warning'>A node is required to birth your offspring...</span>"
return
var/obj/effect/blob/node/N = locate(/obj/effect/blob) in blob_nodes
if(!N)
src << "<span class='warning'>A node is required to birth your offspring...</span>"
return
if(!can_buy(100))
return
verbs -= /mob/camera/blob/verb/split_consciousness //we've used our split_consciousness
new /obj/effect/blob/core/ (get_turf(N), 200, null, blob_core.point_rate, "offspring")
qdel(N)
if(ticker && ticker.mode.name == "blob")
var/datum/game_mode/blob/BL = ticker.mode
BL.blobwincount = initial(BL.blobwincount) * 2
/mob/camera/blob/verb/blob_broadcast()
set category = "Blob"
set name = "Blob Broadcast"
set desc = "Speak with your blob spores and blobbernauts as your mouthpieces. This action is free."
var/speak_text = input(usr, "What would you like to say with your minions?", "Blob Broadcast", null) as text
if(!speak_text)
return
else
usr << "You broadcast with your minions, <B>[speak_text]</B>"
for(var/mob/living/simple_animal/hostile/blob_minion in blob_mobs)
blob_minion.say(speak_text)
return
/mob/camera/blob/verb/create_storage()
set category = "Blob"
set name = "Create Storage Blob (40)"
set desc = "Create a storage tower which will store extra resources for you. This increases your max resource cap by 50."
var/turf/T = get_turf(src)
if(!T)
return
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)//We are on a blob
src << "There is no blob here!"
return
if(!istype(B, /obj/effect/blob/normal))
src << "Unable to use this blob, find a normal one."
return
for(var/obj/effect/blob/storage/blob in orange(3, T))
src << "There is a storage blob nearby, move more than 4 tiles away from it!"
return
if(!can_buy(40))
return
B.color = blob_reagent_datum.color
B.change_to(/obj/effect/blob/storage)
var/obj/effect/blob/storage/R = locate() in T
if(R)
R.overmind = src
R.update_max_blob_points(50)
return
/mob/camera/blob/verb/chemical_reroll()
set category = "Blob"
set name = "Reactive Chemical Adaptation (50)"
set desc = "Replaces your chemical with a different one"
if(!can_buy(50))
return
var/list/excluded = list(/datum/reagent/blob, blob_reagent_datum.type) //guaranteed new chemical
var/datum/reagent/blob/B = pick((typesof(/datum/reagent/blob) - excluded))
blob_reagent_datum = new B
for(var/obj/effect/blob/BL in blobs)
BL.adjustcolors(blob_reagent_datum.color)
for(var/mob/living/simple_animal/hostile/blob/BLO)
BLO.adjustcolors(blob_reagent_datum.color)
src << "Your reagent is now: <b>[blob_reagent_datum.name]</b>!"
+186 -146
View File
@@ -2,7 +2,7 @@
/obj/effect/blob
name = "blob"
icon = 'icons/mob/blob.dmi'
light_range = 0
light_range = 3
desc = "Some blob creature thingy"
density = 0
opacity = 0
@@ -13,176 +13,216 @@
var/fire_resist = 1
New(loc)
blobs += src
src.dir = pick(1, 2, 4, 8)
src.update_icon()
..(loc)
for(var/atom/A in loc)
A.blob_act()
return
/obj/effect/blob/New(loc)
blobs += src
src.dir = pick(1, 2, 4, 8)
src.update_icon()
..(loc)
for(var/atom/A in loc)
A.blob_act()
return
Destroy()
blobs -= src
return ..()
/obj/effect/blob/Destroy()
blobs -= src
if(isturf(loc)) //Necessary because Expand() is retarded and spawns a blob and then deletes it
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
return ..()
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
/obj/effect/blob/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
return 0
/obj/effect/blob/process()
Life()
return
/obj/effect/blob/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
var/damage = Clamp(0.01 * exposed_temperature, 0, 4)
take_damage(damage, BURN)
/obj/effect/blob/proc/Life()
return
/obj/effect/blob/proc/RegenHealth()
// All blobs heal over time when pulsed, but it has a cool down
if(health_timestamp > world.time)
return 0
if(health < initial(health))
health++
update_icon()
health_timestamp = world.time + 10 // 1 seconds
process()
Life()
/obj/effect/blob/proc/Pulse(var/pulse = 0, var/origin_dir = 0, var/a_color)//Todo: Fix spaceblob expand
set background = BACKGROUND_ENABLED
RegenHealth()
if(run_action())//If we can do something here then we dont need to pulse more
return
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
var/damage = Clamp(0.03 * exposed_temperature / fire_resist, 0, 7 - fire_resist)
if(damage)
health -= damage
update_icon()
if(pulse > 30)
return//Inf loop check
proc/Life()
for(var/atom/A in src.loc)//Hit everything in the turf
A.blob_act()
return
proc/Pulse(var/pulse = 0, var/origin_dir = 0)//Todo: Fix spaceblob expand
//set background = 1
if(run_action())//If we can do something here then we dont need to pulse more
//Looking for another blob to pulse
var/list/dirs = list(1,2,4,8)
dirs.Remove(origin_dir)//Dont pulse the guy who pulsed us
for(var/i = 1 to 4)
if(!dirs.len) break
var/dirn = pick(dirs)
dirs.Remove(dirn)
var/turf/T = get_step(src, dirn)
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)
expand(T,1,a_color)//No blob here so try and expand
return
B.adjustcolors(a_color)
if(pulse > 20)
return//Inf loop check
B.Pulse((pulse+1),get_dir(src.loc,T), a_color)
return
return
//Looking for another blob to pulse
/obj/effect/blob/proc/run_action()
return 0
/obj/effect/blob/proc/expand(var/turf/T = null, var/prob = 1, var/a_color)
if(prob && !prob(health)) return
if(istype(T, /turf/space) && prob(75)) return
if(!T)
var/list/dirs = list(1,2,4,8)
dirs.Remove(origin_dir)//Dont pulse the guy who pulsed us
for(var/i = 1 to 4)
if(!dirs.len) break
var/dirn = pick(dirs)
dirs.Remove(dirn)
var/turf/T = get_step(src, dirn)
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)
expand(T)//No blob here so try and expand
return
B.Pulse((pulse+1),get_dir(src.loc,T))
return
T = get_step(src, dirn)
if(!(locate(/obj/effect/blob) in T)) break
else T = null
if(!T) return 0
var/obj/effect/blob/normal/B = new /obj/effect/blob/normal(src.loc, min(src.health, 30))
B.color = a_color
B.density = 1
if(T.Enter(B,src))//Attempt to move into the tile
B.density = initial(B.density)
B.loc = T
else
T.blob_act()//If we cant move in hit the turf
B.loc = null //So we don't play the splat sound, see Destroy()
qdel(B)
for(var/atom/A in T)//Hit everything in the turf
A.blob_act()
return 1
/obj/effect/blob/ex_act(severity)
..()
var/damage = 150 - 20 * severity
take_damage(damage, BRUTE)
/obj/effect/blob/bullet_act(var/obj/item/projectile/Proj)
..()
take_damage(Proj.damage, Proj.damage_type)
return 0
/obj/effect/blob/Crossed(var/mob/living/L)
..()
L.blob_act()
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
visible_message("<span class='danger'>[user] has attacked the [src.name] with \the [W]!</span>")
if(W.damtype == BURN)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
take_damage(W.force, W.damtype)
/obj/effect/blob/attack_animal(mob/living/simple_animal/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
visible_message("<span class='danger'>\The [M] has attacked the [src.name]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
take_damage(damage, BRUTE)
return
/obj/effect/blob/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
visible_message("<span class='danger'>[M] has slashed the [src.name]!</span>")
var/damage = rand(15, 30)
take_damage(damage, BRUTE)
return
/obj/effect/blob/proc/take_damage(damage, damage_type)
if(!damage || damage_type == STAMINA) // Avoid divide by zero errors
return
switch(damage_type)
if(BRUTE)
damage /= max(brute_resist, 1)
if(BURN)
damage /= max(fire_resist, 1)
health -= damage
update_icon()
/obj/effect/blob/proc/change_to(var/type)
if(!ispath(type))
error("[type] is an invalid type for the blob.")
var/obj/effect/blob/B = new type(src.loc)
if(!istype(type, /obj/effect/blob/core) || !istype(type, /obj/effect/blob/node))
B.color = color
else
B.adjustcolors(color)
qdel(src)
proc/run_action()
return 0
/obj/effect/blob/proc/adjustcolors(var/a_color)
if(a_color)
color = a_color
return
/obj/effect/blob/examine(mob/user)
..()
user << "It looks like it's of a [get_chem_name()] kind."
return
proc/expand(var/turf/T = null, var/prob = 1)
if(prob && !prob(health)) return
if(istype(T, /turf/space) && prob(75)) return
if(!T)
var/list/dirs = list(1,2,4,8)
for(var/i = 1 to 4)
var/dirn = pick(dirs)
dirs.Remove(dirn)
T = get_step(src, dirn)
if(!(locate(/obj/effect/blob) in T)) break
else T = null
if(!T) return 0
var/obj/effect/blob/normal/B = new /obj/effect/blob/normal(src.loc, min(src.health, 30))
B.density = 1
if(T.Enter(B,src))//Attempt to move into the tile
B.density = initial(B.density)
B.loc = T
else
T.blob_act()//If we cant move in hit the turf
B.Delete()
for(var/atom/A in T)//Hit everything in the turf
A.blob_act()
return 1
ex_act(severity)
var/damage = 150
health -= ((damage/brute_resist) - (severity * 5))
update_icon()
return
bullet_act(var/obj/item/projectile/Proj)
..()
switch(Proj.damage_type)
if(BRUTE)
health -= (Proj.damage/brute_resist)
if(BURN)
health -= (Proj.damage/fire_resist)
update_icon()
return 0
attackby(var/obj/item/weapon/W, var/mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(get_turf(src), 'sound/effects/attackblob.ogg', 50, 1)
src.visible_message("\red <B>The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = 0
switch(W.damtype)
if("fire")
damage = (W.force / max(src.fire_resist,1))
if(istype(W, /obj/item/weapon/weldingtool))
playsound(get_turf(src), 'sound/items/Welder.ogg', 100, 1)
if("brute")
damage = (W.force / max(src.brute_resist,1))
health -= damage
update_icon()
return
attack_animal(mob/living/simple_animal/M as mob)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
src.visible_message("<span class='danger'>The [src.name] has been attacked by \the [M]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
if(!damage) // Avoid divide by zero errors
return
damage /= max(src.brute_resist, 1)
health -= damage
update_icon()
return
proc/change_to(var/type)
if(!ispath(type))
error("[type] is an invalid type for the blob.")
new type(src.loc)
Delete()
return
proc/Delete()
qdel(src)
/obj/effect/blob/proc/get_chem_name()
for(var/mob/camera/blob/B in mob_list)
if(lowertext(B.blob_reagent_datum.color) == lowertext(src.color)) // Goddamit why we use strings for these
return B.blob_reagent_datum.name
return "unknown"
/obj/effect/blob/normal
icon_state = "blob"
luminosity = 0
light_range = 0
health = 21
Delete()
src.loc = null
blobs -= src
/obj/effect/blob/normal/update_icon()
if(health <= 0)
qdel(src)
else if(health <= 15)
icon_state = "blob_damaged"
else
icon_state = "blob"
update_icon()
if(health <= 0)
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
Delete()
return
if(health <= 15)
icon_state = "blob_damaged"
return
/* // Used to create the glow sprites. Remember to set the animate loop to 1, instead of infinite!
var/datum/blob_colour/B = new()
/datum/blob_colour/New()
..()
var/icon/I = 'icons/mob/blob.dmi'
I += rgb(35, 35, 0)
if(isfile("icons/mob/blob_result.dmi"))
fdel("icons/mob/blob_result.dmi")
fcopy(I, "icons/mob/blob_result.dmi")
*/
@@ -104,4 +104,4 @@
if(E.target_real_name == new_dna.real_name)
protected_dna |= new_dna
return
absorbed_dna |= new_dna
absorbed_dna |= new_dna
@@ -0,0 +1,53 @@
/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>"
+2 -1
View File
@@ -76,6 +76,8 @@
// if(revdata)
// feedback_set_details("revision","[revdata.revision]")
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
start_state = new /datum/station_state()
start_state.count()
return 1
@@ -225,7 +227,6 @@
feedback_set("escaped_on_pod_5",escaped_on_pod_5)
send2mainirc("A round of [src.name] has ended - [surviving_total] survivors, [ghosts] ghosts.")
return 0
+11
View File
@@ -465,6 +465,17 @@ 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()
var/station_integrity = min(round( 100.0 * start_state.score(end_state), 0.1), 100.0)
world << "<BR>[TAB]Shift Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B>"
world << "<BR>[TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>"
world << "<BR>"
//Silicon laws report
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
if (aiPlayer.stat != 2)
world << "<b>[aiPlayer.name] (Played by: [aiPlayer.key])'s laws at the end of the game were:</b>"
+29 -4
View File
@@ -454,9 +454,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_STATION && 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.
+10 -10
View File
@@ -116,16 +116,16 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/chemist(H), slot_wear_suit)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/chemist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -145,17 +145,17 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
+10 -10
View File
@@ -25,17 +25,17 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/melee/classic_baton/telescopic(H.back), slot_in_backpack)
return 1
@@ -62,16 +62,16 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
+5 -5
View File
@@ -86,6 +86,11 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
@@ -93,11 +98,6 @@
H.equip_or_collect(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/pda/botanist(H), slot_wear_pda)
switch(H.backbag)
if(1) H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
+4
View File
@@ -15,6 +15,10 @@
if(!H) return 0
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
H.equip_or_collect(B, slot_l_hand)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/device/pda/chaplain(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
@@ -127,7 +127,7 @@
origin_tech = "programming=2;powerstorage=2"
/obj/item/weapon/circuitboard/powermonitor
name = "Circuit board (Power Monitor)"
build_path = "/obj/machinery/power/monitor"
build_path = "/obj/machinery/computer/monitor"
/obj/item/weapon/circuitboard/olddoor
name = "Circuit board (DoorMex)"
build_path = "/obj/machinery/computer/pod/old"
+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)
@@ -39,6 +39,7 @@
R.speech_synthesizer_langs = list()
R.notify_ai(2)
R.updateicon()
R.add_language("Robot Talk", 1)
return 1
-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
+1 -3
View File
@@ -43,7 +43,7 @@
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
/turf/simulated/Entered(atom/A, atom/OL)
..()
if(ishuman(A))
var/mob/living/carbon/human/M = A
if(M.lying) return
@@ -148,8 +148,6 @@
M.inertia_dir = 0
return
..()
//returns 1 if made bloody, returns 0 otherwise
/turf/simulated/add_blood(mob/living/carbon/human/M as mob)
if (!..())
+2 -2
View File
@@ -189,8 +189,8 @@
return
/turf/simulated/wall/blob_act()
take_damage(rand(75, 125))
return
if(prob(50))
dismantle_wall()
/turf/simulated/wall/mech_melee_attack(obj/mecha/M)
if(M.damtype == "brute")
-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)
+19 -47
View File
@@ -35,10 +35,9 @@
/turf/New()
..()
for(var/atom/movable/AM as mob|obj in src)
spawn( 0 )
src.Entered(AM)
return
for(var/atom/movable/AM in src)
Entered(AM)
return
/turf/Destroy()
return QDEL_HINT_HARDDEL_NOW
@@ -105,51 +104,24 @@
return 1 //Nothing found to block so return success!
/turf/Entered(atom/atom as mob|obj)
..()
//vvvvv Infared beam stuff vvvvv
if ((atom && atom.density && !( istype(atom, /obj/effect/beam) )))
for(var/obj/effect/beam/i_beam/I in src)
spawn( 0 )
if (I)
I.hit()
break
//^^^^^ Infared beam stuff ^^^^^
if(!istype(atom, /atom/movable))
return
var/atom/movable/M = atom
if(!M.simulated) return
var/loopsanity = 100
/turf/Entered(atom/movable/M)
if(ismob(M))
if(!M:lastarea)
M:lastarea = get_area(M.loc)
if(M:lastarea.has_gravity == 0)
inertial_drift(M)
/*
if(M.flags & NOGRAV)
inertial_drift(M)
*/
var/mob/O = M
if(!O.lastarea)
O.lastarea = get_area(O.loc)
var/has_gravity = O.mob_has_gravity(src)
O.update_gravity(has_gravity)
if(!has_gravity)
inertial_drift(O)
else if(!istype(src, /turf/space))
M:inertia_dir = 0
..()
var/objects = 0
for(var/atom/A as mob|obj|turf|area in range(1))
if(!A.simulated) return
if(objects > loopsanity) break
objects++
spawn( 0 )
if ((A && M))
A.HasProximity(M, 1)
return
return
O.inertia_dir = 0
var/loopsanity = 100
for(var/atom/A in range(1))
if(loopsanity == 0)
break
loopsanity--
A.HasProximity(M, 1)
/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume)
return
+14
View File
@@ -493,6 +493,20 @@
dat += "in [flag_loc.loc] at ([flag_loc.x], [flag_loc.y], [flag_loc.z])</td></tr>"
dat += "</table>"
if(istype(ticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/mode = ticker.mode
dat += "<br><table cellspacing=5><tr><td><B>Blob</B></td><td></td><td></td></tr>"
dat += "<tr><td><i>Progress: [blobs.len]/[mode.blobwincount]</i></td></tr>"
for(var/datum/mind/blob in mode.infected_crew)
var/mob/M = blob.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
else
dat += "<tr><td><i>Blob not found!</i></td></tr>"
dat += "</table>"
if(ticker.mode.changelings.len)
dat += check_role_table("Changelings", ticker.mode.changelings, src)
+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
+6
View File
@@ -6,7 +6,13 @@
var/time = 30 //time in deciseconds
var/parts[] = list() //type paths of items that will be placed in the result
var/chem_catalists[] = list() //like tools but for reagents
var/fruit[] = list() //grown products required by the recipe
/datum/table_recipe/proc/AdjustChems(var/obj/resultobj as obj)
//This proc is to replace the make_food proc of recipes from microwaves and such that are being converted to table crafting recipes.
//Use it to handle the removal of reagents after the food has been created (like removing toxins from a salad made with ambrosia)
//If a recipe does not require it's chems adjusted, don't bother declaring this for the recipe, as it will call this placeholder
return
/datum/table_recipe/IED
name = "IED"
+25
View File
@@ -11,6 +11,13 @@
/obj/structure/table/proc/check_contents(datum/table_recipe/R)
check_table()
main_loop:
if(R.fruit)
for(var/A in R.fruit)
for(var/B in table_contents)
if(B == A)
if(table_contents[B] >= R.fruit[A])
continue main_loop
return 0
for(var/A in R.reqs)
for(var/B in table_contents)
if(ispath(B, A))
@@ -28,6 +35,10 @@
if(istype(I, /obj/item/stack))
var/obj/item/stack/S = I
table_contents[I.type] += S.amount
else if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = I
if(G.seed && G.seed.kitchen_tag)
table_contents[G.seed.kitchen_tag] += 1
else
if(istype(I, /obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = I
@@ -75,6 +86,7 @@
I.reagents = new /datum/reagents()
I.reagents.reagent_list.Add(A)
I.CheckParts()
R.AdjustChems(I)
return 1
return 0
@@ -84,6 +96,19 @@
var/reagenttransfer = 0
if(istype(resultobject,/obj/item/weapon/reagent_containers))
reagenttransfer = 1
if(R.fruit)
for(var/A in R.fruit)
amt = R.fruit[A]
fruit_loop: //ha
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in loc)
if(G.seed && G.seed.kitchen_tag && (G.seed.kitchen_tag == A))
amt--
G.loc = null //remove it from the table loc so that we don't locate the same fruit every time
if(reagenttransfer)
G.reagents.trans_to(resultobject, G.reagents.total_volume)
qdel(G)
if(amt <= 0)
break fruit_loop
for(var/A in R.reqs)
amt = R.reqs[A]
if(ispath(A, /obj/item/stack))
+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
+8 -57
View File
@@ -1,73 +1,24 @@
/datum/event/blob
announceWhen = 120
noAutoEnd = 1
var/nuke_announced = 0
announceWhen = 12
endWhen = 120
var/obj/effect/blob/core/Blob
/datum/event/blob/announce()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. Nanotrasen has issued a directive 7-10. The station is to be considered quarantined.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs while minimizing collateral damage."
aiPlayer.set_zeroth_law(law)
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: [law]"
/datum/event/blob/start()
var/turf/T = pick(blobstart)
if(!T)
kill()
return
return kill()
Blob = new /obj/effect/blob/core(T, 200)
for(var/i = 1; i < rand(3, 6), i++)
Blob.process()
/datum/event/blob/tick()
if(Blob && IsMultiple(activeFor, 3))
Blob.process()
if(blobs.len > 700*0.6 && !nuke_announced)
announce_nuke()
nuke_announced = 1
if(!Blob && !blob_cores.len)
if(!Blob)
kill()
return
/datum/event/blob/proc/announce_nuke()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code && (bomb.z in config.station_levels))
nukecode = bomb.r_code
command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs. The nuclear failsafe must be activated at any cost, the code is: [nukecode]."
aiPlayer.set_zeroth_law(law)
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: [law]"
spawn(10)
world << sound('sound/effects/siren.ogg')
/datum/event/blob/kill()
spawn(10)
if(Blob || blob_cores.len)
return
command_announcement.Announce("The level 7 biohazard aboard [station_name()] has been eliminated. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update")
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
aiPlayer.clear_zeroth_law()
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: Zeroth law removed."
..()
if(IsMultiple(activeFor, 3))
Blob.process()
+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)
+1 -78
View File
@@ -327,19 +327,11 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/fishandchips
/datum/recipe/microwave/sandwich
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meatsteak,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sandwich
/datum/recipe/microwave/toastedsandwich
items = list(
/obj/item/weapon/reagent_containers/food/snacks/sandwich
)
result = /obj/item/weapon/reagent_containers/food/snacks/toastedsandwich
/datum/recipe/microwave/tomatosoup
reagents = list("water" = 10)
@@ -453,20 +445,6 @@
fruit = list("apple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/candiedapple
/datum/recipe/microwave/slimeburger
reagents = list("slimejelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/bun
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime
/datum/recipe/microwave/jellyburger
reagents = list("cherryjelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/bun
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry
/datum/recipe/microwave/twobread
reagents = list("wine" = 5)
items = list(
@@ -475,22 +453,6 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/twobread
/datum/recipe/microwave/slimesandwich
reagents = list("slimejelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime
/datum/recipe/microwave/cherrysandwich
reagents = list("cherryjelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry
/datum/recipe/microwave/bloodsoup
reagents = list("blood" = 10)
fruit = list("bloodtomato" = 2)
@@ -556,39 +518,8 @@
fruit = list("whitebeet" = 1, "cabbage" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/beetsoup
/datum/recipe/microwave/herbsalad
fruit = list("ambrosia" = 3, "apple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/herbsalad
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..(container)
being_cooked.reagents.del_reagent("toxin")
return being_cooked
/datum/recipe/microwave/aesirsalad
fruit = list("ambrosiadeus" = 3, "goldapple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/aesirsalad
/datum/recipe/microwave/validsalad
fruit = list("ambrosia" = 3, "potato" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/validsalad
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..(container)
being_cooked.reagents.del_reagent("toxin")
return being_cooked
////////////////////////////FOOD ADDITTIONS///////////////////////////////
/datum/recipe/microwave/wrap
reagents = list("soysauce" = 10)
fruit = list("cabbage" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/friedegg,
)
result = /obj/item/weapon/reagent_containers/food/snacks/wrap
/datum/recipe/microwave/beans
reagents = list("ketchup" = 5)
fruit = list("soybeans" = 2)
@@ -618,14 +549,6 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/icecreamsandwich
/datum/recipe/microwave/notasandwich
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/clothing/mask/fakemoustache,
)
result = /obj/item/weapon/reagent_containers/food/snacks/notasandwich
/datum/recipe/microwave/friedbanana
reagents = list("sugar" = 10, "cornoil" = 5)
fruit = list("banana" = 1)
+96
View File
@@ -0,0 +1,96 @@
/* Example for reference when defining recipes
/datum/table_recipe/food
name = "" //in-game display name
reqs[] = list() //type paths of items/reagents consumed associated with how many are needed (equivalent to var/list/items and var/list/reagents combined)
result //type path of item resulting from this craft
tools[] = list() //type paths of items needed but not consumed
time = 30 //time in deciseconds
parts[] = list() //type paths of items that will be placed in the result
fruit[] = list() //grown products required by the recipe
*/
/datum/table_recipe/sandwich
name = "Sandwich"
reqs = list(
/obj/item/weapon/reagent_containers/food/snacks/meatsteak = 1,
/obj/item/weapon/reagent_containers/food/snacks/breadslice = 2,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge = 1,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sandwich
/datum/table_recipe/slimesandwich
name = "Slime Jelly Sandwich"
reqs = list(
/datum/reagent/slimejelly = 5,
/obj/item/weapon/reagent_containers/food/snacks/breadslice = 2,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime
/datum/table_recipe/cherrysandwich
name = "Cherry Jelly Sandwich"
reqs = list(
/datum/reagent/cherryjelly = 5,
/obj/item/weapon/reagent_containers/food/snacks/breadslice = 2,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry
/datum/table_recipe/slimeburger
name = "Slime Jelly Burger"
reqs = list(
/datum/reagent/slimejelly = 5,
/obj/item/weapon/reagent_containers/food/snacks/bun = 1,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime
/datum/table_recipe/jellyburger
name = "Cherry Jelly Burger"
reqs = list(
/datum/reagent/cherryjelly = 5,
/obj/item/weapon/reagent_containers/food/snacks/bun = 1,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry
/datum/table_recipe/herbsalad
name = "herb salad"
fruit = list("ambrosia" = 3, "apple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/herbsalad
/datum/table_recipe/herbsalad/AdjustChems(var/obj/resultobj as obj)
if(istype(resultobj, /obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = resultobj
RC.reagents.del_reagent("toxin")
/datum/table_recipe/aesirsalad
name = "Aesir salad"
fruit = list("ambrosiadeus" = 3, "goldapple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/aesirsalad
/datum/table_recipe/validsalad
name = "valid salad"
fruit = list("ambrosia" = 3, "potato" = 1)
reqs = list(
/obj/item/weapon/reagent_containers/food/snacks/meatball = 1,
)
result = /obj/item/weapon/reagent_containers/food/snacks/validsalad
/datum/table_recipe/validsalad/AdjustChems(var/obj/resultobj as obj)
if(istype(resultobj, /obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = resultobj
RC.reagents.del_reagent("toxin")
/datum/table_recipe/notasandwich
name = "not-a-sandwich"
reqs = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice = 2,
/obj/item/clothing/mask/fakemoustache = 1,
)
result = /obj/item/weapon/reagent_containers/food/snacks/notasandwich
/datum/table_recipe/wrap
name = "egg wrap"
fruit = list("cabbage" = 1)
reqs = list(
/datum/reagent/soysauce = 10,
/obj/item/weapon/reagent_containers/food/snacks/friedegg = 1,
)
result = /obj/item/weapon/reagent_containers/food/snacks/wrap
+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 ..()
+16 -10
View File
@@ -2,31 +2,37 @@ var/global/datum/controller/process/lighting/lighting_controller
/datum/controller/process/lighting/setup()
name = "lighting"
schedule_interval = LIGHTING_INTERVAL
lighting_controller = src
schedule_interval = LIGHTING_INTERVAL
create_lighting_overlays()
/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.
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.
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
+7
View File
@@ -3,6 +3,7 @@
/mob/camera
name = "camera mob"
density = 0
anchored = 1
status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
see_in_dark = 7
@@ -10,3 +11,9 @@
move_on_shuttle = 0
/mob/camera/experience_pressure_difference()
return
/mob/camera/Destroy()
..()
return QDEL_HINT_HARDDEL_NOW
@@ -110,21 +110,6 @@
updatehealth()
/mob/living/carbon/alien/humanoid/blob_act()
if (stat == 2)
return
var/shielded = 0
var/damage = null
if (stat != 2)
damage = rand(30,40)
if(shielded)
damage /= 4
show_message("<span class='userdanger'>The blob attacks!</span>")
adjustFireLoss(damage)
return
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
@@ -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)
@@ -101,30 +101,6 @@
updatehealth()
/mob/living/carbon/alien/larva/blob_act()
if (stat == 2)
return
var/shielded = 0
var/damage = null
if (stat != 2)
damage = rand(10,30)
if(shielded)
damage /= 4
//paralysis += 1
show_message("<span class='userdanger'>The blob attacks you!</span>")
adjustFireLoss(damage)
updatehealth()
return
//can't equip anything
/mob/living/carbon/alien/larva/attack_ui(slot_id)
return
@@ -60,5 +60,8 @@
/mob/living/carbon/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
return
/mob/living/carbon/brain/blob_act()
return
/mob/living/carbon/brain/binarycheck()
return istype(loc, /obj/item/device/mmi/posibrain)
+8
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()
..()
@@ -20,6 +21,13 @@ mob/living
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
germ_level++
/mob/living/carbon/blob_act()
if (stat == DEAD)
return
else
show_message("<span class='userdanger'>The blob attacks!</span>")
adjustBruteLoss(10)
/mob/living/carbon/Move(NewLoc, direct)
. = ..()
if(.)
@@ -381,11 +381,11 @@
..()
/mob/living/carbon/human/blob_act()
if(stat == 2) return
show_message("\red The blob attacks you!")
if(stat == DEAD) return
show_message("<span class='userdanger'>The blob attacks you!</span>")
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
apply_damage(rand(20,30), BRUTE, affecting, run_armor_check(affecting, "melee"))
apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee"))
return
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
@@ -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)
@@ -212,23 +212,8 @@
/mob/living/carbon/slime/blob_act()
if (stat == 2)
return
var/shielded = 0
var/damage = null
if (stat != 2)
damage = rand(10,30)
if(shielded)
damage /= 4
//paralysis += 1
show_message("<span class='userdanger'> The blob attacks you!</span>")
adjustFireLoss(damage)
adjustBruteLoss(20)
updatehealth()
return
@@ -1,8 +1,8 @@
/obj/machinery/computer/drone_control
name = "Maintenance Drone Control"
desc = "Used to monitor the station's drone population and the assembler that services them."
icon = 'icons/obj/computer.dmi'
icon_state = "power"
icon_screen = "power"
icon_keyboard = "power_key"
req_access = list(access_engine_equip)
circuit = "/obj/item/weapon/circuitboard/drone_control"
@@ -243,7 +243,7 @@
/mob/living/simple_animal/borer/verb/secrete_chemicals()
set category = "Alien"
set name = "Secrete Chemicals (50)"
set name = "Secrete Chemicals (30)"
set desc = "Push some chemicals into your host's bloodstream."
if(!host)
@@ -257,17 +257,17 @@
src << "\blue You are feeling far too docile to do that."
return
if(chemicals < 50)
if(chemicals < 30)
src << "You don't have enough chemicals!"
var/chem = input("Select a chemical to secrete.", "Chemicals") as null|anything in list("mannitol","styptic_powder","methamphetamine","sal_acid")
if(!chem || chemicals < 50 || !host || controlling || !src || stat) //Sanity check.
if(!chem || chemicals < 30 || !host || controlling || !src || stat) //Sanity check.
return
src << "\red <B>You squirt a measure of [chem] from your reservoirs into [host]'s bloodstream.</B>"
host.reagents.add_reagent(chem, 15)
chemicals -= 50
host.reagents.add_reagent(chem, 9)
chemicals -= 30
/mob/living/simple_animal/borer/verb/release_host()
set category = "Alien"
+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
+6 -6
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))
@@ -337,4 +337,4 @@
trace.firer = user
var/output = trace.process() //Test it!
qdel(trace) //No need for it anymore
return output //Send it back to the gun!
return output //Send it back to the gun!
@@ -0,0 +1,192 @@
// These can only be applied by blobs. They are what blobs are made out of.
// The 4 damage
/datum/reagent/blob
var/message = "The blob strikes you" //message sent to any mob hit by the blob
var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt
/datum/reagent/blob/boiling_oil
name = "Boiling Oil"
id = "boiling_oil"
description = ""
color = "#B68D00"
message = "The blob splashes you with burning oil"
/datum/reagent/blob/boiling_oil/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(15*ratio, BURN)
M.adjust_fire_stacks(2*ratio)
M.IgniteMob()
if(isliving(M))
M.emote("scream")
/datum/reagent/blob/toxic_goop
name = "Toxic Goop"
id = "toxic_goop"
description = ""
color = "#008000"
message_living = ", and you feel sick and nauseated"
/datum/reagent/blob/toxic_goop/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(20*ratio, TOX)
/datum/reagent/blob/skin_ripper
name = "Skin Ripper"
id = "skin_ripper"
description = ""
color = "#FF4C4C"
message_living = ", and you feel your skin ripping and tearing off"
/datum/reagent/blob/skin_ripper/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(20*ratio, BRUTE)
if(iscarbon(M))
M.emote("scream")
// Combo Reagents
/datum/reagent/blob/skin_melter
name = "Skin Melter"
id = "skin_melter"
description = ""
color = "#7F0000"
message_living = ", and you feel your skin char and melt"
/datum/reagent/blob/skin_melter/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(10*ratio, BRUTE)
M.apply_damage(10*ratio, BURN)
M.adjust_fire_stacks(2*ratio)
M.IgniteMob()
if(iscarbon(M))
M.emote("scream")
/datum/reagent/blob/lung_destroying_toxin
name = "Lung Destroying Toxin"
id = "lung_destroying_toxin"
description = ""
color = "#00FFC5"
message_living = ", and your lungs feel heavy and weak"
/datum/reagent/blob/lung_destroying_toxin/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(20* ratio, OXY)
M.losebreath += 15*ratio
M.apply_damage(20*ratio, TOX)
// Special Reagents
/datum/reagent/blob/radioactive_liquid
name = "Radioactive Liquid"
id = "radioactive_liquid"
description = ""
color = "#00EE00"
message_living = ", and your skin feels papery and everything hurts"
/datum/reagent/blob/radioactive_liquid/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(10*ratio, BRUTE)
if(istype(M, /mob/living/carbon/human))
M.apply_effect(40*ratio,IRRADIATE,0)
if(prob(33*ratio))
randmuti(M)
if(prob(98))
randmutb(M)
domutcheck(M, null)
M.UpdateAppearance()
/datum/reagent/blob/dark_matter
name = "Dark Matter"
id = "dark_matter"
description = ""
color = "#61407E"
message = "You feel a thrum as the blob strikes you, and everything flies at you"
/datum/reagent/blob/dark_matter/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(15*ratio, BRUTE)
reagent_vortex(M, 0)
/datum/reagent/blob/b_sorium
name = "Sorium"
id = "b_sorium"
description = ""
color = "#808000"
message = "The blob slams into you, and sends you flying"
/datum/reagent/blob/b_sorium/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.apply_damage(15*ratio, BRUTE)
reagent_vortex(M, 1)
/datum/reagent/blob/explosive // I'm gonna burn in hell for this one
name = "Explosive Gelatin"
id = "explosive"
description = ""
color = "#FFA500"
message = "The blob strikes you, and its tendrils explode"
/datum/reagent/blob/explosive/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
if(prob(75*ratio))
explosion(M.loc, 0, 0, 1, 0, 0)
/datum/reagent/blob/omnizine
name = "Omnizine"
id = "b_omnizine"
description = ""
color = "#C8A5DC"
message = "The blob squirts something at you"
message_living = ", and you feel great"
/datum/reagent/blob/omnizine/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.reagents.add_reagent("omnizine", 11*ratio)
/datum/reagent/blob/spacedrugs
name = "Space drugs"
id = "b_space_drugs"
description = ""
color = "#60A584"
message = "The blob squirts something at you"
message_living = ", and you feel funny"
/datum/reagent/blob/spacedrugs/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume)
if(method == TOUCH)
var/ratio = volume/25
M.hallucination += 20*ratio
M.reagents.add_reagent("space_drugs", 15*ratio)
M.apply_damage(10*ratio, TOX)
/datum/reagent/blob/proc/reagent_vortex(var/mob/living/M as mob, var/setting_type)
var/turf/pull = get_turf(M)
for(var/atom/movable/X in range(4,pull))
if(istype(X, /atom/movable))
if((X) && !X.anchored)
if(setting_type)
step_away(X,pull)
step_away(X,pull)
step_away(X,pull)
step_away(X,pull)
else
X.throw_at(pull)
/datum/reagent/blob/proc/send_message(var/mob/living/M as mob)
var/totalmessage = message
if(message_living && !issilicon(M))
totalmessage += message_living
totalmessage += "!"
M << "<span class='userdanger'>[totalmessage]</span>"
+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)
@@ -144,34 +144,36 @@
..() // -> item/attackby(, params)
if(istype(W,/obj/item/weapon/kitchen/utensil))
//This will allow forks/spoons/plastic cutlery to pick up sliceables, but requires it to be unsliceable for the knife to pick it up
if((istype(W, /obj/item/weapon/kitchen/utensil/knife) && !slice_path) || !istype(W, /obj/item/weapon/kitchen/utensil/knife))
var/obj/item/weapon/kitchen/utensil/U = W
var/obj/item/weapon/kitchen/utensil/U = W
if(!U.reagents)
U.create_reagents(5)
if(!U.reagents)
U.create_reagents(5)
if (U.reagents.total_volume > 0)
user << "\red You already have something on your [U]."
if (U.reagents.total_volume > 0)
user << "\red You already have something on your [U]."
return
user.visible_message( \
"[user] scoops up some [src] with \the [U]!", \
"\blue You scoop up some [src] with \the [U]!" \
)
src.bitecount++
U.overlays.Cut()
U.loaded = "[src]"
var/image/I = new(U.icon, "loadedfood")
I.color = src.filling_color
U.overlays += I
reagents.trans_to(U,min(reagents.total_volume,5))
if (reagents.total_volume <= 0)
qdel(src)
return
user.visible_message( \
"[user] scoops up some [src] with \the [U]!", \
"\blue You scoop up some [src] with \the [U]!" \
)
src.bitecount++
U.overlays.Cut()
U.loaded = "[src]"
var/image/I = new(U.icon, "loadedfood")
I.color = src.filling_color
U.overlays += I
reagents.trans_to(U,min(reagents.total_volume,5))
if (reagents.total_volume <= 0)
qdel(src)
return
if((slices_num <= 0 || !slices_num) || !slice_path)
return 0
@@ -10,7 +10,12 @@
src.bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/kitchen/utensil/knife))
if( \
istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/butch) || \
istype(W, /obj/item/weapon/scalpel) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) \
)
new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src)
new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src)
new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src)
@@ -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