Linter diagnostics + bans non-var relative pathing

This commit is contained in:
MarinaGryphon
2021-06-20 18:16:45 -04:00
committed by VirgoBot
parent 79eefa9f83
commit 385fa640af
311 changed files with 11232 additions and 8984 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
//Either pass the mob you wish to ban in the 'banned_mob' attribute, or the banckey, banip and bancid variables. If both are passed, the mob takes priority! If a mob is not passed, banckey is the minimum that needs to be passed! banip and bancid are optional.
datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null, var/banip = null, var/bancid = null)
/datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null, var/banip = null, var/bancid = null)
if(!check_rights(R_MOD,0) && !check_rights(R_BAN)) return
@@ -88,7 +88,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
/datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
if(!check_rights(R_BAN)) return
@@ -152,7 +152,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
DB_ban_unban_by_id(ban_id)
datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
/datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
if(!check_rights(R_BAN)) return
@@ -208,7 +208,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
to_chat(usr, "<span class='filter_adminlog'>Cancelled</span>")
return
datum/admins/proc/DB_ban_unban_by_id(var/id)
/datum/admins/proc/DB_ban_unban_by_id(var/id)
if(!check_rights(R_BAN)) return
+1 -2
View File
@@ -1,6 +1,6 @@
#ifndef OVERRIDE_BAN_SYSTEM
//Blocks an attempt to connect before even creating our client datum thing.
world/IsBanned(key,address,computer_id)
/world/IsBanned(key,address,computer_id)
if(ckey(key) in admin_datums)
return ..()
@@ -81,5 +81,4 @@ world/IsBanned(key,address,computer_id)
message_admins("[key] has logged in with a blank ip in the ban check.")
return ..() //default pager ban stuff
#endif
#undef OVERRIDE_BAN_SYSTEM
+2 -2
View File
@@ -20,7 +20,7 @@ var/global/floorIsLava = 0
var/msg = rendered
to_chat(C,msg)
proc/admin_notice(var/message, var/rights)
/proc/admin_notice(var/message, var/rights)
for(var/mob/M in mob_list)
if(check_rights(rights, 0, M))
to_chat(M,message)
@@ -1576,7 +1576,7 @@ var/datum/announcement/minor/admin_min_announcer = new
P.adminbrowse()
datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies in
/datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies in
/datum/admins/proc/faxCallback(var/obj/item/weapon/paper/admin/P, var/obj/machinery/photocopier/faxmachine/destination)
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
+5 -5
View File
@@ -3,11 +3,11 @@
/mob/var/attack_log = list( )
/mob/var/dialogue_log = list( )
proc/log_and_message_admins(var/message as text, var/mob/user = usr)
/proc/log_and_message_admins(var/message as text, var/mob/user = usr)
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
message_admins(user ? "[key_name_admin(user)] [message]" : "EVENT [message]")
proc/log_and_message_admins_many(var/list/mob/users, var/message)
/proc/log_and_message_admins_many(var/list/mob/users, var/message)
if(!users || !users.len)
return
@@ -18,7 +18,7 @@ proc/log_and_message_admins_many(var/list/mob/users, var/message)
log_admin("[english_list(user_keys)] [message]")
message_admins("[english_list(user_keys)] [message]")
/* Old procs
proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
/proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
if(victim)
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[key_name(attacker)] - [victim_message]</font>")
if(attacker)
@@ -26,14 +26,14 @@ proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, va
msg_admin_attack("[key_name(attacker)] [admin_message] [key_name(victim)] (INTENT: [attacker? uppertext(attacker.a_intent) : "N/A"]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[attacker.x];Y=[attacker.y];Z=[attacker.z]'>JMP</a>)")
proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var/attacker_message, var/victim_message, var/admin_message)
/proc/admin_attacker_log_many_victims(var/mob/attacker, var/list/mob/victims, var/attacker_message, var/victim_message, var/admin_message)
if(!victims || !victims.len)
return
for(var/mob/victim in victims)
admin_attack_log(attacker, victim, attacker_message, victim_message, admin_message)
proc/admin_inject_log(mob/attacker, mob/victim, obj/item/weapon, reagents, amount_transferred, violent=0)
/proc/admin_inject_log(mob/attacker, mob/victim, obj/item/weapon, reagents, amount_transferred, violent=0)
if(violent)
violent = "violently "
else
+10 -10
View File
@@ -3,7 +3,7 @@
// they can only be read by admins and moderators.
// a single admin report
datum/admin_report/var
/datum//admin_report/var
ID // the ID of the report
body // the content of the report
author // key of the author
@@ -13,7 +13,7 @@ datum/admin_report/var
offender_key // store the key of the offender
offender_cid // store the cid of the offender
datum/report_topic_handler
/datum//report_topic_handler
Topic(href,href_list)
..()
var/client/C = locate(href_list["client"])
@@ -31,7 +31,7 @@ world/New()
report_topic_handler = new
// add a new news datums
proc/make_report(body, author, okey, cid)
/proc/make_report(body, author, okey, cid)
var/savefile/Reports = new("data/reports.sav")
var/list/reports
var/lastID
@@ -57,7 +57,7 @@ proc/make_report(body, author, okey, cid)
Reports["lastID"] << lastID
// load the reports from disk
proc/load_reports()
/proc/load_reports()
var/savefile/Reports = new("data/reports.sav")
var/list/reports
@@ -68,7 +68,7 @@ proc/load_reports()
return reports
// check if there are any unhandled reports
client/proc/unhandled_reports()
/client/proc/unhandled_reports()
if(!src.holder) return 0
var/list/reports = load_reports()
@@ -80,7 +80,7 @@ client/proc/unhandled_reports()
return 0
// checks if the player has an unhandled report against him
client/proc/is_reported()
/client/proc/is_reported()
var/list/reports = load_reports()
for(var/datum/admin_report/N in reports) if(!N.done)
@@ -90,7 +90,7 @@ client/proc/is_reported()
return 0
// display only the reports that haven't been handled
client/proc/display_admin_reports()
/client/proc/display_admin_reports()
set category = "Admin"
set name = "Display Admin Reports"
if(!src.holder) return
@@ -118,7 +118,7 @@ client/proc/display_admin_reports()
usr << browse(output, "window=news;size=600x400")
client/proc/Report(mob/M as mob in world)
/client/proc/Report(mob/M as mob in world)
set category = "Admin"
if(!src.holder)
return
@@ -136,7 +136,7 @@ client/proc/Report(mob/M as mob in world)
spawn(1)
display_admin_reports()
client/proc/mark_report_done(ID as num)
/client/proc/mark_report_done(ID as num)
if(!src.holder || src.holder.level < 0)
return
@@ -157,7 +157,7 @@ client/proc/mark_report_done(ID as num)
Reports["reports"] << reports
client/proc/edit_report(ID as num)
/client/proc/edit_report(ID as num)
if(!src.holder || src.holder.level < 0)
to_chat(src, "<b>You tried to modify the news, but you're not an admin!</b>")
return
+1 -1
View File
@@ -60,7 +60,7 @@ if rights_required == 0, then it simply checks if they are an admin.
if it doesn't return 1 and show_msg=1 it will prints a message explaining why the check has failed
generally it would be used like so:
proc/admin_proc()
/proc/admin_proc()
if(!check_rights(R_ADMIN)) return
to_world("you have enough rights!")
+2 -2
View File
@@ -4,11 +4,11 @@
/*
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
datum/admins/proc/notes_show(var/ckey)
/datum/admins/proc/notes_show(var/ckey)
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
datum/admins/proc/notes_gethtml(var/ckey)
/datum/admins/proc/notes_gethtml(var/ckey)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
if(ckey)
+3 -3
View File
@@ -1979,13 +1979,13 @@
PlayerNotesFilter()
return
mob/living/proc/can_centcom_reply()
/mob/living/proc/can_centcom_reply()
return 0
mob/living/carbon/human/can_centcom_reply()
/mob/living/carbon/human/can_centcom_reply()
return istype(l_ear, /obj/item/device/radio/headset) || istype(r_ear, /obj/item/device/radio/headset)
mob/living/silicon/ai/can_centcom_reply()
/mob/living/silicon/ai/can_centcom_reply()
return common_radio != null && !check_unable(2)
/atom/proc/extra_admin_link()
+92 -90
View File
@@ -66,115 +66,117 @@
/obj/effect/bmode/builddir
icon_state = "build"
screen_loc = "NORTH,WEST"
Click()
switch(dir)
if(NORTH)
set_dir(EAST)
if(EAST)
set_dir(SOUTH)
if(SOUTH)
set_dir(WEST)
if(WEST)
set_dir(NORTHWEST)
if(NORTHWEST)
set_dir(NORTH)
return 1
/obj/effect/bmode/builddir/Click()
switch(dir)
if(NORTH)
set_dir(EAST)
if(EAST)
set_dir(SOUTH)
if(SOUTH)
set_dir(WEST)
if(WEST)
set_dir(NORTHWEST)
if(NORTHWEST)
set_dir(NORTH)
return 1
/obj/effect/bmode/buildhelp
icon = 'icons/misc/buildmode.dmi'
icon_state = "buildhelp"
screen_loc = "NORTH,WEST+1"
Click()
switch(master.cl.buildmode)
if(BUILDMODE_BASIC)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button = Construct / Upgrade<br>\
Right Mouse Button = Deconstruct / Delete / Downgrade<br>\
Left Mouse Button + ctrl = R-Window<br>\
Left Mouse Button + alt = Airlock<br><br>\
Use the button in the upper left corner to<br>\
change the direction of built objects.<br>\
***********************************************************</span>")
/obj/effect/bmode/buildhelp/Click()
switch(master.cl.buildmode)
if(BUILDMODE_ADVANCED)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Right Mouse Button on buildmode button = Set object type<br>\
Middle Mouse Button on buildmode button= On/Off object type saying<br>\
Middle Mouse Button on turf/obj = Capture object type<br>\
Left Mouse Button on turf/obj = Place objects<br>\
Right Mouse Button = Delete objects<br>\
Mouse Button + ctrl = Copy object type<br><br>\
Use the button in the upper left corner to<br>\
change the direction of built objects.<br>\
***********************************************************</span>")
if(BUILDMODE_BASIC)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button = Construct / Upgrade<br>\
Right Mouse Button = Deconstruct / Delete / Downgrade<br>\
Left Mouse Button + ctrl = R-Window<br>\
Left Mouse Button + alt = Airlock<br><br>\
Use the button in the upper left corner to<br>\
change the direction of built objects.<br>\
***********************************************************</span>")
if(BUILDMODE_EDIT)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Right Mouse Button on buildmode button = Select var(type) & value<br>\
Left Mouse Button on turf/obj/mob = Set var(type) & value<br>\
Right Mouse Button on turf/obj/mob = Reset var's value<br>\
***********************************************************</span>")
if(BUILDMODE_ADVANCED)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Right Mouse Button on buildmode button = Set object type<br>\
Middle Mouse Button on buildmode button= On/Off object type saying<br>\
Middle Mouse Button on turf/obj = Capture object type<br>\
Left Mouse Button on turf/obj = Place objects<br>\
Right Mouse Button = Delete objects<br>\
Mouse Button + ctrl = Copy object type<br><br>\
Use the button in the upper left corner to<br>\
change the direction of built objects.<br>\
***********************************************************</span>")
if(BUILDMODE_THROW)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf/obj/mob = Select<br>\
Right Mouse Button on turf/obj/mob = Throw<br>\
***********************************************************</span>")
if(BUILDMODE_EDIT)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Right Mouse Button on buildmode button = Select var(type) & value<br>\
Left Mouse Button on turf/obj/mob = Set var(type) & value<br>\
Right Mouse Button on turf/obj/mob = Reset var's value<br>\
***********************************************************</span>")
if(BUILDMODE_ROOM)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf = Select as point A<br>\
Right Mouse Button on turf = Select as point B<br>\
Right Mouse Button on buildmode button = Change floor/wall type<br>\
***********************************************************</span>")
if(BUILDMODE_THROW)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf/obj/mob = Select<br>\
Right Mouse Button on turf/obj/mob = Throw<br>\
***********************************************************</span>")
if(BUILDMODE_LADDER)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf = Set as upper ladder loc<br>\
Right Mouse Button on turf = Set as lower ladder loc<br>\
***********************************************************</span>")
if(BUILDMODE_ROOM)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf = Select as point A<br>\
Right Mouse Button on turf = Select as point B<br>\
Right Mouse Button on buildmode button = Change floor/wall type<br>\
***********************************************************</span>")
if(BUILDMODE_CONTENTS)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf/obj/mob = Select<br>\
Right Mouse Button on turf/obj/mob = Move into selection<br>\
***********************************************************</span>")
if(BUILDMODE_LADDER)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf = Set as upper ladder loc<br>\
Right Mouse Button on turf = Set as lower ladder loc<br>\
***********************************************************</span>")
if(BUILDMODE_LIGHTS)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf/obj/mob = Make it glow<br>\
Right Mouse Button on turf/obj/mob = Reset glowing<br>\
Right Mouse Button on buildmode button = Change glow properties<br>\
***********************************************************</span>")
if(BUILDMODE_CONTENTS)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf/obj/mob = Select<br>\
Right Mouse Button on turf/obj/mob = Move into selection<br>\
***********************************************************</span>")
if(BUILDMODE_AI)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button drag box = Select only mobs in box<br>\
Left Mouse Button drag box + shift = Select additional mobs in area<br>\
Left Mouse Button on non-mob = Deselect all mobs<br>\
Left Mouse Button on AI mob = Select/Deselect mob<br>\
Left Mouse Button + alt on AI mob = Toggle hostility on mob<br>\
Left Mouse Button + shift on AI mob = Toggle AI (also resets)<br>\
Left Mouse Button + ctrl on AI mob = Copy mob faction<br>\
Right Mouse Button + ctrl on any mob = Paste mob faction copied with Left Mouse Button + shift<br>\
Right Mouse Button on enemy mob = Command selected mobs to attack mob<br>\
Right Mouse Button on allied mob = Command selected mobs to follow mob<br>\
Right Mouse Button + shift on any mob = Command selected mobs to follow mob regardless of faction<br>\
Note: The following also reset the mob's home position:<br>\
Right Mouse Button on tile = Command selected mobs to move to tile (will cancel if enemies are seen)<br>\
Right Mouse Button + shift on tile = Command selected mobs to reposition to tile (will not be inturrupted by enemies)<br>\
Right Mouse Button + alt on obj/turfs = Command selected mobs to attack obj/turf<br>\
***********************************************************</span>")
return 1
if(BUILDMODE_LIGHTS)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button on turf/obj/mob = Make it glow<br>\
Right Mouse Button on turf/obj/mob = Reset glowing<br>\
Right Mouse Button on buildmode button = Change glow properties<br>\
***********************************************************</span>")
if(BUILDMODE_AI)
to_chat(usr, "<span class='notice'>***********************************************************<br>\
Left Mouse Button drag box = Select only mobs in box<br>\
Left Mouse Button drag box + shift = Select additional mobs in area<br>\
Left Mouse Button on non-mob = Deselect all mobs<br>\
Left Mouse Button on AI mob = Select/Deselect mob<br>\
Left Mouse Button + alt on AI mob = Toggle hostility on mob<br>\
Left Mouse Button + shift on AI mob = Toggle AI (also resets)<br>\
Left Mouse Button + ctrl on AI mob = Copy mob faction<br>\
Right Mouse Button + ctrl on any mob = Paste mob faction copied with Left Mouse Button + shift<br>\
Right Mouse Button on enemy mob = Command selected mobs to attack mob<br>\
Right Mouse Button on allied mob = Command selected mobs to follow mob<br>\
Right Mouse Button + shift on any mob = Command selected mobs to follow mob regardless of faction<br>\
Note: The following also reset the mob's home position:<br>\
Right Mouse Button on tile = Command selected mobs to move to tile (will cancel if enemies are seen)<br>\
Right Mouse Button + shift on tile = Command selected mobs to reposition to tile (will not be inturrupted by enemies)<br>\
Right Mouse Button + alt on obj/turfs = Command selected mobs to attack obj/turf<br>\
***********************************************************</span>")
return 1
/obj/effect/bmode/buildquit
icon_state = "buildquit"
screen_loc = "NORTH,WEST+3"
Click()
togglebuildmode(master.cl.mob)
return 1
/obj/effect/bmode/buildquit/Click()
togglebuildmode(master.cl.mob)
return 1
/obj/effect/bmode/buildholder
density = 0
@@ -95,6 +95,5 @@
C.ear_deaf += 10
to_chat(L, span("danger", "Lightning struck nearby, and the thunderclap is deafening!"))
#undef GROUNDING_ROD_RANGE
#undef LIGHTNING_ZAP_RANGE
#undef LIGHTNING_POWER
+3 -3
View File
@@ -28,9 +28,9 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
icon = 'icons/480x480.dmi'
icon_state = "25percent"
New()
src.pixel_x = -224
src.pixel_y = -224
/obj/effect/debugging/camera_range/New()
src.pixel_x = -224
src.pixel_y = -224
/obj/effect/debugging/marker
icon = 'icons/turf/areas.dmi'
+2 -2
View File
@@ -76,7 +76,7 @@ var/list/sounds_cache = list()
M << 'bananaphone.ogg'
client/proc/space_asshole()
/client/proc/space_asshole()
set category = "Fun"
set name = "Space Asshole"
@@ -87,7 +87,7 @@ client/proc/space_asshole()
M << 'sound/music/space_asshole.ogg'
client/proc/honk_theme()
/client/proc/honk_theme()
set category = "Fun"
set name = "Honk"
+1 -1
View File
@@ -161,7 +161,7 @@
feedback_add_details("admin_verb","GOD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(automute)
if(!config.automute_on)
return
-2
View File
@@ -135,5 +135,3 @@
/mob/living/silicon/robot/syndicate/get_alarm_cameras()
return list()
#undef ALARM_LOSS_DELAY
+8 -18
View File
@@ -15,12 +15,12 @@
name = "exile"
desc = "Prevents you from returning from away missions"
get_data()
var/dat = {"
/obj/item/weapon/implant/exile/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> [using_map.company_name] Employee Exile Implant<BR>
<b>Implant Details:</b> The onboard gateway system has been modified to reject entry by individuals containing this implant<BR>"}
return dat
return dat
/obj/item/weapon/implantcase/exile
name = "Glass Case- 'Exile'"
@@ -29,23 +29,13 @@
icon_state = "implantcase-r"
New()
src.imp = new /obj/item/weapon/implant/exile( src )
..()
return
/obj/item/weapon/implantcase/exile/New()
src.imp = new /obj/item/weapon/implant/exile( src )
..()
return
/obj/structure/closet/secure_closet/exile
name = "Exile Implants"
req_access = list(access_hos)
New()
..()
sleep(2)
new /obj/item/weapon/implanter/exile(src)
new /obj/item/weapon/implantcase/exile(src)
new /obj/item/weapon/implantcase/exile(src)
new /obj/item/weapon/implantcase/exile(src)
new /obj/item/weapon/implantcase/exile(src)
new /obj/item/weapon/implantcase/exile(src)
return
starts_with = list(/obj/item/weapon/implanter/exile = 1, /obj/item/weapon/implantcase/exile = 5)
+1 -1
View File
@@ -51,7 +51,7 @@
density = 1
*/ //VOREStation Removal End
obj/machinery/gateway/centerstation/process()
/obj/machinery/gateway/centerstation/process()
if(stat & (NOPOWER))
if(active) toggleoff()
return
+5
View File
@@ -1,5 +1,10 @@
<<<<<<< HEAD
proc/createRandomZlevel()
if(awaydestinations.len || UNIT_TEST) //crude, but it saves another var! //VOREStation Edit - No loading away missions during CI testing
=======
/proc/createRandomZlevel()
if(awaydestinations.len) //crude, but it saves another var!
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
return
var/list/potentialRandomZlevels = list()
+3 -4
View File
@@ -403,7 +403,6 @@
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `erro_connection_log`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
query_accesslog.Execute()
#undef TOPIC_SPAM_DELAY
#undef UPLOAD_LIMIT
#undef MIN_CLIENT_VERSION
@@ -433,17 +432,17 @@
//Precache the client with all other assets slowly, so as to not block other browse() calls
addtimer(CALLBACK(GLOBAL_PROC, /proc/getFilesSlow, src, SSassets.preload, FALSE), 5 SECONDS)
mob/proc/MayRespawn()
/mob/proc/MayRespawn()
return 0
client/proc/MayRespawn()
/client/proc/MayRespawn()
if(mob)
return mob.MayRespawn()
// Something went wrong, client is usually kicked or transfered to a new mob at this point
return 0
client/verb/character_setup()
/client/verb/character_setup()
set name = "Character Setup"
set category = "Preferences"
if(prefs)
@@ -1,8 +1,8 @@
datum/preferences
/datum/preferences
var/biological_gender = MALE
var/identifying_gender = MALE
datum/preferences/proc/set_biological_gender(var/gender)
/datum/preferences/proc/set_biological_gender(var/gender)
biological_gender = gender
identifying_gender = gender
@@ -140,7 +140,11 @@ datum/preferences/proc/set_biological_gender(var/gender)
return TOPIC_REFRESH
else if(href_list["metadata"])
<<<<<<< HEAD
var/new_metadata = sanitize(input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , html_decode(pref.metadata)) as message, extra = 0) //VOREStation Edit
=======
var/new_metadata = sanitize(input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , pref.metadata) as message|null)
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
if(new_metadata && CanUseTopic(user))
pref.metadata = new_metadata
return TOPIC_REFRESH
@@ -98,7 +98,7 @@
display_name = "trenchcoat, grey"
path = /obj/item/clothing/suit/storage/trench/grey
datum/gear/suit/duster
/datum/gear/suit/duster
display_name = "cowboy duster"
path = /obj/item/clothing/suit/storage/duster
@@ -1,8 +1,3 @@
//used for pref.alternate_option
#define GET_RANDOM_JOB 0
#define BE_ASSISTANT 1
#define RETURN_TO_LOBBY 2
/datum/category_item/player_setup_item/occupation
name = "Occupation"
sort_order = 1
+1 -1
View File
@@ -2,7 +2,7 @@
var/list/preferences_datums = list()
datum/preferences
/datum/preferences
//doohickeys for savefiles
var/path
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
+15 -15
View File
@@ -15,25 +15,25 @@ var/list/spawntypes = list()
var/announce_channel = "Common"
var/allowed_mob_types = JOB_SILICON|JOB_CARBON
proc/check_job_spawning(job)
if(restrict_job && !(job in restrict_job))
return 0
/datum/spawnpoint/proc/check_job_spawning(job)
if(restrict_job && !(job in restrict_job))
return 0
if(disallow_job && (job in disallow_job))
return 0
if(disallow_job && (job in disallow_job))
return 0
var/datum/job/J = SSjob.get_job(job)
if(!J) // Couldn't find, admin shenanigans? Allow it
return 1
if(J.offmap_spawn && !(job in restrict_job))
return 0
if(!(J.mob_type & allowed_mob_types))
return 0
var/datum/job/J = SSjob.get_job(job)
if(!J) // Couldn't find, admin shenanigans? Allow it
return 1
if(J.offmap_spawn && !(job in restrict_job))
return 0
if(!(J.mob_type & allowed_mob_types))
return 0
return 1
/datum/spawnpoint/proc/get_spawn_position()
return get_turf(pick(turfs))
File diff suppressed because it is too large Load Diff
+13 -13
View File
@@ -500,19 +500,19 @@ BLIND // can't see anything
enables_planes = list(VIS_FULLBRIGHT, VIS_CLOAKED)
flash_protection = FLASH_PROTECTION_REDUCED
emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/M = src.loc
to_chat(M, "<font color='red'>The Optical Thermal Scanner overloads and blinds you!</font>")
if(M.glasses == src)
M.Blind(3)
M.eye_blurry = 5
// Don't cure being nearsighted
if(!(M.disabilities & NEARSIGHTED))
M.disabilities |= NEARSIGHTED
spawn(100)
M.disabilities &= ~NEARSIGHTED
..()
/obj/item/clothing/glasses/thermal/emp_act(severity)
if(istype(src.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/M = src.loc
to_chat(M, "<font color='red'>The Optical Thermal Scanner overloads and blinds you!</font>")
if(M.glasses == src)
M.Blind(3)
M.eye_blurry = 5
// Don't cure being nearsighted
if(!(M.disabilities & NEARSIGHTED))
M.disabilities |= NEARSIGHTED
spawn(100)
M.disabilities &= ~NEARSIGHTED
..()
/obj/item/clothing/glasses/thermal/New()
..()
+1 -1
View File
@@ -91,7 +91,7 @@
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE
obj/item/clothing/gloves/fingerless
/obj/item/clothing/gloves/fingerless
desc = "A pair of gloves that don't actually cover the fingers."
name = "fingerless gloves"
icon_state = "fingerlessgloves"
+6 -6
View File
@@ -184,13 +184,13 @@
siemens_coefficient = 1.5
item_icons = list()
update_icon(var/mob/living/carbon/human/user)
if(!istype(user)) return
var/icon/ears = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kitty")
ears.Blend(rgb(user.r_hair, user.g_hair, user.b_hair), ICON_ADD)
/obj/item/clothing/head/kitty/update_icon(var/mob/living/carbon/human/user)
if(!istype(user)) return
var/icon/ears = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kitty")
ears.Blend(rgb(user.r_hair, user.g_hair, user.b_hair), ICON_ADD)
var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner")
ears.Blend(earbit, ICON_OVERLAY)
var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner")
ears.Blend(earbit, ICON_OVERLAY)
/obj/item/clothing/head/richard
name = "chicken mask"
+1 -1
View File
@@ -48,7 +48,7 @@
wizard_garb = 1
obj/item/clothing/shoes/sandal/clogs
/obj/item/clothing/shoes/sandal/clogs
name = "plastic clogs"
desc = "A pair of plastic clog shoes."
icon_state = "clogs"
+2 -2
View File
@@ -263,13 +263,13 @@
body_parts_covered = UPPER_TORSO|ARMS
flags_inv = HIDETIE|HIDEHOLSTER
obj/item/clothing/suit/kimono
/obj/item/clothing/suit/kimono
name = "kimono"
desc = "A traditional Japanese kimono."
icon_state = "kimono"
addblends = "kimono_a"
obj/item/clothing/suit/kamishimo
/obj/item/clothing/suit/kamishimo
name = "kamishimo"
desc = "Traditional Japanese menswear."
icon_state = "kamishimo"
+59 -56
View File
@@ -31,53 +31,55 @@
/obj/item/clothing/suit/storage/toggle
flags_inv = HIDEHOLSTER
var/open = 0 //0 is closed, 1 is open, -1 means it won't be able to toggle
verb/toggle()
set name = "Toggle Coat Buttons"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(open == 1) //Will check whether icon state is currently set to the "open" or "closed" state and switch it around with a message to the user
open = 0
icon_state = initial(icon_state)
flags_inv = HIDETIE|HIDEHOLSTER
to_chat(usr, "You button up the coat.")
else if(open == 0)
open = 1
icon_state = "[icon_state]_open"
flags_inv = HIDEHOLSTER
to_chat(usr, "You unbutton the coat.")
else //in case some goofy admin switches icon states around without switching the icon_open or icon_closed
to_chat(usr, "You attempt to button-up the velcro on your [src], before promptly realising how silly you are.")
return
update_clothing_icon() //so our overlays update
/obj/item/clothing/suit/storage/toggle/verb/toggle()
set name = "Toggle Coat Buttons"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(open == 1) //Will check whether icon state is currently set to the "open" or "closed" state and switch it around with a message to the user
open = 0
icon_state = initial(icon_state)
flags_inv = HIDETIE|HIDEHOLSTER
to_chat(usr, "You button up the coat.")
else if(open == 0)
open = 1
icon_state = "[icon_state]_open"
flags_inv = HIDEHOLSTER
to_chat(usr, "You unbutton the coat.")
else //in case some goofy admin switches icon states around without switching the icon_open or icon_closed
to_chat(usr, "You attempt to button-up the velcro on your [src], before promptly realising how silly you are.")
return
update_clothing_icon() //so our overlays update
/obj/item/clothing/suit/storage/hooded/toggle
flags_inv = HIDEHOLSTER
var/open = 0 //0 is closed, 1 is open, -1 means it won't be able to toggle
verb/toggle()
set name = "Toggle Coat Buttons"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(open == 1) //Will check whether icon state is currently set to the "open" or "closed" state and switch it around with a message to the user
open = 0
icon_state = initial(icon_state)
flags_inv = HIDETIE|HIDEHOLSTER
to_chat(usr, "You button up the coat.")
else if(open == 0)
open = 1
icon_state = "[icon_state]_open"
flags_inv = HIDEHOLSTER
to_chat(usr, "You unbutton the coat.")
else //in case some goofy admin switches icon states around without switching the icon_open or icon_closed
to_chat(usr, "You attempt to button-up the velcro on your [src], before promptly realising how silly you are.")
return
update_clothing_icon() //so our overlays update
/obj/item/clothing/suit/storage/hooded/toggle/verb/toggle()
set name = "Toggle Coat Buttons"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(open == 1) //Will check whether icon state is currently set to the "open" or "closed" state and switch it around with a message to the user
open = 0
icon_state = initial(icon_state)
flags_inv = HIDETIE|HIDEHOLSTER
to_chat(usr, "You button up the coat.")
else if(open == 0)
open = 1
icon_state = "[icon_state]_open"
flags_inv = HIDEHOLSTER
to_chat(usr, "You unbutton the coat.")
else //in case some goofy admin switches icon states around without switching the icon_open or icon_closed
to_chat(usr, "You attempt to button-up the velcro on your [src], before promptly realising how silly you are.")
return
update_clothing_icon() //so our overlays update
//New Vest 4 pocket storage and badge toggles, until suit accessories are a thing.
@@ -90,21 +92,22 @@
/obj/item/clothing/suit/storage/vest
var/icon_badge
var/icon_nobadge
verb/toggle()
set name ="Adjust Badge"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(icon_state == icon_badge)
icon_state = icon_nobadge
to_chat(usr, "You conceal \the [src]'s badge.")
else if(icon_state == icon_nobadge)
icon_state = icon_badge
to_chat(usr, "You reveal \the [src]'s badge.")
else
to_chat(usr, "\The [src] does not have a badge.")
return
update_clothing_icon()
/obj/item/clothing/suit/storage/vest/verb/toggle()
set name ="Adjust Badge"
set category = "Object"
set src in usr
if(!usr.canmove || usr.stat || usr.restrained())
return 0
if(icon_state == icon_badge)
icon_state = icon_nobadge
to_chat(usr, "You conceal \the [src]'s badge.")
else if(icon_state == icon_nobadge)
icon_state = icon_badge
to_chat(usr, "You reveal \the [src]'s badge.")
else
to_chat(usr, "\The [src] does not have a badge.")
return
update_clothing_icon()
@@ -395,7 +395,7 @@
// Helmet Covers
/////////////////
obj/item/clothing/accessory/armor/helmcover
/obj/item/clothing/accessory/armor/helmcover
name = "helmet cover"
desc = "A fabric cover for armored helmets."
icon_override = 'icons/mob/ties.dmi'
@@ -109,15 +109,10 @@
/obj/item/weapon/storage/box/holobadge
name = "holobadge box"
desc = "A box claiming to contain holobadges."
New()
new /obj/item/clothing/accessory/badge/holo(src)
new /obj/item/clothing/accessory/badge/holo(src)
new /obj/item/clothing/accessory/badge/holo(src)
new /obj/item/clothing/accessory/badge/holo(src)
new /obj/item/clothing/accessory/badge/holo/cord(src)
new /obj/item/clothing/accessory/badge/holo/cord(src)
..()
return
starts_with = list(
/obj/item/clothing/accessory/badge/holo = 4,
/obj/item/clothing/accessory/badge/holo/cord = 2
)
/obj/item/clothing/accessory/badge/holo/warden
name = "warden's holobadge"
@@ -140,16 +135,14 @@
/obj/item/weapon/storage/box/holobadge/hos
name = "holobadge box"
desc = "A box claiming to contain holobadges."
New()
new /obj/item/clothing/accessory/badge/holo(src)
new /obj/item/clothing/accessory/badge/holo(src)
new /obj/item/clothing/accessory/badge/holo/warden(src)
new /obj/item/clothing/accessory/badge/holo/detective(src)
new /obj/item/clothing/accessory/badge/holo/detective(src)
new /obj/item/clothing/accessory/badge/holo/hos(src)
new /obj/item/clothing/accessory/badge/holo/cord(src)
..()
return
starts_with = list(
/obj/item/clothing/accessory/badge/holo = 2,
/obj/item/clothing/accessory/badge/holo/warden = 1,
/obj/item/clothing/accessory/badge/holo/detective = 2,
/obj/item/clothing/accessory/badge/holo/hos = 1,
/obj/item/clothing/accessory/badge/holo/cord = 1
)
// Synthmorph bag / Corporation badges. Primarily used on the robobag, but can be worn. Default is NT.
-3
View File
@@ -25,6 +25,3 @@
M.Translate(0, (name ? COMPASS_LABEL_OFFSET-4 : COMPASS_LABEL_OFFSET))
M.Turn(ATAN2(cy-y, cx-x)+180)
compass_overlay.transform = M
#undef COMPASS_PERIOD
#undef COMPASS_INTERVAL
+3 -3
View File
@@ -5,12 +5,12 @@
//This is the output of the stringpercent(print) proc, and means about 80% of
//the print must be there for it to be complete. (Prints are 32 digits)
var/const/FINGERPRINT_COMPLETE = 6
proc/is_complete_print(var/print)
/proc/is_complete_print(var/print)
return stringpercent(print) <= FINGERPRINT_COMPLETE
atom/var/list/suit_fibers
/atom/var/list/suit_fibers
atom/proc/add_fibers(mob/living/carbon/human/M)
/atom/proc/add_fibers(mob/living/carbon/human/M)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.transfer_blood) //bloodied gloves transfer blood to touched objects
+3 -3
View File
@@ -26,16 +26,16 @@
if(INDUSTRIAL_ACCIDENT)
dearer_goods = list(EMERGENCY, BIOMEDICAL, ROBOTICS)
if(BIOHAZARD_OUTBREAK)
dearer_goods = list(BIOMEDICAL, GAS)
dearer_goods = list(BIOMEDICAL, GASEOUS)
if(PIRATES)
dearer_goods = list(SECURITY, MINERALS)
if(CORPORATE_ATTACK)
dearer_goods = list(SECURITY, MAINTENANCE)
if(ALIEN_RAIDERS)
dearer_goods = list(BIOMEDICAL, ANIMALS)
cheaper_goods = list(GAS, MINERALS)
cheaper_goods = list(GASEOUS, MINERALS)
if(AI_LIBERATION)
dearer_goods = list(EMERGENCY, GAS, MAINTENANCE)
dearer_goods = list(EMERGENCY, GASEOUS, MAINTENANCE)
if(MOURNING)
cheaper_goods = list(MINERALS, MAINTENANCE)
if(CULT_CELL_REVEALED)
+3 -128
View File
@@ -1,129 +1,4 @@
/* /datum/event/mundane_news
endWhen = 10
/datum/event/mundane_news/announce()
var/datum/trade_destination/affected_dest = pickweight(weighted_mundaneevent_locations)
var/event_type = 0
if(affected_dest.viable_mundane_events.len)
event_type = pick(affected_dest.viable_mundane_events)
if(!event_type)
return
var/author = "The "+using_map.starsys_name+" Times"
var/channel = author
//see if our location has custom event info for this event
var/body = affected_dest.get_custom_eventstring()
if(!body)
body = ""
switch(event_type)
if(RESEARCH_BREAKTHROUGH)
body = "A major breakthough in the field of [pick("phoron research","super-compressed materials","nano-augmentation","bluespace research","volatile power manipulation")] \
was announced [pick("yesterday","a few days ago","last week","earlier this month")] by a private firm on [affected_dest.name]. \
[using_map.company_name] declined to comment as to whether this could impinge on profits."
if(ELECTION)
body = "The pre-selection of an additional candidates was announced for the upcoming [pick("supervisors council","advisory board","governership","board of inquisitors")] \
election on [affected_dest.name] was announced earlier today, \
[pick("media mogul","web celebrity", "industry titan", "superstar", "famed chef", "popular gardener", "ex-army officer", "multi-billionaire")] \
[random_name(pick(MALE,FEMALE))]. In a statement to the media they said '[pick("My only goal is to help the [pick("sick","poor","children")]",\
"I will maintain my company's record profits","I believe in our future","We must return to our moral core","Just like... chill out dudes")]'."
if(RESIGNATION)
body = "[using_map.company_name] regretfully announces the resignation of [pick("Sector Admiral","Division Admiral","Ship Admiral","Vice Admiral")] [random_name(pick(MALE,FEMALE))]."
if(prob(25))
var/locstring = pick("Segunda","Salusa","Cepheus","Andromeda","Gruis","Corona","Aquila","Asellus") + " " + pick("I","II","III","IV","V","VI","VII","VIII")
body += " In a ceremony on [affected_dest.name] this afternoon, they will be awarded the \
[pick("Red Star of Sacrifice","Purple Heart of Heroism","Blue Eagle of Loyalty","Green Lion of Ingenuity")] for "
if(prob(33))
body += "their actions at the Battle of [pick(locstring,"REDACTED")]."
else if(prob(50))
body += "their contribution to the colony of [locstring]."
else
body += "their loyal service over the years."
else if(prob(33))
body += " They are expected to settle down in [affected_dest.name], where they have been granted a handsome pension."
else if(prob(50))
body += " The news was broken on [affected_dest.name] earlier today, where they cited reasons of '[pick("health","family","REDACTED")]'"
else
body += " Administration Aerospace wishes them the best of luck in their retirement ceremony on [affected_dest.name]."
if(CELEBRITY_DEATH)
body = "It is with regret today that we announce the sudden passing of the "
if(prob(33))
body += "[pick("distinguished","decorated","veteran","highly respected")] \
[pick("Ship's Captain","Vice Admiral","Colonel","Lieutenant Colonel")] "
else if(prob(50))
body += "[pick("award-winning","popular","highly respected","trend-setting")] \
[pick("comedian","singer/songwright","artist","playwright","TV personality","model")] "
else
body += "[pick("successful","highly respected","ingenious","esteemed")] \
[pick("academic","Professor","Doctor","Scientist")] "
body += "[random_name(pick(MALE,FEMALE))] on [affected_dest.name] [pick("last week","yesterday","this morning","two days ago","three days ago")]\
[pick(". Assassination is suspected, but the perpetrators have not yet been brought to justice",\
" due to mercenary infiltrators (since captured)",\
" during an industrial accident",\
" due to [pick("heart failure","kidney failure","liver failure","brain hemorrhage")]")]"
if(BARGAINS)
body += "BARGAINS! BARGAINS! BARGAINS! Commerce Control on [affected_dest.name] wants you to know that everything must go! Across all retail centres, \
all goods are being slashed, and all retailors are onboard - so come on over for the \[shopping\] time of your life."
if(SONG_DEBUT)
body += "[pick("Singer","Singer/songwriter","Saxophonist","Pianist","Guitarist","TV personality","Star")] [random_name(pick(MALE,FEMALE))] \
announced the debut of their new [pick("single","album","EP","label")] '[pick("Everyone's","Look at the","Baby don't eye those","All of those","Dirty nasty")] \
[pick("roses","three stars","starships","nanobots","cyborgs","Skrell","Sren'darr")] \
[pick("on Venus","on Reade","on Moghes","in my hand","slip through my fingers","die for you","sing your heart out","fly away")]' \
with [pick("pre-puchases available","a release tour","cover signings","a launch concert")] on [affected_dest.name]."
if(MOVIE_RELEASE)
body += "From the [pick("desk","home town","homeworld","mind")] of [pick("acclaimed","award-winning","popular","stellar")] \
[pick("playwright","author","director","actor","TV star")] [random_name(pick(MALE,FEMALE))] comes the latest sensation: '\
[pick("Deadly","The last","Lost","Dead")] [pick("Starships","Warriors","outcasts","Tajarans","Unathi","Skrell")] \
[pick("of","from","raid","go hunting on","visit","ravage","pillage","destroy")] \
[pick("Moghes","Earth","Biesel","Meralar","Rarkajar","the Void","the Edge of Space")]'.\
. Own it on webcast today, or visit the galactic premier on [affected_dest.name]!"
if(BIG_GAME_HUNTERS)
body += "Game hunters on [affected_dest.name] "
if(prob(33))
body += "were surprised when an unusual species experts have since identified as \
[pick("a subclass of mammal","a divergent abhuman species","an intelligent species of lemur","organic/cyborg hybrids")] turned up. Believed to have been brought in by \
[pick("alien smugglers","early colonists","mercenary raiders","unwitting tourists")], this is the first such specimen discovered in the wild."
else if(prob(50))
body += "were attacked by a vicious [pick("nas'r","diyaab","samak","predator which has not yet been identified")]\
. Officials urge caution, and locals are advised to stock up on armaments."
else
body += "brought in an unusually [pick("valuable","rare","large","vicious","intelligent")] [pick("mammal","predator","farwa","samak")] for inspection \
[pick("today","yesterday","last week")]. Speculators suggest they may be tipped to break several records."
if(GOSSIP)
body += "[pick("TV host","Webcast personality","Superstar","Model","Actor","Singer")] [random_name(pick(MALE,FEMALE))] "
if(prob(33))
body += "and their partner announced the birth of their [pick("first","second","third")] child on [affected_dest.name] early this morning. \
Doctors say the child is well, and the parents are considering "
if(prob(50))
body += capitalize(pick(first_names_female))
else
body += capitalize(pick(first_names_male))
body += " for the name."
else if(prob(50))
body += "announced their [pick("split","break up","marriage","engagement")] with [pick("TV host","webcast personality","superstar","model","actor","singer")] \
[random_name(pick(MALE,FEMALE))] at [pick("a society ball","a new opening","a launch","a club")] on [affected_dest.name] yesterday, pundits are shocked."
else
body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to "
body += "[pick("unkind comments by an ex","rumours started by jealous friends",\
"the decision to be dropped by a major sponsor","a disasterous interview on [using_map.starsys_name] Tonight")]."
if(TOURISM)
body += "Tourists are flocking to [affected_dest.name] after the surprise announcement of [pick("major shopping bargains by a wily retailer",\
"a huge new ARG by a popular entertainment company","a secret tour by popular artiste [random_name(pick(MALE,FEMALE))]")]. \
The [using_map.starsys_name] Times is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage."
news_network.SubmitArticle(body, author, channel, null, 1)
*/
/datum/event/trivial_news
endWhen = 10
@@ -140,7 +15,7 @@
"Pens proclaim pencils obsolete, 'lead is dead'.",\
"Rock and paper sues scissors for discrimination.",\
"Steak tell-all book reveals he never liked sitting by potato.",\
"Woodchuck stops counting how many times hes chucked 'Never again'.",\
"Woodchuck stops counting how many times hes chucked 'Never again'.",\
"[affected_dest.name] clerk first person able to pronounce '@*$%!'.",\
"[affected_dest.name] delis serving boiled paperback dictionaries, 'Adjectives chewy' customers declare.",\
"[affected_dest.name] weather deemed 'boring'; meteors and rad storms to be imported.",\
@@ -156,8 +31,8 @@
"Skrell marries computer; wedding attended by 100 modems.",\
"Chef reports successfully using harmonica as cheese grater.",\
"[using_map.company_name] invents handkerchief that says 'Bless you' after sneeze.",\
"Clone accused of posing for other cloness school photo.",\
"Clone accused of stealing other cloness employee of the month award.",\
"Clone accused of posing for other cloness school photo.",\
"Clone accused of stealing other cloness employee of the month award.",\
"Woman robs station with hair dryer; crewmen love new style.",\
"This space for rent.",\
"[affected_dest.name] Baker Wins Pickled Crumpet Toss Three Years Running",\
+9 -9
View File
@@ -11,7 +11,7 @@ var/list/weighted_mundaneevent_locations = list()
var/can_shuttle_here = 0 //one day crew from the station will be able to travel to this destination
var/list/viable_random_events = list()
var/list/temp_price_change[BIOMEDICAL]
var/list/viable_mundane_events = list()
var/mundane_probability = 0
/datum/trade_destination/proc/get_custom_eventstring(var/event_type)
return null
@@ -24,7 +24,7 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CORPORATE_ATTACK, AI_LIBERATION)
viable_mundane_events = list(ELECTION, RESIGNATION, CELEBRITY_DEATH)
mundane_probability = 3
/datum/trade_destination/nohio
name = "New Ohio"
@@ -33,7 +33,7 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(SECURITY_BREACH, CULT_CELL_REVEALED, BIOHAZARD_OUTBREAK, PIRATES, ALIEN_RAIDERS)
viable_mundane_events = list(RESEARCH_BREAKTHROUGH, RESEARCH_BREAKTHROUGH, BARGAINS, GOSSIP)
mundane_probability = 4
/datum/trade_destination/sophia
name = "Sophia"
@@ -42,7 +42,7 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(INDUSTRIAL_ACCIDENT, PIRATES, CORPORATE_ATTACK)
viable_mundane_events = list(RESEARCH_BREAKTHROUGH, RESEARCH_BREAKTHROUGH)
mundane_probability = 2
/datum/trade_destination/jade
name = "Jade"
@@ -51,7 +51,7 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(PIRATES, INDUSTRIAL_ACCIDENT)
viable_mundane_events = list(TOURISM)
mundane_probability = 1
/datum/trade_destination/sif
name = "Sif"
@@ -60,7 +60,7 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
viable_mundane_events = list(BARGAINS, GOSSIP, SONG_DEBUT, MOVIE_RELEASE, ELECTION, TOURISM, RESIGNATION, CELEBRITY_DEATH)
mundane_probability = 8
/datum/trade_destination/mars
name = "Mars"
@@ -69,7 +69,7 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(RIOTS, INDUSTRIAL_ACCIDENT, BIOHAZARD_OUTBREAK, CULT_CELL_REVEALED, FESTIVAL, MOURNING)
viable_mundane_events = list(ELECTION, TOURISM, RESIGNATION)
mundane_probability = 3
/datum/trade_destination/nisp
name = "Nisp"
@@ -78,7 +78,7 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
viable_mundane_events = list(ELECTION, TOURISM, BIG_GAME_HUNTERS, RESIGNATION)
mundane_probability = 4
/datum/trade_destination/abelsrest
name = "Abel's Rest"
@@ -87,4 +87,4 @@ var/list/weighted_mundaneevent_locations = list()
willing_to_buy = list()
willing_to_sell = list()
viable_random_events = list(WILD_ANIMAL_ATTACK, CULT_CELL_REVEALED, FESTIVAL, MOURNING, ANIMAL_RIGHTS_RAID, ALIEN_RAIDERS)
viable_mundane_events = list(ELECTION, TOURISM, BIG_GAME_HUNTERS, RESIGNATION)
mundane_probability = 4
+5 -4
View File
@@ -141,7 +141,7 @@
desc = "It's worth 1000 Thalers."
worth = 1000
proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
/proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
var/obj/item/weapon/spacecash/SC = new (spawnloc)
SC.set_worth(sum)
@@ -157,9 +157,10 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
drop_sound = 'sound/items/drop/card.ogg'
pickup_sound = 'sound/items/pickup/card.ogg'
var/owner_name = "" //So the ATM can set it so the EFTPOS can put a valid name on transactions.
attack_self() return //Don't act
attackby() return //like actual
update_icon() return //space cash
/obj/item/weapon/spacecash/ewallet/attack_self() return //Don't act
/obj/item/weapon/spacecash/ewallet/attackby() return //like actual
/obj/item/weapon/spacecash/ewallet/update_icon() return //space cash
/obj/item/weapon/spacecash/ewallet/examine(mob/user)
. = ..()
+10 -33
View File
@@ -3,7 +3,6 @@
#define WILD_ANIMAL_ATTACK 2
#define INDUSTRIAL_ACCIDENT 3
#define BIOHAZARD_OUTBREAK 4
#define WARSHIPS_ARRIVE 5
#define PIRATES 6
#define CORPORATE_ATTACK 7
#define ALIEN_RAIDERS 8
@@ -14,37 +13,15 @@
#define ANIMAL_RIGHTS_RAID 13
#define FESTIVAL 14
#define RESEARCH_BREAKTHROUGH 15
#define BARGAINS 16
#define SONG_DEBUT 17
#define MOVIE_RELEASE 18
#define BIG_GAME_HUNTERS 19
#define ELECTION 20
#define GOSSIP 21
#define TOURISM 22
#define CELEBRITY_DEATH 23
#define RESIGNATION 24
#define DEFAULT 1
#define ADMINISTRATIVE 2
#define CLOTHING 3
#define SECURITY 4
#define SPECIAL_SECURITY 5
#define FOOD 6
#define ANIMALS 7
#define MINERALS 8
#define EMERGENCY 9
#define GAS 10
#define MAINTENANCE 11
#define ELECTRICAL 12
#define ROBOTICS 13
#define BIOMEDICAL 14
#define GEAR_EVA 15
#define SECURITY 1
#define FOOD 2
#define ANIMALS 3
#define MINERALS 4
#define EMERGENCY 5
#define GASEOUS 6
#define MAINTENANCE 7
#define ROBOTICS 8
#define BIOMEDICAL 9
//---- The following corporations are friendly with NanoTrasen and loosely enable trade and travel:
@@ -86,7 +63,7 @@ var/global/economy_init = 0
for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination)
var/datum/trade_destination/D = new loc_type
weighted_randomevent_locations[D] = D.viable_random_events.len
weighted_mundaneevent_locations[D] = D.viable_mundane_events.len
weighted_mundaneevent_locations[D] = D.mundane_probability
create_station_account()
+2 -3
View File
@@ -980,9 +980,8 @@
/obj/item/weapon/reagent_containers/food/snacks/dionaroast
price_tag = 25
/obj/item/pizzabox
get_item_cost()
return get_item_cost(pizza)
/obj/item/pizzabox/get_item_cost()
return get_item_cost(pizza)
//***************//
+4 -4
View File
@@ -1,9 +1,9 @@
//var/global/list/event_viruses = list() // so that event viruses are kept around for admin logs, rather than being GCed
datum/event/viral_infection
/datum/event/viral_infection
var/list/viruses = list()
datum/event/viral_infection/setup()
/datum/event/viral_infection/setup()
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1
@@ -18,7 +18,7 @@ datum/event/viral_infection/setup()
D.makerandom(strength)
viruses += D
datum/event/viral_infection/announce()
/datum/event/viral_infection/announce()
var/level
if (severity == EVENT_LEVEL_MUNDANE)
return
@@ -30,7 +30,7 @@ datum/event/viral_infection/announce()
if (severity == EVENT_LEVEL_MAJOR || prob(60))
command_announcement.Announce("Confirmed outbreak of level [level] biohazard aboard \the [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
datum/event/viral_infection/start()
/datum/event/viral_infection/start()
if(!viruses.len) return
var/list/candidates = list() //list of candidate keys
+3 -3
View File
@@ -22,7 +22,7 @@ var/list/dreams = list(
"swallowed whole","a fox","a wolf","a cat","a tiger","a dog","a taur","a xenochimera"
)
mob/living/carbon/proc/dream()
/mob/living/carbon/proc/dream()
dreaming = 1
spawn(0)
@@ -35,8 +35,8 @@ mob/living/carbon/proc/dream()
dreaming = 0
return
mob/living/carbon/proc/handle_dreams()
/mob/living/carbon/proc/handle_dreams()
if(client && !dreaming && prob(5))
dream()
mob/living/carbon/var/dreaming = 0
/mob/living/carbon/var/dreaming = 0
+76 -74
View File
@@ -11,7 +11,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
*/
mob/living/carbon/var
/mob/living/carbon/var
image/halimage
image/halbody
obj/halitem
@@ -19,7 +19,7 @@ mob/living/carbon/var
handling_hal = 0
hal_crit = 0
mob/living/carbon/proc/handle_hallucinations()
/mob/living/carbon/proc/handle_hallucinations()
if(handling_hal) return
handling_hal = 1
while(client && hallucination > 20)
@@ -211,7 +211,7 @@ mob/living/carbon/proc/handle_hallucinations()
return start_txt + mocktxt + end_txt + "</TT></BODY></HTML>"
proc/check_panel(mob/M)
/proc/check_panel(mob/M)
if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
if(M.hallucination < 15)
return 1
@@ -241,87 +241,89 @@ proc/check_panel(mob/M)
var/health = 100
attackby(var/obj/item/weapon/P as obj, mob/user as mob)
/obj/effect/fake_attacker/attackby(var/obj/item/weapon/P as obj, mob/user as mob)
step_away(src,my_target,2)
for(var/mob/M in oviewers(world.view,my_target))
to_chat(M, "<font color='red'><B>[my_target] flails around wildly.</B></font>")
my_target.show_message("<font color='red'><B>[src] has been attacked by [my_target] </B></font>", 1) //Lazy.
src.health -= P.force
return
/obj/effect/fake_attacker/Crossed(var/mob/M, somenumber)
if(M == my_target)
step_away(src,my_target,2)
for(var/mob/M in oviewers(world.view,my_target))
to_chat(M, "<font color='red'><B>[my_target] flails around wildly.</B></font>")
my_target.show_message("<font color='red'><B>[src] has been attacked by [my_target] </B></font>", 1) //Lazy.
if(prob(30))
for(var/mob/O in oviewers(world.view , my_target))
to_chat(O, "<font color='red'><B>[my_target] stumbles around.</B></font>")
src.health -= P.force
/obj/effect/fake_attacker/New()
..()
QDEL_IN(src, 30 SECONDS)
step_away(src,my_target,2)
spawn attack_loop()
/obj/effect/fake_attacker/Destroy()
if(my_target)
my_target.hallucinations -= src
return ..()
return
Crossed(var/mob/M, somenumber)
if(M == my_target)
step_away(src,my_target,2)
if(prob(30))
for(var/mob/O in oviewers(world.view , my_target))
to_chat(O, "<font color='red'><B>[my_target] stumbles around.</B></font>")
New()
..()
spawn(300)
if(my_target)
my_target.hallucinations -= src
qdel(src)
step_away(src,my_target,2)
spawn attack_loop()
/obj/effect/fake_attacker/proc/updateimage()
// qdel(src.currentimage)
proc/updateimage()
// qdel(src.currentimage)
if(src.dir == NORTH)
qdel(src.currentimage)
src.currentimage = new /image(up,src)
else if(src.dir == SOUTH)
qdel(src.currentimage)
src.currentimage = new /image(down,src)
else if(src.dir == EAST)
qdel(src.currentimage)
src.currentimage = new /image(right,src)
else if(src.dir == WEST)
qdel(src.currentimage)
src.currentimage = new /image(left,src)
my_target << currentimage
if(src.dir == NORTH)
qdel(src.currentimage)
src.currentimage = new /image(up,src)
else if(src.dir == SOUTH)
qdel(src.currentimage)
src.currentimage = new /image(down,src)
else if(src.dir == EAST)
qdel(src.currentimage)
src.currentimage = new /image(right,src)
else if(src.dir == WEST)
qdel(src.currentimage)
src.currentimage = new /image(left,src)
my_target << currentimage
proc/attack_loop()
while(1)
sleep(rand(5,10))
if(src.health < 0)
collapse()
continue
if(get_dist(src,my_target) > 1)
src.set_dir(get_dir(src,my_target))
step_towards(src,my_target)
updateimage()
else
if(prob(15))
if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.show_message("<font color='red'><B>[my_target] has been attacked with [weapon_name] by [src.name] </B></font>", 1)
my_target.halloss += 8
if(prob(20)) my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("<font color='red'><B>[src.name] has punched [my_target]!</B></font>", 1)
my_target.halloss += 4
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
/obj/effect/fake_attacker/proc/attack_loop()
while(1)
sleep(rand(5,10))
if(src.health < 0)
collapse()
continue
if(get_dist(src,my_target) > 1)
src.set_dir(get_dir(src,my_target))
step_towards(src,my_target)
updateimage()
else
if(prob(15))
step_away(src,my_target,2)
if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.show_message("<font color='red'><B>[my_target] has been attacked with [weapon_name] by [src.name] </B></font>", 1)
my_target.halloss += 8
if(prob(20)) my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("<font color='red'><B>[src.name] has punched [my_target]!</B></font>", 1)
my_target.halloss += 4
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
proc/collapse()
collapse = 1
updateimage()
if(prob(15))
step_away(src,my_target,2)
/obj/effect/fake_attacker/proc/collapse()
collapse = 1
updateimage()
/proc/fake_blood(var/mob/target)
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
+4 -4
View File
@@ -1,6 +1,6 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
proc/Intoxicated(phrase)
/proc/Intoxicated(phrase)
phrase = html_decode(phrase)
var/leng=length(phrase)
var/counter=length(phrase)
@@ -23,7 +23,7 @@ proc/Intoxicated(phrase)
newphrase+="[newletter]";counter-=1
return newphrase
proc/NewStutter(phrase,stunned)
/proc/NewStutter(phrase,stunned)
phrase = html_decode(phrase)
var/list/split_phrase = splittext(phrase," ") //Split it up into words.
@@ -59,10 +59,10 @@ proc/NewStutter(phrase,stunned)
return sanitize(jointext(split_phrase," "))
proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
/proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
step(M, pick(d,turn(d,90),turn(d,-90)))
proc/Ellipsis(original_msg, chance = 50)
/proc/Ellipsis(original_msg, chance = 50)
if(chance <= 0) return "..."
if(chance >= 100) return original_msg
+28 -38
View File
@@ -2,92 +2,82 @@
name = "glassware box"
desc = "A box of assorted glassware"
can_hold = list(/obj/item/weapon/reagent_containers/food/drinks/glass2)
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/glass2/square(src)
new /obj/item/weapon/reagent_containers/food/drinks/glass2/rocks(src)
new /obj/item/weapon/reagent_containers/food/drinks/glass2/shake(src)
new /obj/item/weapon/reagent_containers/food/drinks/glass2/cocktail(src)
new /obj/item/weapon/reagent_containers/food/drinks/glass2/shot(src)
new /obj/item/weapon/reagent_containers/food/drinks/glass2/pint(src)
new /obj/item/weapon/reagent_containers/food/drinks/glass2/mug(src)
new /obj/item/weapon/reagent_containers/food/drinks/glass2/wine(src)
new /obj/item/weapon/reagent_containers/food/drinks/metaglass(src)
new /obj/item/weapon/reagent_containers/food/drinks/metaglass/metapint(src)
starts_with = list(
/obj/item/weapon/reagent_containers/food/drinks/glass2/square,
/obj/item/weapon/reagent_containers/food/drinks/glass2/rocks,
/obj/item/weapon/reagent_containers/food/drinks/glass2/shake,
/obj/item/weapon/reagent_containers/food/drinks/glass2/cocktail,
/obj/item/weapon/reagent_containers/food/drinks/glass2/shot,
/obj/item/weapon/reagent_containers/food/drinks/glass2/pint,
/obj/item/weapon/reagent_containers/food/drinks/glass2/mug,
/obj/item/weapon/reagent_containers/food/drinks/glass2/wine,
/obj/item/weapon/reagent_containers/food/drinks/metaglass,
/obj/item/weapon/reagent_containers/food/drinks/metaglass/metapint
)
/obj/item/weapon/storage/box/glasses
name = "box of glasses"
var/glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2
can_hold = list(/obj/item/weapon/reagent_containers/food/drinks/glass2)
New()
..()
for(var/i = 1 to 7)
new glass_type(src)
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2 = 7)
/obj/item/weapon/storage/box/glasses/square
name = "box of half-pint glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/square
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/square = 7)
/obj/item/weapon/storage/box/glasses/rocks
name = "box of rocks glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/rocks
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/rocks = 7)
/obj/item/weapon/storage/box/glasses/shake
name = "box of milkshake glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/shake
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/shake = 7)
/obj/item/weapon/storage/box/glasses/cocktail
name = "box of cocktail glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/cocktail
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/cocktail = 7)
/obj/item/weapon/storage/box/glasses/shot
name = "box of shot glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/shot
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/shot = 7)
/obj/item/weapon/storage/box/glasses/pint
name = "box of pint glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/pint
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/pint = 7)
/obj/item/weapon/storage/box/glasses/mug
name = "box of glass mugs"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/mug
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/mug = 7)
/obj/item/weapon/storage/box/glasses/wine
name = "box of wine glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/glass2/wine
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/glass2/wine = 7)
/obj/item/weapon/storage/box/glasses/meta
name = "box of half-pint metamorphic glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/metaglass
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/metaglass = 7)
/obj/item/weapon/storage/box/glasses/meta/metapint
name = "box of metamorphic pint glasses"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/metaglass/metapint
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/metaglass/metapint = 7)
/obj/item/weapon/storage/box/glass_extras
name = "box of cocktail garnishings"
var/extra_type = /obj/item/weapon/glass_extra
can_hold = list(/obj/item/weapon/glass_extra)
storage_slots = 14
New()
..()
for(var/i = 1 to 14)
new extra_type(src)
starts_with = list(/obj/item/weapon/glass_extra = 14)
/obj/item/weapon/storage/box/glass_extras/straws
name = "box of straws"
extra_type = /obj/item/weapon/glass_extra/straw
starts_with = list(/obj/item/weapon/glass_extra/straw = 14)
/obj/item/weapon/storage/box/glass_extras/sticks
name = "box of drink sticks"
extra_type = /obj/item/weapon/glass_extra/stick
starts_with = list(/obj/item/weapon/glass_extra/stick = 14)
/obj/item/weapon/storage/box/glasses/coffeecup
name = "box of coffee cups"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/cup
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/cup = 7)
/obj/item/weapon/storage/box/glasses/coffeemug
name = "box of coffee mugs"
glass_type = /obj/item/weapon/reagent_containers/food/drinks/britcup
starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/britcup = 7)
+2 -1
View File
@@ -12,7 +12,8 @@
var/obj/item/weapon/reagent_containers/glass/rag/rag = null
var/rag_underlay = "rag"
on_reagent_change() return // To suppress price updating. Bottles have their own price tags.
/obj/item/weapon/reagent_containers/food/drinks/bottle/on_reagent_change() return // To suppress price updating. Bottles have their own price tags.
/obj/item/weapon/reagent_containers/food/drinks/bottle/Initialize()
. = ..()
+81 -84
View File
@@ -10,47 +10,39 @@
center_of_mass = list("x"=16, "y"=10)
matter = list("glass" = 500)
on_reagent_change()
/*if(reagents.reagent_list.len > 1 )
icon_state = "glass_brown"
name = "Glass of Hooch"
desc = "Two or more drinks, mixed together."*/
/*else if(reagents.reagent_list.len == 1)
for(var/datum/reagent/R in reagents.reagent_list)
switch(R.id)*/
if (reagents.reagent_list.len > 0)
var/datum/reagent/R = reagents.get_master_reagent()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change()
if (!length(reagents?.reagent_list))
icon_state = "glass_empty"
name = "glass"
desc = "Your standard drinking glass."
center_of_mass = list("x"=16, "y"=10)
return
var/datum/reagent/R = reagents.get_master_reagent()
if(R.glass_icon_state)
icon_state = R.glass_icon_state
else
icon_state = "glass_brown"
if(R.glass_icon_state)
icon_state = R.glass_icon_state
else
icon_state = "glass_brown"
if(R.glass_name)
name = R.glass_name
else
name = "Glass of.. what?"
if(R.glass_name)
name = R.glass_name
else
name = "Glass of.. what?"
if(R.glass_desc)
desc = R.glass_desc
else
desc = "You can't really tell what this is."
if(R.glass_desc)
desc = R.glass_desc
else
desc = "You can't really tell what this is."
if(R.glass_center_of_mass)
center_of_mass = R.glass_center_of_mass
else
center_of_mass = list("x"=16, "y"=10)
if(R.glass_center_of_mass)
center_of_mass = R.glass_center_of_mass
else
center_of_mass = list("x"=16, "y"=10)
if(R.price_tag)
price_tag = R.price_tag
else
price_tag = null
else
icon_state = "glass_empty"
name = "glass"
desc = "Your standard drinking glass."
center_of_mass = list("x"=16, "y"=10)
return
if(R.price_tag)
price_tag = R.price_tag
else
price_tag = null
/obj/item/weapon/reagent_containers/food/drinks/cup
name = "coffee cup"
@@ -60,54 +52,48 @@
volume = 30
center_of_mass = list("x"=16, "y"=16)
on_reagent_change()
if (reagents.reagent_list.len > 0)
var/datum/reagent/R = reagents.get_master_reagent()
/obj/item/weapon/reagent_containers/food/drinks/cup/on_reagent_change()
if (!length(reagents?.reagent_list))
icon_state = "cup_empty"
name = "coffee cup"
desc = "The container of oriental luxuries."
center_of_mass = list("x"=16, "y"=16)
return
var/datum/reagent/R = reagents.get_master_reagent()
if(R.cup_icon_state)
icon_state = R.cup_icon_state
else
icon_state = "cup_brown"
if(R.cup_icon_state)
icon_state = R.cup_icon_state
else
icon_state = "cup_brown"
if(R.cup_name)
name = R.cup_name
else
name = "Cup of.. what?"
if(R.cup_name)
name = R.cup_name
else
name = "Cup of.. what?"
if(R.cup_desc)
desc = R.cup_desc
else
desc = "You can't really tell what this is."
if(R.cup_desc)
desc = R.cup_desc
else
desc = "You can't really tell what this is."
if(R.cup_center_of_mass)
center_of_mass = R.cup_center_of_mass
else
center_of_mass = list("x"=16, "y"=16)
if(R.cup_center_of_mass)
center_of_mass = R.cup_center_of_mass
else
center_of_mass = list("x"=16, "y"=16)
if(R.price_tag)
price_tag = R.price_tag
else
price_tag = null
else
icon_state = "cup_empty"
name = "coffee cup"
desc = "The container of oriental luxuries."
center_of_mass = list("x"=16, "y"=16)
return
if(R.price_tag)
price_tag = R.price_tag
else
price_tag = null
// for /obj/machinery/vending/sovietsoda
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda
New()
..()
reagents.add_reagent("sodawater", 50)
on_reagent_change()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda/New()
..()
reagents.add_reagent("sodawater", 50)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola
New()
..()
reagents.add_reagent("cola", 50)
on_reagent_change()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola/New()
..()
reagents.add_reagent("cola", 50)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass
name = "shot glass"
@@ -118,21 +104,33 @@
matter = list("glass" = 175)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change()
<<<<<<< HEAD
cut_overlays()
=======
overlays.Cut()
name = "shot glass"
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
if(reagents.total_volume)
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]1")
if(!reagents.total_volume)
return
var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]1")
switch(reagents.total_volume)
if(0 to 3) filling.icon_state = "[icon_state]1"
if(4 to 7) filling.icon_state = "[icon_state]5"
if(8 to INFINITY) filling.icon_state = "[icon_state]12"
switch(reagents.total_volume)
if(0 to 3) filling.icon_state = "[icon_state]1"
if(4 to 7) filling.icon_state = "[icon_state]5"
if(8 to INFINITY) filling.icon_state = "[icon_state]12"
<<<<<<< HEAD
filling.color += reagents.get_color()
add_overlay(filling)
name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future.
else
name = "shot glass"
=======
filling.color += reagents.get_color()
overlays += filling
name += " of [reagents.get_master_reagent_name()]" //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future.
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask
name = "fitness shaker"
@@ -174,5 +172,4 @@
reagents.add_reagent("nutriment", 30)
reagents.add_reagent("iron", 10)
reagents.add_reagent("protein", 15)
reagents.add_reagent("water", 45)
on_reagent_change()
reagents.add_reagent("water", 45)
+3 -3
View File
@@ -188,8 +188,8 @@
ice_creamed = 1
#undef ICECREAM_VANILLA
#undef FLAVOUR_CHOCOLATE
#undef FLAVOUR_STRAWBERRY
#undef FLAVOUR_BLUE
#undef ICECREAM_CHOCOLATE
#undef ICECREAM_STRAWBERRY
#undef ICECREAM_BLUE
#undef CONE_WAFFLE
#undef CONE_CHOC
+9 -7
View File
@@ -49,13 +49,15 @@ I said no!
/obj/item/weapon/reagent_containers/food/snacks/meatball
)
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
being_cooked.heat()
make_food(var/obj/container as obj)
. = ..(container)
for (var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/D in .)
if (!D.warm)
warm_up(D)
/datum/recipe/donkpocket/proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
being_cooked.heat()
/datum/recipe/donkpocket/make_food(var/obj/container as obj)
. = ..(container)
for (var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/D in .)
if (!D.warm)
warm_up(D)
/datum/recipe/donkpocket/warm
reagents = list() //This is necessary since this is a child object of the above recipe and we don't want donk pockets to need flour
+34 -45
View File
@@ -5,77 +5,66 @@
var/effect // description of what happens when not treated
var/duration = 0 // delay between start() and finish()
proc/start(mob/living/carbon/human/H)
// start the side effect, this should give some cue as to what's happening,
// such as gasping. These cues need to be unique among side-effects.
/datum/genetics/side_effect/proc/start(mob/living/carbon/human/H)
// start the side effect, this should give some cue as to what's happening,
// such as gasping. These cues need to be unique among side-effects.
proc/finish(mob/living/carbon/human/H)
// Finish the side-effect. This should first check whether the cure has been
// applied, and if not, cause bad things to happen.
/datum/genetics/side_effect/proc/finish(mob/living/carbon/human/H)
// Finish the side-effect. This should first check whether the cure has been
// applied, and if not, cause bad things to happen.
/datum/genetics/side_effect/genetic_burn
name = "Genetic Burn"
symptom = "Subject's skin turns unusualy red."
treatment = "Inject small dose of dexalin."
effect = "Subject's skin burns."
duration = 10*30
duration = 30 SECONDS
start(mob/living/carbon/human/H)
H.custom_emote(VISIBLE_MESSAGE, "starts turning very red..")
/datum/genetics/side_effect/genetic_burn/start(mob/living/carbon/human/H)
H.custom_emote(VISIBLE_MESSAGE, "starts turning very red..")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("dexalin"))
for(var/organ_name in BP_ALL)
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(0, 5, 0)
/datum/genetics/side_effect/genetic_burn/finish(mob/living/carbon/human/H)
if(H.reagents.has_reagent("dexalin"))
return
for(var/organ_name in BP_ALL)
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(0, 5, 0)
/datum/genetics/side_effect/bone_snap
name = "Bone Snap"
symptom = "Subject's limbs tremble notably."
treatment = "Inject small dose of bicaridine."
effect = "Subject's bone breaks."
duration = 10*60
duration = 60 SECONDS
start(mob/living/carbon/human/H)
H.custom_emote(VISIBLE_MESSAGE, "'s limbs start shivering uncontrollably.")
/datum/genetics/side_effect/bone_snap/start(mob/living/carbon/human/H)
H.custom_emote(VISIBLE_MESSAGE, "'s limbs start shivering uncontrollably.")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("bicaridine"))
var/organ_name = pick(BP_ALL)
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(20, 0, 0)
E.fracture()
/*/datum/genetics/side_effect/monkey
name = "Monkey"
symptom = "Subject starts drooling uncontrollably."
treatment = "Inject small dose of dylovene."
effect = "Subject turns into monkey."
duration = 10*90
start(mob/living/carbon/human/H)
H.custom_emote(VISIBLE_MESSAGE, "has drool running down from [H.gender == MALE ? "his" : H.gender == FEMALE ? "her" : "their"] mouth.")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("anti_toxin"))
H.monkeyize()**/
/datum/genetics/side_effect/bone_snap/finish(mob/living/carbon/human/H)
if(H.reagents.has_reagent("bicaridine"))
return
var/organ_name = pick(BP_ALL)
var/obj/item/organ/external/E = H.get_organ(organ_name)
E.take_damage(20, 0, 0)
E.fracture()
/datum/genetics/side_effect/confuse
name = "Confuse"
symptom = "Subject starts drooling uncontrollably."
treatment = "Inject small dose of dylovene."
effect = "Subject becomes confused."
duration = 10*30
duration = 30 SECONDS
start(mob/living/carbon/human/H)
var/datum/gender/T = gender_datums[H.get_visible_gender()]
H.custom_emote(VISIBLE_MESSAGE, "has drool running down from [T.his] mouth.")
/datum/genetics/side_effect/confuse/start(mob/living/carbon/human/H)
var/datum/gender/T = gender_datums[H.get_visible_gender()]
H.custom_emote(VISIBLE_MESSAGE, "has drool running down from [T.his] mouth.")
finish(mob/living/carbon/human/H)
if(!H.reagents.has_reagent("anti_toxin"))
H.Confuse(100)
/datum/genetics/side_effect/confuse/finish(mob/living/carbon/human/H)
if(H.reagents.has_reagent("anti_toxin"))
return
H.Confuse(100)
proc/trigger_side_effect(mob/living/carbon/human/H)
/proc/trigger_side_effect(mob/living/carbon/human/H)
spawn
if(!istype(H)) return
var/tp = pick(typesof(/datum/genetics/side_effect) - /datum/genetics/side_effect)
+2 -2
View File
@@ -3,12 +3,12 @@
var/list/ghost_traps
proc/get_ghost_trap(var/trap_key)
/proc/get_ghost_trap(var/trap_key)
if(!ghost_traps)
populate_ghost_traps()
return ghost_traps[trap_key]
proc/populate_ghost_traps()
/proc/populate_ghost_traps()
ghost_traps = list()
for(var/traptype in typesof(/datum/ghosttrap))
var/datum/ghosttrap/G = new traptype
+2 -2
View File
@@ -142,10 +142,10 @@
item_state = "boxing"
special_attack_type = /datum/unarmed_attack/holopugilism
datum/unarmed_attack/holopugilism
/datum/unarmed_attack/holopugilism
sparring_variant_type = /datum/unarmed_attack/holopugilism
datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/zone)
/datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/zone)
user.do_attack_animation(src)
var/damage = rand(0, 9)
if(!damage)
@@ -144,7 +144,7 @@
push_data()
activate_pin(2)
obj/item/integrated_circuit/list/len
/obj/item/integrated_circuit/list/len
name = "len circuit"
desc = "This circuit will give length of the list."
inputs = list(
+43 -43
View File
@@ -128,36 +128,36 @@ Book Cart End
/obj/structure/bookcase/manuals/medical
name = "Medical Manuals bookcase"
New()
..()
new /obj/item/weapon/book/manual/medical_cloning(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
update_icon()
/obj/structure/bookcase/manuals/medical/New()
..()
new /obj/item/weapon/book/manual/medical_cloning(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
new /obj/item/weapon/book/manual/medical_diagnostics_manual(src)
update_icon()
/obj/structure/bookcase/manuals/engineering
name = "Engineering Manuals bookcase"
New()
..()
new /obj/item/weapon/book/manual/engineering_construction(src)
new /obj/item/weapon/book/manual/engineering_particle_accelerator(src)
new /obj/item/weapon/book/manual/engineering_hacking(src)
new /obj/item/weapon/book/manual/engineering_guide(src)
new /obj/item/weapon/book/manual/atmospipes(src)
new /obj/item/weapon/book/manual/engineering_singularity_safety(src)
new /obj/item/weapon/book/manual/evaguide(src)
update_icon()
/obj/structure/bookcase/manuals/engineering/New()
..()
new /obj/item/weapon/book/manual/engineering_construction(src)
new /obj/item/weapon/book/manual/engineering_particle_accelerator(src)
new /obj/item/weapon/book/manual/engineering_hacking(src)
new /obj/item/weapon/book/manual/engineering_guide(src)
new /obj/item/weapon/book/manual/atmospipes(src)
new /obj/item/weapon/book/manual/engineering_singularity_safety(src)
new /obj/item/weapon/book/manual/evaguide(src)
update_icon()
/obj/structure/bookcase/manuals/research_and_development
name = "R&D Manuals bookcase"
New()
..()
new /obj/item/weapon/book/manual/research_and_development(src)
update_icon()
/obj/structure/bookcase/manuals/research_and_development/New()
..()
new /obj/item/weapon/book/manual/research_and_development(src)
update_icon()
/*
@@ -383,26 +383,26 @@ Book Cart End
var/obj/item/weapon/book/book // Currently scanned book
var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory
attack_self(mob/user as mob)
mode += 1
if(mode > 3)
mode = 0
to_chat(user, "[src] Status Display:")
var/modedesc
switch(mode)
if(0)
modedesc = "Scan book to local buffer."
if(1)
modedesc = "Scan book to local buffer and set associated computer buffer to match."
if(2)
modedesc = "Scan book to local buffer, attempt to check in scanned book."
if(3)
modedesc = "Scan book to local buffer, attempt to add book to general inventory."
else
modedesc = "ERROR"
to_chat(user, " - Mode [mode] : [modedesc]")
if(src.computer)
to_chat(user, "<font color=green>Computer has been associated with this unit.</font>")
/obj/item/weapon/barcodescanner/attack_self(mob/user as mob)
mode += 1
if(mode > 3)
mode = 0
to_chat(user, "[src] Status Display:")
var/modedesc
switch(mode)
if(0)
modedesc = "Scan book to local buffer."
if(1)
modedesc = "Scan book to local buffer and set associated computer buffer to match."
if(2)
modedesc = "Scan book to local buffer, attempt to check in scanned book."
if(3)
modedesc = "Scan book to local buffer, attempt to add book to general inventory."
else
to_chat(user, "<font color=red>No associated computer found. Only local scans will function properly.</font>")
to_chat(user, "\n")
modedesc = "ERROR"
to_chat(user, " - Mode [mode] : [modedesc]")
if(src.computer)
to_chat(user, "<font color=green>Computer has been associated with this unit.</font>")
else
to_chat(user, "<font color=red>No associated computer found. Only local scans will function properly.</font>")
to_chat(user, "\n")
+1 -1
View File
@@ -11,7 +11,7 @@
/*
* Borrowbook datum
*/
datum/borrowbook // Datum used to keep track of who has borrowed what when and for how long.
/datum/borrowbook // Datum used to keep track of who has borrowed what when and for how long.
var/bookname
var/mobname
var/getdate
+1 -1
View File
@@ -54,7 +54,7 @@ turf: (lighting_turf.dm)
- Create lighting overlays for this turf
atom/movable/lighting_overlay: (lighting_overlay.dm)
/atom/movable/lighting_overlay: (lighting_overlay.dm)
- var/lum_r, var/lum_g, var/lum_b; lumcounts of each colour
- var/needs_update; set on update_lumcount, checked by lighting process
+7 -7
View File
@@ -5,10 +5,10 @@
by Lummox JR
*/
mob/verb/Convert(filename as file)
/mob/verb/Convert(filename as file)
dmp2swapmap(filename)
proc/d2sm_prepmap(filename)
/proc/d2sm_prepmap(filename)
var/txt = file2text(filename)
if(!txt) return
var/i,j
@@ -23,7 +23,7 @@ proc/d2sm_prepmap(filename)
i=findText(txt,"\\\n",i)
return txt
proc/dmp2swapmap(filename)
/proc/dmp2swapmap(filename)
//var/txt = file2text(filename)
//if(!txt) return
var/txt = d2sm_prepmap(filename)
@@ -187,7 +187,7 @@ proc/dmp2swapmap(filename)
to_chat(F, "\t\t\t[x]")
to_chat(F, codes[pick(codes)]) */
proc/d2sm_ParseCommaList(txt)
/proc/d2sm_ParseCommaList(txt)
var/list/L=new
var/i,ch
for(i=1,i<=length(txt),++i)
@@ -205,7 +205,7 @@ proc/d2sm_ParseCommaList(txt)
if(i>1) L+=copytext(txt,1,i)
return L
proc/d2sm_MatchBrace(txt, i, which)
/proc/d2sm_MatchBrace(txt, i, which)
if(which==40) ++which
else which+=2
var/j,ch
@@ -216,7 +216,7 @@ proc/d2sm_MatchBrace(txt, i, which)
j=d2sm_MatchBrace(txt,j,ch)
if(!j) return 0
proc/d2sm_ConvertType(tt,tabs="")
/proc/d2sm_ConvertType(tt,tabs="")
var/i=findText(tt,"{")
if(!i) return "[tabs]type = [tt]\n"
.="[tabs]type = [copytext(tt,1,i)]\n"
@@ -225,7 +225,7 @@ proc/d2sm_ConvertType(tt,tabs="")
for(var/pair in L)
.="[.][tabs][pair]\n"
proc/d2sm_Contents(list/conts,n,tabs="")
/proc/d2sm_Contents(list/conts,n,tabs="")
.="[tabs]contents = list("
var/i
for(i=0,i<n,++i)
+12 -12
View File
@@ -508,7 +508,7 @@ var/swapmaps_initialized
var/swapmaps_loaded
var/swapmaps_byname
proc/InitializeSwapMaps()
/proc/InitializeSwapMaps()
if(swapmaps_initialized) return
swapmaps_initialized=1
swapmaps_compiled_maxx=world.maxx
@@ -522,16 +522,16 @@ proc/InitializeSwapMaps()
// so you can look up an icon file by name or vice-versa
swapmaps_iconcache[swapmaps_iconcache[V]]=V
proc/SwapMaps_AddIconToCache(name,icon)
/proc/SwapMaps_AddIconToCache(name,icon)
if(!swapmaps_iconcache) swapmaps_iconcache=list()
swapmaps_iconcache[name]=icon
swapmaps_iconcache[icon]=name
proc/SwapMaps_Find(id)
/proc/SwapMaps_Find(id)
InitializeSwapMaps()
return swapmaps_byname[id]
proc/SwapMaps_Load(id)
/proc/SwapMaps_Load(id)
InitializeSwapMaps()
var/swapmap/M=swapmaps_byname[id]
if(!M)
@@ -552,29 +552,29 @@ proc/SwapMaps_Load(id)
M.mode=text
return M
proc/SwapMaps_Save(id)
/proc/SwapMaps_Save(id)
InitializeSwapMaps()
var/swapmap/M=swapmaps_byname[id]
if(M) M.Save()
return M
proc/SwapMaps_Save_All()
/proc/SwapMaps_Save_All()
InitializeSwapMaps()
for(var/swapmap/M in swapmaps_loaded)
if(M) M.Save()
proc/SwapMaps_Unload(id)
/proc/SwapMaps_Unload(id)
InitializeSwapMaps()
var/swapmap/M=swapmaps_byname[id]
if(!M) return // return silently from an error
M.Unload()
return 1
proc/SwapMaps_DeleteFile(id)
/proc/SwapMaps_DeleteFile(id)
fdel("map_[id].sav")
fdel("map_[id].txt")
proc/SwapMaps_CreateFromTemplate(template_id)
/proc/SwapMaps_CreateFromTemplate(template_id)
var/swapmap/M=new
var/savefile/S
var/text=0
@@ -601,7 +601,7 @@ proc/SwapMaps_CreateFromTemplate(template_id)
while(M.locked) sleep(1)
return M
proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
/proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
var/swapmap/M=new
var/savefile/S
var/text=0
@@ -628,7 +628,7 @@ proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
qdel(M)
return 1
proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
/proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
if(!corner1 || !corner2)
to_world_log("SwapMaps error in SwapMaps_SaveChunk():")
if(!corner1) to_world_log(" corner1 turf is null")
@@ -649,7 +649,7 @@ proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
qdel(M)
return 1
proc/SwapMaps_GetSize(id)
/proc/SwapMaps_GetSize(id)
var/savefile/S
var/text=0
if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
+8 -8
View File
@@ -1,4 +1,4 @@
dmm_suite{
/dmm_suite{
/*
dmm_suite version 1.0
@@ -52,12 +52,12 @@ dmm_suite{
.dmm files. Errors in the .dmm format will cause runtime errors.
*/
}
verb/load_map(var/dmm_file as file, var/x_offset as num, var/y_offset as num, var/z_offset as num, var/cropMap as num, var/measureOnly as num, no_changeturf as num){
// dmm_file: A .dmm file to load (Required).
// z_offset: A number representing the z-level on which to start loading the map (Optional).
// cropMap: When true, the map will be cropped to fit the existing world dimensions (Optional).
// measureOnly: When true, no changes will be made to the world (Optional).
// no_changeturf: When true, turf/AfterChange won't be called on loaded turfs
}
/dmm_suite/verb/load_map(var/dmm_file as file, var/x_offset as num, var/y_offset as num, var/z_offset as num, var/cropMap as num, var/measureOnly as num, no_changeturf as num){
// dmm_file: A .dmm file to load (Required).
// z_offset: A number representing the z-level on which to start loading the map (Optional).
// cropMap: When true, the map will be cropped to fit the existing world dimensions (Optional).
// measureOnly: When true, no changes will be made to the world (Optional).
// no_changeturf: When true, turf/AfterChange won't be called on loaded turfs
}
@@ -6,8 +6,9 @@
name = "Input area"
density = 0
anchored = 1.0
New()
icon_state = "blank"
/obj/machinery/mineral/input/New()
icon_state = "blank"
/obj/machinery/mineral/output
icon = 'icons/mob/screen1.dmi'
@@ -15,5 +16,6 @@
name = "Output area"
density = 0
anchored = 1.0
New()
icon_state = "blank"
/obj/machinery/mineral/output/New()
icon_state = "blank"
+4 -4
View File
@@ -86,19 +86,19 @@ var/list/mining_overlay_cache = list()
can_build_into_floor = TRUE
//Alternative sand floor sprite.
turf/simulated/mineral/floor/light
/turf/simulated/mineral/floor/light
icon_state = "sand-light"
sand_icon_state = "sand-light"
turf/simulated/mineral/floor/light_border
/turf/simulated/mineral/floor/light_border
icon_state = "sand-light-border"
sand_icon_state = "sand-light-border"
turf/simulated/mineral/floor/light_nub
/turf/simulated/mineral/floor/light_nub
icon_state = "sand-light-nub"
sand_icon_state = "sand-light-nub"
turf/simulated/mineral/floor/light_corner
/turf/simulated/mineral/floor/light_corner
icon_state = "sand-light-corner"
sand_icon_state = "sand-light-corner"
+963
View File
@@ -1,3 +1,4 @@
<<<<<<< HEAD
/mob/observer
name = "observer"
desc = "This shouldn't appear"
@@ -967,3 +968,965 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
set name = "Respawn"
set category = "Ghost"
src.abandon_mob()
=======
/mob/observer
name = "observer"
desc = "This shouldn't appear"
density = 0
/mob/observer/dead
name = "ghost"
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
icon = 'icons/mob/ghost.dmi'
icon_state = "ghost"
stat = DEAD
canmove = 0
blinded = 0
anchored = 1 // don't get pushed around
var/can_reenter_corpse
var/datum/hud/living/carbon/hud = null // hud
var/bootime = 0
var/started_as_observer //This variable is set to 1 when you enter the game as an observer.
//If you died in the game and are a ghsot - this will remain as null.
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
var/has_enabled_antagHUD = 0
var/medHUD = 0
var/secHUD = 0
var/antagHUD = 0
universal_speak = 1
var/atom/movable/following = null
var/admin_ghosted = 0
var/anonsay = 0
var/ghostvision = 1 //is the ghost able to see things humans can't?
incorporeal_move = 1
var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil.
var/ghost_sprite = null
var/global/list/possible_ghost_sprites = list(
"Clear" = "blank",
"Green Blob" = "otherthing",
"Bland" = "ghost",
"Robed-B" = "ghost1",
"Robed-BAlt" = "ghost2",
"King" = "ghostking",
"Shade" = "shade",
"Hecate" = "ghost-narsie",
"Glowing Statue" = "armour",
"Artificer" = "artificer",
"Behemoth" = "behemoth",
"Harvester" = "harvester",
"Wraith" = "wraith",
"Viscerator" = "viscerator",
"Corgi" = "corgi",
"Tamaskan" = "tamaskan",
"Black Cat" = "blackcat",
"Lizard" = "lizard",
"Goat" = "goat",
"Space Bear" = "bear",
"Bats" = "bat",
"Chicken" = "chicken_white",
"Parrot"= "parrot_fly",
"Goose" = "goose",
"Penguin" = "penguin",
"Brown Crab" = "crab",
"Gray Crab" = "evilcrab",
"Trout" = "trout-swim",
"Salmon" = "salmon-swim",
"Pike" = "pike-swim",
"Koi" = "koi-swim",
"Carp" = "carp",
"Red Robes" = "robe_red",
"Faithless" = "faithless",
"Shadowform" = "forgotten",
"Dark Ethereal" = "bloodguardian",
"Holy Ethereal" = "lightguardian",
"Red Elemental" = "magicRed",
"Blue Elemental" = "magicBlue",
"Pink Elemental" = "magicPink",
"Orange Elemental" = "magicOrange",
"Green Elemental" = "magicGreen",
"Daemon" = "daemon",
"Guard Spider" = "guard",
"Hunter Spider" = "hunter",
"Nurse Spider" = "nurse",
"Rogue Drone" = "drone",
"ED-209" = "ed209",
"Beepsky" = "secbot"
)
var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners.
var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns
/mob/observer/dead/New(mob/body)
appearance = body
invisibility = INVISIBILITY_OBSERVER
layer = BELOW_MOB_LAYER
plane = PLANE_GHOSTS
alpha = 127
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but...
verbs += /mob/observer/dead/proc/dead_tele
var/turf/T
if(ismob(body))
T = get_turf(body) //Where is the body located?
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
gender = body.gender
if(body.mind && body.mind.name)
name = body.mind.name
else
if(body.real_name)
name = body.real_name
else
if(gender == MALE)
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
else
name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
mind = body.mind //we don't transfer the mind but we keep a reference to it.
// Fix for naked ghosts.
// Unclear why this isn't being grabbed by appearance.
if(ishuman(body))
var/mob/living/carbon/human/H = body
add_overlay(H.overlays_standing)
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
forceMove(T)
if(!name) //To prevent nameless ghosts
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
real_name = name
animate(src, pixel_y = 2, time = 10, loop = -1)
..()
/mob/observer/dead/Topic(href, href_list)
if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list
if(target)
ManualFollow(target)
if(href_list["reenter"])
reenter_corpse()
return
/mob/observer/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/book/tome))
var/mob/observer/dead/M = src
M.manifest(user)
/mob/observer/dead/CanPass(atom/movable/mover, turf/target)
return TRUE
/mob/observer/dead/set_stat(var/new_stat)
if(new_stat != DEAD)
CRASH("It is best if observers stay dead, thank you.")
/mob/observer/dead/examine_icon()
var/icon/I = get_cached_examine_icon(src)
if(!I)
I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE)
set_cached_examine_icon(src, I, 200 SECONDS)
return I
/mob/observer/dead/examine(mob/user)
. = ..()
if(is_admin(user))
. += "\t><span class='admin'>[ADMIN_FULLMONTY(src)]</span>"
/*
Transfer_mind is there to check if mob is being deleted/not going to have a body.
Works together with spawning an observer, noted above.
*/
/mob/observer/dead/Life()
..()
if(!loc) return
if(!client) return 0
handle_regular_hud_updates()
handle_vision()
/mob/proc/ghostize(var/can_reenter_corpse = 1)
if(key)
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.vr_holder && !can_reenter_corpse)
H.exit_vr()
return 0
var/mob/observer/dead/ghost = new(src) //Transfer safety to observer spawning proc.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
ghost.key = key
if(istype(loc, /obj/structure/morgue))
var/obj/structure/morgue/M = loc
M.update()
else if(istype(loc, /obj/structure/closet/body_bag))
var/obj/structure/closet/body_bag/B = loc
B.update()
if(ghost.client)
ghost.client.time_died_as_mouse = ghost.timeofdeath
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/observer/dead/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost
/*
This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues.
*/
/mob/living/verb/ghost()
set category = "OOC"
set name = "Ghost"
set desc = "Relinquish your life and enter the land of the dead."
if(stat == DEAD && !forbid_seeing_deadchat)
announce_ghost_joinleave(ghostize(1))
else
var/response
if(src.client && src.client.holder)
response = alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", "Ghost", "Admin Ghost", "Stay in body")
if(response == "Admin Ghost")
if(!src.client)
return
src.client.admin_ghost()
else
response = alert(src, "Are you -sure- you want to ghost?\n(You are alive, or otherwise have the potential to become alive. If you ghost, you won't be able to play this round until you respawn as a new character! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", "Ghost", "Stay in body")
if(response != "Ghost")
return
resting = 1
var/turf/location = get_turf(src)
var/special_role = check_special_role()
if(!istype(loc,/obj/machinery/cryopod))
log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",usr)
else if(special_role)
log_and_message_admins("has ghosted in cryo as [special_role]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",usr)
var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
if(ghost)
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
ghost.set_respawn_timer()
announce_ghost_joinleave(ghost)
/mob/observer/dead/can_use_hands() return 0
/mob/observer/dead/is_active() return 0
/mob/observer/dead/Stat()
..()
if(statpanel("Status"))
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)
stat(null, eta_status)
/mob/observer/dead/verb/reenter_corpse()
set category = "Ghost"
set name = "Re-enter Corpse"
if(!client) return
if(!(mind && mind.current && can_reenter_corpse))
to_chat(src, "<span class='warning'>You have no body.</span>")
return
if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients
to_chat(usr, "<span class='warning'>Another consciousness is in your body... it is resisting you.</span>")
return
if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune).
var/found_rune
for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune
if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune.
found_rune = 1
break
if(!found_rune)
to_chat(usr, "<span class='warning'>The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.</span>")
return
mind.current.ajourn=0
mind.current.key = key
mind.current.teleop = null
if(istype(mind.current.loc, /obj/structure/morgue))
var/obj/structure/morgue/M = mind.current.loc
M.update(1)
else if(istype(mind.current.loc, /obj/structure/closet/body_bag))
var/obj/structure/closet/body_bag/B = mind.current.loc
B.update(1)
if(!admin_ghosted)
announce_ghost_joinleave(mind, 0, "They now occupy their body again.")
return 1
/mob/observer/dead/verb/toggle_medHUD()
set category = "Ghost"
set name = "Toggle MedicHUD"
set desc = "Toggles Medical HUD allowing you to see how everyone is doing"
medHUD = !medHUD
plane_holder.set_vis(VIS_CH_HEALTH, medHUD)
plane_holder.set_vis(VIS_CH_STATUS_OOC, medHUD)
to_chat(src, "<font color='blue'><B>Medical HUD [medHUD ? "Enabled" : "Disabled"]</B></font>")
/mob/observer/dead/verb/toggle_secHUD()
set category = "Ghost"
set name = "Toggle Security HUD"
set desc = "Toggles Security HUD allowing you to see people's displayed ID's job, wanted status, etc"
secHUD = !secHUD
plane_holder.set_vis(VIS_CH_ID, secHUD)
plane_holder.set_vis(VIS_CH_WANTED, secHUD)
plane_holder.set_vis(VIS_CH_IMPTRACK, secHUD)
plane_holder.set_vis(VIS_CH_IMPLOYAL, secHUD)
plane_holder.set_vis(VIS_CH_IMPCHEM, secHUD)
to_chat(src, "<font color='blue'><B>Security HUD [secHUD ? "Enabled" : "Disabled"]</B></font>")
/mob/observer/dead/verb/toggle_antagHUD()
set category = "Ghost"
set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
if(!config.antag_hud_allowed && !client.holder)
to_chat(src, "<font color='red'>Admins have disabled this for this round.</font>")
return
if(jobban_isbanned(src, "AntagHUD"))
to_chat(src, "<font color='red'><B>You have been banned from using this feature</B></font>")
return
if(config.antag_hud_restricted && !has_enabled_antagHUD && !client.holder)
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
if(response == "No") return
can_reenter_corpse = FALSE
set_respawn_timer(-1) // Foreeeever
if(!has_enabled_antagHUD && !client.holder)
has_enabled_antagHUD = TRUE
antagHUD = !antagHUD
plane_holder.set_vis(VIS_CH_SPECIAL, antagHUD)
to_chat(src, "<font color='blue'><B>AntagHUD [antagHUD ? "Enabled" : "Disabled"]</B></font>")
/mob/observer/dead/proc/jumpable_areas()
var/list/areas = return_sorted_areas()
if(client?.holder)
return areas
for(var/area/A as anything in areas)
if(A.z in using_map?.secret_levels)
areas -= A
return areas
/mob/observer/dead/proc/jumpable_mobs()
var/list/mobs = getmobs()
if(client?.holder)
return mobs
for(var/key in mobs)
var/mobz = get_z(mobs[key])
if(mobz in using_map?.secret_levels)
mobs -= key
return mobs
/mob/observer/dead/proc/dead_tele(var/area/A in jumpable_areas())
set category = "Ghost"
set name = "Teleport"
set desc = "Teleport to a location"
if(!istype(usr, /mob/observer/dead))
to_chat(usr, "Not when you're not dead!")
return
if(!A)
A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in jumpable_areas()
if(!A)
return
usr.forceMove(pick(get_area_turfs(A)))
usr.on_mob_jump()
/mob/observer/dead/verb/follow(input in jumpable_mobs())
set category = "Ghost"
set name = "Follow" // "Haunt"
set desc = "Follow and haunt a mob."
if(!input)
input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in jumpable_mobs()
if(!input)
return
var/target = jumpable_mobs()[input]
if(!target) return
ManualFollow(target)
/mob/observer/dead/forceMove(atom/destination)
if(client?.holder)
return ..()
if(get_z(destination) in using_map?.secret_levels)
to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts."))
if(following)
stop_following()
return
return ..()
/mob/observer/dead/Move(atom/newloc, direct = 0, movetime)
if(client?.holder)
return ..()
if(get_z(newloc) in using_map?.secret_levels)
to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts."))
if(following)
stop_following()
return
return ..()
// This is the ghost's follow verb with an argument
/mob/observer/dead/proc/ManualFollow(var/atom/movable/target)
if(!target)
return
var/turf/targetloc = get_turf(target)
if(check_holy(targetloc))
to_chat(usr, "<span class='warning'>You cannot follow a mob standing on holy grounds!</span>")
return
if(get_z(target) in using_map?.secret_levels)
to_chat(src, SPAN_WARNING("Sorry, that target is in an area that ghosts aren't allowed to go."))
return
if(target != src)
if(following && following == target)
return
following = target
to_chat(src, "<span class='notice'>Now following [target]</span>")
if(ismob(target))
forceMove(get_turf(target))
var/mob/M = target
M.following_mobs += src
else
spawn(0)
while(target && following == target && client)
var/turf/T = get_turf(target)
if(!T)
break
// To stop the ghost flickering.
if(loc != T)
forceMove(T)
sleep(15)
var/icon/I = icon(target.icon,target.icon_state,target.dir)
var/orbitsize = (I.Width()+I.Height())*0.5
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
var/rot_seg
/* We don't have this pref yet
switch(ghost_orbit)
if(GHOST_ORBIT_TRIANGLE)
rot_seg = 3
if(GHOST_ORBIT_SQUARE)
rot_seg = 4
if(GHOST_ORBIT_PENTAGON)
rot_seg = 5
if(GHOST_ORBIT_HEXAGON)
rot_seg = 6
else //Circular
rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle
*/
orbit(target, orbitsize, FALSE, 20, rot_seg)
/mob/observer/dead/orbit()
set_dir(2) //reset dir so the right directional sprites show up
return ..()
/mob/observer/dead/stop_orbit()
. = ..()
//restart our floating animation after orbit is done.
pixel_y = 0
pixel_x = 0
transform = null
animate(src, pixel_y = 2, time = 10, loop = -1)
/mob/observer/dead/proc/stop_following()
following = null
stop_orbit()
/mob/proc/update_following()
. = get_turf(src)
for(var/mob/observer/dead/M in following_mobs)
if(M.following != src)
following_mobs -= M
else
if(M.loc != .)
M.forceMove(.)
/mob
var/list/following_mobs = list()
/mob/Destroy()
for(var/mob/observer/dead/M in following_mobs)
M.stop_following()
following_mobs = null
return ..()
/mob/observer/dead/Destroy()
if(ismob(following))
var/mob/M = following
M.following_mobs -= src
stop_following()
return ..()
/mob/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
update_following()
/mob/Life()
// to catch teleports etc which directly set loc
update_following()
return ..()
/mob/proc/check_holy(var/turf/T)
return 0
/mob/observer/dead/check_holy(var/turf/T)
if(check_rights(R_ADMIN|R_FUN|R_EVENT, 0, src))
return 0
return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists))
/mob/observer/dead/verb/jumptomob(input in jumpable_mobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
set name = "Jump to Mob"
set desc = "Teleport to a mob"
set popup_menu = FALSE
if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer!
return
if(!input)
input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in jumpable_mobs()
if(!input)
return
var/target = jumpable_mobs()[input]
if (!target)//Make sure we actually have a target
return
else
var/mob/M = target //Destination mob
var/turf/T = get_turf(M) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
forceMove(T)
stop_following()
else
to_chat(src, "This mob is not located in the game world.")
/mob/observer/dead/memory()
set hidden = 1
to_chat(src, "<font color='red'>You are dead! You have no mind to store memory!</font>")
/mob/observer/dead/add_memory()
set hidden = 1
to_chat(src, "<font color='red'>You are dead! You have no mind to store memory!</font>")
/mob/observer/dead/Post_Incorpmove()
stop_following()
/mob/observer/dead/verb/analyze_air()
set name = "Analyze Air"
set category = "Ghost"
if(!istype(usr, /mob/observer/dead)) return
// Shamelessly copied from the Gas Analyzers
if (!( istype(usr.loc, /turf) ))
return
var/datum/gas_mixture/environment = usr.loc.return_air()
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles
to_chat(src, "<font color='blue'><B>Results:</B></font>")
if(abs(pressure - ONE_ATMOSPHERE) < 10)
to_chat(src, "<font color='blue'>Pressure: [round(pressure,0.1)] kPa</font>")
else
to_chat(src, "<font color='red'>Pressure: [round(pressure,0.1)] kPa</font>")
if(total_moles)
for(var/g in environment.gas)
to_chat(src, "<font color='blue'>[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)</font>")
to_chat(src, "<font color='blue'>Temperature: [round(environment.temperature-T0C,0.1)]&deg;C ([round(environment.temperature,0.1)]K)</font>")
to_chat(src, "<font color='blue'>Heat Capacity: [round(environment.heat_capacity(),0.1)]</font>")
/mob/observer/dead/verb/check_radiation()
set name = "Check Radiation"
set category = "Ghost"
var/turf/t = get_turf(src)
if(t)
var/rads = SSradiation.get_rads_at_turf(t)
to_chat(src, "<span class='notice'>Radiation level: [rads ? rads : "0"] Bq.</span>")
/mob/observer/dead/verb/become_mouse()
set name = "Become mouse"
set category = "Ghost"
if(config.disable_player_mice)
to_chat(src, "<span class='warning'>Spawning as a mouse is currently disabled.</span>")
return
if(!MayRespawn(1))
return
var/turf/T = get_turf(src)
if(!T || (T.z in using_map.admin_levels))
to_chat(src, "<span class='warning'>You may not spawn as a mouse on this Z-level.</span>")
return
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
var/timedifference_text
timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss")
to_chat(src, "<span class='warning'>You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.</span>")
return
var/response = alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?","Squeek!","Nope!")
if(response != "Squeek!") return //Hit the wrong key...again.
//find a viable mouse candidate
var/mob/living/simple_mob/animal/passive/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines)
if(!v.welded && v.z == T.z && v.network && v.network.normal_members.len > 20)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
host = new /mob/living/simple_mob/animal/passive/mouse(vent_found)
else
to_chat(src, "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>")
if(host)
if(config.uneducated_mice)
host.universal_understand = 0
announce_ghost_joinleave(src, 0, "They are now a mouse.")
host.ckey = src.ckey
host.add_ventcrawl(vent_found)
to_chat(host, "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>")
/mob/observer/dead/verb/view_manfiest()
set name = "Show Crew Manifest"
set category = "Ghost"
var/dat
dat += "<h4>Crew Manifest</h4>"
dat += data_core.get_manifest()
src << browse(dat, "window=manifest;size=370x420;can_close=1")
//This is called when a ghost is drag clicked to something.
/mob/observer/dead/MouseDrop(atom/over)
if(!usr || !over) return
if (isobserver(usr) && usr.client && usr.client.holder && isliving(over))
if (usr.client.holder.cmd_ghost_drag(src,over))
return
return ..()
//Used for drawing on walls with blood puddles as a spooky ghost.
/mob/observer/dead/verb/bloody_doodle()
set category = "Ghost"
set name = "Write in blood"
set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC."
if(!(config.cult_ghostwriter))
to_chat(src, "<font color='red'>That verb is not currently permitted.</font>")
return
if (!src.stat)
return
if (usr != src)
return 0 //something is terribly wrong
var/ghosts_can_write
if(ticker.mode.name == "cult")
if(cult.current_antagonists.len > config.cult_ghostwriter_req_cultists)
ghosts_can_write = 1
if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such.
to_chat(src, "<font color='red'>The veil is not thin enough for you to do that.</font>")
return
var/list/choices = list()
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.amount > 0)
choices += B
if(!choices.len)
to_chat(src, "<span class = 'warning'>There is no blood to use nearby.</span>")
return
var/obj/effect/decal/cleanable/blood/choice = input(src,"What blood would you like to use?") in null|choices
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
var/turf/simulated/T = src.loc
if (direction != "Here")
T = get_step(T,text2dir(direction))
if (!istype(T))
to_chat(src, "<span class='warning'>You cannot doodle there.</span>")
return
if(!choice || choice.amount == 0 || !(src.Adjacent(choice)))
return
var/doodle_color = (choice.basecolor) ? choice.basecolor : "#A10808"
var/num_doodles = 0
for (var/obj/effect/decal/cleanable/blood/writing/W in T)
num_doodles++
if (num_doodles > 4)
to_chat(src, "<span class='warning'>There is no space to write on!</span>")
return
var/max_length = 50
var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
if (message)
if (length(message) > max_length)
message += "-"
to_chat(src, "<span class='warning'>You ran out of blood to write with!</span>")
var/obj/effect/decal/cleanable/blood/writing/W = new(T)
W.basecolor = doodle_color
W.update_icon()
W.message = message
W.add_hiddenprint(src)
W.visible_message("<font color='red'>Invisible fingers crudely paint something in blood on [T]...</font>")
/mob/observer/dead/pointed(atom/A as mob|obj|turf in view())
if(!..())
return 0
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
return 1
/mob/observer/dead/proc/manifest(mob/user)
is_manifest = TRUE
verbs |= /mob/observer/dead/proc/toggle_visibility
verbs |= /mob/observer/dead/proc/ghost_whisper
to_chat(src, "<font color='purple'>As you are now in the realm of the living, you can whisper to the living with the <b>Spectral Whisper</b> verb, inside the IC tab.</font>")
if(plane != PLANE_WORLD)
user.visible_message( \
"<span class='warning'>\The [user] drags ghost, [src], to our plane of reality!</span>", \
"<span class='warning'>You drag [src] to our plane of reality!</span>" \
)
toggle_visibility(TRUE)
else
var/datum/gender/T = gender_datums[user.get_visible_gender()]
user.visible_message ( \
"<span class='warning'>\The [user] just tried to smash [T.his] book into that ghost! It's not very effective.</span>", \
"<span class='warning'>You get the feeling that the ghost can't become any more visible.</span>" \
)
/mob/observer/dead/proc/toggle_icon(var/icon)
if(!client)
return
var/iconRemoved = 0
for(var/image/I in client.images)
if(I.icon_state == icon)
iconRemoved = 1
qdel(I)
if(!iconRemoved)
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
client.images += J
/mob/observer/dead/proc/toggle_visibility(var/forced = 0)
set category = "Ghost"
set name = "Toggle Visibility"
set desc = "Allows you to turn (in)visible (almost) at will."
var/toggled_invisible
if(!forced && plane == PLANE_GHOSTS && world.time < toggled_invisible + 600)
to_chat(src, "You must gather strength before you can turn visible again...")
return
if(plane == PLANE_WORLD)
toggled_invisible = world.time
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible.</span>")
else
to_chat(src, "<span class='info'>You are now visible!</span>")
plane = (plane == PLANE_GHOSTS) ? PLANE_WORLD : PLANE_GHOSTS
invisibility = (plane == PLANE_WORLD) ? 0 : INVISIBILITY_OBSERVER
// Give the ghost a cult icon which should be visible only to itself
toggle_icon("cult")
/mob/observer/dead/verb/toggle_anonsay()
set category = "Ghost"
set name = "Toggle Anonymous Chat"
set desc = "Toggles showing your key in dead chat."
src.anonsay = !src.anonsay
if(anonsay)
to_chat(src, "<span class='info'>Your key won't be shown when you speak in dead chat.</span>")
else
to_chat(src, "<span class='info'>Your key will be publicly visible again.</span>")
/mob/observer/dead/canface()
return 1
/mob/observer/dead/proc/can_admin_interact()
return check_rights(R_ADMIN|R_EVENT, 0, src)
/mob/observer/dead/verb/toggle_ghostsee()
set name = "Toggle Ghost Vision"
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
set category = "Ghost"
ghostvision = !ghostvision
updateghostsight()
to_chat(src, "You [ghostvision ? "now" : "no longer"] have ghost vision.")
/mob/observer/dead/verb/toggle_darkness()
set name = "Toggle Darkness"
set desc = "Toggles your ability to see lighting overlays, and the darkness they create."
set category = "Ghost"
seedarkness = !seedarkness
updateghostsight()
to_chat(src, "You [seedarkness ? "now" : "no longer"] see darkness.")
/mob/observer/dead/proc/updateghostsight()
plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness) //Inversion, because "not seeing" the darkness is "seeing" the lighting plane master.
plane_holder.set_vis(VIS_GHOSTS, ghostvision)
/mob/observer/dead/MayRespawn(var/feedback = 0)
if(!client)
return 0
if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse)
if(feedback)
to_chat(src, "<span class='warning'>Your non-dead body prevent you from respawning.</span>")
return 0
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
if(feedback)
to_chat(src, "<span class='warning'>antagHUD restrictions prevent you from respawning.</span>")
return 0
return 1
/atom/proc/extra_ghost_link()
return
/mob/extra_ghost_link(var/atom/ghost)
if(client && eyeobj)
return "|<a href='byond://?src=\ref[ghost];track=\ref[eyeobj]'>eye</a>"
/mob/observer/dead/extra_ghost_link(var/atom/ghost)
if(mind && mind.current)
return "|<a href='byond://?src=\ref[ghost];track=\ref[mind.current]'>body</a>"
/proc/ghost_follow_link(var/atom/target, var/atom/ghost)
if((!target) || (!ghost)) return
. = "<a href='byond://?src=\ref[ghost];track=\ref[target]'>follow</a>"
. += target.extra_ghost_link(ghost)
//Culted Ghosts
/mob/observer/dead/proc/ghost_whisper()
set name = "Spectral Whisper"
set category = "IC"
if(is_manifest) //Only able to whisper if it's hit with a tome.
var/list/options = list()
for(var/mob/living/Ms in view(src))
options += Ms
var/mob/living/M = input(src, "Select who to whisper to:", "Whisper to?", null) as null|mob in options
if(!M)
return 0
var/msg = sanitize(input(src, "Message:", "Spectral Whisper") as text|null)
if(msg)
log_say("(SPECWHISP to [key_name(M)]): [msg]", src)
to_chat(M, "<span class='warning'> You hear a strange, unidentifiable voice in your head... <font color='purple'>[msg]</font></span>")
to_chat(src, "<span class='warning'> You said: '[msg]' to [M].</span>")
else
return
return 1
else
to_chat(src, "<span class='danger'>You have not been pulled past the veil!</span>")
/mob/observer/dead/verb/choose_ghost_sprite()
set category = "Ghost"
set name = "Choose Sprite"
var/choice
var/previous_state
var/finalized = "No"
while(finalized == "No" && src.client)
choice = input(usr,"What would you like to use for your ghost sprite?") as null|anything in possible_ghost_sprites
if(!choice)
return
if(choice)
icon = 'icons/mob/ghost.dmi'
overlays.Cut()
if(icon_state && icon)
previous_state = icon_state
icon_state = possible_ghost_sprites[choice]
finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes")
ghost_sprite = possible_ghost_sprites[choice]
if(finalized == "No")
icon_state = previous_state
/mob/observer/dead/is_blind()
return FALSE
/mob/observer/dead/is_deaf()
return FALSE
/mob/observer/dead/verb/paialert()
set category = "Ghost"
set name = "Blank pAI alert"
set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope."
if(usr.client.prefs?.be_special & BE_PAI)
var/count = 0
for(var/obj/item/device/paicard/p in all_pai_cards)
var/obj/item/device/paicard/PP = p
if(PP.pai == null)
count++
PP.overlays += "pai-ghostalert"
spawn(54)
PP.overlays.Cut()
to_chat(usr,"<span class='notice'>Flashing the displays of [count] unoccupied PAIs.</span>")
else
to_chat(usr,"<span class='warning'>You have 'Be pAI' disabled in your character prefs, so we can't help you.</span>")
/mob/observer/dead/speech_bubble_appearance()
return "ghost"
// Lets a ghost know someone's trying to bring them back, and for them to get into their body.
// Mostly the same as TG's sans the hud element, since we don't have TG huds.
/mob/observer/dead/proc/notify_revive(var/message, var/sound, flashwindow = TRUE, var/atom/source)
if((last_revive_notification + 2 MINUTES) > world.time)
return
last_revive_notification = world.time
if(flashwindow)
window_flash(client)
if(message)
to_chat(src, "<span class='ghostalert'><font size=4>[message]</font></span>")
if(source)
throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source)
to_chat(src, "<span class='ghostalert'><a href=?src=[REF(src)];reenter=1>(Click to re-enter)</a></span>")
if(sound)
SEND_SOUND(src, sound(sound))
/mob/observer/dead/verb/respawn()
set name = "Respawn"
set category = "Ghost"
src.abandon_mob()
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
@@ -160,8 +160,8 @@
//These things are allowed to add vision flags.
//If you code some crazy item that goes on your feet that lets you see ghosts, you need to add a slot here.
var/tmp/list/slots = list(slot_glasses,slot_head)
var/tmp/list/compiled_vis = list()
var/list/slots = list(slot_glasses,slot_head)
var/list/compiled_vis = list()
for(var/slot in slots)
var/obj/item/clothing/O = get_equipped_item(slot) //Change this type if you move the vision stuff to item or something.
@@ -187,12 +187,12 @@
if(!compiled_vis.len && !vis_enabled.len)
return //Nothin' doin'.
var/tmp/list/oddities = vis_enabled ^ compiled_vis
var/list/oddities = vis_enabled ^ compiled_vis
if(!oddities.len)
return //Same thing in both lists!
var/tmp/list/to_enable = oddities - vis_enabled
var/tmp/list/to_disable = oddities - compiled_vis
var/list/to_enable = oddities - vis_enabled
var/list/to_disable = oddities - compiled_vis
for(var/vis in to_enable)
plane_holder.set_vis(vis,TRUE)
+1 -1
View File
@@ -1388,7 +1388,7 @@
see_in_dark = species.darksight
see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : see_invisible_default
var/tmp/glasses_processed = 0
var/glasses_processed = 0
var/obj/item/weapon/rig/rig = get_rig()
if(istype(rig) && rig.visor && !looking_elsewhere)
if(!rig.helmet || (head && rig.helmet == head))
@@ -235,7 +235,7 @@
base_color = "#333333"
reagent_tag = IS_TAJARA
allergens = COFFEE
allergens = ALLERGEN_COFFEE
move_trail = /obj/effect/decal/cleanable/blood/tracks/paw
@@ -338,7 +338,7 @@
breath_heat_level_3 = 1350 //Default 1250
reagent_tag = IS_SKRELL
allergens = MEAT|FISH|DAIRY|EGGS
allergens = ALLERGEN_MEAT|ALLERGEN_FISH|ALLERGEN_DAIRY|ALLERGEN_EGGS
has_limbs = list(
BP_TORSO = list("path" = /obj/item/organ/external/chest),
@@ -1,4 +1,4 @@
proc/create_new_xenomorph(var/alien_caste,var/target)
/proc/create_new_xenomorph(var/alien_caste,var/target)
target = get_turf(target)
if(!target || !alien_caste) return
@@ -63,7 +63,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
#define MUTATIONS_LAYER 1 //Mutations like fat, and lasereyes
#define SKIN_LAYER 2 //Skin things added by a call on species
#define BLOOD_LAYER 3 //Bloodied hands/feet/anything else
#define DAMAGE_LAYER 4 //Injury overlay sprites like open wounds
#define MOB_DAM_LAYER 4 //Injury overlay sprites like open wounds
#define SURGERY_LAYER 5 //Overlays for open surgical sites
#define UNDERWEAR_LAYER 6 //Underwear/bras/etc
#define SHOES_LAYER_ALT 7 //Shoe-slot item (when set to be under uniform via verb)
@@ -79,6 +79,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
#define SUIT_STORE_LAYER 17 //Suit storage-slot item
#define BACK_LAYER 18 //Back-slot item
#define HAIR_LAYER 19 //The human's hair
<<<<<<< HEAD
#define HAIR_ACCESSORY_LAYER 20 //VOREStation edit. Simply move this up a number if things are added.
#define EARS_LAYER 21 //Both ear-slot items (combined image)
#define EYES_LAYER 22 //Mob's eyes (used for glowing eyes)
@@ -95,6 +96,23 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
#define WATER_LAYER 33 //'Mob submerged' overlay layer
#define TARGETED_LAYER 34 //'Aimed at' overlay layer
#define TOTAL_LAYERS 34 //VOREStation edit. <---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list.
=======
#define EARS_LAYER 20 //Both ear-slot items (combined image)
#define EYES_LAYER 21 //Mob's eyes (used for glowing eyes)
#define FACEMASK_LAYER 22 //Mask-slot item
#define HEAD_LAYER 23 //Head-slot item
#define HANDCUFF_LAYER 24 //Handcuffs, if the human is handcuffed, in a secret inv slot
#define LEGCUFF_LAYER 25 //Same as handcuffs, for legcuffs
#define L_HAND_LAYER 26 //Left-hand item
#define R_HAND_LAYER 27 //Right-hand item
#define WING_LAYER 28 //Wings or protrusions over the suit.
#define TAIL_LAYER_ALT 29 //Modified tail-sprite layer. Tend to be larger.
#define MODIFIER_EFFECTS_LAYER 30 //Effects drawn by modifiers
#define FIRE_LAYER 31 //'Mob on fire' overlay layer
#define MOB_WATER_LAYER 32 //'Mob submerged' overlay layer
#define TARGETED_LAYER 33 //'Aimed at' overlay layer
#define TOTAL_LAYERS 33//<---- KEEP THIS UPDATED, should always equal the highest number here, used to initialize a list.
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
//////////////////////////////////
/mob/living/carbon/human
@@ -172,7 +190,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
if(QDESTROYING(src))
return
remove_layer(DAMAGE_LAYER)
remove_layer(MOB_DAM_LAYER)
// first check whether something actually changed about damage appearance
var/damage_appearance = ""
@@ -188,7 +206,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
previous_damage_appearance = damage_appearance
var/image/standing_image = image(icon = species.damage_overlays, icon_state = "00", layer = BODY_LAYER+DAMAGE_LAYER)
var/image/standing_image = image(icon = species.damage_overlays, icon_state = "00", layer = BODY_LAYER+MOB_DAM_LAYER)
// blend the individual damage states with our icons
for(var/obj/item/organ/external/O in organs)
@@ -209,8 +227,8 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
standing_image.add_overlay(DI)
overlays_standing[DAMAGE_LAYER] = standing_image
apply_layer(DAMAGE_LAYER)
overlays_standing[MOB_DAM_LAYER] = standing_image
apply_layer(MOB_DAM_LAYER)
//BASE MOB SPRITE
/mob/living/carbon/human/update_icons_body()
@@ -1098,18 +1116,18 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
if(QDESTROYING(src))
return
remove_layer(WATER_LAYER)
remove_layer(MOB_WATER_LAYER)
var/depth = check_submerged()
if(!depth || lying)
return
var/atom/A = loc // We'd better be swimming and on a turf
var/image/I = image(icon = 'icons/mob/submerged.dmi', icon_state = "human_swimming_[depth]", layer = BODY_LAYER+WATER_LAYER) //TODO: Improve
var/image/I = image(icon = 'icons/mob/submerged.dmi', icon_state = "human_swimming_[depth]", layer = BODY_LAYER+MOB_WATER_LAYER) //TODO: Improve
I.color = A.color
overlays_standing[WATER_LAYER] = I
overlays_standing[MOB_WATER_LAYER] = I
apply_layer(WATER_LAYER)
apply_layer(MOB_WATER_LAYER)
/mob/living/carbon/human/proc/update_surgery()
if(QDESTROYING(src))
@@ -1193,7 +1211,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
return image(tail_s)
//If you have a custom tail selected
if(tail_style && !(wear_suit && wear_suit.flags_inv & HIDETAIL && !isTaurTail(tail_style)))
if(tail_style && !(wear_suit && wear_suit.flags_inv & HIDETAIL && !istaurtail(tail_style)))
var/icon/tail_s = new/icon("icon" = tail_style.icon, "icon_state" = wagging && tail_style.ani_state ? tail_style.ani_state : tail_style.icon_state)
if(tail_style.do_colouration)
tail_s.Blend(rgb(src.r_tail, src.g_tail, src.b_tail), tail_style.color_blend_mode)
@@ -1221,11 +1239,15 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
tail_s.Blend(overlay, ICON_OVERLAY)
qdel(overlay)
<<<<<<< HEAD
var/image/working = image(tail_s)
if(tail_style.em_block)
working.overlays += em_block_image_generic(working) // Leaving this as overlays +=
if(isTaurTail(tail_style))
=======
if(istaurtail(tail_style))
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
var/datum/sprite_accessory/tail/taur/taurtype = tail_style
working.pixel_x = -16
if(taurtype.can_ride && !riding_datum)
@@ -1251,7 +1273,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
//Human Overlays Indexes/////////
#undef MUTATIONS_LAYER
#undef SKIN_LAYER
#undef DAMAGE_LAYER
#undef MOB_DAM_LAYER
#undef SURGERY_LAYER
#undef UNDERWEAR_LAYER
#undef SHOES_LAYER_ALT
@@ -1271,7 +1293,6 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
#undef EYES_LAYER
#undef FACEMASK_LAYER
#undef HEAD_LAYER
#undef COLLAR_LAYER
#undef HANDCUFF_LAYER
#undef LEGCUFF_LAYER
#undef L_HAND_LAYER
+1 -1
View File
@@ -62,7 +62,7 @@ var/list/department_radio_keys = list(
var/list/channel_to_radio_key = new
proc/get_radio_key_from_channel(var/channel)
/proc/get_radio_key_from_channel(var/channel)
var/key = channel_to_radio_key[channel]
if(!key)
for(var/radio_key in department_radio_keys)
@@ -265,7 +265,7 @@
drop_item()
obj/item/weapon/gripper/proc/drop_item()
/obj/item/weapon/gripper/proc/drop_item()
if(!wrapped)
//There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z
for(var/obj/item/thing in src.contents)
+1 -1
View File
@@ -853,7 +853,7 @@
/mob/proc/embedded_needs_process()
return (embedded.len > 0)
mob/proc/yank_out_object()
/mob/proc/yank_out_object()
set category = "Object"
set name = "Yank out object"
set desc = "Remove an embedded item at the cost of bleeding and pain."
+8 -8
View File
@@ -42,7 +42,7 @@
/mob/living/carbon/human/isMonkey()
return istype(species, /datum/species/monkey)
proc/isdeaf(A)
/proc/isdeaf(A)
if(istype(A, /mob))
var/mob/M = A
return (M.sdisabilities & DEAF) || M.ear_deaf
@@ -57,24 +57,24 @@ proc/isdeaf(A)
/mob/proc/is_cloaked()
return FALSE
proc/hasorgans(A) // Fucking really??
/proc/hasorgans(A) // Fucking really??
return ishuman(A)
proc/iscuffed(A)
/proc/iscuffed(A)
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/C = A
if(C.handcuffed)
return 1
return 0
proc/hassensorlevel(A, var/level)
/proc/hassensorlevel(A, var/level)
var/mob/living/carbon/human/H = A
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = H.w_uniform
return U.sensor_mode >= level
return 0
proc/getsensorlevel(A)
/proc/getsensorlevel(A)
var/mob/living/carbon/human/H = A
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = H.w_uniform
@@ -190,7 +190,7 @@ proc/getsensorlevel(A)
for(var/datum/multilingual_say_piece/S in message_pieces)
. += new /datum/multilingual_say_piece(S.speaking, stars(S.message))
proc/slur(phrase)
/proc/slur(phrase)
phrase = html_decode(phrase)
var/leng=length(phrase)
var/counter=length(phrase)
@@ -237,7 +237,7 @@ proc/slur(phrase)
return sanitize(t)
proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
/proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
/* Turn text into complete gibberish! */
var/returntext = ""
for(var/i = 1, i <= length(t), i++)
@@ -364,7 +364,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
else
hud_used.action_intent.icon_state = I_HELP
proc/is_blind(A)
/proc/is_blind(A)
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/C = A
if(C.sdisabilities & BLIND || C.blinded)
@@ -47,7 +47,7 @@
/mob/living/carbon/human/buckle_mob(mob/living/M, forced = FALSE, check_loc = TRUE)
if(forced)
return ..() // Skip our checks
if(!isTaurTail(tail_style))
if(!istaurtail(tail_style))
return FALSE
else
var/datum/sprite_accessory/tail/taur/taurtype = tail_style
@@ -68,7 +68,7 @@
var/mob/living/carbon/human/H = M
if(isTaurTail(H.tail_style))
if(istaurtail(H.tail_style))
to_chat(src,"<span class='warning'>Too many legs. TOO MANY LEGS!!</span>")
return FALSE
@@ -31,11 +31,11 @@ var/list/comm_message_listeners = list() //We first have to initialize list then
var/datum/comm_message_listener/global_message_listener = new //May be used by admins
var/last_message_id = 0
proc/get_comm_message_id()
/proc/get_comm_message_id()
last_message_id = last_message_id + 1
return last_message_id
proc/post_comm_message(var/message_title, var/message_text)
/proc/post_comm_message(var/message_title, var/message_text)
var/list/message = list()
message["id"] = get_comm_message_id()
message["title"] = message_title
@@ -246,7 +246,7 @@
return data
obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/obj/item/weapon/card/id/I = W.GetID()
// Awaiting payment state
if(state == 2)
+4 -4
View File
@@ -9,8 +9,8 @@
// FOR THE LOVE OF GOD USE THESE. DO NOT FUCKING SPAGHETTIFY THIS.
// Use the Has*() functions if you ONLY need to check.
// If you need to do something, use Get*().
HasAbove(var/z)
HasBelow(var/z)
/HasAbove(var/z)
/HasBelow(var/z)
// These give either the turf or null.
GetAbove(var/atom/atom)
GetBelow(var/atom/atom)
/GetAbove(var/atom/atom)
/GetBelow(var/atom/atom)
+1 -1
View File
@@ -43,7 +43,7 @@ var/list/z_levels = list()// Each bit re... haha just kidding this is a list of
for(var/level = z, HasAbove(level), level++)
. |= level+1
proc/AreConnectedZLevels(var/zA, var/zB)
/proc/AreConnectedZLevels(var/zA, var/zB)
return zA == zB || (zB in GetConnectedZlevels(zA))
/proc/get_zstep(ref, dir)
+4 -4
View File
@@ -1,10 +1,10 @@
proc/HasAbove(var/z)
/proc/HasAbove(var/z)
return 0
proc/HasBelow(var/z)
/proc/HasBelow(var/z)
return 0
// These give either the turf or null.
proc/GetAbove(var/turf/turf)
/proc/GetAbove(var/turf/turf)
return null
proc/GetBelow(var/turf/turf)
/proc/GetBelow(var/turf/turf)
return null
+21 -21
View File
@@ -1,7 +1,7 @@
////////////////////////////
// parent class for pipes //
////////////////////////////
obj/machinery/atmospherics/pipe/zpipe
/obj/machinery/atmospherics/pipe/zpipe
icon = 'icons/obj/structures.dmi'
icon_state = "up"
@@ -56,13 +56,13 @@ obj/machinery/atmospherics/pipe/zpipe
invisibility = i ? 101 : 0
update_icon()
obj/machinery/atmospherics/pipe/zpipe/process()
/obj/machinery/atmospherics/pipe/zpipe/process()
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
..()
else
. = PROCESS_KILL
obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
/obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
var/datum/gas_mixture/environment = loc.return_air()
var/pressure_difference = pressure - environment.return_pressure()
@@ -77,7 +77,7 @@ obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
else return 1
obj/machinery/atmospherics/pipe/zpipe/proc/burst()
/obj/machinery/atmospherics/pipe/zpipe/proc/burst()
src.visible_message("<span class='warning'>\The [src] bursts!</span>");
playsound(src, 'sound/effects/bang.ogg', 25, 1)
var/datum/effect/effect/system/smoke_spread/smoke = new
@@ -85,27 +85,27 @@ obj/machinery/atmospherics/pipe/zpipe/proc/burst()
smoke.start()
qdel(src) // NOT qdel.
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
/obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
if(dir == (NORTH|SOUTH))
set_dir(NORTH)
else if(dir == (EAST|WEST))
set_dir(EAST)
obj/machinery/atmospherics/pipe/zpipe/Destroy()
/obj/machinery/atmospherics/pipe/zpipe/Destroy()
if(node1)
node1.disconnect(src)
if(node2)
node2.disconnect(src)
. = ..()
obj/machinery/atmospherics/pipe/zpipe/pipeline_expansion()
/obj/machinery/atmospherics/pipe/zpipe/pipeline_expansion()
return list(node1, node2)
obj/machinery/atmospherics/pipe/zpipe/update_icon()
/obj/machinery/atmospherics/pipe/zpipe/update_icon()
color = pipe_color
return
obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
/obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
qdel(parent)
@@ -120,14 +120,14 @@ obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/refe
/////////////////////////
// the elusive up pipe //
/////////////////////////
obj/machinery/atmospherics/pipe/zpipe/up
/obj/machinery/atmospherics/pipe/zpipe/up
icon = 'icons/obj/structures.dmi'
icon_state = "up"
name = "upwards pipe"
desc = "A pipe segment to connect upwards."
obj/machinery/atmospherics/pipe/zpipe/up/atmos_init()
/obj/machinery/atmospherics/pipe/zpipe/up/atmos_init()
normalize_dir()
var/node1_dir
@@ -157,14 +157,14 @@ obj/machinery/atmospherics/pipe/zpipe/up/atmos_init()
// and the down pipe //
///////////////////////
obj/machinery/atmospherics/pipe/zpipe/down
/obj/machinery/atmospherics/pipe/zpipe/down
icon = 'icons/obj/structures.dmi'
icon_state = "down"
name = "downwards pipe"
desc = "A pipe segment to connect downwards."
obj/machinery/atmospherics/pipe/zpipe/down/atmos_init()
/obj/machinery/atmospherics/pipe/zpipe/down/atmos_init()
normalize_dir()
var/node1_dir
@@ -194,7 +194,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/atmos_init()
// supply/scrubbers //
///////////////////////
obj/machinery/atmospherics/pipe/zpipe/up/scrubbers
/obj/machinery/atmospherics/pipe/zpipe/up/scrubbers
icon_state = "up-scrubbers"
name = "upwards scrubbers pipe"
desc = "A scrubbers pipe segment to connect upwards."
@@ -204,7 +204,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/scrubbers
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
obj/machinery/atmospherics/pipe/zpipe/up/supply
/obj/machinery/atmospherics/pipe/zpipe/up/supply
icon_state = "up-supply"
name = "upwards supply pipe"
desc = "A supply pipe segment to connect upwards."
@@ -214,7 +214,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/supply
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
obj/machinery/atmospherics/pipe/zpipe/up/fuel
/obj/machinery/atmospherics/pipe/zpipe/up/fuel
icon_state = "up-fuel"
name = "upwards fuel pipe"
desc = "A fuel pipe segment to connect upwards."
@@ -224,7 +224,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/fuel
icon_connect_type = "-fuel"
color = PIPE_COLOR_YELLOW
obj/machinery/atmospherics/pipe/zpipe/up/aux
/obj/machinery/atmospherics/pipe/zpipe/up/aux
icon_state = "up-aux"
name = "upwards aux pipe"
desc = "A aux pipe segment to connect upwards."
@@ -234,7 +234,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/aux
icon_connect_type = "-aux"
color = PIPE_COLOR_CYAN
obj/machinery/atmospherics/pipe/zpipe/down/scrubbers
/obj/machinery/atmospherics/pipe/zpipe/down/scrubbers
icon_state = "down-scrubbers"
name = "downwards scrubbers pipe"
desc = "A scrubbers pipe segment to connect downwards."
@@ -244,7 +244,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/scrubbers
icon_connect_type = "-scrubbers"
color = PIPE_COLOR_RED
obj/machinery/atmospherics/pipe/zpipe/down/supply
/obj/machinery/atmospherics/pipe/zpipe/down/supply
icon_state = "down-supply"
name = "downwards supply pipe"
desc = "A supply pipe segment to connect downwards."
@@ -254,7 +254,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/supply
icon_connect_type = "-supply"
color = PIPE_COLOR_BLUE
obj/machinery/atmospherics/pipe/zpipe/down/fuel
/obj/machinery/atmospherics/pipe/zpipe/down/fuel
icon_state = "down-fuel"
name = "downwards fuel pipe"
desc = "A fuel pipe segment to connect downwards."
@@ -264,7 +264,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/fuel
icon_connect_type = "-fuel"
color = PIPE_COLOR_YELLOW
obj/machinery/atmospherics/pipe/zpipe/down/aux
/obj/machinery/atmospherics/pipe/zpipe/down/aux
icon_state = "down-aux"
name = "upwards aux pipe"
desc = "A aux pipe segment to connect upwards."
+4 -4
View File
@@ -19,7 +19,7 @@
drop_sound = 'sound/items/drop/wrapper.ogg'
pickup_sound = 'sound/items/pickup/wrapper.ogg'
obj/item/weapon/newspaper/attack_self(mob/user as mob)
/obj/item/weapon/newspaper/attack_self(mob/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/human_user = user
var/dat
@@ -27,7 +27,7 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
switch(screen)
if(0) //Cover
dat+="<DIV ALIGN='center'><B><FONT SIZE=6>The Griffon</FONT></B></div>"
dat+="<DIV ALIGN='center'><FONT SIZE=2>[using_map.company_name]-standard newspaper, for use on [using_map.company_name]© Space Facilities</FONT></div><HR>"
dat+="<DIV ALIGN='center'><FONT SIZE=2>[using_map.company_name]-standard newspaper, for use on [using_map.company_name] Space Facilities</FONT></div><HR>"
if(isemptylist(news_content))
if(important_message)
dat+="Contents:<BR><ul><B><FONT COLOR='red'>**</FONT>Important Security Announcement<FONT COLOR='red'>**</FONT></B> <FONT SIZE=2>\[page [pages+2]\]</FONT><BR></ul>"
@@ -99,7 +99,7 @@ obj/item/weapon/newspaper/attack_self(mob/user as mob)
else
to_chat(user, "The paper is full of intelligible symbols!")
obj/item/weapon/newspaper/Topic(href, href_list)
/obj/item/weapon/newspaper/Topic(href, href_list)
var/mob/living/U = usr
..()
if((src in U.contents) || (istype(loc, /turf) && in_range(src, U)))
@@ -130,7 +130,7 @@ obj/item/weapon/newspaper/Topic(href, href_list)
if(istype(src.loc, /mob))
attack_self(src.loc)
obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
if(scribble_page == curr_page)
to_chat(user, "<FONT COLOR='blue'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</FONT>")
+2 -2
View File
@@ -304,7 +304,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
return D
return res
proc/blood_incompatible(donor,receiver,donor_species,receiver_species)
/proc/blood_incompatible(donor,receiver,donor_species,receiver_species)
if(!donor || !receiver) return 0
if(donor_species && receiver_species)
@@ -327,7 +327,7 @@ proc/blood_incompatible(donor,receiver,donor_species,receiver_species)
//AB is a universal receiver.
return 0
proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
/proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
//Vorestation Edit Start - We're not going to splatter at all because we're in something and that's silly.
if(istype(source,/atom/movable))
-2
View File
@@ -1,5 +1,3 @@
#define PROCESS_ACCURACY 10
/obj/item/organ/internal/appendix
name = "appendix"
icon_state = "appendix"
-2
View File
@@ -1,5 +1,3 @@
#define PROCESS_ACCURACY 10
/obj/item/organ/internal/eyes
name = "eyeballs"
icon_state = "eyes"
-2
View File
@@ -1,5 +1,3 @@
#define PROCESS_ACCURACY 10
/obj/item/organ/internal/heart
name = "heart"
icon_state = "heart-on"
-2
View File
@@ -1,5 +1,3 @@
#define PROCESS_ACCURACY 10
/obj/item/organ/internal/kidneys
name = "kidneys"
icon_state = "kidneys"
-2
View File
@@ -1,5 +1,3 @@
#define PROCESS_ACCURACY 10
/obj/item/organ/internal/liver
name = "liver"
icon_state = "liver"
-2
View File
@@ -1,5 +1,3 @@
#define PROCESS_ACCURACY 10
/obj/item/organ/internal/lungs
name = "lungs"
icon_state = "lungs"
+6 -6
View File
@@ -1,14 +1,14 @@
mob/proc/flash_pain()
/mob/proc/flash_pain()
flick("pain",pain)
mob/var/list/pain_stored = list()
mob/var/last_pain_message = ""
mob/var/next_pain_time = 0
/mob/var/list/pain_stored = list()
/mob/var/last_pain_message = ""
/mob/var/next_pain_time = 0
// message is the custom message to be displayed
// power decides how much painkillers will stop the message
// force means it ignores anti-spam timer
mob/living/carbon/proc/custom_pain(message, power, force)
/mob/living/carbon/proc/custom_pain(message, power, force)
if(!message || stat || !can_feel_pain() || chem_effects[CE_PAINKILLER] > power)
return 0
message = "<span class='danger'>[message]</span>"
@@ -21,7 +21,7 @@ mob/living/carbon/proc/custom_pain(message, power, force)
to_chat(src,message)
next_pain_time = world.time + (100-power)
mob/living/carbon/human/proc/handle_pain()
/mob/living/carbon/human/proc/handle_pain()
if(stat)
return
+129 -129
View File
@@ -53,169 +53,169 @@
var/tmp/list/desc_list = list()
var/tmp/list/damage_list = list()
New(var/damage)
/datum/wound/New(var/damage)
created = world.time
created = world.time
// reading from a list("stage" = damage) is pretty difficult, so build two separate
// lists from them instead
for(var/V in stages)
desc_list += V
damage_list += stages[V]
// reading from a list("stage" = damage) is pretty difficult, so build two separate
// lists from them instead
for(var/V in stages)
desc_list += V
damage_list += stages[V]
src.damage = damage
src.damage = damage
// initialize with the appropriate stage
src.init_stage(damage)
// initialize with the appropriate stage
src.init_stage(damage)
bleed_timer += damage
bleed_timer += damage
// returns 1 if there's a next stage, 0 otherwise
proc/init_stage(var/initial_damage)
current_stage = stages.len
/datum/wound/proc/init_stage(var/initial_damage)
current_stage = stages.len
while(src.current_stage > 1 && src.damage_list[current_stage-1] <= initial_damage / src.amount)
src.current_stage--
while(src.current_stage > 1 && src.damage_list[current_stage-1] <= initial_damage / src.amount)
src.current_stage--
src.min_damage = damage_list[current_stage]
src.desc = desc_list[current_stage]
src.min_damage = damage_list[current_stage]
src.desc = desc_list[current_stage]
// the amount of damage per wound
proc/wound_damage()
return src.damage / src.amount
// the amount of damage per wound
/datum/wound/proc/wound_damage()
return src.damage / src.amount
proc/can_autoheal()
if(is_treated())
return TRUE
if(src.wound_damage() <= autoheal_cutoff)
if(created + 10 MINUTES > world.time) // Wounds don't autoheal for ten minutes if not bandaged.
return FALSE
return TRUE
/datum/wound/proc/can_autoheal()
if(is_treated())
return TRUE
if(src.wound_damage() <= autoheal_cutoff)
if(created + 10 MINUTES > world.time) // Wounds don't autoheal for ten minutes if not bandaged.
return FALSE
return TRUE
// checks whether the wound has been appropriately treated
proc/is_treated()
if(damage_type == BRUISE || damage_type == CUT || damage_type == PIERCE)
return bandaged
else if(damage_type == BURN)
return salved
// checks whether the wound has been appropriately treated
/datum/wound/proc/is_treated()
if(damage_type == BRUISE || damage_type == CUT || damage_type == PIERCE)
return bandaged
else if(damage_type == BURN)
return salved
// Checks whether other other can be merged into src.
proc/can_merge(var/datum/wound/other)
if (other.type != src.type) return 0
if (other.current_stage != src.current_stage) return 0
if (other.damage_type != src.damage_type) return 0
if (!(other.can_autoheal()) != !(src.can_autoheal())) return 0
if (!(other.bandaged) != !(src.bandaged)) return 0
if (!(other.clamped) != !(src.clamped)) return 0
if (!(other.salved) != !(src.salved)) return 0
if (!(other.disinfected) != !(src.disinfected)) return 0
//if (other.germ_level != src.germ_level) return 0
return 1
// Checks whether other other can be merged into src.
/datum/wound/proc/can_merge(var/datum/wound/other)
if (other.type != src.type) return 0
if (other.current_stage != src.current_stage) return 0
if (other.damage_type != src.damage_type) return 0
if (!(other.can_autoheal()) != !(src.can_autoheal())) return 0
if (!(other.bandaged) != !(src.bandaged)) return 0
if (!(other.clamped) != !(src.clamped)) return 0
if (!(other.salved) != !(src.salved)) return 0
if (!(other.disinfected) != !(src.disinfected)) return 0
//if (other.germ_level != src.germ_level) return 0
return 1
proc/merge_wound(var/datum/wound/other)
src.damage += other.damage
src.amount += other.amount
src.bleed_timer += other.bleed_timer
src.germ_level = max(src.germ_level, other.germ_level)
src.created = max(src.created, other.created) //take the newer created time
// checks if wound is considered open for external infections
// untreated cuts (and bleeding bruises) and burns are possibly infectable, chance higher if wound is bigger
proc/infection_check()
if (damage < 10) //small cuts, tiny bruises, and moderate burns shouldn't be infectable.
return 0
if (is_treated() && damage < 25) //anything less than a flesh wound (or equivalent) isn't infectable if treated properly
return 0
if (disinfected)
germ_level = 0 //reset this, just in case
return 0
if (damage_type == BRUISE && !bleeding()) //bruises only infectable if bleeding
return 0
var/dam_coef = round(damage/10)
switch (damage_type)
if (BRUISE)
return prob(dam_coef*5)
if (BURN)
return prob(dam_coef*10)
if (CUT)
return prob(dam_coef*20)
/datum/wound/proc/merge_wound(var/datum/wound/other)
src.damage += other.damage
src.amount += other.amount
src.bleed_timer += other.bleed_timer
src.germ_level = max(src.germ_level, other.germ_level)
src.created = max(src.created, other.created) //take the newer created time
// checks if wound is considered open for external infections
// untreated cuts (and bleeding bruises) and burns are possibly infectable, chance higher if wound is bigger
/datum/wound/proc/infection_check()
if (damage < 10) //small cuts, tiny bruises, and moderate burns shouldn't be infectable.
return 0
if (is_treated() && damage < 25) //anything less than a flesh wound (or equivalent) isn't infectable if treated properly
return 0
if (disinfected)
germ_level = 0 //reset this, just in case
return 0
proc/bandage()
bandaged = 1
if (damage_type == BRUISE && !bleeding()) //bruises only infectable if bleeding
return 0
proc/salve()
salved = 1
var/dam_coef = round(damage/10)
switch (damage_type)
if (BRUISE)
return prob(dam_coef*5)
if (BURN)
return prob(dam_coef*10)
if (CUT)
return prob(dam_coef*20)
proc/disinfect()
disinfected = 1
return 0
// heal the given amount of damage, and if the given amount of damage was more
// than what needed to be healed, return how much heal was left
// set @heals_internal to also heal internal organ damage
proc/heal_damage(amount, heals_internal = 0)
if(src.internal && !heals_internal)
// heal nothing
return amount
/datum/wound/proc/bandage()
bandaged = 1
var/healed_damage = min(src.damage, amount)
amount -= healed_damage
src.damage -= healed_damage
/datum/wound/proc/salve()
salved = 1
while(src.wound_damage() < damage_list[current_stage] && current_stage < src.desc_list.len)
current_stage++
desc = desc_list[current_stage]
src.min_damage = damage_list[current_stage]
/datum/wound/proc/disinfect()
disinfected = 1
// return amount of healing still leftover, can be used for other wounds
// heal the given amount of damage, and if the given amount of damage was more
// than what needed to be healed, return how much heal was left
// set @heals_internal to also heal internal organ damage
/datum/wound/proc/heal_damage(amount, heals_internal = 0)
if(src.internal && !heals_internal)
// heal nothing
return amount
// opens the wound again
proc/open_wound(damage)
src.damage += damage
bleed_timer += damage
var/healed_damage = min(src.damage, amount)
amount -= healed_damage
src.damage -= healed_damage
while(src.current_stage > 1 && src.damage_list[current_stage-1] <= src.damage / src.amount)
src.current_stage--
while(src.wound_damage() < damage_list[current_stage] && current_stage < src.desc_list.len)
current_stage++
desc = desc_list[current_stage]
src.min_damage = damage_list[current_stage]
src.desc = desc_list[current_stage]
src.min_damage = damage_list[current_stage]
// return amount of healing still leftover, can be used for other wounds
return amount
// returns whether this wound can absorb the given amount of damage.
// this will prevent large amounts of damage being trapped in less severe wound types
proc/can_worsen(damage_type, damage)
if (src.damage_type != damage_type)
return 0 //incompatible damage types
// opens the wound again
/datum/wound/proc/open_wound(damage)
src.damage += damage
bleed_timer += damage
if (src.amount > 1)
return 0//merged wounds cannot be worsened.
while(src.current_stage > 1 && src.damage_list[current_stage-1] <= src.damage / src.amount)
src.current_stage--
//with 1.5*, a shallow cut will be able to carry at most 30 damage,
//37.5 for a deep cut
//52.5 for a flesh wound, etc.
var/max_wound_damage = 1.5*src.damage_list[1]
if (src.damage + damage > max_wound_damage)
return 0
src.desc = desc_list[current_stage]
src.min_damage = damage_list[current_stage]
return 1
// returns whether this wound can absorb the given amount of damage.
// this will prevent large amounts of damage being trapped in less severe wound types
/datum/wound/proc/can_worsen(damage_type, damage)
if (src.damage_type != damage_type)
return 0 //incompatible damage types
proc/bleeding()
if (src.internal)
return 0 // internal wounds don't bleed in the sense of this function
if (src.amount > 1)
return 0//merged wounds cannot be worsened.
if (current_stage > max_bleeding_stage)
return 0
//with 1.5*, a shallow cut will be able to carry at most 30 damage,
//37.5 for a deep cut
//52.5 for a flesh wound, etc.
var/max_wound_damage = 1.5*src.damage_list[1]
if (src.damage + damage > max_wound_damage)
return 0
if (bandaged||clamped)
return 0
return 1
if (bleed_timer <= 0 && wound_damage() <= bleed_threshold)
return 0 //Bleed timer has run out. Once a wound is big enough though, you'll need a bandage to stop it
/datum/wound/proc/bleeding()
if (src.internal)
return 0 // internal wounds don't bleed in the sense of this function
return 1
if (current_stage > max_bleeding_stage)
return 0
if (bandaged||clamped)
return 0
if (bleed_timer <= 0 && wound_damage() <= bleed_threshold)
return 0 //Bleed timer has run out. Once a wound is big enough though, you'll need a bandage to stop it
return 1
/** WOUND DEFINITIONS **/
@@ -295,7 +295,7 @@
max_bleeding_stage = 3
stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large blood soaked clot" = 25, "large angry scar" = 10, "large straight scar" = 0)
datum/wound/cut/massive
/datum/wound/cut/massive
max_bleeding_stage = 3
stages = list("massive wound" = 70, "massive healing wound" = 50, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0)
@@ -327,7 +327,7 @@ datum/wound/cut/massive
stages = list("big gaping hole" = 50, "healing gaping hole" = 20, "large blood soaked clot" = 15, "large angry scar" = 10, "large round scar" = 0)
damage_type = PIERCE
datum/wound/puncture/massive
/datum/wound/puncture/massive
max_bleeding_stage = 3
stages = list("massive wound" = 60, "massive healing wound" = 30, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0)
damage_type = PIERCE
+2 -2
View File
@@ -32,7 +32,7 @@
if(can_die())
qdel(src)
proc/get_deepspace(x,y)
/proc/get_deepspace(x,y)
var/turf/unsimulated/map/overmap_turf = locate(x,y,global.using_map.overmap_z)
if(!istype(overmap_turf))
CRASH("Attempt to get deepspace at ([x],[y]) which is not on overmap: [overmap_turf]")
@@ -75,7 +75,7 @@ proc/get_deepspace(x,y)
return FALSE
// return isnull(client) && !key && stat == DEAD // Allows bodies that players have ghosted from to be deleted - Ater
proc/overmap_spacetravel(var/turf/space/T, var/atom/movable/A)
/proc/overmap_spacetravel(var/turf/space/T, var/atom/movable/A)
if (!T || !A)
return
+1 -1
View File
@@ -91,7 +91,7 @@ var/list/moving_levels = list()
//Proc to 'move' stars in spess
//yes it looks ugly, but it should only fire when state actually change.
//null direction stops movement
proc/toggle_move_stars(zlevel, direction)
/proc/toggle_move_stars(zlevel, direction)
if(!zlevel)
return
+1 -1
View File
@@ -75,7 +75,7 @@
generateFooter()
updateDisplay()
obj/item/weapon/paper/admin/proc/updateDisplay()
/obj/item/weapon/paper/admin/proc/updateDisplay()
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[headerOn ? header : ""][info_links][stamps][footerOn ? footer : ""][interactions]</BODY></HTML>", "window=[name];can_close=0")
@@ -139,7 +139,7 @@
deletepicture(src)
obj/item/device/camera/siliconcam/proc/getsource()
/obj/item/device/camera/siliconcam/proc/getsource()
if(istype(src.loc, /mob/living/silicon/ai))
return src
+1 -1
View File
@@ -1,5 +1,5 @@
//like orange but only checks north/south/east/west for one step
proc/cardinalrange(var/center)
/proc/cardinalrange(var/center)
var/list/things = list()
for(var/direction in cardinal)
var/turf/T = get_step(center, direction)
+1 -1
View File
@@ -264,7 +264,7 @@ var/list/possible_cable_coil_colours = list(
qdel(src)
return
obj/structure/cable/proc/cableColor(var/colorC)
/obj/structure/cable/proc/cableColor(var/colorC)
var/color_n = "#DD0000"
if(colorC)
color_n = colorC
@@ -14,7 +14,7 @@ var/list/fusion_reactions
/decl/fusion_reaction/proc/handle_reaction_special(var/obj/effect/fusion_em_field/holder)
return 0
proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy)
/proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy)
if(!fusion_reactions)
fusion_reactions = list()
for(var/rtype in typesof(/decl/fusion_reaction) - /decl/fusion_reaction)
@@ -41,7 +41,7 @@
charge_cost = 400
recharge_time = 7
obj/item/weapon/gun/energy/phasegun/rifle
/obj/item/weapon/gun/energy/phasegun/rifle
name = "phase rifle"
desc = "The RayZar EW31 Orion is a specialist energy weapon, intended for use against hostile wildlife."
icon_state = "phaserifle"
@@ -160,7 +160,7 @@
projectile_type = /obj/item/projectile/animate
charge_cost = 240
*/
obj/item/weapon/gun/energy/staff/focus
/obj/item/weapon/gun/energy/staff/focus
name = "mental focus"
desc = "An artifact that channels the will of the user into destructive bolts of force. If you aren't careful with it, you might poke someone's brain out."
icon = 'icons/obj/wizard.dmi'
@@ -81,7 +81,7 @@
max_shells = 7
obj/item/weapon/gun/projectile/revolver/detective45/verb/rename_gun()
/obj/item/weapon/gun/projectile/revolver/detective45/verb/rename_gun()
set name = "Name Gun"
set category = "Object"
set desc = "Rename your gun. If you're the Detective."

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