Merge branch 'development' into map-development

# Conflicts:
#	baystation12.dme
#	code/game/objects/random/random.dm
#	code/game/turfs/turf_changing.dm
#	code/modules/mining/ore.dm
#	code/modules/mob/living/silicon/robot/robot_modules.dm
This commit is contained in:
skull132
2017-05-01 01:07:56 +03:00
336 changed files with 4668 additions and 3389 deletions

Binary file not shown.

BIN
UDPShipper.dll Normal file

Binary file not shown.

View File

@@ -328,6 +328,7 @@
#include "code\game\dna\dna_modifier.dm"
#include "code\game\dna\genes\disabilities.dm"
#include "code\game\dna\genes\gene.dm"
#include "code\game\dna\genes\monkey.dm"
#include "code\game\dna\genes\powers.dm"
#include "code\game\gamemodes\antagspawner.dm"
#include "code\game\gamemodes\events.dm"
@@ -2084,6 +2085,7 @@
#include "code\modules\turbolift\turbolift_map.dm"
#include "code\modules\turbolift\turbolift_process.dm"
#include "code\modules\turbolift\turbolift_turfs.dm"
#include "code\modules\udp\ship_udp.dm"
#include "code\modules\vehicles\bike.dm"
#include "code\modules\vehicles\cargo_train.dm"
#include "code\modules\vehicles\train.dm"

View File

@@ -267,7 +267,7 @@
hibernate = 0
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
//log_debug("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
@@ -342,7 +342,7 @@
broadcast_status()
return //do not update_icon
//log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
//log_debug("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
update_icon()

View File

@@ -246,7 +246,7 @@
broadcast_status()
return //do not update_icon
// log_admin("DEBUG \[[world.timeofday]\]: vent_scrubber/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
// log_debug("DEBUG \[[world.timeofday]\]: vent_scrubber/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
spawn(2)
broadcast_status()
update_icon()

View File

@@ -3,7 +3,8 @@
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
#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.
#define LIGHTING_ICON 'icons/effects/lighting_overlay.png' // icon used for lighting shading effects
#define LIGHTING_ICON 'icons/effects/lighting_overlay.dmi' // icon used for lighting shading effects
#define LIGHTING_BASE_ICON_STATE "matrix"
#define LIGHTING_SOFT_THRESHOLD 0.001 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays.

View File

@@ -291,6 +291,8 @@
// Shim until addtimer is merged or I figure out if it is safe to use scheduler for this.
#define QDEL_IN(OBJ, TIME) spawn(TIME) qdel(OBJ)
#define DEBUG_REF(D) (D ? "\ref[D]|[D] ([D.type])" : "NULL")
//Recipe type defines. Used to determine what machine makes them
#define MICROWAVE 0x1
#define FRYER 0x2

View File

@@ -113,6 +113,10 @@
#define COMPANY_ALIGNMENTS list(COMPANY_LOYAL,COMPANY_SUPPORTATIVE,COMPANY_NEUTRAL,COMPANY_SKEPTICAL,COMPANY_OPPOSED)
// Defines the argument used for get_mobs_and_objs_in_view_fast
#define GHOSTS_ALL_HEAR 1
#define ONLY_GHOSTS_IN_VIEW 0
// Defines mob sizes, used by lockers and to determine what is considered a small sized mob, etc.
#define MOB_LARGE 16

View File

@@ -245,6 +245,41 @@
. += M
return .
/proc/get_mobs_and_objs_in_view_fast(var/turf/T, var/range, var/list/mobs, var/list/objs, var/checkghosts = GHOSTS_ALL_HEAR)
var/list/hear = list()
DVIEW(hear, range, T, INVISIBILITY_MAXIMUM)
var/list/hearturfs = list()
for(var/am in hear)
var/atom/movable/AM = am
if(ismob(AM))
mobs += AM
hearturfs += AM.locs[1]
else if(isobj(AM))
objs += AM
hearturfs += AM.locs[1]
for(var/m in player_list)
var/mob/M = m
if(checkghosts == GHOSTS_ALL_HEAR && M.stat == DEAD && (M.client && M.client.prefs.toggles & CHAT_GHOSTEARS))
mobs |= M
continue
if(M.loc && M.locs[1] in hearturfs)
mobs |= M
for(var/o in listening_objects)
var/obj/O = o
if(O && O.loc && O.locs[1] in hearturfs)
objs |= O
#define SIGN(X) ((X<0)?-1:1)
proc

View File

@@ -107,7 +107,7 @@ AngleToHue(hue)
Converts an angle to a hue in the valid range.
RotateHue(hsv, angle)
Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360.
(Rotating red by 60<36> produces yellow.) The result is another HSV or HSVA color with the same saturation and value
(Rotating red by 60<36> produces yellow.) The result is another HSV or HSVA color with the same saturation and value
as the original, but a different hue.
GrayScale(rgb)
Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string.
@@ -886,17 +886,26 @@ proc/generate_image(var/tx as num, var/ty as num, var/tz as num, var/range as nu
//Capture includes non-existan turfs
if(!suppress_errors)
return
return generate_image_from_turfs(turfstocapture, range, cap_mode, user, lighting)
/proc/generate_image_from_turfs(turf/topleft, list/turf/turfstocapture, range as num, cap_mode = CAPTURE_MODE_PARTIAL, mob/living/user, lighting = TRUE)
var/tx = topleft.x
var/ty = topleft.y
//Lines below determine what objects will be rendered
var/list/atoms = list()
for(var/turf/T in turfstocapture)
atoms.Add(T)
atoms += T
for(var/atom/A in T)
if(istype(A, /atom/movable/lighting_overlay) && lighting) //Special case for lighting
atoms.Add(A)
if(istype(A, /atom/movable/lighting_overlay)) //Special case for lighting
continue
if(A.invisibility) continue
atoms.Add(A)
//Lines below actually render all colected data
if(A.invisibility)
continue
atoms += A
//Lines below actually render all collected data
atoms = sort_atoms_by_layer(atoms)
var/icon/cap = icon('icons/effects/96x96.dmi', "")
cap.Scale(range*32, range*32)
@@ -911,6 +920,14 @@ proc/generate_image(var/tx as num, var/ty as num, var/tz as num, var/range as nu
var/yoff = (A.y - ty) * 32
cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
if (lighting)
for (var/turf/T in turfstocapture)
var/icon/im = new(LIGHTING_ICON, "blank")
var/color = T.get_avg_color() // We're going to lose some detail, but it's all we can do without color matrixes.
if (color)
im.Blend(color, ICON_MULTIPLY)
cap.Blend(im, ICON_MULTIPLY, (T.x - tx) * 32, (T.y - ty) * 32)
return cap
proc/percentage_to_colour(var/P)

View File

@@ -23,12 +23,13 @@
/proc/game_log(category, text)
diary << "\[[time_stamp()]] [game_id] [category]: [text][log_end]"
/proc/log_admin(text)
/proc/log_admin(text,level=5,ckey="",admin_key="",ckey_target="")
admin_log.Add(text)
if (config.log_admin)
game_log("ADMIN", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="ADMIN",additional_data=list("_ckey"=html_encode(ckey),"_admin_key"=html_encode(admin_key),"_ckey_target"=html_encode(ckey_target)))
/proc/log_debug(text)
/proc/log_debug(text,level=5)
if (config.log_debug)
game_log("DEBUG", text)
@@ -37,62 +38,72 @@
return
if(C.prefs.toggles & CHAT_DEBUGLOGS)
C << "DEBUG: [text]"
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="DEBUG")
/proc/log_game(text)
/proc/log_game(text,level=5,ckey="",admin_key="",ckey_target="")
if (config.log_game)
game_log("GAME", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="GAME",additional_data=list("_ckey"=html_encode(ckey),"_admin_key"=html_encode(admin_key),"_target"=html_encode(target)))
/proc/log_vote(text)
if (config.log_vote)
game_log("VOTE", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=5,category="VOTE")
/proc/log_access(text)
/proc/log_access(text,level=5,ckey="")
if (config.log_access)
game_log("ACCESS", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="ACCESS",additional_data=list("_ckey"=html_encode(ckey)))
/proc/log_say(text)
/proc/log_say(text,level=5,ckey="")
if (config.log_say)
game_log("SAY", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="SAY",additional_data=list("_ckey"=html_encode(ckey)))
/proc/log_ooc(text)
/proc/log_ooc(text,level=5,ckey="")
if (config.log_ooc)
game_log("OOC", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="OOC",additional_data=list("_ckey"=html_encode(ckey)))
/proc/log_whisper(text)
/proc/log_whisper(text,level=5,ckey="")
if (config.log_whisper)
game_log("WHISPER", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="WHISPER",additional_data=list("_ckey"=html_encode(ckey)))
/proc/log_emote(text)
/proc/log_emote(text,level=5,ckey="")
if (config.log_emote)
game_log("EMOTE", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="EMOTE",additional_data=list("_ckey"=html_encode(ckey)))
/proc/log_attack(text)
/proc/log_attack(text,level=5,ckey="",ckey_target="")
if (config.log_attack)
game_log("ATTACK", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=5,category="ATTACK",additional_data=list("_ckey"=html_encode(ckey),"_ckey_target"=html_encode(ckey_target)))
/proc/log_adminsay(text)
if (config.log_adminchat)
game_log("ADMINSAY", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=5,category="ADMINSAY")
/proc/log_adminwarn(text)
if (config.log_adminwarn)
game_log("ADMINWARN", text)
/proc/log_pda(text)
/proc/log_pda(text,level=5,ckey="",ckey_target="")
if (config.log_pda)
game_log("PDA", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="PDA",additional_data=list("_ckey"=html_encode(ckey),"_ckey_target"=html_encode(ckey_target)))
/proc/log_ntirc(text)
/proc/log_ntirc(text,level=5,ckey="",conversation="")
if (config.log_pda)
game_log("NTIRC", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=level,category="NTIRC",additional_data=list("_ckey"=html_encode(ckey),"_ntirc_conversation"=html_encode(conversation)))
/proc/log_to_dd(text)
world.log << text //this comes before the config check because it can't possibly runtime
if(config.log_world_output)
game_log("DD_OUTPUT", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=5,category="DD_OUTPUT")
/proc/log_misc(text)
game_log("MISC", text)
send_gelf_log(short_message=text, long_message="[time_stamp()]: [text]",level=5,category="MISC")
/proc/log_unit_test(text)
world.log << "## UNIT_TEST ##: [text]"
@@ -102,6 +113,7 @@
if (config.log_runtime)
diary_runtime << "hard delete:[log_end]"
diary_runtime << "[A.type][log_end]"
send_gelf_log(short_message="hard delete: [A.type]",level=5,category="HARDDEL")
/proc/log_exception(exception/e)
if (config.log_runtime)
@@ -110,6 +122,7 @@
diary_runtime << "runtime error:[e.name][log_end]"
diary_runtime << "[e.desc]"
send_gelf_log(short_message="runtime error:[e.name]",long_message="[e.desc]",level=5,category="HARDDEL")
//pretty print a direction bitflag, can be useful for debugging.
/proc/print_dir(var/dir)

View File

@@ -158,7 +158,7 @@ Proc for attack log creation, because really why not
if(target && ismob(target))
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(admin)
log_attack("<font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
log_attack("<font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>",ckey=key_name(user),ckey_target=key_name(target))
//checks whether this item is a module of the robot it is located in.
/proc/is_robot_module(var/obj/item/thing)

View File

@@ -13,9 +13,7 @@ proc/worldtime2text(time = world.time, timeshift = 1)
/proc/worldtime2hours()
if (!roundstart_hour)
worldtime2text()
. = (world.timeofday / (60 MINUTES)) + roundstart_hour
if (. > 24)
. -= 24
. = text2num(time2text(world.time + (36000 * roundstart_hour), "hh"))
proc/worlddate2text()
return num2text(game_year) + "-" + time2text(world.timeofday, "MM-DD")

View File

@@ -37,6 +37,7 @@
mymob.flash.name = "flash"
mymob.flash.screen_loc = ui_entire_screen
mymob.flash.layer = 17
mymob.flash.mouse_opacity = 0
mymob.fire = new /obj/screen()
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'

View File

@@ -132,6 +132,7 @@
mymob.flash.name = "flash"
mymob.flash.screen_loc = ui_entire_screen
mymob.flash.layer = 17
mymob.flash.mouse_opacity = 0
if(constructtype)
mymob.fire = new /obj/screen()

View File

@@ -147,6 +147,7 @@ var/obj/screen/robot_inventory
mymob.flash.name = "flash"
mymob.flash.screen_loc = ui_entire_screen
mymob.flash.layer = 17
mymob.flash.mouse_opacity = 0
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'

View File

@@ -64,7 +64,7 @@ avoid code duplication. This includes items that may sometimes act as a standard
if(!no_attack_log)
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)" )
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M) )
/////////////////////////
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)

View File

@@ -17,7 +17,7 @@
world.log << "### ZAS SHUTDOWN"
message_admins("ZASALERT: Shutting down! status: [air_master.tick_progress]")
log_admin("ZASALERT: Shutting down! status: [air_master.tick_progress]")
log_admin("ZASALERT: Shutting down! status: [air_master.tick_progress]",level=1)
air_processing_killed = TRUE
air_master.failed_ticks = 0

View File

@@ -4,6 +4,9 @@ var/datum/controller/process/night_lighting/nl_ctrl
var/isactive = 0
var/firstrun = 1
var/manual_override = 0
// 0 -> No manual override
// 1 -> Override via. player-set nightmode setting (like CE console)
// 2 -> Red-alert override.
/datum/controller/process/night_lighting/proc/is_active()
return isactive
@@ -19,25 +22,23 @@ var/datum/controller/process/night_lighting/nl_ctrl
disabled = 1
/datum/controller/process/night_lighting/preStart()
var/time = worldtime2hours()
if (time <= config.nl_finish || time >= config.nl_start)
activate()
else
deactivate()
doWork(FALSE)
/datum/controller/process/night_lighting/doWork()
/datum/controller/process/night_lighting/doWork(announce = TRUE)
if (manual_override) // don't automatically change lighting if it was manually changed in-game
return
var/time = worldtime2hours()
if (time <= config.nl_finish || time >= config.nl_start)
if (!isactive)
command_announcement.Announce("Good evening. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now dim lighting in the public hallways in order to accommodate the circadian rhythm of some species.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg')
activate()
if (announce)
command_announcement.Announce("Good evening. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now dim lighting in the public hallways in order to accommodate the circadian rhythm of some species.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg')
else
if (isactive)
command_announcement.Announce("Good morning. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now return the public hallway lighting levels to normal.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg')
deactivate()
if (announce)
command_announcement.Announce("Good morning. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now return the public hallway lighting levels to normal.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg')
// 'whitelisted' areas are areas that have nightmode explicitly enabled

View File

@@ -293,7 +293,7 @@ var/global/datum/controller/radio/radio_controller
/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null)
if (!filter)
filter = RADIO_DEFAULT
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
//log_debug("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
var/list/obj/devices_line = devices[filter]
if (!devices_line)
devices_line = new
@@ -301,8 +301,8 @@ var/global/datum/controller/radio/radio_controller
devices_line+=device
// var/list/obj/devices_line___ = devices[filter_str]
// var/l = devices_line___.len
//log_admin("DEBUG: devices_line.len=[devices_line.len]")
//log_admin("DEBUG: devices(filter_str).len=[l]")
//log_debug("DEBUG: devices_line.len=[devices_line.len]")
//log_debug("DEBUG: devices(filter_str).len=[l]")
/datum/radio_frequency/proc/remove_listener(obj/device)
for (var/devices_filter in devices)

View File

@@ -19,7 +19,6 @@ var/list/gamemode_cache = list()
var/log_emote = 0 // log emotes
var/log_attack = 0 // log attack messages
var/log_adminchat = 0 // log admin chat messages
var/log_adminwarn = 0 // log warnings admins get about bomb construction and such
var/log_pda = 0 // log pda messages
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
var/log_runtime = 0 // logs world.log to a file
@@ -254,6 +253,11 @@ var/list/gamemode_cache = list()
var/api_rate_limit = 50
var/list/api_rate_limit_whitelist = list()
//UDP GELF Logging
var/log_gelf_enabled = 0
var/log_gelf_ip = ""
var/log_gelf_port = ""
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
for (var/T in L)
@@ -358,9 +362,6 @@ var/list/gamemode_cache = list()
if ("log_adminchat")
config.log_adminchat = 1
if ("log_adminwarn")
config.log_adminwarn = 1
if ("log_pda")
config.log_pda = 1
@@ -795,6 +796,15 @@ var/list/gamemode_cache = list()
if("api_rate_limit_whitelist")
config.api_rate_limit_whitelist = text2list(value, ";")
if("log_gelf_enabled")
config.log_gelf_enabled = text2num(value)
if("log_gelf_ip")
config.log_gelf_ip = value
if("log_gelf_port")
config.log_gelf_port = value
else
log_misc("Unknown setting in configuration: '[name]'")

View File

@@ -95,7 +95,7 @@
/datum/ai_laws/drone/New()
add_inherent_law("Preserve, repair and improve the station to the best of your abilities.")
add_inherent_law("Cause no harm to the station or crew.")
add_inherent_law("Interact with no humanoid or synthetic being. that is not a fellow maintenance drone.")
add_inherent_law("Interact with no humanoid or synthetic being that is not a fellow maintenance drone.")
..()
/datum/ai_laws/construction_drone

View File

@@ -750,7 +750,7 @@ proc/api_update_command_database()
G.can_reenter_corpse = 1
G:show_message(text("<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>"), 1)
log_admin("[senderkey] allowed [key_name(G)] to bypass the 30 minute respawn limit via the API")
log_admin("[senderkey] allowed [key_name(G)] to bypass the 30 minute respawn limit via the API",ckey=key_name(G),admin_key=senderkey)
message_admins("Admin [senderkey] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit via the API", 1)
@@ -907,7 +907,7 @@ proc/api_update_command_database()
world << sound('sound/AI/commandreport.ogg')
log_admin("[senderkey] has created a command report via the api: [reportbody]")
log_admin("[senderkey] has created a command report via the api: [reportbody]",admin_key=senderkey)
message_admins("[senderkey] has created a command report via the api", 1)
statuscode = 200
@@ -959,7 +959,7 @@ proc/api_update_command_database()
else
command_announcement.Announce("A fax message from Central Command has been sent to the following fax machines: <br>"+list2text(sendsuccess, ", "), "Fax Received", new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
log_admin("[senderkey] sent a fax via the API: : [faxbody]")
log_admin("[senderkey] sent a fax via the API: : [faxbody]",admin_key=senderkey)
message_admins("[senderkey] sent a fax via the API", 1)
statuscode = 200

View File

@@ -129,7 +129,7 @@ var/datum/discord_bot/discord_bot = null
queue.Add(list(list(message, A - sent)))
// Schedule a push.
if (!push_task)
if (!push_task && scheduler)
push_task = schedule_task_with_source_in(10 SECONDS, src, /datum/discord_bot/proc/push_queue)
// And exit.
@@ -153,11 +153,15 @@ var/datum/discord_bot/discord_bot = null
return list()
if (!channels.len || isnull(channels_to_group["channel_pins"]))
testing("No group.")
if (robust_debug)
log_debug("BOREALIS: No pins channel group.")
return list()
var/list/output = list()
if (robust_debug)
log_debug("BOREALIS: Acquiring pins.")
for (var/A in channels_to_group["channel_pins"])
var/datum/discord_channel/channel = A
if (isnull(output["[channel.pin_flag]"]))
@@ -165,6 +169,9 @@ var/datum/discord_bot/discord_bot = null
output["[channel.pin_flag]"] += channel.get_pins(auth_token)
if (robust_debug)
log_debug("BOREALIS: Finished acquiring pins.")
return output
/*

View File

@@ -152,7 +152,7 @@
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
if(antag)
if(antag.add_antagonist(src, 1, 1, 0, 1, 1)) // Ignore equipment and role type for this.
log_admin("[key_name_admin(usr)] made [key_name(src)] into a [antag.role_text].")
log_admin("[key_name_admin(usr)] made [key_name(src)] into a [antag.role_text].",admin_key=key_name_admin(usr),ckey=key_name(src))
else
usr << "<span class='warning'>[src] could not be made into a [antag.role_text]!</span>"
@@ -326,11 +326,11 @@
qdel(I)
break
H << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</B></font></span>"
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].")
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].",admin_key=key_name(usr),ckey=key_name(usr))
if("add")
H << "<span class='danger'><font size =3>You somehow have become the recepient of a loyalty transplant, and it just activated!</font></span>"
H.implant_loyalty(H, override = TRUE)
log_admin("[key_name_admin(usr)] has loyalty implanted [current].")
log_admin("[key_name_admin(usr)] has loyalty implanted [current].",admin_key=key_name(usr),ckey=key_name(usr))
else
else if (href_list["silicon"])
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
@@ -351,7 +351,7 @@
else if(R.module_state_3 == R.module.emag)
R.module_state_3 = null
R.contents -= R.module.emag
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
log_admin("[key_name_admin(usr)] has unemag'ed [R].",admin_key=key_name(usr),ckey_target=key_name(R))
if("unemagcyborgs")
if (istype(current, /mob/living/silicon/ai))
@@ -370,7 +370,7 @@
else if(R.module_state_3 == R.module.emag)
R.module_state_3 = null
R.contents -= R.module.emag
log_admin("[key_name_admin(usr)] has unemag'ed [ai]'s Cyborgs.")
log_admin("[key_name_admin(usr)] has unemag'ed [ai]'s Cyborgs.",admin_key=key_name_admin(usr),ckey_target=key_name(ai))
else if (href_list["common"])
switch(href_list["common"])

View File

@@ -173,8 +173,25 @@
if (!user)
return
user.info_sent = 0
user << browse('html/templates/welcome_screen.html', "window=greeting;size=640x500")
/*
* A proc used to close the server greeting window for a user.
* Args:
* - var/user client
* - var/reason text
*/
/datum/server_greeting/proc/close_window(var/client/user, var/reason)
if (!user)
return
if (reason)
user << span("notice", reason)
user << browse(null, "window=greeting")
/*
* Sends data to the JS controllers used in the server greeting.
* Also updates the user's preferences, if any of the hashes were out of date.

View File

@@ -67,7 +67,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/storage/box/swabs,
/obj/item/weapon/storage/box/swabs,
/obj/item/weapon/storage/box/slides,
/obj/item/weapon/reagent_containers/spray/luminol)
/obj/item/weapon/reagent_containers/spray/luminol,
/obj/item/device/uv_light)
cost = 30
containertype = /obj/structure/closet/crate
containername = "Auxiliary forensic tools"
@@ -154,6 +155,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/food/drinks/flask/barflask,
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron,
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
/obj/item/weapon/reagent_containers/food/drinks/bottle/sarezhiwine,
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
/obj/item/weapon/lipstick/random,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale,
@@ -222,6 +224,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
group = "Atmospherics"
/datum/supply_packs/inflatable
name = "Inflatable barriers"
contains = list(/obj/item/weapon/storage/briefcase/inflatable,
@@ -1108,6 +1112,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Sterile equipment crate"
group = "Medical"
/datum/supply_packs/beer
contains = list(/obj/structure/reagent_dispensers/beerkeg)
name = "Beer Keg"
cost = 10
containertype = /obj/structure/largecrate
containername = "Beer Crate"
group = "Hospitality"
/datum/supply_packs/xuizi
contains = list(/obj/structure/reagent_dispensers/xuizikeg)
name = "Xuizi Juice Keg"
cost = 20
containertype = /obj/structure/largecrate
containername = "Xuizi Juice Crate"
group = "Hospitality"
/datum/supply_packs/randomised/pizza
num_contained = 5
contains = list(/obj/item/pizzabox/margherita,

View File

@@ -111,7 +111,7 @@ datum/announcement/priority/command/Sound(var/message_sound)
datum/announcement/proc/Log(message as text, message_title as text)
if(log)
log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]")
log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]",ckey=key_name(usr))
message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1)
/proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I)

View File

@@ -34,7 +34,7 @@
return
src << "<span class='danger'>You are attempting to convert \the [player.current]...</span>"
log_admin("[src]([src.ckey]) attempted to convert [player.current].")
log_admin("[src]([src.ckey]) attempted to convert [player.current].",ckey=src.ckey,ckey_target=key_name(player.current))
message_admins("<span class='danger'>[src]([src.ckey]) attempted to convert [player.current].</span>")
player.rev_cooldown = world.time+100

View File

@@ -1,7 +1,7 @@
/datum/antagonist/proc/can_become_antag(var/datum/mind/player, var/ignore_role)
if (!player.current)
return 0
if(player.current && jobban_isbanned(player.current, bantype))
if(jobban_isbanned(player.current, bantype) || jobban_isbanned(player.current, "Antagonist"))
return 0
if(!ignore_role)
if(player.assigned_role in restricted_jobs)

View File

@@ -29,13 +29,10 @@ var/datum/antagonist/deathsquad/mercenary/commandos
under.attackby(hold, player)
player.equip_to_slot_or_del(under, slot_w_uniform)
player.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(player), slot_shoes)
player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(player), slot_gloves)
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(player), slot_glasses)
player.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(player), slot_wear_mask)
player.equip_to_slot_or_del(new /obj/item/ammo_magazine/c45m(player), slot_l_store)
player.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(player), slot_r_store)
player.equip_to_slot_or_del(new /obj/item/weapon/rig/merc(player), slot_back)
player.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/rifle/sts35(player), slot_l_hand)
var/obj/item/weapon/storage/belt/military/syndie_belt = new(player)
@@ -50,6 +47,25 @@ var/datum/antagonist/deathsquad/mercenary/commandos
syndie_belt.contents += new /obj/item/weapon/plastique
player.equip_to_slot_or_del(syndie_belt, slot_belt)
var/obj/item/weapon/rig/merc/mercrig = new(get_turf(player))
mercrig.seal_delay = 0
player.put_in_hands(mercrig)
player.equip_to_slot_or_del(mercrig,slot_back)
if(mercrig)
mercrig.toggle_seals(src,1)
mercrig.seal_delay = initial(mercrig.seal_delay)
if(istype(player.back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = player.back
if(rig.air_supply)
player.internal = rig.air_supply
spawn(10)
if(player.internal)
player.internals.icon_state = "internal1"
else
player << "<span class='danger'>You forgot to turn on your internals! Quickly, toggle the valve!</span>"
var/obj/item/weapon/card/id/id = create_id("Commando", player)
id.access |= get_all_accesses()
id.icon_state = "centcom"

View File

@@ -39,9 +39,7 @@ var/datum/antagonist/deathsquad/deathsquad
under.attackby(hold, player)
player.equip_to_slot_or_del(under, slot_w_uniform)
player.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(player), slot_shoes)
player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(player), slot_gloves)
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(player), slot_glasses)
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud/tactical(player), slot_glasses)
player.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(player), slot_wear_mask)
player.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(player), slot_l_ear)
if (player.mind == leader)
@@ -51,7 +49,6 @@ var/datum/antagonist/deathsquad/deathsquad
player.equip_to_slot_or_del(new /obj/item/weapon/plastique(player), slot_l_store)
player.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(player), slot_r_store)
player.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/rifle/pulse(player), slot_l_hand)
player.equip_to_slot_or_del(new /obj/item/weapon/rig/ert/assetprotection(player), slot_back)
var/obj/item/weapon/storage/belt/security/tactical/commando_belt = new(player)
commando_belt.contents += new /obj/item/ammo_magazine/a357
@@ -65,6 +62,25 @@ var/datum/antagonist/deathsquad/deathsquad
commando_belt.contents += new /obj/item/weapon/grenade/frag
player.equip_to_slot_or_del(commando_belt, slot_belt)
var/obj/item/weapon/rig/ert/assetprotection/mercrig = new(get_turf(player))
mercrig.seal_delay = 0
player.put_in_hands(mercrig)
player.equip_to_slot_or_del(mercrig,slot_back)
if(mercrig)
mercrig.toggle_seals(src,1)
mercrig.seal_delay = initial(mercrig.seal_delay)
if(istype(player.back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/rig = player.back
if(rig.air_supply)
player.internal = rig.air_supply
spawn(10)
if(player.internal)
player.internals.icon_state = "internal1"
else
player << "<span class='danger'>You forgot to turn on your internals! Quickly, toggle the valve!</span>"
var/obj/item/weapon/card/id/id = create_id("Asset Protection", player)
if(id)
id.access |= get_all_station_access()

View File

@@ -33,6 +33,8 @@ var/datum/antagonist/cultist/cult
initial_spawn_target = 6
antaghud_indicator = "hudcultist"
faction = "cult"
var/allow_narsie = 1
var/datum/mind/sacrifice_target
var/list/startwords = list("blood","join","self","hell")

View File

@@ -67,4 +67,4 @@ var/datum/antagonist/highlander/highlanders
highlanders.add_antagonist(H.mind)
message_admins("<span class='notice'>[key_name_admin(usr)] used THERE CAN BE ONLY ONE!</span>", 1)
log_admin("[key_name(usr)] used there can be only one.")
log_admin("[key_name(usr)] used there can be only one.", admin_key=key_name(usr))

View File

@@ -458,22 +458,22 @@ its easier to just keep the beam vertical.
// Use for objects performing visible actions
// message is output to anyone who can see, e.g. "The [src] does something!"
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
/atom/proc/visible_message(var/message, var/blind_message)
var/list/messageturfs = list()//List of turfs we broadcast to.
var/list/messagemobs = list()//List of living mobs nearby who can hear it, and distant ghosts who've chosen to hear it
for (var/turf in view(world.view, get_turf(src)))
messageturfs += turf
/atom/proc/visible_message(var/message, var/blind_message, var/range = world.view)
var/turf/T = get_turf(src)
var/list/mobs = list()
var/list/objs = list()
get_mobs_and_objs_in_view_fast(T,range, mobs, objs, ONLY_GHOSTS_IN_VIEW)
for(var/A in player_list)
var/mob/M = A
if (!M.client || istype(M, /mob/new_player))
continue
if(get_turf(M) in messageturfs)
messagemobs += M
for(var/o in objs)
var/obj/O = o
O.show_message(message,1,blind_message,2)
for(var/A in messagemobs)
var/mob/M = A
for(var/m in mobs)
var/mob/M = m
if(M.see_invisible >= invisibility)
M.show_message(message,1,blind_message,2)
else if(blind_message)
M.show_message(blind_message, 2)
// Show a message to all mobs and objects in earshot of this atom
// Use for objects performing audible actions
@@ -485,17 +485,17 @@ its easier to just keep the beam vertical.
var/range = world.view
if(hearing_distance)
range = hearing_distance
var/list/hear = get_mobs_or_objects_in_view(range,src)
var/turf/T = get_turf(src)
var/list/mobs = list()
var/list/objs = list()
get_mobs_and_objs_in_view_fast(T,range, mobs, objs, ONLY_GHOSTS_IN_VIEW)
for(var/I in hear)
if(isobj(I))
spawn(0)
if(I) //It's possible that it could be deleted in the meantime.
var/obj/O = I
O.show_message( message, 2, deaf_message, 1)
else if(ismob(I))
var/mob/M = I
for(var/m in mobs)
var/mob/M = m
M.show_message(message,2,deaf_message,1)
for(var/o in objs)
var/obj/O = o
O.show_message(message,2,deaf_message,1)
/atom/proc/change_area(var/area/oldarea, var/area/newarea)
change_area_name(oldarea.name, newarea.name)

View File

@@ -44,4 +44,4 @@ proc/get_base_turf_by_area(var/turf/T)
new_base_path = /turf/space
base_turf_by_z["[choice]"] = new_base_path
message_admins("[key_name_admin(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].")
log_admin("[key_name(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].")
log_admin("[key_name(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].",admin_key=key_name(usr))

View File

@@ -5,171 +5,29 @@
block = MONKEYBLOCK
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
return ishuman(M)
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/human))
//testing("Cannot monkey-ify [M], type is [M.type].")
return
var/mob/living/carbon/human/H = M
H.transforming = 1
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in H)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (H.contents-implants))
if (W==H.w_uniform) // will be teared
continue
H.drop_from_inventory(W)
M.transforming = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
qdel(animation)
var/mob/living/carbon/monkey/O = null
if(H.species.primitive)
O = new H.species.primitive(src)
/datum/dna/gene/monkey/activate(var/mob/living/carbon/C)
var/mob/living/carbon/human/H
if(ishuman(C))
H = C
else
return
if(!islesserform(H))
H = H.monkeyize(1)
H.name = H.species.get_random_name() // keep the realname
/datum/dna/gene/monkey/deactivate(var/mob/living/carbon/C)
var/mob/living/carbon/human/H
if(ishuman(C))
H = C
else
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
return
if(M)
if (M.dna)
O.dna = M.dna.Clone()
M.dna = null
if(islesserform(H))
H = H.humanize(1) // woo transform procs!
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
for(var/obj/T in (M.contents-implants))
qdel(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = I_HURT
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
qdel(M)
return
/datum/dna/gene/monkey/deactivate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/monkey))
//testing("Cannot humanize [M], type is [M.type].")
return
var/mob/living/carbon/monkey/Mo = M
Mo.transforming = 1
var/list/implants = list() //Still preserving implants
for(var/obj/item/weapon/implant/W in Mo)
implants += W
W.loc = null
if(!connected)
for(var/obj/item/W in (Mo.contents-implants))
Mo.drop_from_inventory(W)
M.transforming = 1
M.canmove = 0
M.icon = null
M.invisibility = 101
var/atom/movable/overlay/animation = new( M.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("monkey2h", animation)
sleep(48)
qdel(animation)
var/mob/living/carbon/human/O
if(Mo.greaterform)
O = new(src, Mo.greaterform)
else
O = new(src)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
else
O.gender = MALE
if (M)
if (M.dna)
O.dna = M.dna.Clone()
M.dna = null
if (M.suiciding)
O.suiciding = M.suiciding
M.suiciding = null
for(var/datum/disease/D in M.viruses)
O.viruses += D
D.affected_mob = O
M.viruses -= D
//for(var/obj/T in M)
// qdel(T)
O.loc = M.loc
if(M.mind)
M.mind.transfer_to(O) //transfer our mind to the human
if (connected) //inside dna thing
var/obj/machinery/dna_scannernew/C = connected
O.loc = C
C.occupant = O
connected = null
var/i
while (!i)
var/randomname
if (O.gender == MALE)
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if (findname(randomname))
continue
else
O.real_name = randomname
O.dna.real_name = randomname
i++
O.UpdateAppearance()
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
// O.update_icon = 1 //queue a full icon update at next life() call
qdel(M)
return
if(!H.dna.real_name)
var/randomname = H.species.get_random_name()
H.real_name = randomname
H.dna.real_name = randomname

View File

@@ -10,10 +10,7 @@
throw_speed = 1
throw_range = 5
w_class = 1.0
var/used = 0
/obj/item/weapon/antag_spawner/proc/spawn_antag(var/client/C, var/turf/T, var/type = "")
return
var/uses = 1
/obj/item/weapon/antag_spawner/proc/equip_antag(mob/target as mob)
return
@@ -23,56 +20,24 @@
desc = "A single-use teleporter used to deploy a Syndicate Cyborg on the field. Due to budget restrictions, it is only possible to deploy a single cyborg at time."
icon = 'icons/obj/device.dmi'
icon_state = "locator"
var/searching = 0
var/askDelay = 10 * 60 * 1
/obj/item/weapon/antag_spawner/borg_tele/attack_self(mob/user)
if(uses == 0)
usr << "This teleporter is out of uses."
return
user << "<span class='notice'>The syndicate robot teleporter is attempting to locate an available cyborg.</span>"
searching = 1
for(var/mob/dead/observer/O in player_list)
if(!O.MayRespawn())
continue
if(jobban_isbanned(O, "Antagonist") && jobban_isbanned(O, "Mercenary") && jobban_isbanned(O, "Cyborg"))
continue
if(O.client && O.client.prefs && (MODE_MERCENARY in O.client.prefs.be_special_role))
question(O.client)
var/datum/ghosttrap/ghost = get_ghost_trap("syndicate cyborg")
uses--
var/mob/living/silicon/robot/syndicate/F = new(get_turf(usr))
spark(F, 4, alldirs)
ghost.request_player(F,"An operative is requesting a syndicate cyborg.", 60 SECONDS)
F.faction = usr.faction
spawn(600)
searching = 0
if(!used)
user << "<span class='warning'>Unable to connect to the Syndicate Command. Perhaps you could try again later?</span>"
/obj/item/weapon/antag_spawner/borg_tele/proc/question(var/client/C)
spawn(0)
if(!C)
return
var/response = alert(C, "Someone is requesting a syndicate cyborg Would you like to play as one?",
"Syndicate robot request","Yes", "No", "Never for this round")
if(response == "Yes")
response = alert(C, "Are you sure you want to play as a syndicate cyborg?", "Syndicate cyborg request", "Yes", "No")
if(!C || used || !searching)
return
if(response == "Yes")
spawn_antag(C, get_turf(src))
else if (response == "Never for this round")
C.prefs.be_special_role ^= MODE_MERCENARY
obj/item/weapon/antag_spawner/borg_tele/spawn_antag(client/C, turf/T)
spark(T, 4, alldirs)
var/mob/living/silicon/robot/H = new /mob/living/silicon/robot/syndicate(T)
H.key = C.key
var/newname = sanitizeSafe(input(H,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
if (newname != "")
H.real_name = newname
H.name = H.real_name
H << "<b>You are a syndicate cyborg, bound to help and follow the orders of the mercenaries that are deploying you. Remember to speak to the other mercenaries to know more about their plans, you are also able to change your name using the name pick command.</b>"
spawn(1)
used = 1
qdel(src)
H << "<b>You are a syndicate cyborg, bound to help and follow the orders of the mercenaries that are deploying you. Remember to speak to the other mercenaries to know more about their plans, you are also able to change your name using the name pick command.</b>"
spawn(1)
used = 1
qdel(src)
if(F)
if(!F.ckey || !F.client)
F.visible_message("With no working brain to keep \the [F] working, it is teleported back.")
qdel(F)
uses++

View File

@@ -686,6 +686,9 @@ var/list/datum/absorbed_dna/hivemind_bank = list()
if(!(T in view(changeling.sting_range))) return
if(!sting_can_reach(T, changeling.sting_range)) return
if(!changeling_power(required_chems)) return
if(T.isSynthetic())
src << "<span class='warning'>[T] is not compatible with our biology.</span>"
return
changeling.chem_charges -= required_chems
changeling.sting_range = 1

View File

@@ -17,19 +17,6 @@
desc = "A forge used in crafting the unholy weapons used by the armies of Nar-Sie"
icon_state = "forge"
/*
Cult pylons can be used as arcane defensive turrets.
@@ -57,7 +44,10 @@
Exosuits
Explosives
Ablative armour
Smoke grenades
Close the damn firelocks so they can't see you
*/
/obj/structure/cult/pylon
name = "Pylon"
desc = "A floating crystal that hums with an unearthly energy"
@@ -110,6 +100,10 @@
start_process()
/obj/structure/cult/pylon/Destroy()
processing_objects.Remove(src)
return ..()
//Another subtype which starts with infinite empower shots. For empowered adminbus
/obj/structure/cult/pylon/turret/empowered
empowered = 99999999
@@ -202,12 +196,13 @@
if (2)
if ((ticks % process_interval) == 0)
handle_firing()
if (damagetaken && prob(50))
if (damagetaken && prob(50) && empowered > 0)
damagetaken = max(0, damagetaken-1) //An empowered pylon slowly self repairs
empowered = max(0, empowered - 0.2)
if (prob(10))
visible_message("Cracks in the [src] gradually seal as new crystalline matter grows to fill them.")
if (empowered && prob(2))
if (empowered && prob(4))
empowered = max(0, empowered - 1) //Overcharging gradually wears off over time
if (empowered <= 0)
update_icon()
@@ -278,7 +273,7 @@
//If the sacrifice was deleted somehow, we cant know exactly what happened. We'll assume it escaped
.=-1
else if(get_dist(src, sacrifice) > 5)
else if(get_dist(src, get_turf(sacrifice)) > 5)
//If the sacrifice gets more than 5 tiles away, it has escaped
.=-1
else if (sacrifice.stat == DEAD)
@@ -295,7 +290,11 @@
if (sacrifice)
walk_to(sacrifice,0)
else
if (istype(sacrifice.loc, /turf) && !(sacrifice.is_ventcrawling) && !(sacrifice.buckled))
//Suck the creature towards the pylon if possible
walk_towards(sacrifice,src, 10)
else
walk_to(sacrifice,0) //If we're not in a valid situation, cancel walking to prevent bugginess
/obj/structure/cult/pylon/proc/finalize_sacrifice()
sacrifice.visible_message(span("danger","\The [sacrifice]'s physical form unwinds as its soul is extracted from the remains, and drawn into the pylon!"))
@@ -330,7 +329,7 @@
fire_at(target)
return
else
stuffcache = mobs_in_view(10, src)
stuffcache = mobs_in_view(9, src)
//for (var/turf/T in stuffcache)
//new /obj/effect/testtrans(T)
if ((target in stuffcache) && isInSight(src, target))
@@ -342,7 +341,7 @@
//We may have already populated stuffcache this run, dont repeat work
if (!stuffcache)
stuffcache = mobs_in_view(10, src)
stuffcache = mobs_in_view(9, src)
target = null //Either we lost a target or lack one
//for (var/turf/T in stuffcache)
@@ -398,6 +397,7 @@
A.ignore = sacrificer
A.launch(target)
next_shot = world.time + shot_delay
A = null //So projectiles can GC
spawn(shot_delay+1)
handle_firing()
@@ -465,7 +465,7 @@
visible_message(
"<span class='cult'>The beam refracts inside the pylon, splitting into an indistinct violet glow. The crystal takes on a new, more ominous aura!</span>"
)
empowered += damage*0.3
empowered += damage*0.2
//When shot with a laser, the pylon absorbs the beam, becoming empowered for a while, glowing brighter
// and firing more powerful blasts which have some armor penetration
// Using lasers to empower a defensive pylon yields more total damage than directly shooting your enemies
@@ -485,7 +485,7 @@
if(!isbroken)
if (user)
user.do_attack_animation(src)
if(prob(damagetaken*0.5))
if(prob(damagetaken*0.75))
shatter()
else
if (user && !ranged)

View File

@@ -341,7 +341,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on them by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [name] on [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
if(istype(M,/mob/dead))
var/mob/dead/D = M
@@ -353,6 +353,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
return ..()
if(iscultist(M))
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
M.take_organ_damage(0,rand(5,20)) //really lucky - 5 hits for a crit
for(var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [user] beats \the [M] with \the [src]!</span>", 1)

View File

@@ -134,7 +134,7 @@ var/global/Holiday = null
Holiday_Game_Start()
message_admins("<span class='notice'>ADMIN: Event: [key_name(src)] force-set Holiday to \"[Holiday]\"</span>")
log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"")
log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"",admin_key=key_name(src))
//Run at the start of a round

View File

@@ -92,10 +92,53 @@
if(!ability_prechecks(user, price))
return
var/title = input("Select message title: ")
var/text = input("Select message text: ")
if(!title || !text || !ability_pay(user, price))
user << "Hack Aborted"
var/reporttitle
var/reportbody
var/reporttype = input(usr, "Choose whether to use a template or custom report.", "Create Command Report") in list("Template", "Custom", "Cancel")
switch(reporttype)
if("Template")
establish_db_connection(dbcon)
if (!dbcon.IsConnected())
src << "<span class='notice'>Unable to connect to the database.</span>"
return
var/DBQuery/query = dbcon.NewQuery("SELECT title, message FROM ss13_ccia_general_notice_list WHERE deleted_at IS NULL")
query.Execute()
var/list/template_names = list()
var/list/templates = list()
while (query.NextRow())
template_names += query.item[1]
templates[query.item[1]] = query.item[2]
// Catch empty list
if (!templates.len)
src << "<span class='notice'>There are no templates in the database.</span>"
return
reporttitle = input(usr, "Please select a command report template.", "Create Command Report") in template_names
reportbody = templates[reporttitle]
if("Custom")
reporttitle = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
if(!reporttitle)
reporttitle = "NanoTrasen Update"
reportbody = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "Body", "") as message|null, extra = 0)
if(!reportbody)
return
else
return
if (reporttype == "Template")
sanitizeSafe(alert(usr, "Would you like it to appear as if CCIAMS made the report?",,"Yes","No"))
if ("Yes")
reportbody += "\n\n- CCIAMS, [commstation_name()]"
else
switch(alert("Should this be announced to the general population?",,"Yes","No"))
if("Yes")
if(!reporttitle || !reportbody || !ability_pay(user, price))
user << "Hack Aborted due to no title, no body message, or you do not have enough CPU for this action."
return
log_ability_use(user, "advanced encryption hack")
@@ -105,19 +148,33 @@
if(prob(5))
user.hack_fails ++
announce_hack_failure(user, "quantum message relay")
log_ability_use(user, "elite encryption hack (CRITFAIL - title: [title])")
log_ability_use(user, "advanced encryption hack (CRITFAIL - title: [reporttitle])")
return
log_ability_use(user, "elite encryption hack (FAIL - title: [title])")
log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
return
log_ability_use(user, "elite encryption hack (SUCCESS - title: [title])")
command_announcement.Announce(text, title)
for (var/obj/machinery/computer/communications/C in machines)
if(! (C.stat & (BROKEN|NOPOWER) ) )
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
P.name = "[command_name()] Update"
P.info = replacetext(text, "\n", "<br/>")
P.update_space(P.info)
P.update_icon()
log_ability_use(user, "advanced encryption hack (SUCCESS - title: [reporttitle])")
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
if("No")
if(!reporttitle || !reportbody || !ability_pay(user, price))
user << "Hack Aborted due to no title, no body message, or you do not have enough CPU for this action."
return
log_ability_use(user, "advanced encryption hack")
if(prob(50) && user.hack_can_fail)
user << "Hack Failed."
if(prob(5))
user.hack_fails ++
announce_hack_failure(user, "quantum message relay")
log_ability_use(user, "advanced encryption hack (CRITFAIL - title: [reporttitle])")
return
log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
return
log_ability_use(user, "advanced encryption hack (SUCCESS - title: [reporttitle])")
world << "\red New [company_name] Update available at all communication consoles."
world << sound('sound/AI/commandreport.ogg')
post_comm_message(reporttitle, reportbody)
/datum/game_mode/malfunction/verb/elite_encryption_hack()
set category = "Software"

View File

@@ -680,7 +680,7 @@
T.mind.vampire.master = src
vampire.thralls += T
T << "<span class='notice'>You have been forced into a blood bond by [T.mind.vampire.master], and are thus their thrall. While a thrall may feel a myriad of emotions towards their master, ranging from fear, to hate, to love; the supernatural bond between them still forces the thrall to obey their master, and to listen to the master's commands.<br><br>You must obey your master's orders, you must protect them, you cannot harm them.</span>"
src << "<span class='notice'>You have completed the thralling process. They are now your slave and will obey your commands.</span>"
admin_attack_log(src, T, "enthralled [key_name(T)]", "was enthralled by [key_name(src)]", "successfully enthralled")
vampire.use_blood(150)

View File

@@ -62,7 +62,7 @@
economic_modifier = 5
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_morgue, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_external_airlocks)
minimal_player_age = 5
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -105,7 +105,7 @@
economic_modifier = 5
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels)
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels)
minimal_player_age = 3
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
@@ -189,7 +189,7 @@
economic_modifier = 4
access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_morgue, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_external_airlocks)
minimal_player_age = 3
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)

View File

@@ -361,6 +361,9 @@ var/global/datum/controller/occupations/job_master
job.equip(H)
job.apply_fingerprints(H)
// Randomize nutrition. (Between 50-100% of max.)
H.nutrition = (rand(50, 100) * 0.01) * H.max_nutrition
//If some custom items could not be equipped before, try again now.
for(var/thing in custom_equip_leftovers)
var/datum/gear/G = gear_datums[thing]
@@ -586,6 +589,9 @@ var/global/datum/controller/occupations/job_master
var/obj/item/clothing/glasses/G = H.glasses
G.prescription = 1
// So shoes aren't silent if people never change 'em.
H.update_noise_level()
BITSET(H.hud_updateflag, ID_HUD)
BITSET(H.hud_updateflag, IMPLOYAL_HUD)
BITSET(H.hud_updateflag, SPECIALROLE_HUD)

View File

@@ -199,5 +199,5 @@
if (!user && usr)
user = usr
log_admin("[user] ([user.ckey]) opened '[src.name]' containing [gases].")
log_admin("[user] ([user.ckey]) opened '[src.name]' containing [gases].", ckey=key_name(user))
message_admins("[user] ([user.ckey]) opened '[src.name]' containing [gases]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")

View File

@@ -238,7 +238,7 @@
if(!making || multiplier < 0 || multiplier > 100)
var/turf/exploit_loc = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate an item! ([exploit_loc ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[exploit_loc.x];Y=[exploit_loc.y];Z=[exploit_loc.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate an item!")
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate an item!",ckey=key_name(usr))
return
busy = 1

View File

@@ -207,7 +207,7 @@
new /obj/effect/spawner/newbomb/timer/syndicate(src.loc)
new /obj/item/clothing/head/collectable/petehat(src.loc)
message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.")
log_game("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.")
log_game("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.",ckey=key_name(usr))
src.New()
emagged = 0
else if(!contents.len)

View File

@@ -462,7 +462,7 @@
if(emagged)
new /obj/item/weapon/orion_ship(src.loc)
message_admins("[key_name_admin(usr)] made it to Orion on an emagged machine and got an explosive toy ship.")
log_game("[key_name(usr)] made it to Orion on an emagged machine and got an explosive toy ship.")
log_game("[key_name(usr)] made it to Orion on an emagged machine and got an explosive toy ship.",ckey=key_name(usr))
else
prizevend()
event = null
@@ -487,7 +487,7 @@
if(active)
return
message_admins("[key_name_admin(usr)] primed an explosive Orion ship for detonation.")
log_game("[key_name(usr)] primed an explosive Orion ship for detonation.")
log_game("[key_name(usr)] primed an explosive Orion ship for detonation.",ckey=key_name(usr))
user << "<span class='warning'>You flip the switch on the underside of [src].</span>"
active = 1
src.visible_message("<span class='notice'>[src] softly beeps and whirs to life!</span>")

View File

@@ -90,7 +90,7 @@
set_security_level(tmp_alertlevel)
if(security_level != old_level)
//Only notify the admins if an actual change happened
log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
log_game("[key_name(usr)] has changed the security level to [get_security_level()].",ckey=key_name(usr))
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
switch(security_level)
if(SEC_LEVEL_GREEN)
@@ -195,7 +195,7 @@
return
Centcomm_announce(input, usr)
usr << "<span class='notice'>Message transmitted.</span>"
log_say("[key_name(usr)] has made an IA [boss_short] announcement: [input]")
log_say("[key_name(usr)] has made an IA [boss_short] announcement: [input]",ckey=key_name(usr))
centcomm_message_cooldown = 1
spawn(300)//30 second cooldown
centcomm_message_cooldown = 0
@@ -212,7 +212,7 @@
return
Syndicate_announce(input, usr)
usr << "<span class='notice'>Message transmitted.</span>"
log_say("[key_name(usr)] has made an illegal announcement: [input]")
log_say("[key_name(usr)] has made an illegal announcement: [input]",ckey=key_name(usr))
centcomm_message_cooldown = 1
spawn(300)//10 minute cooldown
centcomm_message_cooldown = 0
@@ -459,7 +459,7 @@
return
emergency_shuttle.call_evac()
log_game("[key_name(user)] has called the shuttle.")
log_game("[key_name(user)] has called the shuttle.",ckey=key_name(user))
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
@@ -519,7 +519,7 @@
if(!emergency_shuttle.going_to_centcom()) //check that shuttle isn't already heading to centcomm
emergency_shuttle.recall()
log_game("[key_name(user)] has recalled the shuttle.")
log_game("[key_name(user)] has recalled the shuttle.",key_name(user))
message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
return

View File

@@ -63,8 +63,8 @@
target << "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered."
target.ResetSecurityCodes()
else
message_admins("<span class='notice'>[key_name_admin(usr)] detonated [target.name]!</span>")
log_game("[key_name(usr)] detonated [target.name]!")
message_admins("[key_name_admin(usr)] detonated [target.name]!")
log_game("[key_name(usr)] detonated [target.name]!",ckey=key_name(usr))
target << "<span class='danger'>Self-destruct command received.</span>"
spawn(10)
target.self_destruct()
@@ -92,15 +92,10 @@
if(!target || !istype(target))
return
message_admins("<span class='notice'>[key_name_admin(usr)] [target.canmove ? "locked down" : "released"] [target.name]!</span>")
log_game("[key_name(usr)] [target.canmove ? "locked down" : "released"] [target.name]!")
target.canmove = !target.canmove
if (target.lockcharge)
target.lockcharge = !target.lockcharge
target << "Your lockdown has been lifted!"
else
target.lockcharge = !target.lockcharge
target << "You have been locked down!"
target.SetLockdown(!target.lockcharge) // Toggle.
message_admins("[key_name_admin(usr)] [target.lockcharge ? "locked down" : "released"] [target.name]!")
log_game("[key_name(usr)] [target.lockcharge ? "locked down" : "released"] [target.name]!",ckey=key_name(usr))
target << (target.lockcharge ? "You have been locked down!" : "Your lockdown has been lifted!")
// Remotely hacks the cyborg. Only antag AIs can do this and only to linked cyborgs.
else if (href_list["hack"])
@@ -124,8 +119,8 @@
if(!target || !istype(target))
return
message_admins("<span class='notice'>[key_name_admin(usr)] emagged [target.name] using robotic console!</span>")
log_game("[key_name(usr)] emagged [target.name] using robotic console!")
message_admins("[key_name_admin(usr)] emagged [target.name] using robotic console!")
log_game("[key_name(usr)] emagged [target.name] using robotic console!",ckey=key_name(usr))
target.emagged = 1
target << "<span class='notice'>Failsafe protocols overriden. New tools available.</span>"
@@ -147,8 +142,8 @@
user << "Self-destruct aborted - safety active"
return
message_admins("<span class='notice'>[key_name_admin(usr)] detonated all cyborgs!</span>")
log_game("[key_name(usr)] detonated all cyborgs!")
message_admins("[key_name_admin(usr)] detonated all cyborgs!")
log_game("[key_name(usr)] detonated all cyborgs!",ckey=key_name(usr))
for(var/mob/living/silicon/robot/R in mob_list)
if(istype(R, /mob/living/silicon/robot/drone))
@@ -179,7 +174,7 @@
robot["name"] = R.name
if(R.stat)
robot["status"] = "Not Responding"
else if (!R.canmove)
else if (R.lockcharge) // changed this from !R.canmove to R.lockcharge because of issues with lockdown and chairs
robot["status"] = "Lockdown"
else
robot["status"] = "Operational"

View File

@@ -38,11 +38,11 @@
src.authorized += W:registered_name
if (src.auth_need - src.authorized.len > 0)
message_admins("[key_name_admin(user)] has authorized early shuttle launch")
log_game("[user.ckey] has authorized early shuttle launch")
log_game("[user.ckey] has authorized early shuttle launch",key_name(user))
world << text("<span class='notice'><b>Alert: [] authorizations needed until shuttle is launched early</b></span>", src.auth_need - src.authorized.len)
else
message_admins("[key_name_admin(user)] has launched the shuttle")
log_game("[user.ckey] has launched the shuttle early")
log_game("[user.ckey] has launched the shuttle early",key_name(user))
world << "<span class='notice'><b>Alert: Shuttle launch time shortened to 10 seconds!</b></span>"
emergency_shuttle.set_launch_countdown(10)
//src.authorized = null

View File

@@ -426,7 +426,7 @@
// Book keeping!
var/turf/location = get_turf(src)
log_admin("[key_name_admin(M)] has entered a stasis pod. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_admin("[key_name_admin(M)] has entered a stasis pod. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",ckey=key_name(M))
message_admins("<span class='notice'>[key_name_admin(M)] has entered a stasis pod.</span>")
//Despawning occurs when process() is called with an occupant without a client.
@@ -486,7 +486,7 @@
// Book keeping!
var/turf/location = get_turf(src)
log_admin("[key_name_admin(L)] has entered a stasis pod.")
log_admin("[key_name_admin(L)] has entered a stasis pod.",ckey=key_name(L))
message_admins("<span class='notice'>[key_name_admin(L)] has entered a stasis pod.(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)</span>")
//Despawning occurs when process() is called with an occupant without a client.

View File

@@ -35,8 +35,15 @@
var/secured_wires = 0
var/datum/wires/airlock/wires = null
var/obj/item/device/magnetic_lock/bracer = null
var/open_sound_powered = 'sound/machines/airlock.ogg'
var/close_sound_powered = 'sound/machines/AirlockClose.ogg'
var/open_sound_unpowered = 'sound/machines/airlock_creaking.ogg'
var/close_sound_unpowered = 'sound/machines/airlock_creaking.ogg'
var/bolts_dropping = 'sound/machines/BoltsDown.ogg'
var/bolts_rising = 'sound/machines/BoltsUp.ogg'
hashatch = 1
var/_wifi_id
@@ -126,6 +133,7 @@
icon = 'icons/obj/doors/Doorglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg'
open_sound_powered = 'sound/machines/windowdoor.ogg'
close_sound_powered = 'sound/machines/windowdoor.ogg'
maxhealth = 300
explosion_resistance = 5
opacity = 0
@@ -1093,9 +1101,9 @@ About the new airlock wires panel:
take_damage(DOOR_CRUSH_DAMAGE)
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
if(arePowerSystemsOn())
playsound(src.loc, open_sound_powered, 100, 1)
playsound(src.loc, close_sound_powered, 100, 1)
else
playsound(src.loc, open_sound_unpowered, 100, 1)
playsound(src.loc, close_sound_unpowered, 100, 1)
..()
@@ -1104,8 +1112,8 @@ About the new airlock wires panel:
return 0
if (operating && !forced) return 0
src.locked = 1
for(var/mob/M in range(1,src))
M.show_message("You hear a click from the bottom of the door.", 2)
playsound(src, bolts_dropping, 30, 0, -6)
audible_message("You hear a click from the bottom of the door.")
update_icon()
return 1
@@ -1115,8 +1123,8 @@ About the new airlock wires panel:
if (!forced)
if(operating || !src.arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS)) return
src.locked = 0
for(var/mob/M in range(1,src))
M.show_message("You hear a click from the bottom of the door.", 2)
playsound(src, bolts_rising, 30, 0, -6)
audible_message("You hear a click from the bottom of the door.")
update_icon()
return 1

View File

@@ -1,4 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
// Please do not use relative paths.
/obj/item/weapon/airlock_electronics
name = "airlock electronics"
@@ -15,8 +16,9 @@
var/one_access = 0 //if set to 1, door would receive req_one_access instead of req_access
var/last_configurator = null
var/locked = 1
var/inuse = 0 // no double-spending
attack_self(mob/user as mob)
/obj/item/weapon/airlock_electronics/attack_self(mob/user as mob)
if (!ishuman(user) && !istype(user,/mob/living/silicon/robot))
return ..(user)
@@ -58,7 +60,7 @@
user << browse(t1, "window=airlock_electronics")
onclose(user, "airlock")
Topic(href, href_list)
/obj/item/weapon/airlock_electronics/Topic(href, href_list)
..()
if (usr.stat || usr.restrained() || (!ishuman(usr) && !istype(usr,/mob/living/silicon)))
return
@@ -93,8 +95,7 @@
attack_self(usr)
proc
toggle_access(var/acc)
/obj/item/weapon/airlock_electronics/proc/toggle_access(var/acc)
if (acc == "all")
conf_access = null
else

View File

@@ -340,9 +340,7 @@
if( "activate" )
src.timer_start()
log_debug("Updating record")
for (var/datum/data/record/E in data_core.general)
log_debug("Searching for criminal with name: [incident.criminal.name]")
if(E.fields["name"] == incident.criminal.name)
for (var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])

View File

@@ -364,7 +364,7 @@
else
use_power(360)
else
log_admin("[usr]([usr.ckey]) has forced open an emergency shutter.")
log_admin("[usr]([usr.ckey]) has forced open an emergency shutter.",key_name(usr))
message_admins("[usr]([usr.ckey]) has forced open an emergency shutter.")
latetoggle()
return ..()

View File

@@ -26,7 +26,7 @@
var/can_cook_mobs // Whether or not this machine accepts grabbed mobs.
var/mobdamagetype = BRUTE // Burn damage for cooking appliances, brute for cereal/candy
var/food_color // Colour of resulting food item.
var/cooked_sound // Sound played when cooking completes.
var/cooked_sound = 'sound/machines/ding.ogg' // Sound played when cooking completes.
var/can_burn_food // Can the object burn food that is left inside?
var/burn_chance = 10 // How likely is the food to burn?
var/list/cooking_objs = list() // List of things being cooked
@@ -110,14 +110,18 @@
icon_state = off_icon
/obj/machinery/appliance/verb/toggle_power()
set src in view()
set name = "Toggle Power"
set category = "Object"
set category = null
set src in view() //So that AI can operate it remotely
if (!isliving(usr))
usr << "Ghosts aren't allowed to toggle power switches"
return
if (isanimal(usr))
usr << "You lack the dexterity to do that!"
return
if (usr.stat || usr.restrained() || usr.incapacitated())
return
@@ -140,15 +144,22 @@
playsound(src, 'sound/machines/click.ogg', 40, 1)
update_icon()
/obj/machinery/appliance/AICtrlClick()
toggle_power()
/obj/machinery/appliance/proc/choose_output()
set src in view()
set name = "Choose output"
set category = "Object"
set category = null
if (!isliving(usr))
usr << "Ghosts aren't allowed to mess with cooking machines!"
return
if (isanimal(usr))
usr << "You lack the dexterity to do that!"
return
if (usr.stat || usr.restrained() || usr.incapacitated())
return
@@ -558,6 +569,12 @@
return 0
/obj/machinery/appliance/proc/can_remove_items(var/mob/user)
if (!Adjacent(user))
return 0
if (isanimal(user))
return 0
return 1
/obj/machinery/appliance/proc/eject(var/datum/cooking_item/CI, var/mob/user = null)

View File

@@ -7,7 +7,7 @@
var/shortname
var/max_space = 20//Maximum sum of w-classes of foods in this container at once
var/max_reagents = 80//Maximum units of reagents
flags = OPENCONTAINER | NOREACT
var/list/insertable = list(/obj/item/weapon/reagent_containers/food/snacks,
/obj/item/weapon/holder,
/obj/item/weapon/paper)
@@ -48,13 +48,23 @@
set category = "Object"
set desc = "Removes items from the container. does not remove reagents."
if (!isliving(usr))
usr << "Ghosts can't mess with cooking containers"
//Here we only check for ghosts. Animals are intentionally allowed to remove things from oven trays so they can eat it
return
if (!Adjacent(usr))
usr << "You can't reach the [src] from there, get closer!"
return
if (!contents.len)
usr << span("warning", "Theres nothing in the [src] you can remove!")
for (var/atom/movable/A in contents)
A.forceMove(get_turf(src))
usr << span("notice", "You remove all the solid items from the [src].")
/obj/item/weapon/reagent_containers/cooking_container/proc/check_contents()
if (contents.len == 0)
if (!reagents || reagents.total_volume == 0)
@@ -64,6 +74,10 @@
return 1//Contains only a single object which can be extracted alone
return 2//Contains multiple objects and/or reagents
/obj/item/weapon/reagent_containers/cooking_container/AltClick(var/mob/user)
.=1
if(user.stat || user.restrained()) return
empty()
//Deletes contents of container.

View File

@@ -201,7 +201,7 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [cook_type] \the [victim] ([victim.ckey]) in \a [src]</font>")
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [cook_type] in \a [src] by [user.name] ([user.ckey])</font>")
msg_admin_attack("[user] ([user.ckey]) [cook_type] \the [victim] ([victim.ckey]) in \a [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user] ([user.ckey]) [cook_type] \the [victim] ([victim.ckey]) in \a [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(victim))
//Coat the victim in some oil
oil.trans_to(victim, 40)

View File

@@ -50,15 +50,29 @@
/obj/machinery/appliance/cooker/oven/AltClick(var/mob/user)
.=1
if(user.stat || user.restrained()) return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)//No spamming the door, it makes a sound
toggle_door()
/obj/machinery/appliance/cooker/oven/verb/toggle_door()
set src in view()
set name = "Open/close oven door"
set category = "Object"
set category = null
if (!isliving(usr))
usr << "Ghosts can't mess with ovens."
return
if (isanimal(usr))
usr << "You lack the dexterity to do that."
return
if (!Adjacent(usr))
if (!issilicon(usr))
usr << "You can't reach the [src] from there, get closer!"
return
@@ -67,7 +81,7 @@
loss = (active_power_usage / resistance)*0.5
else
open = 1
loss = (active_power_usage / resistance)*6
loss = (active_power_usage / resistance)*4
//When the oven door is opened, heat is lost MUCH faster
playsound(src, 'sound/machines/hatch_open.ogg', 20, 1)

View File

@@ -218,7 +218,7 @@
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[user]/[user.ckey]</b>" //One shall not simply gib a mob unnoticed!
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
msg_admin_attack("[user.name] ([user.ckey]) gibbed [src.occupant] ([src.occupant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) gibbed [src.occupant] ([src.occupant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(src.occupant))
src.occupant.ghostize()

View File

@@ -257,7 +257,7 @@ var/bomb_set
if (text2num(lastentered) == null)
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: <a href='?_src_=vars;Vars=\ref[src]'>[lastentered]</a>! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT: [key_name(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]!")
log_admin("EXPLOIT: [key_name(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]!",ckey=key_name(usr))
else
code += lastentered
if (length(code) > 5)

View File

@@ -7,7 +7,7 @@
usr.set_machine(src)
if(!mapping) return
log_game("[usr]([usr.key]) used station map L[z] in [src.loc.loc]")
log_game("[usr]([usr.key]) used station map L[z] in [src.loc.loc]",ckey=key_name(usr))
src.drawmap(usr)

View File

@@ -181,6 +181,13 @@
var/paid = 0
var/handled = 0
if (currently_vending.amount < 1)
visible_message(span("warning","\The [src] buzzes and flashes a message on its LCD: <b>\"Out of stock.\"</b>"))
src.status_error = 1
playsound(src.loc, 'sound/machines/buzz-two.ogg', 35, 1)
currently_vending = null
return
if (I) //for IDs and PDAs and wallets with IDs
paid = pay_with_card(I,W)
handled = 1
@@ -321,6 +328,10 @@
visible_message("<span class='info'>\The [usr] swipes \the [ID_container] through \the [src].</span>")
var/datum/money_account/customer_account = get_account(I.associated_account_number)
if (!customer_account)
//Allow BSTs to take stuff from vendors, for debugging and adminbus purposes
if (istype(I, /obj/item/weapon/card/id/bst))
return 1
src.status_message = "Error: Unable to access account. Please contact technical support if problem persists."
src.status_error = 1
return 0
@@ -507,6 +518,9 @@
nanomanager.update_uis(src)
/obj/machinery/vending/proc/vend(datum/data/vending_product/R, mob/user)
if (!R || R.amount < 1)
return
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
flick(src.icon_deny,src)
@@ -516,6 +530,8 @@
src.status_error = 0
nanomanager.update_uis(src)
if (R.category & CAT_COIN)
if(!coin)
user << "<span class='notice'>You need to insert a coin to get this item.</span>"
@@ -699,7 +715,8 @@
/obj/item/weapon/reagent_containers/food/drinks/bottle/chartreusegreen = 5,/obj/item/weapon/reagent_containers/food/drinks/bottle/chartreuseyellow =5,
/obj/item/weapon/reagent_containers/food/drinks/bottle/cremewhite = 4, /obj/item/weapon/reagent_containers/food/drinks/bottle/brandy = 4,
/obj/item/weapon/reagent_containers/food/drinks/bottle/guinnes = 4, /obj/item/weapon/reagent_containers/food/drinks/bottle/drambuie = 4,
/obj/item/weapon/reagent_containers/food/drinks/bottle/cremeyvette = 4)
/obj/item/weapon/reagent_containers/food/drinks/bottle/cremeyvette = 4, /obj/item/weapon/reagent_containers/food/drinks/bottle/small/xuizijuice = 8,
/obj/item/weapon/reagent_containers/food/drinks/bottle/sarezhiwine = 2, /obj/item/weapon/reagent_containers/food/drinks/bottle/victorygin = 2)
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/tea = 10)
vend_delay = 15
idle_power_usage = 211 //refrigerator - believe it or not, this is actually the average power consumption of a refrigerated vending machine according to NRCan.
@@ -841,9 +858,9 @@
icon_state = "sec"
icon_deny = "sec-deny"
req_access = list(access_security)
products = list(/obj/item/weapon/handcuffs = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/weapon/grenade/chem_grenade/teargas = 4,/obj/item/device/flash = 5,
products = list(/obj/item/weapon/handcuffs = 8,/obj/item/weapon/grenade/chem_grenade/teargas = 4,/obj/item/device/flash = 5,
/obj/item/weapon/reagent_containers/food/snacks/donut/normal = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/holowarrant = 5)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/box/donut = 2)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/box/donut = 2,/obj/item/weapon/grenade/flashbang = 4)
/obj/machinery/vending/hydronutrients
name = "NutriMax"
@@ -956,7 +973,7 @@
icon_deny = "tact-deny"
req_access = list(access_security)
products = list(/obj/item/weapon/storage/box/shotgunammo = 2,/obj/item/weapon/storage/box/shotgunshells = 2,/obj/item/ammo_magazine/c45m = 6,/obj/item/weapon/grenade/chem_grenade/teargas = 6,
/obj/item/ammo_magazine/mc9mmt = 2, /obj/item/clothing/mask/gas/tactical = 4, /obj/item/weapon/handcuffs/ziptie = 3)
/obj/item/ammo_magazine/mc9mmt = 2, /obj/item/clothing/mask/gas/tactical = 4, /obj/item/weapon/handcuffs/ziptie = 3, /obj/item/weapon/grenade/flashbang = 6)
/obj/machinery/vending/tacticool/ert //Slightly more !FUN!
name = "Nanosecurity Plus"

View File

@@ -44,13 +44,13 @@
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
if (!(HULK in user.mutations))
user.mutations.Add(HULK)
user << "\blue Your muscles hurt."
user << "<span class='notice'>Your muscles hurt.</span>"
if (!(LASER in user.mutations))
user.mutations.Add(LASER)
user << "\blue You feel pressure building behind your eyes."
user << "<span class='notice'>You feel pressure building behind your eyes.</span>"
if (!(COLD_RESISTANCE in user.mutations))
user.mutations.Add(COLD_RESISTANCE)
user << "\blue Your body feels warm."
user << "<span class='notice'>Your body feels warm.</span>"
if (!(TK in user.mutations))
user.mutations.Add(TK)
if(!(HEAL in user.mutations))
@@ -59,7 +59,7 @@
user.mutations.Add(XRAY)
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
user << "\blue The walls suddenly disappear."
user << "<span class='notice'>The walls suddenly disappear.</span>"
user.set_species("Shadow")
user.mind.special_role = "Avatar of the Wish Granter"
if("I want to be rich")
@@ -80,7 +80,7 @@
user.mind.special_role = "Avatar of the Wish Granter"
user.hallucination += 10
user.adjustBrainLoss(30)
user.show_message("<b>[user]</b> screams!")
user.emote("screams!")
playsound(user, 'sound/hallucinations/wail.ogg', 40, 1)
sleep(30)
user << "<span class='warning'>Your mind is assaulted by endless horrors, your only desire is to end it, you must fulfill the Wish Granter's desires!</span>"
@@ -114,6 +114,7 @@
C << "<span class='notice'>You're not dead yet!</span>"
return
C << "<span class='notice'>Death is not your end!</span>"
C.verbs -= /mob/living/carbon/proc/immortality
spawn(rand(400,800))
if(C.stat == DEAD)
@@ -125,4 +126,5 @@
C << "<span class='notice'>You have regenerated.</span>"
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
C.update_canmove()
C.verbs += /mob/living/carbon/proc/immortality
return 1

View File

@@ -228,7 +228,7 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has fed [target.name]'s ([target.ckey]) hair into a [src].</font>")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their hair fed into [src] by [user.name] ([user.ckey])</font>")
msg_admin_attack("[key_name_admin(user.ckey)] fed [key_name_admin(target)] in a [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(user.ckey)] fed [key_name_admin(target)] in a [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(target))
else
return
if(!do_after(usr, 35))

View File

@@ -1071,7 +1071,7 @@
if (brokesomething)
playsound(get_turf(target), 'sound/weapons/heavysmash.ogg', 100, 1)
occupant.attack_log += "\[[time_stamp()]\]<font color='red'> driving [name] crashed into [brokesomething] objects at ([target.x];[target.y];[target.z]) </font>"
msg_admin_attack("[key_name(occupant)] driving [name] crashed into [brokesomething] objects at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>)" )
msg_admin_attack("[key_name(occupant)] driving [name] crashed into [brokesomething] objects at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>)",ckey=key_name(occupant))
//5. If we get here, then we've broken through everything that could stop us
@@ -1110,7 +1110,7 @@
var/mob/living/M = A
occupant.attack_log += "\[[time_stamp()]\]<font color='red'> Crashed into [key_name(M)]with exosuit [name] </font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Was rammed with the exosuit [name] driven by [key_name(occupant)]</font>"
msg_admin_attack("[key_name(occupant)] driving [name] crashed into [key_name(M)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)" )
msg_admin_attack("[key_name(occupant)] driving [name] crashed into [key_name(M)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)",ckey=key_name(occupant),ckey_target=key_name(M) )
A.ex_act(3)

View File

@@ -24,20 +24,11 @@
pixel_x = -32 + rand(-8, 8)
pixel_y = -32 + rand(-8, 8)
//switching opacity on after the smoke has spawned, and then turning it off before it is deleted results in cleaner
//lighting and view range updates (Is this still true with the new lighting system?)
set_opacity(1)
//float over to our destination, if we have one
destination = dest_turf
if(destination)
walk_to(src, destination)
/obj/effect/effect/smoke/chem/Destroy()
set_opacity(0)
fadeOut()
..()
/obj/effect/effect/smoke/chem/Move()
var/list/oldlocs = view(1, src)
. = ..()
@@ -61,16 +52,6 @@
if(!istype(AM, /obj/effect/effect/smoke/chem))
reagents.splash(AM, splash_amount, copy = 1)
// Fades out the smoke smoothly using it's alpha variable.
/obj/effect/effect/smoke/chem/proc/fadeOut(var/frames = 16)
if(!alpha) return //already transparent
frames = max(frames, 1) //We will just assume that by 0 frames, the coder meant "during one frame".
var/alpha_step = round(alpha / frames)
while(alpha > 0)
alpha = max(0, alpha - alpha_step)
sleep(world.tick_lag)
/////////////////////////////////////////////
// Chem Smoke Effect System
/////////////////////////////////////////////
@@ -154,7 +135,7 @@
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].",ckey=key_name(M))
else
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")

View File

@@ -113,7 +113,18 @@ steam.start() -- spawns the effect
if (duration)
time_to_live = duration
spawn (time_to_live)
qdel(src)
kill()
/obj/effect/effect/smoke/proc/kill()
set waitfor = FALSE
animate(src, alpha = 0, time = 2 SECONDS, easing = QUAD_EASING)
set_opacity(FALSE)
var/turf/T = get_turf(src)
if (T)
T.force_update_lights() // I hate it, but nothing else seems to work.
QDEL_IN(src, 2 SECONDS)
/obj/effect/effect/smoke/Crossed(mob/living/carbon/M as mob )
..()
@@ -271,8 +282,8 @@ steam.start() -- spawns the effect
sleep(10)
step(smoke,direction)
spawn(smoke.time_to_live*0.75+rand(10,30))
if (smoke) qdel(smoke)
src.total_smoke--
qdel(smoke)
/datum/effect/effect/system/smoke_spread/bad

View File

@@ -485,7 +485,7 @@ var/list/global/slot_flags_enumeration = list(
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)") //BS12 EDIT ALG
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M)) //BS12 EDIT ALG
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(M)

View File

@@ -853,11 +853,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.show_message("<span class='warning'>Energy feeds back into your [src]!</span>", 1)
ui.close()
detonate_act(src)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up",ckey=key_name(U),ckey_target=key_name(P))
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed.", 1)
else
U.show_message("<span class='notice'>Success!</span>", 1)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded")
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded",ckey=key_name(U),ckey_target=key_name(P))
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded.", 1)
detonate_act(P)
else
@@ -1084,7 +1084,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/reception_message = "\icon[src] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[sending_unit]'>Reply</a>)"
new_info(message_silent, ttone, reception_message)
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]")
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]",ckey=key_name(usr),ckey_target=key_name(name))
new_message = 1
update_icon()
@@ -1096,7 +1096,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/reception_message = "\icon[src] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[sending_unit]'>Reply</a>) [track]"
new_info(message_silent, newstone, reception_message)
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]")
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]",ckey=key_name(usr),ckey_target=key_name(name))
new_message = 1
/obj/item/device/pda/verb/verb_reset_pda()

View File

@@ -37,7 +37,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(M)

View File

@@ -63,9 +63,11 @@ var/global/list/default_medbay_channels = list(
..()
wires = new(src)
internal_channels = default_internal_channels.Copy()
listening_objects += src
/obj/item/device/radio/Destroy()
qdel(wires)
listening_objects -= src
wires = null
if(radio_controller)
radio_controller.remove_object(src, frequency)

View File

@@ -23,6 +23,11 @@
..()
radio = new(src)
camera = new(src)
listening_objects += src
/obj/item/device/spy_bug/Destroy()
listening_objects -= src
return ..()
/obj/item/device/spy_bug/examine(mob/user)
. = ..(user, 0)
@@ -62,6 +67,11 @@
/obj/item/device/spy_monitor/New()
radio = new(src)
listening_objects += src
/obj/item/device/spy_monitor/Destroy()
listening_objects -= src
return ..()
/obj/item/device/spy_monitor/examine(mob/user)
. = ..(user, 1)

View File

@@ -197,6 +197,10 @@
if (on)
if (attached_to_suit(src.loc))
user << "It's switched on and running."
else if (istype(src.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src.loc
if (H.get_species()=="Industrial Frame")
user << "It's switched on and running, connected to the cooling systems of [H]."
else
user << "It's switched on, but not attached to anything."
else

View File

@@ -20,6 +20,14 @@
throw_speed = 4
throw_range = 20
/obj/item/device/taperecorder/New()
..()
listening_objects += src
/obj/item/device/taperecorder/Destroy()
listening_objects -= src
return ..()
/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says", datum/language/speaking=null)
if(recording)
timestamp += timerecorded

View File

@@ -34,7 +34,7 @@
item.loc = src
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
message_admins("[key_name_admin(user)] attached both tanks to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.")
log_game("[key_name_admin(user)] attached both tanks to a transfer valve.",ckey=key_name(user))
update_icon()
nanomanager.update_uis(src) // update all UIs attached to src
@@ -56,7 +56,7 @@
bombers += "[key_name(user)] attached a [item] to a transfer valve."
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.",ckey=key_name(user))
attacher = user
nanomanager.update_uis(src) // update all UIs attached to src
return

View File

@@ -131,7 +131,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])",ckey=key_name(user),ckey_target=key_name(M))
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with \the [src][injected_with_monkey]")
// Apply the DNA shit.

View File

@@ -57,11 +57,11 @@
add_logs(user, target, "planted [name] on")
user.visible_message("<span class='danger'>[user.name] finished planting an explosive on [target.name]!</span>")
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted [src.name] on [key_name(target)](<A HREF='?_src_=holder;adminmoreinfo=\ref[target]'>?</A>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [key_name(target)] with [timer] second fuse")
log_game("[key_name(user)] planted [src.name] on [key_name(target)] with [timer] second fuse",ckey=key_name(user))
else
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse",ckey=key_name(user))
target.overlays += image_overlay
user << "Bomb has been planted. Timer counting down from [timer]."

View File

@@ -182,7 +182,7 @@
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(user)] used [src] to wrap [key_name(H)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[key_name(user)] used [src] to wrap [key_name(H)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(H))
else
user << "<span class='warning'>You need more paper.</span>"
@@ -204,7 +204,7 @@
..()
var/gift_benefactor = pick("John Rolf","Isaac Bureaurgard","David Montrello","Sarah Karpac","Camille Rodgers","Luke Lawrence","Goliath Grills","Torbjorn","Odin","Jesus DeSanto","Santa Claus","Ms. Claus","Mr. Claus","Bjorn","Frodo","Gandalf","Elrond",
"Robert Heinlen","Martin Fresco","Lawrence Chamberlain","Buster Kilrain","Nerevar","Neville Trouserkepling","Adam Sortings","Eve's Grocers","Father Christmas","Adolph Romkippler","Adolf Strange","Camille","Maximilian von Biesel","Max","Bob Wallace",
"The Grinch","Cicilia Simon","John F. Kennedy","Joseph Dorn","Mendell City","Ta<54>Akaix<69>Scay<61>extiih<69>aur Zo<5A>ra","Ta'Akaix'Vaur'skiyet'sca Zo'ra","Miranda Trasen","Jiub","The Biesellian National Guard","The ERT","Baal D. Griffon","Hephaestus Industries","The Sol Alliance (Sorry about the blockade!")
"The Grinch","Cicilia Simon","John F. Kennedy","Joseph Dorn","Mendell City","Ta<54>Akaix<69>Scay<61>extiih<69>aur Zo<5A>ra","Ta'Akaix'Vaur'skiyet'sca Zo'ra","Miranda Trasen","Jiub","The Biesellian National Guard","The ERT","Baal D. Griffon","Hephaestus Industries","The Sol Alliance (Sorry about the blockade!")
var/pick_emotion = pick("love","platonic admiration","approval","love (not in a sexual way or anything, though)","apathy", "schadenfreude","love","God's blessing","Santa's blessing","Non-demoninational deity's blessing","love","compassion","appreciation",
"respect","begrudging respect","love")
desc = "To: The NSS Exodus<BR>From: <i>[gift_benefactor], with [pick_emotion]</i>"

View File

@@ -39,7 +39,7 @@
if(stage > 1 && !active && clown_check(user))
user << "<span class='warning'>You prime \the [name]!</span>"
msg_admin_attack("[user.name] ([user.ckey]) primed \a [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) primed \a [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user))
activate()
add_fingerprint(user)
@@ -132,7 +132,7 @@
icon_state = initial(icon_state) + "_active"
if(user)
msg_admin_attack("[user.name] ([user.ckey]) primed \a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) primed \a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user))
return

View File

@@ -43,7 +43,7 @@ proc/fragem(var/source,var/fragx,var/fragy,var/light_dam,var/flash_dam,var/p_dam
desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments."
icon_state = "frag"
var/num_fragments = 200 //total number of fragments produced by the grenade
var/num_fragments = 100 //total number of fragments produced by the grenade
var/fragment_damage = 15
var/damage_step = 2 //projectiles lose a fragment each time they travel this distance. Can be a non-integer.
var/explosion_size = 3 //size of the center explosion

View File

@@ -70,7 +70,7 @@
return
if(user)
msg_admin_attack("[user.name] ([user.ckey]) primed \a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) primed \a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user))
icon_state = initial(icon_state) + "_active"
active = 1

View File

@@ -59,7 +59,7 @@
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(H))
feedback_add_details("handcuffs","H")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
@@ -98,7 +98,7 @@ var/last_chew = 0
H.visible_message(s, "<span class='warning'>You chew on your [O.name]!</span>")
message_admins("[key_name_admin(H)] is chewing on [H.get_pronoun(1)] restrained hand - (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[H.x];Y=[H.y];Z=[H.z]'>JMP</a>)")
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[s] ([H.ckey])</font>")
log_attack("[s] ([H.ckey])")
log_attack("[s] ([H.ckey])",ckey=key_name(H))
if(O.take_damage(3,0,1,1,"teeth marks"))
H:UpdateDamageIcon()

View File

@@ -50,7 +50,7 @@
Destroy()
if(part)
part.implants.Remove(src)
..()
return ..()
/obj/item/weapon/implant/tracking
name = "tracking implant"
@@ -162,11 +162,12 @@ Implant Specifics:<BR>"}
if (malfunction == MALFUNCTION_PERMANENT)
return
var/need_gib = null
if(istype(imp_in, /mob/))
var/mob/T = imp_in
message_admins("Explosive implant triggered in [T] ([T.key]). (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>) ")
log_game("Explosive implant triggered in [T] ([T.key]).")
log_game("Explosive implant triggered in [T] ([T.key]).",ckey=key_name(T))
need_gib = 1
if(ishuman(imp_in))
@@ -252,6 +253,15 @@ Implant Specifics:<BR>"}
explosion(get_turf(imp_in), -1, -1, 2, 3)
qdel(src)
/obj/item/weapon/implant/explosive/New()
..()
listening_objects += src
/obj/item/weapon/implant/explosive/Destroy()
listening_objects -= src
return ..()
/obj/item/weapon/implant/chem
name = "chemical implant"
desc = "Injects things."

View File

@@ -37,9 +37,9 @@
if(src.imp.reagents.total_volume >= src.imp.reagents.maximum_volume)
user << "<span class='warning'>\The [src] is full.</span>"
else
spawn(5)
I.reagents.trans_to_obj(src.imp, 5)
user << "<span class='notice'>You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units.</span>"
var/trans = I.reagents.trans_to_obj(src.imp, 5)
if (trans > 0)
user << "<span class='notice'>You inject [trans] units of the solution. The syringe now contains [I.reagents.total_volume] units.</span>"
else if (istype(I, /obj/item/weapon/implanter))
var/obj/item/weapon/implanter/M = I
if (M.imp)

View File

@@ -172,7 +172,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.ipc_tag.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.ipc_tag.name]) to implant [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
user.show_message("<span class = 'warning'>You implanted the implant into [M].</span>")

View File

@@ -62,10 +62,9 @@
contained_sprite = 1
slot_flags = SLOT_BELT
force = 22
throwforce = 70
//This should do around 15 brute when you throw it, there's probably a better way to do it.
throw_speed = 1
throw_range = 5
throwforce = 15.0
throw_speed = 5
throw_range = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
w_class = 3
origin_tech = list(TECH_MATERIAL = 3, TECH_ILLEGAL = 2)

View File

@@ -59,6 +59,9 @@
if("id")
icon_state = "walletid"
return
if("guest")
icon_state = "walletid"
return
if("silver")
icon_state = "walletid_silver"
return

View File

@@ -158,7 +158,7 @@
L.stun_effect_act(stun, agony, target_zone, src)
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(L))
if(status)
deductcharge(hitcost)

View File

@@ -75,7 +75,7 @@
flick("c-4detonator_click", src)
if(src.bomb)
src.bomb.detonate()
log_admin("[key_name(user)] has triggered [src.bomb] with [src].")
log_admin("[key_name(user)] has triggered [src.bomb] with [src].",ckey=key_name(user))
message_admins("<span class='danger'>[key_name_admin(user)] has triggered [src.bomb] with [src].</span>")
if("Close the lighter.")

View File

@@ -352,7 +352,7 @@
tank.armed = 0
return
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.")
log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.",ckey=key_name(user))
user << span("alert", "That was stupid of you.")
tank.explode()
return

View File

@@ -64,7 +64,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
if(prob(15))
if(!issilicon(M)) M.Weaken(3)

View File

@@ -59,7 +59,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Is being deconverted with the [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attempt to deconvert [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name(user)] attempted to deconvert [key_name(M)] with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[key_name(user)] attempted to deconvert [key_name(M)] with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
else
return ..()

View File

@@ -18,7 +18,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.welding & prob(50))
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
log_game("[key_name(user)] triggered a fueltank explosion.")
log_game("[key_name(user)] triggered a fueltank explosion.",ckey=key_name(user))
user << "<span class='danger'>That was stupid of you.</span>"
explosion(get_turf(src),-1,0,2)
if(src)

View File

@@ -4,27 +4,43 @@
icon = 'icons/misc/mark.dmi'
icon_state = "rup"
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
var/list/spawnlist
var/list/problist
var/has_postspawn
// creates a new object and deletes itself
/obj/random/initialize()
..()
if (!prob(spawn_nothing_percentage))
spawn_item()
var/item = spawn_item()
if (has_postspawn && item)
post_spawn(item)
qdel(src)
// this function should return a specific item to spawn
/obj/random/proc/item_to_spawn()
return 0
/obj/random/proc/post_spawn(obj/thing)
log_debug("random_obj: [DEBUG_REF(src)] registered itself as having post_spawn, but did not override post_spawn()!")
// creates the random item
/obj/random/proc/spawn_item()
if (spawnlist)
var/itemtype = pick(spawnlist)
. = new itemtype(loc)
else if (problist)
var/itemtype = pickweight(problist)
. = new itemtype(loc)
var/build_path = item_to_spawn()
new build_path(loc)
else
var/itemtype = item_to_spawn()
. = new itemtype(loc)
if (!.)
log_debug("random_obj: [DEBUG_REF(src)] returned null item!")
/obj/random/single
name = "randomly spawned object"
@@ -34,67 +50,66 @@
item_to_spawn()
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
/obj/random/tool
name = "random tool"
desc = "This is a random tool"
icon = 'icons/obj/items.dmi'
icon_state = "welder"
item_to_spawn()
return pick(/obj/item/weapon/screwdriver,\
/obj/item/weapon/wirecutters,\
/obj/item/weapon/weldingtool,\
/obj/item/weapon/crowbar,\
/obj/item/weapon/wrench,\
/obj/item/device/flashlight)
spawnlist = list(
/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
/obj/item/weapon/weldingtool,
/obj/item/weapon/crowbar,
/obj/item/weapon/wrench,
/obj/item/device/flashlight
)
/obj/random/technology_scanner
name = "random scanner"
desc = "This is a random technology scanner."
icon = 'icons/obj/device.dmi'
icon_state = "atmos"
item_to_spawn()
return pick(prob(5);/obj/item/device/t_scanner,\
prob(2);/obj/item/device/radio,\
prob(5);/obj/item/device/analyzer)
problist = list(
/obj/item/device/t_scanner = 5,
/obj/item/device/radio = 2,
/obj/item/device/analyzer = 5
)
/obj/random/powercell
name = "random powercell"
desc = "This is a random powercell."
icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_to_spawn()
return pick(prob(10);/obj/item/weapon/cell/crap,\
prob(40);/obj/item/weapon/cell,\
prob(40);/obj/item/weapon/cell/high,\
prob(9);/obj/item/weapon/cell/super,\
prob(1);/obj/item/weapon/cell/hyper)
problist = list(
/obj/item/weapon/cell/crap = 10,
/obj/item/weapon/cell = 40,
/obj/item/weapon/cell/high = 40,
/obj/item/weapon/cell/super = 9,
/obj/item/weapon/cell/hyper = 1
)
/obj/random/bomb_supply
name = "bomb supply"
desc = "This is a random bomb supply."
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "signaller"
item_to_spawn()
return pick(/obj/item/device/assembly/igniter,\
/obj/item/device/assembly/prox_sensor,\
/obj/item/device/assembly/signaler,\
/obj/item/device/multitool)
spawnlist = list(
/obj/item/device/assembly/igniter,
/obj/item/device/assembly/prox_sensor,
/obj/item/device/assembly/signaler,
/obj/item/device/multitool
)
/obj/random/toolbox
name = "random toolbox"
desc = "This is a random toolbox."
icon = 'icons/obj/storage.dmi'
icon_state = "red"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/toolbox/mechanical,\
prob(2);/obj/item/weapon/storage/toolbox/electrical,\
prob(1);/obj/item/weapon/storage/toolbox/emergency)
spawnlist = list(
/obj/item/weapon/storage/toolbox/mechanical = 3,
/obj/item/weapon/storage/toolbox/electrical = 2,
/obj/item/weapon/storage/toolbox/emergency = 1
)
/obj/random/tech_supply
name = "random tech supply"
@@ -102,18 +117,19 @@
icon = 'icons/obj/power.dmi'
icon_state = "cell"
// spawn_nothing_percentage = 50
item_to_spawn()
return pick(prob(3);/obj/random/powercell,\
prob(2);/obj/random/technology_scanner,\
prob(1);/obj/item/weapon/packageWrap,\
prob(2);/obj/random/bomb_supply,\
prob(1);/obj/item/weapon/extinguisher,\
prob(1);/obj/item/clothing/gloves/fyellow,\
prob(3);/obj/item/stack/cable_coil,\
prob(2);/obj/random/toolbox,\
prob(2);/obj/item/weapon/storage/belt/utility,\
prob(5);/obj/random/tool,\
prob(2);/obj/item/weapon/tape_roll)
problist = list(
/obj/random/powercell = 3,
/obj/random/technology_scanner = 2,
/obj/item/weapon/packageWrap = 1,
/obj/random/bomb_supply = 2,
/obj/item/weapon/extinguisher = 1,
/obj/item/clothing/gloves/fyellow = 1,
/obj/item/stack/cable_coil = 3,
/obj/random/toolbox = 2,
/obj/item/weapon/storage/belt/utility = 2,
/obj/random/tool = 5,
/obj/item/weapon/tape_roll = 2
)
/obj/random/medical
name = "Random Medicine"
@@ -121,35 +137,35 @@
icon = 'icons/obj/items.dmi'
icon_state = "brutepack"
spawn_nothing_percentage = 25
item_to_spawn()
return pick(prob(4);/obj/item/stack/medical/bruise_pack,\
prob(4);/obj/item/stack/medical/ointment,\
prob(2);/obj/item/stack/medical/advanced/bruise_pack,\
prob(2);/obj/item/stack/medical/advanced/ointment,\
prob(1);/obj/item/stack/medical/splint,\
prob(2);/obj/item/bodybag,\
prob(1);/obj/item/bodybag/cryobag,\
prob(2);/obj/item/weapon/storage/pill_bottle/kelotane,\
prob(2);/obj/item/weapon/storage/pill_bottle/antitox,\
prob(2);/obj/item/weapon/storage/pill_bottle/tramadol,\
prob(2);/obj/item/weapon/reagent_containers/syringe/antitoxin,\
prob(1);/obj/item/weapon/reagent_containers/syringe/antiviral,\
prob(2);/obj/item/weapon/reagent_containers/syringe/inaprovaline,\
prob(1);/obj/item/stack/nanopaste)
problist = list(
/obj/item/stack/medical/bruise_pack = 4,
/obj/item/stack/medical/ointment = 4,
/obj/item/stack/medical/advanced/bruise_pack = 2,
/obj/item/stack/medical/advanced/ointment = 2,
/obj/item/stack/medical/splint = 1,
/obj/item/bodybag = 2,
/obj/item/bodybag/cryobag = 1,
/obj/item/weapon/storage/pill_bottle/kelotane = 2,
/obj/item/weapon/storage/pill_bottle/antitox = 2,
/obj/item/weapon/storage/pill_bottle/tramadol = 2,
/obj/item/weapon/reagent_containers/syringe/antitoxin = 2,
/obj/item/weapon/reagent_containers/syringe/antiviral = 1,
/obj/item/weapon/reagent_containers/syringe/inaprovaline = 2,
/obj/item/stack/nanopaste = 1
)
/obj/random/firstaid
name = "Random First Aid Kit"
desc = "This is a random first aid kit."
icon = 'icons/obj/storage.dmi'
icon_state = "firstaid"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/firstaid/regular,\
prob(2);/obj/item/weapon/storage/firstaid/toxin,\
prob(2);/obj/item/weapon/storage/firstaid/o2,\
prob(1);/obj/item/weapon/storage/firstaid/adv,\
prob(2);/obj/item/weapon/storage/firstaid/fire)
problist = list(
/obj/item/weapon/storage/firstaid/regular = 3,
/obj/item/weapon/storage/firstaid/toxin = 2,
/obj/item/weapon/storage/firstaid/o2 = 2,
/obj/item/weapon/storage/firstaid/adv = 1,
/obj/item/weapon/storage/firstaid/fire = 2
)
/obj/random/contraband
name = "Random Illegal Item"
@@ -157,127 +173,133 @@
icon = 'icons/obj/items.dmi'
icon_state = "purplecomb"
// spawn_nothing_percentage = 50
item_to_spawn()
return pick(prob(3);/obj/item/weapon/storage/pill_bottle/tramadol,\
prob(4);/obj/item/weapon/haircomb,\
prob(2);/obj/item/weapon/storage/pill_bottle/happy,\
prob(2);/obj/item/weapon/storage/pill_bottle/zoom,\
prob(5);/obj/item/weapon/contraband/poster,\
prob(2);/obj/item/weapon/material/butterfly,\
prob(3);/obj/item/weapon/material/butterflyblade,\
prob(3);/obj/item/weapon/material/butterflyhandle,\
prob(3);/obj/item/weapon/material/wirerod,\
prob(1);/obj/item/weapon/material/butterfly/switchblade,\
prob(1);/obj/item/weapon/reagent_containers/syringe/drugs)
problist = list(
/obj/item/weapon/storage/pill_bottle/tramadol = 3,
/obj/item/weapon/haircomb = 4,
/obj/item/weapon/storage/pill_bottle/happy = 2,
/obj/item/weapon/storage/pill_bottle/zoom = 2,
/obj/item/weapon/contraband/poster = 5,
/obj/item/weapon/material/butterfly = 2,
/obj/item/weapon/material/butterflyblade = 3,
/obj/item/weapon/material/butterflyhandle = 3,
/obj/item/weapon/material/wirerod = 3,
/obj/item/weapon/material/butterfly/switchblade = 1,
/obj/item/weapon/reagent_containers/syringe/drugs = 1
)
/obj/random/energy
name = "Random Energy Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "energykill100"
item_to_spawn()
return pick(prob(2);/obj/item/weapon/gun/energy/rifle/laser,\
prob(2);/obj/item/weapon/gun/energy/gun,\
prob(1);/obj/item/weapon/gun/energy/stunrevolver)
problist = list(
/obj/item/weapon/gun/energy/rifle/laser = 2,
/obj/item/weapon/gun/energy/gun = 2,
/obj/item/weapon/gun/energy/stunrevolver = 1
)
/obj/random/projectile
name = "Random Projectile Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,\
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,\
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
problist = list(
/obj/item/weapon/gun/projectile/shotgun/pump = 3,
/obj/item/weapon/gun/projectile/automatic/wt550 = 2,
/obj/item/weapon/gun/projectile/shotgun/pump/combat = 1
)
/obj/random/handgun
name = "Random Handgun"
desc = "This is a random security sidearm."
icon = 'icons/obj/gun.dmi'
icon_state = "secgundark"
item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/sec,\
prob(1);/obj/item/weapon/gun/projectile/sec/wood)
problist = list(
/obj/item/weapon/gun/projectile/sec = 3,
/obj/item/weapon/gun/projectile/sec/wood = 1
)
/obj/random/ammo
name = "Random Ammunition"
desc = "This is random ammunition."
icon = 'icons/obj/ammo.dmi'
icon_state = "45-10"
item_to_spawn()
return pick(prob(6);/obj/item/weapon/storage/box/beanbags,\
prob(2);/obj/item/weapon/storage/box/shotgunammo,\
prob(4);/obj/item/weapon/storage/box/shotgunshells,\
prob(1);/obj/item/weapon/storage/box/stunshells,\
prob(2);/obj/item/ammo_magazine/c45m,\
prob(4);/obj/item/ammo_magazine/c45m/rubber,\
prob(4);/obj/item/ammo_magazine/c45m/flash,\
prob(2);/obj/item/ammo_magazine/mc9mmt,\
prob(6);/obj/item/ammo_magazine/mc9mmt/rubber)
problist = list(
/obj/item/weapon/storage/box/beanbags = 6,
/obj/item/weapon/storage/box/shotgunammo = 2,
/obj/item/weapon/storage/box/shotgunshells = 4,
/obj/item/weapon/storage/box/stunshells = 1,
/obj/item/ammo_magazine/c45m = 2,
/obj/item/ammo_magazine/c45m/rubber = 4,
/obj/item/ammo_magazine/c45m/flash = 4,
/obj/item/ammo_magazine/mc9mmt = 2,
/obj/item/ammo_magazine/mc9mmt/rubber = 6
)
/obj/random/action_figure
name = "random action figure"
desc = "This is a random action figure."
icon = 'icons/obj/toy.dmi'
icon_state = "assistant"
item_to_spawn()
return pick(/obj/item/toy/figure/cmo,\
/obj/item/toy/figure/assistant,\
/obj/item/toy/figure/atmos,\
/obj/item/toy/figure/bartender,\
/obj/item/toy/figure/borg,\
/obj/item/toy/figure/gardener,\
/obj/item/toy/figure/captain,\
/obj/item/toy/figure/cargotech,\
/obj/item/toy/figure/ce,\
/obj/item/toy/figure/chaplain,\
/obj/item/toy/figure/chef,\
/obj/item/toy/figure/chemist,\
/obj/item/toy/figure/clown,\
/obj/item/toy/figure/corgi,\
/obj/item/toy/figure/detective,\
/obj/item/toy/figure/dsquad,\
/obj/item/toy/figure/engineer,\
/obj/item/toy/figure/geneticist,\
/obj/item/toy/figure/hop,\
/obj/item/toy/figure/hos,\
/obj/item/toy/figure/qm,\
/obj/item/toy/figure/janitor,\
/obj/item/toy/figure/agent,\
/obj/item/toy/figure/librarian,\
/obj/item/toy/figure/md,\
/obj/item/toy/figure/mime,\
/obj/item/toy/figure/miner,\
/obj/item/toy/figure/ninja,\
/obj/item/toy/figure/wizard,\
/obj/item/toy/figure/rd,\
/obj/item/toy/figure/roboticist,\
/obj/item/toy/figure/scientist,\
/obj/item/toy/figure/syndie,\
/obj/item/toy/figure/secofficer,\
/obj/item/toy/figure/warden,\
/obj/item/toy/figure/psychologist,\
/obj/item/toy/figure/paramedic,\
/obj/item/toy/figure/ert)
spawnlist = list(
/obj/item/toy/figure/cmo,
/obj/item/toy/figure/assistant,
/obj/item/toy/figure/atmos,
/obj/item/toy/figure/bartender,
/obj/item/toy/figure/borg,
/obj/item/toy/figure/gardener,
/obj/item/toy/figure/captain,
/obj/item/toy/figure/cargotech,
/obj/item/toy/figure/ce,
/obj/item/toy/figure/chaplain,
/obj/item/toy/figure/chef,
/obj/item/toy/figure/chemist,
/obj/item/toy/figure/clown,
/obj/item/toy/figure/corgi,
/obj/item/toy/figure/detective,
/obj/item/toy/figure/dsquad,
/obj/item/toy/figure/engineer,
/obj/item/toy/figure/geneticist,
/obj/item/toy/figure/hop,
/obj/item/toy/figure/hos,
/obj/item/toy/figure/qm,
/obj/item/toy/figure/janitor,
/obj/item/toy/figure/agent,
/obj/item/toy/figure/librarian,
/obj/item/toy/figure/md,
/obj/item/toy/figure/mime,
/obj/item/toy/figure/miner,
/obj/item/toy/figure/ninja,
/obj/item/toy/figure/wizard,
/obj/item/toy/figure/rd,
/obj/item/toy/figure/roboticist,
/obj/item/toy/figure/scientist,
/obj/item/toy/figure/syndie,
/obj/item/toy/figure/secofficer,
/obj/item/toy/figure/warden,
/obj/item/toy/figure/psychologist,
/obj/item/toy/figure/paramedic,
/obj/item/toy/figure/ert
)
/obj/random/plushie
name = "random plushie"
desc = "This is a random plushie."
icon = 'icons/obj/toy.dmi'
icon_state = "nymphplushie"
item_to_spawn()
return pick(/obj/structure/plushie/ian,\
/obj/structure/plushie/drone,\
/obj/structure/plushie/carp,\
/obj/structure/plushie/beepsky,\
/obj/item/toy/plushie/nymph,\
/obj/item/toy/plushie/mouse,\
/obj/item/toy/plushie/kitten,\
/obj/item/toy/plushie/lizard)
spawnlist = list(
/obj/structure/plushie/ian,
/obj/structure/plushie/drone,
/obj/structure/plushie/carp,
/obj/structure/plushie/beepsky,
/obj/item/toy/plushie/nymph,
/obj/item/toy/plushie/mouse,
/obj/item/toy/plushie/kitten,
/obj/item/toy/plushie/lizard
)
/obj/random/smalltank
name = "random small tank"
/obj/random/smalltank/item_to_spawn()
if (prob(40))
@@ -287,21 +309,22 @@
else
return /obj/item/weapon/tank/emergency_oxygen/double
/obj/random/belt/item_to_spawn()
var/list/belts = list(/obj/item/weapon/storage/belt/utility = 1,
/obj/random/belt
name = "random belt"
problist = list(
/obj/item/weapon/storage/belt/utility = 1,
/obj/item/weapon/storage/belt/medical = 0.4,
/obj/item/weapon/storage/belt/medical/emt = 0.4,
/obj/item/weapon/storage/belt/security/tactical = 0.1,
/obj/item/weapon/storage/belt/military = 0.1,
/obj/item/weapon/storage/belt/janitor = 0.4
)
return pickweight(belts)
//Spawns a random backpack
//Novelty and rare backpacks have lower weights
/obj/random/backpack/item_to_spawn()
var/list/packs = list(
// Spawns a random backpack.
// Novelty and rare backpacks have lower weights.
/obj/random/backpack
name = "random backpack"
problist = list(
/obj/item/weapon/storage/backpack = 3,
/obj/item/weapon/storage/backpack/holding = 0.5,
/obj/item/weapon/storage/backpack/cultpack = 2,
@@ -348,49 +371,50 @@
/obj/item/weapon/storage/backpack/duffel/syndie = 2,
/obj/item/weapon/storage/backpack/duffel/wizard = 2
)
return pickweight(packs)
/obj/random/voidsuit
name = "random voidsuit"
var/damaged = 0
/obj/random/voidsuit/New(var/_damaged = 0)
damaged = _damaged
..()
/obj/random/voidsuit/spawn_item()
var/list/suit_types = list(
"/space/void" = 2,
"/space/void/engineering" = 2,
"/space/void/mining" = 2,
"/space/void/medical" = 2.3,
"/space/void/security" = 1,
"/space/void/atmos" = 1.5,
"/space/void/merc" = 0.5,
"/space/void/captain" = 0.3
var/list/suitmap = list(
/obj/item/clothing/suit/space/void = /obj/item/clothing/head/helmet/space/void,
/obj/item/clothing/suit/space/void/engineering = /obj/item/clothing/head/helmet/space/void/engineering,
/obj/item/clothing/suit/space/void/mining = /obj/item/clothing/head/helmet/space/void/mining,
/obj/item/clothing/suit/space/void/medical = /obj/item/clothing/head/helmet/space/void/medical,
/obj/item/clothing/suit/space/void/security = /obj/item/clothing/head/helmet/space/void/security,
/obj/item/clothing/suit/space/void/atmos = /obj/item/clothing/head/helmet/space/void/atmos,
/obj/item/clothing/suit/space/void/merc = /obj/item/clothing/head/helmet/space/void/merc,
/obj/item/clothing/suit/space/void/captain = /obj/item/clothing/head/helmet/space/void/merc
)
var/atom/L = src.loc
var/suffix = pickweight(suit_types)
problist = list(
/obj/item/clothing/suit/space/void = 2,
/obj/item/clothing/suit/space/void/engineering = 2,
/obj/item/clothing/suit/space/void/mining = 2,
/obj/item/clothing/suit/space/void/medical = 2.3,
/obj/item/clothing/suit/space/void/security = 1,
/obj/item/clothing/suit/space/void/atmos = 1.5,
/obj/item/clothing/suit/space/void/merc = 0.5,
/obj/item/clothing/suit/space/void/captain = 0.3
)
has_postspawn = TRUE
var/stype = "/obj/item/clothing/suit[suffix]"
var/htype = "/obj/item/clothing/head/helmet[suffix]"
var/obj/item/clothing/suit/space/newsuit = new stype(L)
new htype(L)
new /obj/item/clothing/shoes/magboots(L)
if (damaged && prob(60))//put some damage on it
var/damtype = pick(BRUTE,BURN)
var/amount = rand(1,5)
newsuit.create_breaches(damtype, amount)
/obj/random/voidsuit/New(loc, _damaged = 0)
damaged = _damaged
..(loc)
/obj/random/voidsuit/post_spawn(obj/item/clothing/suit/space/void/suit)
var/helmet = suitmap[suit.type]
if (helmet)
new helmet(loc)
else
log_debug("random_obj (voidsuit): Type [suit.type] was unable to spawn a matching helmet!")
new /obj/item/clothing/shoes/magboots(loc)
if (damaged && prob(60))
suit.create_breaches(pick(BRUTE, BURN), rand(1, 5))
/obj/random/vendor
name = "random vendor"
var/depleted = 0
/obj/random/vendor/New(var/_depleted = 0)
depleted = _depleted
..()
/obj/random/vendor/spawn_item()
var/list/options = list(
problist = list(
/obj/machinery/vending/boozeomat = 1,
/obj/machinery/vending/coffee = 1,
/obj/machinery/vending/snack = 1,
@@ -410,10 +434,13 @@
/obj/machinery/vending/engineering = 1,
/obj/machinery/vending/robotics = 1
)
var/turf/L = get_turf(src)
var/type = pickweight(options)
var/obj/machinery/vending/V = new type(L)
has_postspawn = TRUE
/obj/random/vendor/New(loc, _depleted = 0)
depleted = _depleted
..(loc)
/obj/random/vendor/post_spawn(obj/machinery/vending/V)
if (!depleted)
return
@@ -430,6 +457,8 @@
if (V.products[content] < 1 && V.products[content] > 0) //But we'll usually have at least 1 left
V.products[content] = 0
// Clamp to an integer so we don't get 0.78 of a screwdriver.
V.products[content] = round(V.products[content])
/obj/random/pda_cart/item_to_spawn()
var/list/options = typesof(/obj/item/weapon/cartridge)
@@ -446,69 +475,67 @@
desc = "This is a random glowstick."
icon = 'icons/obj/glowsticks.dmi'
icon_state = "glowstick"
/obj/random/glowstick/item_to_spawn()
return pick(/obj/item/device/flashlight/glowstick,\
/obj/item/device/flashlight/glowstick/red,\
/obj/item/device/flashlight/glowstick/blue,\
/obj/item/device/flashlight/glowstick/orange,\
/obj/item/device/flashlight/glowstick/yellow)
spawnlist = list(
/obj/item/device/flashlight/glowstick,
/obj/item/device/flashlight/glowstick/red,
/obj/item/device/flashlight/glowstick/blue,
/obj/item/device/flashlight/glowstick/orange,
/obj/item/device/flashlight/glowstick/yellow
)
/obj/random/booze
name = "random alcoholic drink"
desc = "This is a random alcoholic drink."
icon = 'icons/obj/drinks.dmi'
icon_state = "broken_bottle"
/obj/random/booze/item_to_spawn()
return pick(/obj/item/weapon/reagent_containers/food/drinks/bottle/gin,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/brandy,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/guinnes,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/drambuie,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,\
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale)
spawnlist = list(
/obj/item/weapon/reagent_containers/food/drinks/bottle/gin,
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey,
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka,
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla,
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing,
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum,
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth,
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua,
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac,
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine,
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe,
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor,
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine,
/obj/item/weapon/reagent_containers/food/drinks/bottle/brandy,
/obj/item/weapon/reagent_containers/food/drinks/bottle/guinnes,
/obj/item/weapon/reagent_containers/food/drinks/bottle/drambuie,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer,
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale
)
/obj/random/melee
name = "random melee weapon"
desc = "This is a random melee weapon."
icon = 'icons/obj/weapons.dmi'
icon_state = "baton"
/obj/random/melee/item_to_spawn()
return pick(/obj/item/weapon/melee/telebaton,\
/obj/item/weapon/melee/energy/sword,\
/obj/item/weapon/melee/energy/sword/pirate,\
/obj/item/weapon/melee/energy/glaive,\
/obj/item/weapon/melee/chainsword,\
/obj/item/weapon/melee/baton/stunrod,\
/obj/item/weapon/material/harpoon,\
/obj/item/weapon/material/twohanded/spear/plasteel,\
/obj/item/weapon/material/sword/trench,\
/obj/item/weapon/material/sword/rapier,\
/obj/item/weapon/melee/hammer,\
/obj/item/weapon/material/twohanded/fireaxe,\
/obj/item/weapon/melee/classic_baton)
spawnlist = list(
/obj/item/weapon/melee/telebaton,
/obj/item/weapon/melee/energy/sword,
/obj/item/weapon/melee/energy/sword/pirate,
/obj/item/weapon/melee/energy/glaive,
/obj/item/weapon/melee/chainsword,
/obj/item/weapon/melee/baton/stunrod,
/obj/item/weapon/material/harpoon,
/obj/item/weapon/material/twohanded/spear/plasteel,
/obj/item/weapon/material/sword/trench,
/obj/item/weapon/material/sword/rapier,
/obj/item/weapon/melee/hammer,
/obj/item/weapon/material/twohanded/fireaxe,
/obj/item/weapon/melee/classic_baton
)
/obj/random/coin
name = "random coin"
desc = "This is a random coin."
icon = 'icons/obj/items.dmi'
icon_state = "coin"
/obj/random/coin/item_to_spawn()
var/list/coin = list(/obj/item/weapon/coin/iron = 5,
problist = list(
/obj/item/weapon/coin/silver = 3,
/obj/item/weapon/coin/gold = 0.7,
/obj/item/weapon/coin/phoron = 0.5,
@@ -516,68 +543,62 @@
/obj/item/weapon/coin/platinum = 0.2,
/obj/item/weapon/coin/diamond = 0.1
)
return pickweight(coin)
/obj/random/energy_antag
name = "random energy weapon"
desc = "This is a random energy weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "retro100"
/obj/random/energy_antag/item_to_spawn()
return pick(/obj/item/weapon/gun/energy/retro,\
/obj/item/weapon/gun/energy/xray,\
/obj/item/weapon/gun/energy/gun,\
/obj/item/weapon/gun/energy/pistol,\
/obj/item/weapon/gun/energy/rifle,\
/obj/item/weapon/gun/energy/mindflayer,\
/obj/item/weapon/gun/energy/toxgun,\
/obj/item/weapon/gun/energy/vaurca/gatlinglaser,\
/obj/item/weapon/gun/energy/vaurca/blaster,\
/obj/item/weapon/gun/energy/crossbow/largecrossbow,\
/obj/item/weapon/gun/energy/rifle/laser/xray)
spawnlist = list(
/obj/item/weapon/gun/energy/retro,
/obj/item/weapon/gun/energy/xray,
/obj/item/weapon/gun/energy/gun,
/obj/item/weapon/gun/energy/pistol,
/obj/item/weapon/gun/energy/rifle,
/obj/item/weapon/gun/energy/mindflayer,
/obj/item/weapon/gun/energy/toxgun,
/obj/item/weapon/gun/energy/vaurca/gatlinglaser,
/obj/item/weapon/gun/energy/vaurca/blaster,
/obj/item/weapon/gun/energy/crossbow/largecrossbow,
/obj/item/weapon/gun/energy/rifle/laser/xray
)
/obj/random/colored_jumpsuit
name = "random colored jumpsuit"
desc = "This is a random colowerd jumpsuit."
icon = 'icons/obj/clothing/uniforms.dmi'
icon_state = "black"
/obj/random/colored_jumpsuit/item_to_spawn()
return pick(/obj/item/clothing/under/color/black,\
/obj/item/clothing/under/color/blackf,\
/obj/item/clothing/under/color/blue,\
/obj/item/clothing/under/color/green,\
/obj/item/clothing/under/color/grey,\
/obj/item/clothing/under/color/orange,\
/obj/item/clothing/under/color/pink,\
/obj/item/clothing/under/color/red,\
/obj/item/clothing/under/color/white,\
/obj/item/clothing/under/color/yellow,\
/obj/item/clothing/under/lightblue,\
/obj/item/clothing/under/aqua,\
/obj/item/clothing/under/purple,\
/obj/item/clothing/under/lightpurple,\
/obj/item/clothing/under/lightgreen,\
/obj/item/clothing/under/lightbrown,\
/obj/item/clothing/under/brown,\
/obj/item/clothing/under/yellowgreen,\
/obj/item/clothing/under/darkblue,\
/obj/item/clothing/under/lightred,\
/obj/item/clothing/under/darkred)
spawnlist = list(
/obj/item/clothing/under/color/black,
/obj/item/clothing/under/color/blackf,
/obj/item/clothing/under/color/blue,
/obj/item/clothing/under/color/green,
/obj/item/clothing/under/color/grey,
/obj/item/clothing/under/color/orange,
/obj/item/clothing/under/color/pink,
/obj/item/clothing/under/color/red,
/obj/item/clothing/under/color/white,
/obj/item/clothing/under/color/yellow,
/obj/item/clothing/under/lightblue,
/obj/item/clothing/under/aqua,
/obj/item/clothing/under/purple,
/obj/item/clothing/under/lightpurple,
/obj/item/clothing/under/lightgreen,
/obj/item/clothing/under/lightbrown,
/obj/item/clothing/under/brown,
/obj/item/clothing/under/yellowgreen,
/obj/item/clothing/under/darkblue,
/obj/item/clothing/under/lightred,
/obj/item/clothing/under/darkred
)
/obj/random/loot
name = "random maintenance loot items"
desc = "Stuff for the maint-dwellers."
icon = 'icons/obj/items.dmi'
icon_state = "gift3"
spawn_nothing_percentage = 5
/obj/random/loot/item_to_spawn()
var/list/maint = list(/obj/item/clothing/glasses/meson = 1,
problist = list(
/obj/item/clothing/glasses/meson = 1,
/obj/item/clothing/glasses/meson/prescription = 0.7,
/obj/item/clothing/glasses/material = 0.8,
/obj/item/clothing/glasses/sunglasses = 1.5,
@@ -700,16 +721,14 @@
/obj/item/weapon/inflatable_duck = 0.2,
/obj/random/hoodie = 0.5
)
return pickweight(maint)
/obj/random/hoodie
name = "random winter coat"
desc = "This is a random winter coat."
icon = 'icons/obj/hoodies.dmi'
icon_state = "coatwinter"
/obj/random/hoodie/item_to_spawn()
var/list/hoodie = list(/obj/item/clothing/suit/storage/hooded/wintercoat = 5,
problist = list(
/obj/item/clothing/suit/storage/hooded/wintercoat = 5,
/obj/item/clothing/suit/storage/hooded/wintercoat/engineering = 3,
/obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos = 3,
/obj/item/clothing/suit/storage/hooded/wintercoat/medical = 3,
@@ -720,16 +739,14 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/security = 2,
/obj/item/clothing/suit/storage/hooded/wintercoat/captain = 1
)
return pickweight(hoodie)
/obj/random/highvalue
name = "random high valuable item"
desc = "This is a random high valuable item."
icon = 'icons/obj/items.dmi'
icon_state = "coin_diamond"
/obj/random/highvalue/item_to_spawn()
var/list/highvalue = list(/obj/item/bluespace_crystal = 7,
problist = list(
/obj/item/bluespace_crystal = 7,
/obj/item/weapon/storage/secure/briefcase/money = 5,
/obj/item/stack/telecrystal{amount = 10} = 7,
/obj/item/clothing/suit/armor/reactive = 0.5,
@@ -743,7 +760,6 @@
/obj/item/weapon/rig/unathi/fancy = 0.5,
/obj/item/clothing/mask/ai = 0.5
)
return pickweight(highvalue)
/obj/random/junk
name = "random trash"
@@ -751,10 +767,7 @@
icon = 'icons/obj/trash.dmi'
icon_state = "koisbar"
spawn_nothing_percentage = 5
/obj/random/junk/item_to_spawn()
var/list/junk = list(/obj/item/trash/koisbar = 0.5,
problist = list(/obj/item/trash/koisbar = 0.5,
/obj/item/trash/raisins = 1,
/obj/item/trash/candy = 1,
/obj/item/trash/cheesie = 2,
@@ -797,8 +810,6 @@
/obj/item/ammo_casing/c45/flash = 0.5,
/obj/item/ammo_casing/shotgun/beanbag = 0.5)
return pickweight(junk)
//Sometimes the chef will have spare oil in storage.
//Sometimes they wont, and will need to order it from cargo
//Variety is the spice of life!
@@ -808,6 +819,6 @@
icon = 'icons/obj/objects.dmi'
icon_state = "oiltank"
spawn_nothing_percentage = 50
/obj/random/cookingoil/item_to_spawn()
return /obj/structure/reagent_dispensers/cookingoil
spawnlist = list(
/obj/structure/reagent_dispensers/cookingoil
)

View File

@@ -216,8 +216,37 @@
new /obj/item/clothing/head/beret/sec/warden(src)
new /obj/item/clothing/accessory/badge/warden(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/weapon/storage/box/ids(src)
return
/obj/structure/closet/secure_closet/security_cadet
name = "security cadet's locker"
req_access = list(access_security)
icon_state = "seccadet1"
icon_closed = "seccadet"
icon_locked = "seccadet1"
icon_opened = "seccadetopen"
icon_broken = "seccadetbroken"
icon_off = "seccadetoff"
New()
..()
if(prob(50))
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/taperoll/police(src)
new /obj/item/device/hailer(src)
new /obj/item/clothing/accessory/storage/black_vest(src)
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/device/holowarrant(src)
new /obj/item/device/flashlight/flare(src)
return
/obj/structure/closet/secure_closet/security
@@ -236,13 +265,13 @@
new /obj/item/weapon/storage/backpack/security(src)
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/random/handgun(src)
new /obj/item/clothing/suit/storage/vest/officer(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
@@ -253,6 +282,7 @@
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/device/holowarrant(src)
new /obj/item/device/flashlight/flare(src)
return

View File

@@ -212,17 +212,22 @@
src.state = 0
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1)
var/obj/item/weapon/airlock_electronics/EL = W
if(!EL.inuse)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
EL.inuse = 1
if(do_after(user, 40))
EL.inuse = 0
if(!src) return
user.drop_item()
W.loc = src
EL.forceMove(src)
user << "<span class='notice'>You installed the airlock electronics!</span>"
src.state = 2
src.name = "Near finished Airlock Assembly"
src.electronics = W
src.electronics = EL
else
EL.inuse = 0
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
//This should never happen, but just in case I guess

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