mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-21 20:12:31 +01:00
Fixes merge conflict
This commit is contained in:
@@ -637,6 +637,9 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=launchshuttle'>Launch a shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=forcelaunchshuttle'>Force launch a shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=jumpshuttle'>Jump a shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
|
||||
@@ -1111,7 +1114,7 @@ var/global/floorIsLava = 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/get_options_bar(whom, detail = 2, name = 0, link = 1)
|
||||
/proc/get_options_bar(whom, detail = 2, name = 0, link = 1, highlight_special = 1)
|
||||
if(!whom)
|
||||
return "<b>(*null*)</b>"
|
||||
var/mob/M
|
||||
@@ -1126,12 +1129,12 @@ var/global/floorIsLava = 0
|
||||
return "<b>(*not an mob*)</b>"
|
||||
switch(detail)
|
||||
if(0)
|
||||
return "<b>[key_name(C, link, name)]</b>"
|
||||
return "<b>[key_name(C, link, name, highlight_special)]</b>"
|
||||
if(1)
|
||||
return "<b>[key_name(C, link, name)](<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>)</b>"
|
||||
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>)</b>"
|
||||
if(2)
|
||||
var/ref_mob = "\ref[M]"
|
||||
return "<b>[key_name(C, link, name)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)</b>"
|
||||
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)</b>"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -144,8 +144,10 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/air_report,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/reload_mentors,
|
||||
/client/proc/reload_mentors,
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/remake_distribution_map,
|
||||
/client/proc/show_distribution_map,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/callproc,
|
||||
/client/proc/toggledebuglogs,
|
||||
@@ -585,22 +587,22 @@ var/list/admin_verbs_mentor = list(
|
||||
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the disease [D].", 1)
|
||||
|
||||
|
||||
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
|
||||
set category = "Fun"
|
||||
set name = "Give Disease"
|
||||
set desc = "Gives a Disease to a mob."
|
||||
|
||||
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease()
|
||||
|
||||
|
||||
var/greater = ((input("Is this a lesser or greater disease?", "Give Disease") in list("Lesser", "Greater")) == "Greater")
|
||||
|
||||
|
||||
D.makerandom(greater)
|
||||
if (!greater)
|
||||
D.infectionchance = 1
|
||||
|
||||
|
||||
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
|
||||
|
||||
|
||||
if(istype(T,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if (H.species)
|
||||
@@ -609,7 +611,7 @@ var/list/admin_verbs_mentor = list(
|
||||
var/mob/living/carbon/monkey/M = T
|
||||
D.affected_species = list(M.greaterform)
|
||||
infect_virus2(T,D,1)
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].", 1)
|
||||
|
||||
@@ -400,13 +400,18 @@
|
||||
if (!emergency_shuttle.online())
|
||||
dat += "<a href='?src=\ref[src];call_shuttle=1'>Call Shuttle</a><br>"
|
||||
else
|
||||
var/timeleft = emergency_shuttle.estimate_launch_time()
|
||||
switch(emergency_shuttle.location())
|
||||
if(1)
|
||||
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
|
||||
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
|
||||
if(0)
|
||||
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
|
||||
if (emergency_shuttle.wait_for_launch)
|
||||
var/timeleft = emergency_shuttle.estimate_launch_time()
|
||||
dat += "ETL: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
|
||||
|
||||
else if (emergency_shuttle.shuttle.has_arrive_time())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
dat += "ETA: <a href='?src=\ref[src];edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
|
||||
dat += "<a href='?src=\ref[src];call_shuttle=2'>Send Back</a><br>"
|
||||
|
||||
if (emergency_shuttle.shuttle.moving_status == SHUTTLE_WARMUP)
|
||||
dat += "Launching now..."
|
||||
|
||||
dat += "<a href='?src=\ref[src];delay_round_end=1'>[ticker.delay_end ? "End Round Normally" : "Delay Round End"]</a><br>"
|
||||
if(ticker.mode.syndicates.len)
|
||||
dat += "<br><table cellspacing=5><tr><td><B>Syndicates</B></td><td></td></tr>"
|
||||
|
||||
+115
-14
@@ -239,12 +239,23 @@
|
||||
else if(href_list["edit_shuttle_time"])
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
var/new_time_left = input("Enter new shuttle launch duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.estimate_launch_time() ) as num
|
||||
if (emergency_shuttle.wait_for_launch)
|
||||
var/new_time_left = input("Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
|
||||
|
||||
emergency_shuttle.launch_time = world.time + new_time_left*10
|
||||
emergency_shuttle.launch_time = world.time + new_time_left*10
|
||||
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [new_time_left]")
|
||||
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [new_time_left*10]", 1)
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]")
|
||||
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1)
|
||||
else if (emergency_shuttle.shuttle.has_arrive_time())
|
||||
|
||||
var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
|
||||
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
|
||||
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]")
|
||||
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1)
|
||||
else
|
||||
alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
|
||||
|
||||
href_list["secretsadmin"] = "check_antagonist"
|
||||
|
||||
else if(href_list["delay_round_end"])
|
||||
@@ -1922,21 +1933,111 @@
|
||||
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
|
||||
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
|
||||
|
||||
if("launchshuttle")
|
||||
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
|
||||
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShL")
|
||||
|
||||
var/list/valid_shuttles = list()
|
||||
for (var/shuttle_tag in shuttle_controller.shuttles)
|
||||
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
|
||||
valid_shuttles += shuttle_tag
|
||||
|
||||
var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles
|
||||
|
||||
if (!shuttle_tag)
|
||||
return
|
||||
|
||||
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
if (S.can_launch())
|
||||
S.launch(usr)
|
||||
message_admins("\blue [key_name_admin(usr)] launched the [shuttle_tag] shuttle", 1)
|
||||
log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle")
|
||||
else
|
||||
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
|
||||
|
||||
if("forcelaunchshuttle")
|
||||
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
|
||||
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShFL")
|
||||
|
||||
var/list/valid_shuttles = list()
|
||||
for (var/shuttle_tag in shuttle_controller.shuttles)
|
||||
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
|
||||
valid_shuttles += shuttle_tag
|
||||
|
||||
var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
|
||||
|
||||
if (!shuttle_tag)
|
||||
return
|
||||
|
||||
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
if (S.can_force())
|
||||
S.force_launch(usr)
|
||||
message_admins("\blue [key_name_admin(usr)] has forced the [shuttle_tag] shuttle launch", 1)
|
||||
log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch")
|
||||
else
|
||||
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
|
||||
|
||||
if("jumpshuttle")
|
||||
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
|
||||
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShJ")
|
||||
|
||||
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
if (!shuttle_tag) return
|
||||
|
||||
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
|
||||
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!origin_area) return
|
||||
|
||||
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!destination_area) return
|
||||
|
||||
var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No")
|
||||
if (long_jump == "Yes")
|
||||
var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!transition_area) return
|
||||
|
||||
var/move_duration = input("How many seconds will this jump take?") as num
|
||||
|
||||
S.long_jump(origin_area, destination_area, transition_area, move_duration)
|
||||
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
|
||||
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
|
||||
else
|
||||
S.short_jump(origin_area, destination_area)
|
||||
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1)
|
||||
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
|
||||
|
||||
if("moveshuttle")
|
||||
|
||||
if(!shuttles) return // Something is very wrong, the global shuttle list has not been created.
|
||||
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
|
||||
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShA")
|
||||
feedback_add_details("admin_secrets_fun_used","ShM")
|
||||
|
||||
var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
|
||||
if (confirm == "Cancel")
|
||||
return
|
||||
|
||||
var/shuttle_tag = input("Which shuttle do you want to call?") as null|anything in shuttles
|
||||
|
||||
if(shuttle_tag)
|
||||
var/datum/shuttle/S = shuttles[shuttle_tag]
|
||||
if(istype(S) && S.moving_status == 0)
|
||||
S.move()
|
||||
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
|
||||
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
|
||||
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
|
||||
if (!shuttle_tag) return
|
||||
|
||||
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
|
||||
|
||||
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!origin_area) return
|
||||
|
||||
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
|
||||
if (!destination_area) return
|
||||
|
||||
S.move(origin_area, destination_area)
|
||||
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
|
||||
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
|
||||
|
||||
if("togglebombcap")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
|
||||
@@ -91,8 +91,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(!mob) return //this doesn't happen
|
||||
|
||||
var/ref_mob = "\ref[mob]"
|
||||
var/mentor_msg = "\blue <b><font color=red>HELP: </font>[get_options_bar(mob, 2, 1, 1, 0)][ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
||||
msg = "\blue <b><font color=red>HELP: </font>[get_options_bar(mob, 2, 1, 1)][ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
||||
|
||||
//send this msg to all admins
|
||||
var/admin_number_afk = 0
|
||||
for(var/client/X in admins)
|
||||
@@ -101,7 +101,10 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
admin_number_afk++
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
X << msg
|
||||
if(X.holder.rights == R_MENTOR)
|
||||
X << mentor_msg // Mentors won't see coloring of names on people with special_roles (Antags, etc.)
|
||||
else
|
||||
X << msg
|
||||
|
||||
//show it to the person adminhelping too
|
||||
src << "<font color='blue'>PM to-<b>Admins</b>: [original_msg]</font>"
|
||||
|
||||
@@ -37,5 +37,7 @@
|
||||
if(config.mods_are_mentors)
|
||||
channel = "MENTOR:"
|
||||
for(var/client/C in admins)
|
||||
if((R_ADMIN|R_MOD|R_MENTOR) & C.holder.rights)
|
||||
if((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
C << "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
else // Mentors get same message without fancy coloring of name if special_role.
|
||||
C << "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1,1,0)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
|
||||
@@ -517,6 +517,25 @@ client/proc/one_click_antag()
|
||||
new_vox.mind.special_role = "Vox Raider"
|
||||
new_vox.mutations |= NOCLONE //Stops the station crew from messing around with their DNA.
|
||||
|
||||
//Now apply cortical stack.
|
||||
var/datum/organ/external/affected = new_vox.get_organ("head")
|
||||
|
||||
//To avoid duplicates.
|
||||
for(var/obj/item/weapon/implant/cortical/imp in new_vox.contents)
|
||||
affected.implants -= imp
|
||||
del(imp)
|
||||
|
||||
var/obj/item/weapon/implant/cortical/I = new(new_vox)
|
||||
I.imp_in = new_vox
|
||||
I.implanted = 1
|
||||
affected.implants += I
|
||||
I.part = affected
|
||||
|
||||
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/heist ) ) )
|
||||
var/datum/game_mode/heist/M = ticker.mode
|
||||
M.cortical_stacks += I
|
||||
M.raiders[new_vox.mind] = I
|
||||
|
||||
ticker.mode.traitors += new_vox.mind
|
||||
new_vox.equip_vox_raider()
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ var/global/vox_tick = 1
|
||||
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/gun/dartgun/vox/medical, slot_r_hand)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/breath/vox(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/breath(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(src), slot_back)
|
||||
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_r_store)
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ datum/preferences
|
||||
var/be_random_name = 0 //whether we are a random name every round
|
||||
var/gender = MALE //gender of character (well duh)
|
||||
var/age = 30 //age of character
|
||||
var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2).
|
||||
var/b_type = "A+" //blood type (not-chooseable)
|
||||
var/underwear = 1 //underwear type
|
||||
var/undershirt = 1 //undershirt type
|
||||
@@ -246,7 +247,8 @@ datum/preferences
|
||||
dat += "<br>"
|
||||
|
||||
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'><b>[gender == MALE ? "Male" : "Female"]</b></a><br>"
|
||||
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a>"
|
||||
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a><br>"
|
||||
dat += "<b>Spawn Point</b>: <a href='byond://?src=\ref[user];preference=spawnpoint;task=input'>[spawnpoint]</a>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;preference=ui'><b>[UI_style]</b></a><br>"
|
||||
@@ -960,6 +962,14 @@ datum/preferences
|
||||
var/datum/language/lang = all_languages[L]
|
||||
if((!(lang.flags & RESTRICTED)) && (is_alien_whitelisted(user, L)||(!( lang.flags & WHITELISTED ))||(S && (L in S.secondary_langs))))
|
||||
new_languages += lang
|
||||
|
||||
//Apparently there's some PHP script that needs to be updated in order to give people whitelist languages.
|
||||
//This workaround should be removed once that has been properly updated
|
||||
if (lang.name == "Siik'maas")
|
||||
new_languages |= all_languages["Siik'tajr"]
|
||||
if (lang.name == "Siik'tajr")
|
||||
new_languages |= all_languages["Siik'maas"]
|
||||
|
||||
languages_available = 1
|
||||
|
||||
if(!(languages_available))
|
||||
@@ -1179,6 +1189,16 @@ datum/preferences
|
||||
var/skin_style_name = input(user, "Select a new skin style") as null|anything in list("default1", "default2", "default3")
|
||||
if(!skin_style_name) return
|
||||
|
||||
if("spawnpoint")
|
||||
var/list/spawnkeys = list()
|
||||
for(var/S in spawntypes)
|
||||
spawnkeys += S
|
||||
var/choice = input(user, "Where would you like to spawn when latejoining?") as null|anything in spawnkeys
|
||||
if(!choice || !spawntypes[choice])
|
||||
spawnpoint = "Arrivals Shuttle"
|
||||
return
|
||||
spawnpoint = choice
|
||||
|
||||
else
|
||||
switch(href_list["preference"])
|
||||
if("gender")
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
S["age"] >> age
|
||||
S["species"] >> species
|
||||
S["language"] >> language
|
||||
S["spawnpoint"] >> spawnpoint
|
||||
|
||||
//colors to be consolidated into hex strings (requires some work with dna code)
|
||||
S["hair_red"] >> r_hair
|
||||
@@ -168,6 +169,7 @@
|
||||
real_name = reject_bad_name(real_name)
|
||||
if(isnull(species)) species = "Human"
|
||||
if(isnull(language)) language = "None"
|
||||
if(isnull(spawnpoint)) spawnpoint = "Arrivals Shuttle"
|
||||
if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation)
|
||||
if(!real_name) real_name = random_name(gender)
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
var/list/spawntypes = list()
|
||||
|
||||
/proc/populate_spawn_points()
|
||||
spawntypes = list()
|
||||
for(var/type in typesof(/datum/spawnpoint)-/datum/spawnpoint)
|
||||
var/datum/spawnpoint/S = new type()
|
||||
spawntypes[S.display_name] = S
|
||||
|
||||
/datum/spawnpoint
|
||||
var/msg //Message to display on the arrivals computer.
|
||||
var/list/turfs //List of turfs to spawn on.
|
||||
var/display_name //Name used in preference setup.
|
||||
|
||||
/datum/spawnpoint/arrivals
|
||||
display_name = "Arrivals Shuttle"
|
||||
msg = "has arrived on the station"
|
||||
|
||||
/datum/spawnpoint/arrivals/New()
|
||||
..()
|
||||
turfs = latejoin
|
||||
|
||||
/datum/spawnpoint/gateway
|
||||
display_name = "Gateway"
|
||||
msg = "has completed translation from offsite gateway"
|
||||
|
||||
/datum/spawnpoint/gateway/New()
|
||||
..()
|
||||
turfs = latejoin_gateway
|
||||
|
||||
/datum/spawnpoint/cryo
|
||||
display_name = "Cryogenic Storage"
|
||||
msg = "has completed cryogenic revival"
|
||||
|
||||
/datum/spawnpoint/cryo/New()
|
||||
..()
|
||||
turfs = latejoin_cryo
|
||||
@@ -172,10 +172,9 @@
|
||||
icons.Add(usr.zone_sel)
|
||||
|
||||
for(var/obj/screen/I in icons)
|
||||
if(I.color && I.alpha)
|
||||
I.icon = ui_style2icon(UI_style_new)
|
||||
I.color = UI_style_color_new
|
||||
I.alpha = UI_style_alpha_new
|
||||
I.icon = ui_style2icon(UI_style_new)
|
||||
I.color = UI_style_color_new
|
||||
I.alpha = UI_style_alpha_new
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
var/vision_flags = 0
|
||||
var/darkness_view = 0//Base human is 2
|
||||
var/invisa_view = 0
|
||||
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/eyes.dmi')
|
||||
/*
|
||||
SEE_SELF // can see self, no matter what
|
||||
SEE_MOBS // can see all mobs, no matter what
|
||||
@@ -130,6 +130,7 @@ BLIND // can't see anything
|
||||
slot_flags = SLOT_GLOVES
|
||||
attack_verb = list("challenged")
|
||||
species_restricted = list("exclude","Unathi","Tajaran")
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/gloves.dmi')
|
||||
|
||||
/obj/item/clothing/gloves/examine()
|
||||
set src in usr
|
||||
@@ -158,13 +159,13 @@ BLIND // can't see anything
|
||||
slot_flags = SLOT_HEAD
|
||||
w_class = 2.0
|
||||
|
||||
|
||||
//Mask
|
||||
/obj/item/clothing/mask
|
||||
name = "mask"
|
||||
icon = 'icons/obj/clothing/masks.dmi'
|
||||
body_parts_covered = HEAD
|
||||
slot_flags = SLOT_MASK
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/masks.dmi')
|
||||
|
||||
//Shoes
|
||||
/obj/item/clothing/shoes
|
||||
@@ -179,6 +180,7 @@ BLIND // can't see anything
|
||||
permeability_coefficient = 0.50
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
species_restricted = list("exclude","Unathi","Tajaran")
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/shoes.dmi')
|
||||
|
||||
//Suit
|
||||
/obj/item/clothing/suit
|
||||
@@ -250,6 +252,7 @@ BLIND // can't see anything
|
||||
var/displays_id = 1
|
||||
var/rolled_down = 0
|
||||
var/basecolor
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
|
||||
|
||||
/obj/item/clothing/under/attackby(obj/item/I, mob/user)
|
||||
if(hastie)
|
||||
@@ -274,10 +277,10 @@ BLIND // can't see anything
|
||||
if(hastie && src.loc == user)
|
||||
hastie.attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
if ((ishuman(usr) || ismonkey(usr)) && src.loc == user) //make it harder to accidentally undress yourself
|
||||
return
|
||||
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/MouseDrop(obj/over_object as obj)
|
||||
@@ -402,4 +405,8 @@ BLIND // can't see anything
|
||||
sensor_mode = pick(0,1,2,3)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/emp_act(severity)
|
||||
if (hastie)
|
||||
hastie.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
name = "ultra rare hat"
|
||||
desc = "an ultra rare hat. It commands a certain respect."
|
||||
icon_state = "petehat"
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi')
|
||||
|
||||
/obj/item/clothing/head/collectable/slime
|
||||
name = "collectable slime cap!"
|
||||
@@ -24,7 +25,7 @@
|
||||
name = "collectable chef's hat"
|
||||
desc = "A rare Chef's Hat meant for hat collectors!"
|
||||
icon_state = "chef"
|
||||
item_state = "chef"
|
||||
item_state = "chefhat"
|
||||
|
||||
/obj/item/clothing/head/collectable/paper
|
||||
name = "collectable paper hat"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "chef's hat"
|
||||
desc = "It's a hat used by chefs to keep hair out of your food. Judging by the food in the mess, they don't work."
|
||||
icon_state = "chef"
|
||||
item_state = "chef"
|
||||
item_state = "chefhat"
|
||||
desc = "The commander in chef's head wear."
|
||||
flags = FPRINT | TABLEPASS
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
w_class = 2
|
||||
gas_transfer_coefficient = 0.10
|
||||
permeability_coefficient = 0.50
|
||||
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/masks.dmi'
|
||||
)
|
||||
|
||||
var/hanging = 0
|
||||
|
||||
verb/toggle()
|
||||
@@ -35,23 +40,4 @@
|
||||
name = "medical mask"
|
||||
icon_state = "medical"
|
||||
item_state = "medical"
|
||||
permeability_coefficient = 0.01
|
||||
|
||||
/obj/item/clothing/mask/breath/vox
|
||||
desc = "A weirdly-shaped breath mask."
|
||||
name = "vox breath mask"
|
||||
icon_state = "voxmask"
|
||||
item_state = "voxmask"
|
||||
permeability_coefficient = 0.01
|
||||
species_restricted = list("Vox","Vox Armalis")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/mask.dmi',
|
||||
"Vox Armalis" = 'icons/mob/species/armalis/mask.dmi',
|
||||
)
|
||||
|
||||
toggle()
|
||||
set category = "Object"
|
||||
set name = "Adjust mask"
|
||||
set src in usr
|
||||
|
||||
usr << "You can't really adjust this mask - it's moulded to your beak!"
|
||||
permeability_coefficient = 0.01
|
||||
@@ -191,8 +191,7 @@
|
||||
|
||||
species_restricted = list("Vox","Vox Armalis")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/feet.dmi',
|
||||
"Vox Armalis" = 'icons/mob/species/armalis/feet.dmi',
|
||||
"Vox Armalis" = 'icons/mob/species/armalis/feet.dmi'
|
||||
)
|
||||
|
||||
action_button_name = "Toggle the magclaws"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
blood_overlay_type = "armor"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/nutrient,/obj/item/weapon/minihoe)
|
||||
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
//Captain
|
||||
/obj/item/clothing/suit/captunic
|
||||
name = "captain's parade tunic"
|
||||
@@ -20,6 +20,7 @@
|
||||
item_state = "bio_suit"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
/obj/item/clothing/suit/captunic/capjacket
|
||||
name = "captain's uniform jacket"
|
||||
@@ -36,6 +37,7 @@
|
||||
icon_state = "chaplain_hoodie"
|
||||
item_state = "chaplain_hoodie"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
//Chaplain
|
||||
/obj/item/clothing/suit/nun
|
||||
@@ -45,6 +47,7 @@
|
||||
item_state = "nun"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
|
||||
flags_inv = HIDESHOES|HIDEJUMPSUIT
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
//Chef
|
||||
/obj/item/clothing/suit/chef
|
||||
@@ -56,6 +59,7 @@
|
||||
permeability_coefficient = 0.50
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list (/obj/item/weapon/kitchenknife,/obj/item/weapon/butch)
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
//Chef
|
||||
/obj/item/clothing/suit/chef/classic
|
||||
@@ -76,6 +80,7 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder)
|
||||
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
/obj/item/clothing/suit/storage/det_suit/black
|
||||
icon_state = "detective2"
|
||||
@@ -110,6 +115,8 @@
|
||||
/obj/item/weapon/crowbar, /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/weapon/tank/emergency_oxygen, \
|
||||
/obj/item/clothing/mask/gas, /obj/item/taperoll/engineering)
|
||||
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
//Lawyer
|
||||
/obj/item/clothing/suit/storage/lawyer/bluejacket
|
||||
name = "Blue Suit Jacket"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
verb/toggle()
|
||||
set name = "Toggle Labcoat Buttons"
|
||||
|
||||
@@ -224,6 +224,16 @@
|
||||
icon_on = "redzippoon"
|
||||
icon_off = "redzippo"
|
||||
|
||||
////////////////////////////// Vivallion - Isaac Jachym - Butterfly Lighter ////////////
|
||||
|
||||
/obj/item/weapon/lighter/zippo/fluff/isaac_jachym
|
||||
name = "Butterfly lighter"
|
||||
desc = "A custom-made zippo lighter, looks rather expensive. On one of it's sides, a clean inscription has been made, 'Butterfly, what is your wisdom?' And I looked down at it's majestic form, flexing it's wings as if to show it's strength. 'Fuck chechenya.' Had it whispered, before fluttering away, and so we went to war."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "che_zippo"
|
||||
icon_on = "che_zippoon"
|
||||
icon_off = "che_zippo"
|
||||
|
||||
/obj/item/weapon/lighter/zippo/fluff/riley_rohtin_1 //rawrtaicho: Riley Rohtin
|
||||
name = "Riley's black zippo"
|
||||
desc = "A black zippo lighter, which holds some form of sentimental value."
|
||||
@@ -860,9 +870,9 @@
|
||||
name = "RN Uniform"
|
||||
desc = "A nurse's uniform that is dark blue and gold. It looks like it's been tailored for a short person."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "sasha_s"
|
||||
item_state = "sasha_s"
|
||||
item_color = "sasha_s"
|
||||
icon_state = "sasha"
|
||||
item_state = "sasha"
|
||||
item_color = "sasha"
|
||||
|
||||
/////// NT-SID Suit //Zuhayr: Jane Doe
|
||||
|
||||
@@ -1051,6 +1061,16 @@
|
||||
name = "duty boots"
|
||||
desc = "Eight-inch black leather boots with side zips and NT-approved safety toes."
|
||||
|
||||
////////////////////////////////////////// Vivallion - Kecer Eldraran - Toe-less Jackboots //////////////
|
||||
|
||||
/obj/item/clothing/shoes/jackboots/fluff/kecer_eldraran
|
||||
name = "Toe-less Jackboots"
|
||||
desc = "Modified pair of jackboots, particularly friendly to those species whose toes hold claws."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
item_state = "digiboots"
|
||||
icon_state = "digiboots"
|
||||
species_restricted = null
|
||||
|
||||
|
||||
//////////// Sets ////////////
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ var/list/event_last_fired = list()
|
||||
possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
|
||||
possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/electrical_storm] = 15 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Botanist"]
|
||||
possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Gardener"]
|
||||
|
||||
if(!spacevines_spawned)
|
||||
possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"]
|
||||
@@ -72,11 +72,10 @@ var/list/event_last_fired = list()
|
||||
possibleEvents[/datum/event/meteor_shower] = 20 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/blob] = 10 * active_with_role["Engineer"]
|
||||
|
||||
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 15
|
||||
if(active_with_role["Medical"] > 0)
|
||||
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 10
|
||||
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 10
|
||||
possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 20
|
||||
possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 10
|
||||
possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50
|
||||
|
||||
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
|
||||
@@ -190,7 +189,7 @@ var/list/event_last_fired = list()
|
||||
active_with_role["AI"] = 0
|
||||
active_with_role["Cyborg"] = 0
|
||||
active_with_role["Janitor"] = 0
|
||||
active_with_role["Botanist"] = 0
|
||||
active_with_role["Gardener"] = 0
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
@@ -223,7 +222,7 @@ var/list/event_last_fired = list()
|
||||
if(M.mind.assigned_role == "Janitor")
|
||||
active_with_role["Janitor"]++
|
||||
|
||||
if(M.mind.assigned_role == "Botanist")
|
||||
active_with_role["Botanist"]++
|
||||
if(M.mind.assigned_role == "Gardener")
|
||||
active_with_role["Gardener"]++
|
||||
|
||||
return active_with_role
|
||||
|
||||
@@ -13,7 +13,7 @@ datum/event/organ_failure/announce()
|
||||
datum/event/organ_failure/start()
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70)
|
||||
if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70 && G.internal_organs)
|
||||
candidates += G
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
@@ -24,8 +24,7 @@ datum/event/organ_failure/start()
|
||||
var/acute = prob(15)
|
||||
if (prob(75))
|
||||
//internal organ infection
|
||||
var/O = pick(C.internal_organs)
|
||||
var/datum/organ/internal/I = C.internal_organs[O]
|
||||
var/datum/organ/internal/I = pick(C.internal_organs)
|
||||
|
||||
if (acute)
|
||||
I.germ_level = max(INFECTION_LEVEL_TWO, I.germ_level)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
for(var/datum/playingcard/P in H.cards)
|
||||
cards += P
|
||||
del(O)
|
||||
user << "You place your cards on top of the deck."
|
||||
user << "You place your cards on the bottom of the deck."
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
set category = "Object"
|
||||
set name = "Draw"
|
||||
set desc = "Draw a card from a deck."
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat || !Adjacent(usr)) return
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
#define MAX_DEEP_COUNT 300
|
||||
#define ITERATE_BEFORE_FAIL 200
|
||||
|
||||
#define RESOURCE_HIGH_MAX 8
|
||||
#define RESOURCE_HIGH_MIN 5
|
||||
#define RESOURCE_MID_MAX 4
|
||||
#define RESOURCE_MID_MIN 2
|
||||
#define RESOURCE_HIGH_MAX 4
|
||||
#define RESOURCE_HIGH_MIN 2
|
||||
#define RESOURCE_MID_MAX 3
|
||||
#define RESOURCE_MID_MIN 1
|
||||
#define RESOURCE_LOW_MAX 1
|
||||
#define RESOURCE_LOW_MIN 0
|
||||
|
||||
@@ -52,10 +52,6 @@ Deep minerals:
|
||||
var/random_variance_chance = 25
|
||||
var/random_element = 0.5
|
||||
|
||||
//Called by the drilling rigs each process().
|
||||
/datum/ore_distribution/proc/get_ore(var/x,var/y)
|
||||
return "Nope."
|
||||
|
||||
/datum/ore_distribution/proc/map_is_sane()
|
||||
if(!map) return 0
|
||||
|
||||
@@ -79,12 +75,13 @@ Deep minerals:
|
||||
//Halfassed diamond-square algorithm with some fuckery since it's a single dimension array.
|
||||
/datum/ore_distribution/proc/populate_distribution_map()
|
||||
|
||||
//Seed beginning values.
|
||||
//Announce it!
|
||||
world << "<b><font color='red'>Generating resource distribution map.</b></font>"
|
||||
|
||||
//Seed beginning values.
|
||||
var/x = 1
|
||||
var/y = 1
|
||||
var/size = real_size-1
|
||||
|
||||
map[MAP_TOP_LEFT] = (range/3)+rand(range/5)
|
||||
map[MAP_TOP_RIGHT] = (range/3)+rand(range/5)
|
||||
map[MAP_BOTTOM_LEFT] = (range/3)+rand(range/5)
|
||||
@@ -109,6 +106,14 @@ Deep minerals:
|
||||
for(var/y = 1, y <= real_size, y++)
|
||||
map[MAP_CELL] = 0
|
||||
|
||||
/datum/ore_distribution/proc/print_distribution_map()
|
||||
var/line = ""
|
||||
for(var/x = 1, x <= real_size, x++)
|
||||
for(var/y = 1, y <= real_size, y++)
|
||||
line += num2text(round(map[MAP_CELL]/25.5))
|
||||
world << line
|
||||
line = ""
|
||||
|
||||
/datum/ore_distribution/proc/generate_distribution_map(var/x,var/y,var/input_size)
|
||||
|
||||
var/size = input_size
|
||||
@@ -131,11 +136,16 @@ Deep minerals:
|
||||
|
||||
/datum/ore_distribution/proc/apply_to_asteroid()
|
||||
|
||||
var/origin_x = 13
|
||||
var/origin_y = 32
|
||||
var/limit_x = 217
|
||||
var/limit_y = 223
|
||||
var/asteroid_z = 5
|
||||
// THESE VALUES DETERMINE THE AREA THAT THE DISTRIBUTION MAP IS APPLIED TO.
|
||||
// IF YOU DO NOT RUN OFFICIAL BAYCODE ASTEROID MAP YOU NEED TO CHANGE THEM.
|
||||
// ORIGIN IS THE BOTTOM LEFT CORNER OF THE SQUARE CONTAINING ALL ASTEROID
|
||||
// TILES YOU WISH TO APPLY THE DISTRIBUTION MAP TO.
|
||||
|
||||
var/origin_x = 13 //We start here...
|
||||
var/origin_y = 32 //...and here...
|
||||
var/limit_x = 217 //...and iterate until here...
|
||||
var/limit_y = 223 //...and here...
|
||||
var/asteroid_z = 5 //...on this Z-level.
|
||||
|
||||
var/tx = origin_x
|
||||
var/ty = origin_y
|
||||
@@ -155,71 +165,47 @@ Deep minerals:
|
||||
|
||||
target_turf = locate(tx+j, ty+i, asteroid_z)
|
||||
|
||||
if(target_turf.has_resources)
|
||||
if(target_turf && target_turf.has_resources)
|
||||
|
||||
var/printcolor
|
||||
if(map[MAP_CELL] > (range*0.60))
|
||||
printcolor = "#FF0000"
|
||||
else if(map[MAP_CELL] > (range*0.40))
|
||||
printcolor = "#00FF00"
|
||||
else
|
||||
printcolor = "#0000FF"
|
||||
target_turf.color = "#[printcolor]"
|
||||
target_turf.resources = list()
|
||||
target_turf.resources["silicates"] = rand(3,5)
|
||||
target_turf.resources["carbonaceous rock"] = rand(3,5)
|
||||
|
||||
target_turf.resources["silicates"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
target_turf.resources["carbonaceous rock"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
|
||||
if(map[MAP_CELL] > (range*0.60))
|
||||
target_turf.resources["iron"] = 0
|
||||
target_turf.resources["gold"] = 0
|
||||
target_turf.resources["silver"] = 0
|
||||
target_turf.resources["uranium"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
target_turf.resources["diamond"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
target_turf.resources["phoron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["osmium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["hydrogen"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
else if(map[MAP_CELL] > (range*0.40))
|
||||
target_turf.resources["iron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["gold"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["silver"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["uranium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["diamond"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["phoron"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["osmium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["hydrogen"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
else
|
||||
target_turf.resources["iron"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["gold"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["silver"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["diamond"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["phoron"] = 0
|
||||
target_turf.resources["osmium"] = 0
|
||||
target_turf.resources["hydrogen"] = 0
|
||||
switch(map[MAP_CELL])
|
||||
if(0 to 100)
|
||||
target_turf.resources["iron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
target_turf.resources["gold"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["silver"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["diamond"] = 0
|
||||
target_turf.resources["phoron"] = 0
|
||||
target_turf.resources["osmium"] = 0
|
||||
target_turf.resources["hydrogen"] = 0
|
||||
if(100 to 124)
|
||||
target_turf.resources["iron"] = 0
|
||||
target_turf.resources["gold"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["silver"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["uranium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["diamond"] = 0
|
||||
target_turf.resources["phoron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["osmium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
target_turf.resources["hydrogen"] = 0
|
||||
if(125 to 255)
|
||||
target_turf.resources["iron"] = 0
|
||||
target_turf.resources["gold"] = 0
|
||||
target_turf.resources["silver"] = 0
|
||||
target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["diamond"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
|
||||
target_turf.resources["phoron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
target_turf.resources["osmium"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
target_turf.resources["hydrogen"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
|
||||
|
||||
tx += chunk_size
|
||||
tx = origin_x
|
||||
ty += chunk_size
|
||||
|
||||
/datum/ore_distribution/proc/print_map()
|
||||
world << "---"
|
||||
var/string = ""
|
||||
for(var/y = 1, y <= real_size, y++)
|
||||
for(var/x = 1, x <= real_size, x++)
|
||||
|
||||
var/printcolor
|
||||
if(map[MAP_CELL] > (range*0.60))
|
||||
printcolor = "#FF0000"
|
||||
else if(map[MAP_CELL] > (range*0.40))
|
||||
printcolor = "#00FF00"
|
||||
else
|
||||
printcolor = "#0000FF"
|
||||
string += "<font color='[printcolor]'>#</font>"
|
||||
|
||||
world << string
|
||||
string = ""
|
||||
world << "---"
|
||||
world << "<b><font color='red'>Resource map generation complete.</font></b>"
|
||||
return
|
||||
|
||||
#undef MAP_CELL
|
||||
#undef MAP_CENTRE
|
||||
@@ -245,4 +231,4 @@ Deep minerals:
|
||||
#undef RESOURCE_MID_MAX
|
||||
#undef RESOURCE_MID_MIN
|
||||
#undef RESOURCE_LOW_MAX
|
||||
#undef RESOURCE_LOW_MIN
|
||||
#undef RESOURCE_LOW_MIN
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
for(var/metal in ore_types)
|
||||
|
||||
if(contents.len >= get_storage_capacity())
|
||||
system_error("insufficient storage space")
|
||||
active = 0
|
||||
need_player_check = 1
|
||||
update_icon()
|
||||
@@ -264,13 +265,13 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_harvest_capacity()
|
||||
return 3 * (cutter ? cutter.rating : 0)
|
||||
return (cutter ? cutter.rating : 0)
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_storage_capacity()
|
||||
return 100 * (storage ? storage.rating : 0)
|
||||
return 200 * (storage ? storage.rating : 0)
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_charge_use()
|
||||
return 100 - (20 * (cellmount ? cellmount.rating : 0))
|
||||
return 50 - (10 * (cellmount ? cellmount.rating : 0))
|
||||
|
||||
/obj/machinery/mining/drill/proc/get_resource_field()
|
||||
|
||||
@@ -345,6 +346,11 @@
|
||||
/obj/machinery/mining/brace/proc/connect()
|
||||
|
||||
var/turf/T = get_step(get_turf(src), src.dir)
|
||||
|
||||
if(!T.has_resources)
|
||||
src.visible_message("\red The terrain near the brace is unsuitable!")
|
||||
return
|
||||
|
||||
for(var/thing in T.contents)
|
||||
if(istype(thing,/obj/machinery/mining/drill))
|
||||
connected = thing
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/obj/item/weapon/mining_scanner
|
||||
name = "ore detector"
|
||||
desc = "A complex device used to locate ore deep underground."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "forensic0-old" //GET A BETTER SPRITE.
|
||||
item_state = "electronic"
|
||||
matter = list("metal" = 150)
|
||||
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
|
||||
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
||||
|
||||
user << "You begin sweeping \the [src] about, scanning for metal deposits."
|
||||
|
||||
if(!do_after(user,50)) return
|
||||
|
||||
if(!user || !src) return
|
||||
|
||||
var/list/metals = list(
|
||||
"surface minerals" = 0,
|
||||
"precious metals" = 0,
|
||||
"nuclear fuel" = 0,
|
||||
"exotic matter" = 0
|
||||
)
|
||||
|
||||
for(var/turf/T in oview(3,get_turf(user)))
|
||||
|
||||
if(!T.has_resources)
|
||||
continue
|
||||
|
||||
for(var/metal in T.resources)
|
||||
|
||||
var/ore_type
|
||||
|
||||
switch(metal)
|
||||
if("silicates" || "carbonaceous rock" || "iron") ore_type = "surface minerals"
|
||||
if("gold" || "silver" || "diamond") ore_type = "precious metals"
|
||||
if("uranium") ore_type = "nuclear fuel"
|
||||
if("phoron" || "osmium" || "hydrogen") ore_type = "exotic matter"
|
||||
|
||||
if(ore_type) metals[ore_type] += T.resources[metal]
|
||||
|
||||
user << "\icon[src] \blue The scanner beeps and displays a readout."
|
||||
|
||||
for(var/ore_type in metals)
|
||||
|
||||
var/result = "no sign"
|
||||
|
||||
switch(metals[ore_type])
|
||||
if(1 to 50) result = "trace amounts"
|
||||
if(51 to 150) result = "significant amounts"
|
||||
if(151 to INFINITY) result = "huge quantities"
|
||||
|
||||
user << "- [result] of [ore_type]."
|
||||
@@ -216,10 +216,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
/mob/dead/observer/verb/reenter_corpse()
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// At minimum every mob has a hear_say proc.
|
||||
|
||||
/mob/proc/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "",var/italics = 0, var/mob/speaker = null)
|
||||
/mob/proc/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "",var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
if(!client)
|
||||
return
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
return
|
||||
|
||||
var/style = "body"
|
||||
|
||||
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
|
||||
if (language && (language.flags & NONVERBAL))
|
||||
if (!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src)))
|
||||
message = stars(message)
|
||||
|
||||
if(!say_understands(speaker,language))
|
||||
if(istype(speaker,/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/S = speaker
|
||||
@@ -44,6 +50,9 @@
|
||||
src << "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear \him."
|
||||
else
|
||||
src << "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][verb], <span class='message'><span class='[style]'>\"[message]\"</span></span></span>"
|
||||
if (speech_sound)
|
||||
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
|
||||
src.playsound_local(source, speech_sound, sound_vol, 1)
|
||||
|
||||
|
||||
/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="")
|
||||
@@ -59,6 +68,11 @@
|
||||
|
||||
var/style = "body"
|
||||
|
||||
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
|
||||
if (language && (language.flags & NONVERBAL))
|
||||
if (!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src)))
|
||||
message = stars(message)
|
||||
|
||||
if(!say_understands(speaker,language))
|
||||
if(istype(speaker,/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/S = speaker
|
||||
@@ -142,6 +156,22 @@
|
||||
else
|
||||
src << "[part_a][speaker_name][part_b][verb], <span class=\"[style]\">\"[message]\"</span></span></span>"
|
||||
|
||||
/mob/proc/hear_signlang(var/message, var/verb = "gestures", var/datum/language/language, var/mob/speaker = null)
|
||||
if(!client)
|
||||
return
|
||||
|
||||
if(say_understands(speaker, language))
|
||||
message = "<B>[src]</B> [verb], \"[message]\""
|
||||
else
|
||||
message = "<B>[src]</B> [verb]."
|
||||
|
||||
if(src.status_flags & PASSEMOTES)
|
||||
for(var/obj/item/weapon/holder/H in src.contents)
|
||||
H.show_message(message)
|
||||
for(var/mob/living/M in src.contents)
|
||||
M.show_message(message)
|
||||
src.show_message(message)
|
||||
|
||||
/mob/proc/hear_sleep(var/message)
|
||||
var/heard = ""
|
||||
if(prob(15))
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
desc = "You shouldn't ever see this."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
slot_flags = SLOT_HEAD
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi')
|
||||
|
||||
/obj/item/weapon/holder/New()
|
||||
..()
|
||||
@@ -34,6 +35,22 @@
|
||||
for(var/mob/living/M in contents)
|
||||
M.show_message(message,m_type)
|
||||
|
||||
//Mob procs and vars for scooping up
|
||||
/mob/living/var/holder_type
|
||||
|
||||
/mob/living/proc/get_scooped(var/mob/living/carbon/grabber)
|
||||
if(!holder_type)
|
||||
return
|
||||
var/obj/item/weapon/holder/H = new holder_type(loc)
|
||||
src.loc = H
|
||||
H.name = loc.name
|
||||
H.attack_hand(grabber)
|
||||
|
||||
grabber << "You scoop up [src]."
|
||||
src << "[grabber] scoops you up."
|
||||
grabber.status_flags |= PASSEMOTES
|
||||
return
|
||||
|
||||
//Mob specific holders.
|
||||
|
||||
/obj/item/weapon/holder/diona
|
||||
@@ -48,4 +65,12 @@
|
||||
name = "maintenance drone"
|
||||
desc = "It's a small maintenance robot."
|
||||
icon_state = "drone"
|
||||
origin_tech = "magnets=3;engineering=5"
|
||||
origin_tech = "magnets=3;engineering=5"
|
||||
|
||||
|
||||
/obj/item/weapon/holder/cat
|
||||
|
||||
name = "cat"
|
||||
desc = "It's a cat. Meow."
|
||||
icon_state = "cat"
|
||||
origin_tech = null
|
||||
@@ -6,6 +6,7 @@
|
||||
var/name = "an unknown language" // Fluff name of language if any.
|
||||
var/desc = "A language." // Short description for 'Check Languages'.
|
||||
var/speech_verb = "says" // 'says', 'hisses', 'farts'.
|
||||
var/signlang_verb = list() // list of emotes that might be displayed if this language has NONVERBAL or SIGNLANG flags
|
||||
var/colour = "body" // CSS style to use for strings in this language.
|
||||
var/key = "x" // Character used to speak in language eg. :o for Unathi.
|
||||
var/flags = 0 // Various language flags.
|
||||
@@ -33,6 +34,10 @@
|
||||
speech_verb = "mrowls"
|
||||
colour = "tajaran_signlang"
|
||||
key = "y" //only "dfpqxyz" left.
|
||||
|
||||
//need to find a way to resolve possesive macros
|
||||
signlang_verb = list("flicks their left ear", "flicks their right ear", "swivels their ears", "twitches their tail", "curls the end of their tail", "arches their tail", "wiggles the end of their tail", "waves their tail about", "holds up a claw", "gestures with their left hand", "gestures with their right hand", "gestures with their tail", "gestures with their ears")
|
||||
|
||||
flags = WHITELISTED | NONVERBAL
|
||||
|
||||
/datum/language/skrell
|
||||
|
||||
@@ -159,10 +159,9 @@
|
||||
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
|
||||
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
/mob/living/carbon/alien/Stun(amount)
|
||||
if(status_flags & CANSTUN)
|
||||
|
||||
@@ -72,7 +72,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
Die()
|
||||
return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
..()
|
||||
|
||||
// Increase germ_level regularly
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(80)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/Move(NewLoc, direct)
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
if(display_gloves)
|
||||
msg += "<span class='warning'><b>[src] has blood running from under [t_his] gloves!</b></span>\n"
|
||||
|
||||
for(var/implant in get_visible_implants(1))
|
||||
for(var/implant in get_visible_implants(0))
|
||||
msg += "<span class='warning'><b>[src] has \a [implant] sticking out of [t_his] flesh!</span>\n"
|
||||
if(digitalcamo)
|
||||
msg += "[t_He] [t_is] repulsively uncanny!\n"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
if(!species)
|
||||
if(new_species)
|
||||
set_species(new_species)
|
||||
set_species(new_species,null,1)
|
||||
else
|
||||
set_species()
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
return
|
||||
|
||||
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
|
||||
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && !tmob.buckled && canmove) // mutual brohugs all around!
|
||||
var/turf/oldloc = loc
|
||||
loc = tmob.loc
|
||||
tmob.loc = oldloc
|
||||
@@ -171,10 +171,9 @@
|
||||
if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
if (client.statpanel == "Status")
|
||||
if (internal)
|
||||
@@ -1087,8 +1086,7 @@
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
del(H)
|
||||
|
||||
for(var/E in internal_organs)
|
||||
var/datum/organ/internal/I = internal_organs[E]
|
||||
for(var/datum/organ/internal/I in internal_organs)
|
||||
I.damage = 0
|
||||
|
||||
for (var/datum/disease/virus in viruses)
|
||||
@@ -1100,11 +1098,11 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/is_lung_ruptured()
|
||||
var/datum/organ/internal/lungs/L = internal_organs["lungs"]
|
||||
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
|
||||
return L.is_bruised()
|
||||
|
||||
/mob/living/carbon/human/proc/rupture_lung()
|
||||
var/datum/organ/internal/lungs/L = internal_organs["lungs"]
|
||||
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
|
||||
|
||||
if(!L.is_bruised())
|
||||
src.custom_pain("You feel a stabbing pain in your chest!", 1)
|
||||
@@ -1167,7 +1165,7 @@
|
||||
var/list/visible_implants = list()
|
||||
for(var/datum/organ/external/organ in src.organs)
|
||||
for(var/obj/item/weapon/O in organ.implants)
|
||||
if(!istype(O,/obj/item/weapon/implant) && O.w_class > class)
|
||||
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/shard/shrapnel))
|
||||
visible_implants += O
|
||||
|
||||
return(visible_implants)
|
||||
@@ -1227,7 +1225,7 @@
|
||||
else
|
||||
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
|
||||
|
||||
/mob/living/carbon/human/proc/set_species(var/new_species, var/force_organs)
|
||||
/mob/living/carbon/human/proc/set_species(var/new_species, var/force_organs, var/default_colour)
|
||||
|
||||
if(!dna)
|
||||
if(!new_species)
|
||||
@@ -1252,11 +1250,22 @@
|
||||
if(species.language)
|
||||
add_language(species.language)
|
||||
|
||||
if(species.base_color && default_colour)
|
||||
//Apply colour.
|
||||
r_skin = hex2num(copytext(species.base_color,2,4))
|
||||
g_skin = hex2num(copytext(species.base_color,4,6))
|
||||
b_skin = hex2num(copytext(species.base_color,6,8))
|
||||
else
|
||||
r_skin = 0
|
||||
g_skin = 0
|
||||
b_skin = 0
|
||||
|
||||
species.handle_post_spawn(src)
|
||||
|
||||
spawn(0)
|
||||
update_icons()
|
||||
|
||||
if(species)
|
||||
species.handle_post_spawn(src)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -1347,7 +1356,7 @@
|
||||
if(last_special > world.time)
|
||||
return
|
||||
|
||||
if(stat || paralysis || stunned || weakened || lying)
|
||||
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
|
||||
src << "You cannot leap in your current state."
|
||||
return
|
||||
|
||||
@@ -1357,13 +1366,20 @@
|
||||
choices += M
|
||||
choices -= src
|
||||
|
||||
var/mob/living/T = input(src,"Who do you wish to leap at?") in null|choices
|
||||
var/mob/living/T = input(src,"Who do you wish to leap at?") as null|anything in choices
|
||||
|
||||
if(!T || !src || src.stat) return
|
||||
|
||||
if(get_dist(get_turf(T), get_turf(src)) > 6) return
|
||||
|
||||
last_special = world.time + 100
|
||||
if(last_special > world.time)
|
||||
return
|
||||
|
||||
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
|
||||
src << "You cannot leap in your current state."
|
||||
return
|
||||
|
||||
last_special = world.time + 75
|
||||
status_flags |= LEAPING
|
||||
|
||||
src.visible_message("<span class='warning'><b>\The [src]</b> leaps at [T]!</span>")
|
||||
@@ -1380,6 +1396,11 @@
|
||||
|
||||
T.Weaken(5)
|
||||
|
||||
//Only official raider vox get the grab and no self-prone."
|
||||
if(src.mind && src.mind.special_role != "Vox Raider")
|
||||
src.Weaken(5)
|
||||
return
|
||||
|
||||
var/use_hand = "left"
|
||||
if(l_hand)
|
||||
if(r_hand)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/mob/living/carbon/human/getBrainLoss()
|
||||
var/res = brainloss
|
||||
var/datum/organ/internal/brain/sponge = internal_organs["brain"]
|
||||
var/datum/organ/internal/brain/sponge = internal_organs_by_name["brain"]
|
||||
if (sponge.is_bruised())
|
||||
res += 20
|
||||
if (sponge.is_broken())
|
||||
@@ -65,13 +65,13 @@
|
||||
|
||||
if (organ_name in organs_by_name)
|
||||
var/datum/organ/external/O = get_organ(organ_name)
|
||||
|
||||
|
||||
if(amount > 0)
|
||||
O.take_damage(amount, 0, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
|
||||
else
|
||||
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
|
||||
O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
|
||||
|
||||
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
|
||||
/mob/living/carbon/human/proc/adjustFireLossByPart(var/amount, var/organ_name, var/obj/damage_source = null)
|
||||
@@ -80,13 +80,13 @@
|
||||
|
||||
if (organ_name in organs_by_name)
|
||||
var/datum/organ/external/O = get_organ(organ_name)
|
||||
|
||||
|
||||
if(amount > 0)
|
||||
O.take_damage(0, amount, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
|
||||
else
|
||||
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
|
||||
O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
|
||||
|
||||
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
|
||||
/mob/living/carbon/human/Stun(amount)
|
||||
@@ -297,19 +297,17 @@ This function restores all organs.
|
||||
updatehealth()
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
|
||||
//Embedded projectile code.
|
||||
//Embedded object code.
|
||||
if(!organ) return
|
||||
if(istype(used_weapon,/obj/item/weapon))
|
||||
var/obj/item/weapon/W = used_weapon //Sharp objects will always embed if they do enough damage.
|
||||
if( (damage > (10*W.w_class)) && ( (sharp && !ismob(W.loc)) || prob(damage/W.w_class) ) )
|
||||
organ.implants += W
|
||||
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
embedded_flag = 1
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
W.add_blood(src)
|
||||
if(ismob(W.loc))
|
||||
var/mob/living/H = W.loc
|
||||
H.drop_item()
|
||||
W.loc = src
|
||||
if(istype(used_weapon,/obj/item))
|
||||
var/obj/item/W = used_weapon
|
||||
if (!W.is_robot_module())
|
||||
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
||||
var/embed_chance = sharp? damage/W.w_class : damage/(W.w_class*3)
|
||||
var/embed_threshold = sharp? 5*W.w_class : 15*W.w_class
|
||||
|
||||
//Sharp objects will always embed if they do enough damage.
|
||||
if((sharp && damage > (10*W.w_class)) || (sharp && !ismob(W.loc)) || (damage > embed_threshold && prob(embed_chance)))
|
||||
organ.embed(W)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -98,11 +98,7 @@ emp_act
|
||||
(SP.name) = "[P.name] shrapnel"
|
||||
(SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
|
||||
(SP.loc) = organ
|
||||
organ.implants += SP
|
||||
visible_message("<span class='danger'>The projectile sticks in the wound!</span>")
|
||||
embedded_flag = 1
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
SP.add_blood(src)
|
||||
organ.embed(SP)
|
||||
|
||||
return (..(P , def_zone))
|
||||
|
||||
@@ -236,11 +232,11 @@ emp_act
|
||||
if ((weapon_sharp || weapon_edge) && prob(getarmor(def_zone, "melee")))
|
||||
weapon_sharp = 0
|
||||
weapon_edge = 0
|
||||
|
||||
|
||||
if(armor >= 2) return 0
|
||||
if(!I.force) return 0
|
||||
|
||||
apply_damage(I.force, I.damtype, affecting, armor , sharp=weapon_sharp, edge=weapon_edge, I)
|
||||
apply_damage(I.force, I.damtype, affecting, armor, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
|
||||
|
||||
var/bloody = 0
|
||||
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + (I.force * 2)))
|
||||
@@ -312,6 +308,6 @@ emp_act
|
||||
if(damtype != BURN && damtype != BRUTE) return
|
||||
|
||||
var/obj/item/clothing/suit/space/SS = wear_suit
|
||||
var/penetrated_dam = max(0,(damage - max(0,(SS.breach_threshold - SS.damage))))
|
||||
var/penetrated_dam = max(0,(damage - SS.breach_threshold)) // - SS.damage)) - Consider uncommenting this if suits seem too hardy on dev.
|
||||
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
else if(E.status & ORGAN_BROKEN)
|
||||
tally += 1.5
|
||||
|
||||
if(pulledby && istype(pulledby, /obj/structure/stool/bed/chair/wheelchair))
|
||||
if(buckled && istype(buckled, /obj/structure/stool/bed/chair/wheelchair))
|
||||
for(var/organ_name in list("l_hand","r_hand","l_arm","r_arm"))
|
||||
var/datum/organ/external/E = get_organ(organ_name)
|
||||
if(!E || (E.status & ORGAN_DESTROYED))
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
head = null
|
||||
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
|
||||
update_hair(0) //rebuild hair
|
||||
update_inv_ears(0)
|
||||
success = 1
|
||||
update_inv_head()
|
||||
else if (W == l_ear)
|
||||
@@ -133,6 +134,7 @@
|
||||
success = 1
|
||||
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR))
|
||||
update_hair(0) //rebuild hair
|
||||
update_inv_ears(0)
|
||||
if(internal)
|
||||
if(internals)
|
||||
internals.icon_state = "internal0"
|
||||
@@ -214,6 +216,7 @@
|
||||
src.wear_mask = W
|
||||
if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR))
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
update_inv_ears(0)
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
@@ -269,6 +272,7 @@
|
||||
src.head = W
|
||||
if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR))
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
update_inv_ears(0)
|
||||
if(istype(W,/obj/item/clothing/head/kitty))
|
||||
W.update_icon(src)
|
||||
W.equipped(src, slot)
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
//Much like get_heat_protection(), this returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
/mob/living/carbon/human/proc/get_pressure_protection()
|
||||
var/pressure_adjustment_coefficient = 1 //Determins how much the clothing you are wearing protects you in percent.
|
||||
|
||||
|
||||
if(head && (head.flags & STOPSPRESSUREDMAGE))
|
||||
pressure_adjustment_coefficient -= PRESSURE_HEAD_REDUCTION_COEFFICIENT
|
||||
|
||||
@@ -145,9 +145,9 @@
|
||||
if(S.can_breach && S.damage)
|
||||
var/pressure_loss = S.damage * 0.1
|
||||
pressure_adjustment_coefficient += pressure_loss
|
||||
|
||||
|
||||
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) //So it isn't less than 0 or larger than 1.
|
||||
|
||||
|
||||
return 1 - pressure_adjustment_coefficient //want 0 to be bad protection, 1 to be good protection
|
||||
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
|
||||
@@ -261,9 +261,11 @@
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
if(!(species.flags & RAD_ABSORB))
|
||||
Weaken(10)
|
||||
if(!lying)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
@@ -296,8 +298,9 @@
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
if(!lying)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
@@ -464,7 +467,7 @@
|
||||
var/exhaling
|
||||
var/poison
|
||||
var/no_exhale
|
||||
|
||||
|
||||
var/failed_inhale = 0
|
||||
var/failed_exhale = 0
|
||||
|
||||
@@ -555,30 +558,30 @@
|
||||
if (!co2_alert|| prob(15))
|
||||
var/word = pick("extremely dizzy","short of breath","faint","confused")
|
||||
src << "\red <b>You feel [word].</b>"
|
||||
|
||||
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
co2_alert = 1
|
||||
failed_exhale = 1
|
||||
|
||||
|
||||
else if(exhaled_pp > safe_exhaled_max * 0.7)
|
||||
if (!co2_alert || prob(1))
|
||||
var/word = pick("dizzy","short of breath","faint","momentarily confused")
|
||||
src << "\red You feel [word]."
|
||||
|
||||
|
||||
//scale linearly from 0 to 1 between safe_exhaled_max and safe_exhaled_max*0.7
|
||||
var/ratio = 1.0 - (safe_exhaled_max - exhaled_pp)/(safe_exhaled_max*0.3)
|
||||
|
||||
|
||||
//give them some oxyloss, up to the limit - we don't want people falling unconcious due to CO2 alone until they're pretty close to safe_exhaled_max.
|
||||
if (getOxyLoss() < 50*ratio)
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
co2_alert = 1
|
||||
failed_exhale = 1
|
||||
|
||||
|
||||
else if(exhaled_pp > safe_exhaled_max * 0.6)
|
||||
if (prob(0.3))
|
||||
var/word = pick("a little dizzy","short of breath")
|
||||
src << "\red You feel [word]."
|
||||
|
||||
|
||||
else
|
||||
co2_alert = 0
|
||||
|
||||
@@ -611,16 +614,16 @@
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
SA.moles = 0
|
||||
|
||||
|
||||
// Were we able to breathe?
|
||||
if (failed_inhale || failed_exhale)
|
||||
failed_last_breath = 1
|
||||
else
|
||||
failed_last_breath = 0
|
||||
adjustOxyLoss(-5)
|
||||
|
||||
|
||||
// Hot air hurts :(
|
||||
if( (breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
|
||||
if( (breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
|
||||
|
||||
if(status_flags & GODMODE)
|
||||
return 1
|
||||
@@ -651,17 +654,17 @@
|
||||
if(species.heat_level_3 to INFINITY)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
|
||||
//breathing in hot/cold air also heats/cools you a bit
|
||||
var/temp_adj = breath.temperature - bodytemperature
|
||||
if (temp_adj < 0)
|
||||
temp_adj /= (BODYTEMP_COLD_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
|
||||
else
|
||||
temp_adj /= (BODYTEMP_HEAT_DIVISOR * 5) //don't raise temperature as much as if we were directly exposed
|
||||
|
||||
|
||||
var/relative_density = breath.total_moles() / (MOLES_CELLSTANDARD * BREATH_PERCENTAGE)
|
||||
temp_adj *= relative_density
|
||||
|
||||
|
||||
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
|
||||
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
|
||||
//world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]"
|
||||
@@ -699,11 +702,11 @@
|
||||
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
||||
|
||||
|
||||
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
|
||||
var/relative_density = environment.total_moles() / MOLES_CELLSTANDARD
|
||||
temp_adj *= relative_density
|
||||
|
||||
|
||||
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
|
||||
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
|
||||
//world << "Environment: [loc_temp], [src]: [bodytemperature], Adjusting: [temp_adj]"
|
||||
@@ -783,22 +786,17 @@
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
*/
|
||||
|
||||
|
||||
proc/stabilize_body_temperature()
|
||||
//TODO find a better place to put this
|
||||
if (s_store && istype(s_store, /obj/item/device/suit_cooling_unit))
|
||||
var/obj/item/device/suit_cooling_unit/CU = s_store
|
||||
CU.cool_mob(src)
|
||||
|
||||
if (species.flags & IS_SYNTHETIC)
|
||||
bodytemperature += species.synth_temp_gain //that CPU/posibrain just keeps putting out heat.
|
||||
bodytemperature += species.synth_temp_gain //just keep putting out heat.
|
||||
return
|
||||
|
||||
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
|
||||
|
||||
if (abs(body_temperature_difference) < 0.5)
|
||||
return //fuck this precision
|
||||
|
||||
|
||||
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
|
||||
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
|
||||
nutrition -= 2
|
||||
@@ -996,19 +994,18 @@
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
|
||||
var/alien = 0 //Not the best way to handle it, but neater than checking this for every single reagent proc.
|
||||
if(species && species.name == "Diona")
|
||||
alien = 1
|
||||
else if(species && species.name == "Vox")
|
||||
alien = 2
|
||||
var/alien = 0
|
||||
if(species && species.reagent_tag)
|
||||
alien = species.reagent_tag
|
||||
reagents.metabolize(src,alien)
|
||||
|
||||
var/total_phoronloss = 0
|
||||
for(var/obj/item/I in src)
|
||||
if(I.contaminated)
|
||||
total_phoronloss += vsc.plc.CONTAMINATION_LOSS
|
||||
var/total_phoronloss = 0
|
||||
for(var/obj/item/I in src)
|
||||
if(I.contaminated)
|
||||
total_phoronloss += vsc.plc.CONTAMINATION_LOSS
|
||||
if(!(status_flags & GODMODE)) adjustToxLoss(total_phoronloss)
|
||||
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
adjustToxLoss(total_phoronloss)
|
||||
|
||||
if(species.flags & REQUIRE_LIGHT)
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
@@ -1478,7 +1475,7 @@
|
||||
var/temp_step
|
||||
if (bodytemperature >= species.body_temperature)
|
||||
temp_step = (species.heat_level_1 - species.body_temperature)/4
|
||||
|
||||
|
||||
if (bodytemperature >= species.heat_level_1)
|
||||
bodytemp.icon_state = "temp4"
|
||||
else if (bodytemperature >= species.body_temperature + temp_step*3)
|
||||
@@ -1489,10 +1486,10 @@
|
||||
bodytemp.icon_state = "temp1"
|
||||
else
|
||||
bodytemp.icon_state = "temp0"
|
||||
|
||||
|
||||
else if (bodytemperature < species.body_temperature)
|
||||
temp_step = (species.body_temperature - species.cold_level_1)/4
|
||||
|
||||
|
||||
if (bodytemperature <= species.cold_level_1)
|
||||
bodytemp.icon_state = "temp-4"
|
||||
else if (bodytemperature <= species.body_temperature - temp_step*3)
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
if(stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) //Todo: Add this to speech_problem_flag checks.
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle) && message_mode != "changeling") //Todo: Add this to speech_problem_flag checks.
|
||||
return
|
||||
|
||||
if(copytext(message,1,2) == "*")
|
||||
@@ -22,22 +24,21 @@
|
||||
|
||||
if(name != GetVoice())
|
||||
alt_name = "(as [get_id_name("Unknown")])"
|
||||
|
||||
|
||||
//parse the radio code and consume it
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
if (message_mode)
|
||||
if (message_mode == "headset")
|
||||
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
|
||||
else
|
||||
message = copytext(message,3)
|
||||
|
||||
|
||||
//parse the language code and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if (speaking)
|
||||
verb = speaking.speech_verb
|
||||
message = copytext(message,3)
|
||||
|
||||
message = capitalize(trim(message))
|
||||
|
||||
message = capitalize(trim(message))
|
||||
|
||||
if(speech_problem_flag)
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
@@ -122,22 +123,13 @@
|
||||
r_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += r_ear
|
||||
|
||||
|
||||
if(used_radios.len)
|
||||
italics = 1
|
||||
message_range = 1
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < SAY_MINIMUM_PRESSURE)
|
||||
italics = 1
|
||||
message_range =1
|
||||
|
||||
var/sound/speech_sound
|
||||
var/sound_vol
|
||||
if((species.name == "Vox" || species.name == "Vox Armalis") && prob(20))
|
||||
playsound(src.loc, 'sound/voice/shriek1.ogg', 50, 1)
|
||||
speech_sound = sound('sound/voice/shriek1.ogg')
|
||||
sound_vol = 50
|
||||
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios, speech_sound, sound_vol) //ohgod we should really be passing a datum here.
|
||||
|
||||
/mob/living/carbon/human/say_understands(var/mob/other,var/datum/language/speaking = null)
|
||||
|
||||
@@ -155,7 +147,7 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
return 1
|
||||
|
||||
|
||||
//This is already covered by mob/say_understands()
|
||||
//if (istype(other, /mob/living/simple_animal))
|
||||
// if((other.universal_speak && !speaking) || src.universal_speak || src.universal_understand)
|
||||
@@ -189,29 +181,29 @@
|
||||
/mob/living/carbon/human/proc/GetSpecialVoice()
|
||||
return special_voice
|
||||
|
||||
|
||||
/*
|
||||
***Deprecated***
|
||||
let this be handled at the hear_say or hear_radio proc
|
||||
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
|
||||
robot_talk() proc.
|
||||
There is no language handling build into it however there is at the /mob level so we accept the call
|
||||
for it but just ignore it.
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null)
|
||||
var/verb = "says"
|
||||
var/ending = copytext(message, length(message))
|
||||
if(ending=="!")
|
||||
verb=pick("exclaims","shouts","yells")
|
||||
else if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
return verb
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
***Deprecated***
|
||||
let this be handled at the hear_say or hear_radio proc
|
||||
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
|
||||
robot_talk() proc.
|
||||
There is no language handling build into it however there is at the /mob level so we accept the call
|
||||
for it but just ignore it.
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null)
|
||||
var/verb = "says"
|
||||
var/ending = copytext(message, length(message))
|
||||
if(ending=="!")
|
||||
verb=pick("exclaims","shouts","yells")
|
||||
else if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
return verb
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
|
||||
var/list/returns[3]
|
||||
var/verb = "says"
|
||||
|
||||
@@ -113,13 +113,13 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
#define ID_LAYER 6
|
||||
#define SHOES_LAYER 7
|
||||
#define GLOVES_LAYER 8
|
||||
#define EARS_LAYER 9
|
||||
#define SUIT_LAYER 10
|
||||
#define GLASSES_LAYER 11
|
||||
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 13
|
||||
#define BACK_LAYER 14
|
||||
#define HAIR_LAYER 15 //TODO: make part of head layer?
|
||||
#define SUIT_LAYER 9
|
||||
#define GLASSES_LAYER 10
|
||||
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 12
|
||||
#define BACK_LAYER 13
|
||||
#define HAIR_LAYER 14 //TODO: make part of head layer?
|
||||
#define EARS_LAYER 15
|
||||
#define FACEMASK_LAYER 16
|
||||
#define HEAD_LAYER 17
|
||||
#define COLLAR_LAYER 18
|
||||
@@ -639,6 +639,11 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
|
||||
overlays_standing[EARS_LAYER] = null
|
||||
if( (head && (head.flags & (BLOCKHAIR | BLOCKHEADHAIR))) || (wear_mask && (wear_mask.flags & (BLOCKHAIR | BLOCKHEADHAIR))))
|
||||
if(update_icons) update_icons()
|
||||
return
|
||||
|
||||
if(l_ear || r_ear)
|
||||
if(l_ear)
|
||||
|
||||
@@ -863,9 +868,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(r_hand.icon_override)
|
||||
t_state = "[t_state]_r"
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else if(r_hand.sprite_sheets && r_hand.sprite_sheets[species.name])
|
||||
t_state = "[t_state]_r"
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
@@ -884,9 +886,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(l_hand.icon_override)
|
||||
t_state = "[t_state]_l"
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else if(l_hand.sprite_sheets && l_hand.sprite_sheets[species.name])
|
||||
t_state = "[t_state]_l"
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/ready_evolve = 0
|
||||
universal_understand = 0 // Dionaea do not need to speak to people
|
||||
universal_speak = 0 // before becoming an adult. Use *chirp.
|
||||
holder_type = /obj/item/weapon/holder/diona
|
||||
|
||||
/mob/living/carbon/monkey/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
@@ -24,14 +25,7 @@
|
||||
src.verbs -= /mob/living/carbon/monkey/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
var/obj/item/weapon/holder/diona/D = new(loc)
|
||||
src.loc = D
|
||||
D.name = loc.name
|
||||
D.attack_hand(M)
|
||||
M << "You scoop up [src]."
|
||||
src << "[M] scoops you up."
|
||||
M.status_flags |= PASSEMOTES
|
||||
return
|
||||
get_scooped(M)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -139,8 +139,9 @@
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
if(!lying)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
@@ -154,8 +155,9 @@
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
if(!lying)
|
||||
src << "\red You feel weak."
|
||||
emote("collapse")
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
|
||||
@@ -28,9 +28,10 @@
|
||||
var/heat_level_1 = 360 // Heat damage level 1 above this point.
|
||||
var/heat_level_2 = 400 // Heat damage level 2 above this point.
|
||||
var/heat_level_3 = 1000 // Heat damage level 2 above this point.
|
||||
|
||||
|
||||
var/body_temperature = 310.15 //non-IS_SYNTHETIC species will try to stabilize at this temperature. (also affects temperature processing)
|
||||
var/synth_temp_gain = 0 //IS_SYNTHETIC species will gain this much temperature every second
|
||||
var/reagent_tag //Used for metabolizing reagents.
|
||||
|
||||
var/darksight = 2
|
||||
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
|
||||
@@ -47,6 +48,7 @@
|
||||
|
||||
var/blood_color = "#A10808" //Red.
|
||||
var/flesh_color = "#FFC896" //Pink.
|
||||
var/base_color //Used when setting species.
|
||||
|
||||
//Used in icon caching.
|
||||
var/race_key = 0
|
||||
@@ -137,6 +139,9 @@
|
||||
|
||||
flesh_color = "#34AF10"
|
||||
|
||||
reagent_tag = IS_UNATHI
|
||||
base_color = "#066000"
|
||||
|
||||
/datum/species/tajaran
|
||||
name = "Tajaran"
|
||||
icobase = 'icons/mob/human_races/r_tajaran.dmi'
|
||||
@@ -160,6 +165,7 @@
|
||||
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL | HAS_SKIN_COLOR
|
||||
|
||||
flesh_color = "#AFA59E"
|
||||
base_color = "#333333"
|
||||
|
||||
/datum/species/skrell
|
||||
name = "Skrell"
|
||||
@@ -173,6 +179,8 @@
|
||||
|
||||
flesh_color = "#8CD7A3"
|
||||
|
||||
reagent_tag = IS_SKRELL
|
||||
|
||||
/datum/species/vox
|
||||
name = "Vox"
|
||||
icobase = 'icons/mob/human_races/r_vox.dmi'
|
||||
@@ -192,11 +200,13 @@
|
||||
breath_type = "nitrogen"
|
||||
poison_type = "oxygen"
|
||||
|
||||
flags = NO_SCAN | NO_BLOOD
|
||||
flags = NO_SCAN
|
||||
|
||||
blood_color = "#2299FC"
|
||||
flesh_color = "#808D11"
|
||||
|
||||
reagent_tag = IS_VOX
|
||||
|
||||
/datum/species/vox/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
|
||||
H.verbs += /mob/living/carbon/human/proc/leap
|
||||
@@ -240,28 +250,7 @@
|
||||
tail = "armalis_tail"
|
||||
icon_template = 'icons/mob/human_races/r_armalis.dmi'
|
||||
|
||||
/datum/species/vox/create_organs(var/mob/living/carbon/human/H)
|
||||
|
||||
..() //create organs first.
|
||||
|
||||
//Now apply cortical stack.
|
||||
var/datum/organ/external/affected = H.get_organ("head")
|
||||
|
||||
//To avoid duplicates.
|
||||
for(var/obj/item/weapon/implant/cortical/imp in H.contents)
|
||||
affected.implants -= imp
|
||||
del(imp)
|
||||
|
||||
var/obj/item/weapon/implant/cortical/I = new(H)
|
||||
I.imp_in = H
|
||||
I.implanted = 1
|
||||
affected.implants += I
|
||||
I.part = affected
|
||||
|
||||
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/heist ) ) )
|
||||
var/datum/game_mode/heist/M = ticker.mode
|
||||
M.cortical_stacks += I
|
||||
M.raiders[H.mind] = I
|
||||
reagent_tag = IS_VOX
|
||||
|
||||
/datum/species/diona
|
||||
name = "Diona"
|
||||
@@ -289,6 +278,8 @@
|
||||
blood_color = "#004400"
|
||||
flesh_color = "#907E4A"
|
||||
|
||||
reagent_tag = IS_DIONA
|
||||
|
||||
/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.gender = NEUTER
|
||||
|
||||
@@ -331,7 +322,7 @@
|
||||
heat_level_1 = 500 //gives them about 25 seconds in space before taking damage
|
||||
heat_level_2 = 1000
|
||||
heat_level_3 = 2000
|
||||
|
||||
|
||||
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
|
||||
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC
|
||||
@@ -348,7 +339,7 @@
|
||||
var/miss_sound = 'sound/weapons/punchmiss.ogg'
|
||||
var/sharp = 0
|
||||
var/edge = 0
|
||||
|
||||
|
||||
/datum/unarmed_attack/punch
|
||||
attack_verb = list("punch")
|
||||
|
||||
|
||||
@@ -431,7 +431,8 @@
|
||||
else
|
||||
stop_pulling()
|
||||
. = ..()
|
||||
if ((s_active && !( s_active in contents ) ))
|
||||
|
||||
if (s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
|
||||
s_active.close(src)
|
||||
|
||||
if(update_slimes)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
|
||||
proj_sharp = 0
|
||||
proj_edge = 0
|
||||
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
P.on_hit(src, absorb, def_zone)
|
||||
@@ -75,8 +75,9 @@
|
||||
dtype = W.damtype
|
||||
src.visible_message("\red [src] has been hit by [O].")
|
||||
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
|
||||
|
||||
if(armor < 2)
|
||||
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, O, sharp=is_sharp(O), edge=has_edge(O))
|
||||
apply_damage(O.throwforce*(speed/5), dtype, zone, armor, is_sharp(O), has_edge(O), O)
|
||||
|
||||
if(!O.fingerprintslast)
|
||||
return
|
||||
@@ -92,7 +93,7 @@
|
||||
|
||||
// Begin BS12 momentum-transfer code.
|
||||
|
||||
if(speed >= 20)
|
||||
if(speed >= 15)
|
||||
var/obj/item/weapon/W = O
|
||||
var/momentum = speed/2
|
||||
var/dir = get_dir(M,src)
|
||||
@@ -100,6 +101,8 @@
|
||||
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
|
||||
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
|
||||
|
||||
if(!W || !src) return
|
||||
|
||||
if(istype(W.loc,/mob/living) && W.sharp) //Projectile is embedded and suitable for pinning.
|
||||
|
||||
if(!istype(src,/mob/living/carbon/human)) //Handles embedding for non-humans and simple_animals.
|
||||
|
||||
@@ -81,14 +81,48 @@ var/list/department_radio_keys = list(
|
||||
if(!istype(dongle)) return
|
||||
if(dongle.translate_binary) return 1
|
||||
|
||||
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list())
|
||||
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list(), var/sound/speech_sound, var/sound_vol)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
//handle nonverbal and sign languages here
|
||||
if (speaking)
|
||||
if (speaking.flags & NONVERBAL)
|
||||
if (prob(30))
|
||||
src.custom_emote(1, "[pick(speaking.signlang_verb)].")
|
||||
|
||||
if (speaking.flags & SIGNLANG)
|
||||
say_signlang(message, pick(speaking.signlang_verb), speaking)
|
||||
return
|
||||
|
||||
//speaking into radios
|
||||
if(used_radios.len)
|
||||
italics = 1
|
||||
message_range = 1
|
||||
|
||||
for(var/mob/living/M in hearers(5, src))
|
||||
if(M != src)
|
||||
M.show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "the radio."]</span>")
|
||||
if (speech_sound)
|
||||
src.playsound_local(get_turf(src), speech_sound, sound_vol * 0.5, 1)
|
||||
|
||||
speech_sound = null //so we don't play it twice.
|
||||
|
||||
//make sure the air can transmit speech
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(environment)
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < SAY_MINIMUM_PRESSURE)
|
||||
italics = 1
|
||||
message_range = 1
|
||||
|
||||
if (speech_sound)
|
||||
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
||||
|
||||
var/list/listening = list()
|
||||
var/list/listening_obj = list()
|
||||
|
||||
if(T)
|
||||
|
||||
var/list/objects = list()
|
||||
var/list/hear = hear(message_range, T)
|
||||
var/list/hearturfs = list()
|
||||
|
||||
@@ -98,11 +132,11 @@ var/list/department_radio_keys = list(
|
||||
listening += M
|
||||
hearturfs += M.locs[1]
|
||||
for(var/obj/O in M.contents)
|
||||
objects |= O
|
||||
listening_obj |= O
|
||||
else if(istype(I, /obj/))
|
||||
var/obj/O = I
|
||||
hearturfs += O.locs[1]
|
||||
objects |= O
|
||||
listening_obj |= O
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
|
||||
@@ -111,28 +145,25 @@ var/list/department_radio_keys = list(
|
||||
if(M.loc && M.locs[1] in hearturfs)
|
||||
listening |= M
|
||||
|
||||
for(var/obj/O in objects)
|
||||
spawn(0)
|
||||
if(O) //It's possible that it could be deleted in the meantime.
|
||||
O.hear_talk(src, message, verb, speaking)
|
||||
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
if(used_radios.len)
|
||||
for(var/mob/living/M in hearers(5, src))
|
||||
if(M != src)
|
||||
M.show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "radio"]</span>")
|
||||
|
||||
|
||||
for(var/mob/M in listening)
|
||||
M << speech_bubble
|
||||
M.hear_say(message,verb,speaking,alt_name, italics, src)
|
||||
|
||||
M.hear_say(message, verb, speaking, alt_name, italics, src, speech_sound, sound_vol)
|
||||
|
||||
for(var/obj/O in listening_obj)
|
||||
spawn(0)
|
||||
if(O) //It's possible that it could be deleted in the meantime.
|
||||
O.hear_talk(src, message, verb, speaking)
|
||||
|
||||
log_say("[name]/[key] : [message]")
|
||||
|
||||
/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
O.hear_signlang(message, verb, language, src)
|
||||
|
||||
/obj/effect/speech_bubble
|
||||
var/mob/parent
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ var/list/ai_list = list()
|
||||
add_language("Rootspeak", 0)
|
||||
add_language("Tradeband", 1)
|
||||
add_language("Gutter", 0)
|
||||
|
||||
|
||||
if(!safety)//Only used by AIize() to successfully spawn an AI.
|
||||
if (!B)//If there is no player/brain inside.
|
||||
new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
|
||||
@@ -410,8 +410,8 @@ var/list/ai_list = list()
|
||||
|
||||
if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name()))
|
||||
ai_actual_track(target)
|
||||
|
||||
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
|
||||
else
|
||||
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
|
||||
return
|
||||
|
||||
else if (href_list["faketrack"])
|
||||
@@ -612,7 +612,7 @@ var/list/ai_list = list()
|
||||
if(usr.stat == 2)
|
||||
usr <<"You cannot change your emotional status because you are dead!"
|
||||
return
|
||||
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer")
|
||||
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Surprised", "Sad", "Upset", "Angry", "Awesome", "BSOD", "Blank", "Problems?", "Facepalm", "Friend Computer")
|
||||
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
||||
for (var/obj/machinery/M in machines) //change status
|
||||
if(istype(M, /obj/machinery/ai_status_display))
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
// Gain Power
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
// Handle EMP-stun
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
//stage = 1
|
||||
//if (istype(src, /mob/living/silicon/ai)) // Are we not sure what we are?
|
||||
var/blind = 0
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
//Used for self-mailing.
|
||||
var/mail_destination = ""
|
||||
|
||||
//Used for pulling.
|
||||
|
||||
holder_type = /obj/item/weapon/holder/drone
|
||||
/mob/living/silicon/robot/drone/New()
|
||||
|
||||
..()
|
||||
@@ -60,7 +59,6 @@
|
||||
|
||||
//Some tidying-up.
|
||||
flavor_text = "It's a tiny little repair drone. The casing is stamped with an NT logo and the subscript: 'NanoTrasen Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
|
||||
updatename()
|
||||
updateicon()
|
||||
|
||||
//Redefining some robot procs...
|
||||
@@ -104,15 +102,8 @@
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
else if(length(message) >= 2)
|
||||
if(copytext(message, 1 ,3) == ":b" || copytext(message, 1 ,3) == ":B")
|
||||
|
||||
if(!is_component_functioning("comms"))
|
||||
src << "\red Your binary communications component isn't functional."
|
||||
return
|
||||
|
||||
robot_talk(trim(copytext(message,3)))
|
||||
|
||||
else if(copytext(message, 1 ,3) == ":d" || copytext(message, 1 ,3) == ":D")
|
||||
if(copytext(message, 1 ,3) == ":d" || copytext(message, 1 ,3) == ":D")
|
||||
|
||||
if(!is_component_functioning("radio"))
|
||||
src << "\red Your radio transmitter isn't functional."
|
||||
@@ -140,18 +131,6 @@
|
||||
else if(M.stat == 2 && M.client.prefs.toggles & CHAT_GHOSTEARS)
|
||||
if(M.client) M << "<b>[src]</b> transmits, \"[message]\""
|
||||
|
||||
//Sick of trying to get this to display properly without redefining it.
|
||||
/mob/living/silicon/robot/drone/show_system_integrity()
|
||||
if(!src.stat)
|
||||
var/temphealth = health+35 //Brings it to 0.
|
||||
if(temphealth<0) temphealth = 0
|
||||
//Convert to percentage.
|
||||
temphealth = (temphealth / (maxHealth*2)) * 100
|
||||
|
||||
stat(null, text("System integrity: [temphealth]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
//Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..().
|
||||
/mob/living/silicon/robot/drone/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -329,13 +308,19 @@
|
||||
full_law_reset()
|
||||
src << "<br><b>You are a maintenance drone, a tiny-brained robotic repair machine</b>."
|
||||
src << "You have no individual will, no personality, and no drives or urges other than your laws."
|
||||
src << "Use <b>:b</b> to talk to your fellow synthetics, <b>:d</b> to talk to other drones, and <b>say</b> to speak silently to your nearby fellows."
|
||||
src << "Remember, you are <b>lawed against interference with the crew</b>."
|
||||
src << "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows."
|
||||
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
|
||||
src << "<b>Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets.</b>"
|
||||
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your third law</i></b>."
|
||||
|
||||
/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes)
|
||||
if (!yes || ( !istype(AM,/obj/machinery/door) && !istype(AM,/obj/machinery/recharge_station) && !istype(AM,/obj/machinery/disposal/deliveryChute) ) ) return
|
||||
if (!yes || ( \
|
||||
!istype(AM,/obj/machinery/door) && \
|
||||
!istype(AM,/obj/machinery/recharge_station) && \
|
||||
!istype(AM,/obj/machinery/disposal/deliveryChute && \
|
||||
!istype(AM,/obj/machinery/teleport/hub) && \
|
||||
!istype(AM,/obj/effect/portal)
|
||||
))) return
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -47,12 +47,5 @@
|
||||
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
if(M.a_intent == "help")
|
||||
var/obj/item/weapon/holder/drone/D = new(loc)
|
||||
src.loc = D
|
||||
D.attack_hand(M)
|
||||
M << "You scoop up [src]."
|
||||
src << "[M] scoops you up."
|
||||
M.status_flags |= PASSEMOTES
|
||||
return
|
||||
|
||||
get_scooped(M)
|
||||
..()
|
||||
@@ -132,10 +132,6 @@
|
||||
else
|
||||
src.blinded = 1
|
||||
|
||||
if(!is_component_functioning("actuator"))
|
||||
src.Paralyse(3)
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_regular_hud_updates()
|
||||
@@ -321,6 +317,6 @@
|
||||
weaponlock_time = 120
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge) canmove = 0
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge || !is_component_functioning("actuator")) canmove = 0
|
||||
else canmove = 1
|
||||
return canmove
|
||||
|
||||
@@ -41,7 +41,15 @@
|
||||
modules += O
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_languages(var/mob/living/silicon/robot/R)
|
||||
//full set of languages
|
||||
R.add_language("Sol Common", 0)
|
||||
R.add_language("Sinta'unathi", 0)
|
||||
R.add_language("Siik'maas", 0)
|
||||
R.add_language("Siik'tajr", 0)
|
||||
R.add_language("Skrellian", 0)
|
||||
R.add_language("Rootspeak", 0)
|
||||
R.add_language("Tradeband", 0)
|
||||
R.add_language("Gutter", 0)
|
||||
|
||||
/obj/item/weapon/robot_module/standard
|
||||
name = "standard robot module"
|
||||
@@ -318,8 +326,8 @@
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/card/emag(src)
|
||||
src.emag.name = "Cryptographic Sequencer"
|
||||
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
|
||||
src.emag.name = "Plasma Cutter"
|
||||
|
||||
for(var/T in stacktypes)
|
||||
var/obj/item/stack/sheet/W = new T(src)
|
||||
@@ -351,4 +359,13 @@
|
||||
var/obj/item/device/lightreplacer/LR = locate() in src.modules
|
||||
LR.Charge(R)
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
//checks whether this item is a module of the robot it is located in.
|
||||
/obj/item/proc/is_robot_module()
|
||||
if (!istype(src.loc, /mob/living/silicon/robot))
|
||||
return 0
|
||||
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
|
||||
return (src in R.module.modules)
|
||||
@@ -6,7 +6,7 @@
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
immune_to_ssd = 1
|
||||
var/list/hud_list[9]
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
return
|
||||
@@ -80,7 +80,7 @@
|
||||
// this function shows the health of the pAI in the Status panel
|
||||
/mob/living/silicon/proc/show_system_integrity()
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [(src.health+100)/2]%"))
|
||||
stat(null, text("System integrity: [round((health/maxHealth)*100)]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
@@ -98,10 +98,9 @@
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
/mob/living/silicon/proc/show_emergency_shuttle_eta()
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
@@ -158,4 +157,4 @@
|
||||
dat += "<b>[L.name] (:[L.key])</b><br/>Speech Synthesizer: <i>[(L in speech_synthesizer_langs)? "YES":"NOT SUPPORTED"]</i><br/>[L.desc]<br/><br/>"
|
||||
|
||||
src << browse(dat, "window=checklanguage")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -146,10 +146,9 @@
|
||||
statpanel("Status")
|
||||
|
||||
if(emergency_shuttle)
|
||||
if(emergency_shuttle.has_eta() && !emergency_shuttle.returned())
|
||||
var/timeleft = emergency_shuttle.estimate_arrival_time()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
|
||||
if (client.statpanel == "Status")
|
||||
stat("Chemicals", chemicals)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
min_oxy = 16 //Require atleast 16kPA oxygen
|
||||
minbodytemp = 223 //Below -50 Degrees Celcius
|
||||
maxbodytemp = 323 //Above 50 Degrees Celcius
|
||||
holder_type = /obj/item/weapon/holder/cat
|
||||
|
||||
/mob/living/simple_animal/cat/Life()
|
||||
//MICE!
|
||||
@@ -60,6 +61,18 @@
|
||||
stop_automated_movement = 1
|
||||
walk_to(src,movement_target,0,3)
|
||||
|
||||
|
||||
/mob/living/simple_animal/cat/MouseDrop(atom/over_object)
|
||||
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H)) return ..()
|
||||
|
||||
if(H.a_intent == "help")
|
||||
get_scooped(H)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
//RUNTIME IS ALIVE! SQUEEEEEEEE~
|
||||
/mob/living/simple_animal/cat/Runtime
|
||||
name = "Runtime"
|
||||
|
||||
+22
-20
@@ -755,7 +755,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
/mob/proc/update_canmove()
|
||||
if(buckled)
|
||||
if(buckled && (!buckled.movable))
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
if( istype(buckled,/obj/structure/stool/bed/chair) )
|
||||
@@ -768,6 +768,10 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
lying = 1
|
||||
else
|
||||
lying = 1
|
||||
else if(buckled && (buckled.movable))
|
||||
anchored = 0
|
||||
canmove = 1
|
||||
lying = 0
|
||||
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
|
||||
lying = 1
|
||||
canmove = 0
|
||||
@@ -778,7 +782,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
lying = 0
|
||||
else
|
||||
else if (!buckled)
|
||||
lying = !can_stand
|
||||
canmove = has_limbs
|
||||
|
||||
@@ -801,36 +805,34 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
return canmove
|
||||
|
||||
|
||||
/mob/verb/eastface()
|
||||
set hidden = 1
|
||||
/mob/proc/facedir(var/ndir)
|
||||
if(!canface()) return 0
|
||||
dir = EAST
|
||||
dir = ndir
|
||||
if(buckled && buckled.movable)
|
||||
buckled.dir = ndir
|
||||
buckled.handle_rotation()
|
||||
client.move_delay += movement_delay()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/verb/eastface()
|
||||
set hidden = 1
|
||||
return facedir(EAST)
|
||||
|
||||
|
||||
/mob/verb/westface()
|
||||
set hidden = 1
|
||||
if(!canface()) return 0
|
||||
dir = WEST
|
||||
client.move_delay += movement_delay()
|
||||
return 1
|
||||
return facedir(WEST)
|
||||
|
||||
|
||||
/mob/verb/northface()
|
||||
set hidden = 1
|
||||
if(!canface()) return 0
|
||||
dir = NORTH
|
||||
client.move_delay += movement_delay()
|
||||
return 1
|
||||
return facedir(NORTH)
|
||||
|
||||
|
||||
/mob/verb/southface()
|
||||
set hidden = 1
|
||||
if(!canface()) return 0
|
||||
dir = SOUTH
|
||||
client.move_delay += movement_delay()
|
||||
return 1
|
||||
return facedir(SOUTH)
|
||||
|
||||
|
||||
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
|
||||
@@ -948,7 +950,7 @@ mob/proc/yank_out_object()
|
||||
if(S == U)
|
||||
self = 1 // Removing object from yourself.
|
||||
|
||||
valid_objects = get_visible_implants(1)
|
||||
valid_objects = get_visible_implants(0)
|
||||
if(!valid_objects.len)
|
||||
if(self)
|
||||
src << "You have nothing stuck in your body that is large enough to remove."
|
||||
@@ -959,9 +961,9 @@ mob/proc/yank_out_object()
|
||||
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
|
||||
|
||||
if(self)
|
||||
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your body.</span>"
|
||||
src << "<span class='warning'>You attempt to get a good grip on [selection] in your body.</span>"
|
||||
else
|
||||
U << "<span class='warning'>You attempt to get a good grip on the [selection] in [S]'s body.</span>"
|
||||
U << "<span class='warning'>You attempt to get a good grip on [selection] in [S]'s body.</span>"
|
||||
|
||||
if(!do_after(U, 80))
|
||||
return
|
||||
|
||||
@@ -199,8 +199,7 @@
|
||||
|
||||
|
||||
if(!mob.canmove)
|
||||
if (mob.buckled && (istype(mob.buckled, /obj/structure/stool/bed/chair/wheelchair) || istype(mob.buckled, /obj/vehicle))) // Exception for wheelchairs
|
||||
else return
|
||||
return
|
||||
|
||||
//if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV))
|
||||
// if(!mob.Process_Spacemove(0)) return 0
|
||||
@@ -246,7 +245,7 @@
|
||||
move_delay -= 1.3
|
||||
var/tickcomp = ((1/(world.tick_lag))*1.3)
|
||||
move_delay = move_delay + tickcomp
|
||||
|
||||
|
||||
if(istype(mob.buckled, /obj/vehicle))
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
@@ -260,7 +259,7 @@
|
||||
var/mob/living/carbon/human/driver = mob.buckled
|
||||
var/datum/organ/external/l_hand = driver.get_organ("l_hand")
|
||||
var/datum/organ/external/r_hand = driver.get_organ("r_hand")
|
||||
if((!l_hand || l_hand.status & ORGAN_DESTROYED) && (!r_hand || r_hand.status & ORGAN_DESTROYED))
|
||||
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
|
||||
return // No hands to drive your chair? Tough luck!
|
||||
move_delay += 2
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
src << alert("You are currently not whitelisted to play [client.prefs.species].")
|
||||
return 0
|
||||
|
||||
AttemptLateSpawn(href_list["SelectedJob"])
|
||||
AttemptLateSpawn(href_list["SelectedJob"],client.prefs.spawnpoint)
|
||||
return
|
||||
|
||||
if(href_list["privacy_poll"])
|
||||
@@ -270,7 +270,7 @@
|
||||
return 1
|
||||
|
||||
|
||||
proc/AttemptLateSpawn(rank)
|
||||
proc/AttemptLateSpawn(rank,var/spawning_at)
|
||||
if (src != usr)
|
||||
return 0
|
||||
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
|
||||
@@ -291,7 +291,21 @@
|
||||
var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind
|
||||
job_master.EquipRank(character, rank, 1) //equips the human
|
||||
EquipCustomItems(character)
|
||||
character.loc = pick(latejoin)
|
||||
|
||||
//Find our spawning point.
|
||||
var/join_message
|
||||
var/datum/spawnpoint/S
|
||||
|
||||
if(spawning_at)
|
||||
S = spawntypes[spawning_at]
|
||||
|
||||
if(S && istype(S))
|
||||
character.loc = pick(S.turfs)
|
||||
join_message = S.msg
|
||||
else
|
||||
character.loc = pick(latejoin)
|
||||
join_message = "has arrived on the station"
|
||||
|
||||
character.lastarea = get_area(loc)
|
||||
// Moving wheelchair if they have one
|
||||
if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
|
||||
@@ -305,18 +319,18 @@
|
||||
if(character.mind.assigned_role != "Cyborg")
|
||||
data_core.manifest_inject(character)
|
||||
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
|
||||
AnnounceArrival(character, rank)
|
||||
AnnounceArrival(character, rank, join_message)
|
||||
|
||||
else
|
||||
character.Robotize()
|
||||
del(src)
|
||||
|
||||
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
|
||||
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
|
||||
if (ticker.current_state == GAME_STATE_PLAYING)
|
||||
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
|
||||
if(character.mind.role_alt_title)
|
||||
rank = character.mind.role_alt_title
|
||||
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] has arrived on the station.", "Arrivals Announcement Computer")
|
||||
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
|
||||
del(a)
|
||||
|
||||
proc/LateChoices()
|
||||
|
||||
@@ -198,12 +198,7 @@ datum/preferences
|
||||
preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
|
||||
preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
|
||||
|
||||
for(var/name in list("l_arm","r_arm","l_leg","r_leg","l_foot","r_foot","l_hand","r_hand"))
|
||||
// make sure the organ is added to the list so it's drawn
|
||||
if(organ_data[name] == null)
|
||||
organ_data[name] = null
|
||||
|
||||
for(var/name in organ_data)
|
||||
for(var/name in list("r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","l_arm","l_hand"))
|
||||
if(organ_data[name] == "amputated") continue
|
||||
|
||||
var/icon/temp = new /icon(icobase, "[name]")
|
||||
@@ -216,7 +211,7 @@ datum/preferences
|
||||
if(current_species && (current_species.flags & HAS_TAIL))
|
||||
var/icon/temp = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[current_species.tail]_s")
|
||||
preview_icon.Blend(temp, ICON_OVERLAY)
|
||||
|
||||
|
||||
// Skin color
|
||||
if(current_species && (current_species.flags & HAS_SKIN_COLOR))
|
||||
preview_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
|
||||
@@ -92,10 +92,6 @@
|
||||
//Language check.
|
||||
for(var/datum/language/L in src.languages)
|
||||
if(speaking.name == L.name)
|
||||
if (L.flags & NONVERBAL)
|
||||
if ((src.sdisabilities & BLIND || src.blinded || src.stat) || !(other in view(src)))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -63,7 +63,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
// Damaged heart virtually reduces the blood volume, as the blood isn't
|
||||
// being pumped properly anymore.
|
||||
var/datum/organ/internal/heart/heart = internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/heart = internal_organs_by_name["heart"]
|
||||
|
||||
if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
|
||||
blood_volume *= 0.8
|
||||
|
||||
@@ -17,6 +17,20 @@
|
||||
/datum/organ/proc/get_icon()
|
||||
return icon('icons/mob/human.dmi',"blank")
|
||||
|
||||
//Germs
|
||||
/datum/organ/proc/handle_antibiotics()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if (!germ_level || antibiotics < 5)
|
||||
return
|
||||
|
||||
if (germ_level < INFECTION_LEVEL_ONE)
|
||||
germ_level = 0 //cure instantly
|
||||
else if (germ_level < INFECTION_LEVEL_TWO)
|
||||
germ_level -= 6 //at germ_level == 500, this should cure the infection in a minute
|
||||
else
|
||||
germ_level -= 2 //at germ_level == 1000, this will cure the infection in 5 minutes
|
||||
|
||||
//Handles chem traces
|
||||
/mob/living/carbon/human/proc/handle_trace_chems()
|
||||
//New are added for reagents to random organs.
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
return
|
||||
|
||||
// High brute damage or sharp objects may damage internal organs
|
||||
if(internal_organs != null) if( (sharp && brute >= 5) || brute >= 10) if(prob(5))
|
||||
if(internal_organs && ( (sharp && brute >= 5) || brute >= 10) && prob(5))
|
||||
// Damage an internal organ
|
||||
var/datum/organ/internal/I = pick(internal_organs)
|
||||
I.take_damage(brute / 2)
|
||||
@@ -337,7 +337,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
//Updating germ levels. Handles organ germ levels and necrosis.
|
||||
/*
|
||||
The INFECTION_LEVEL values defined in setup.dm control the time it takes to reach the different
|
||||
The INFECTION_LEVEL values defined in setup.dm control the time it takes to reach the different
|
||||
infection levels. Since infection growth is exponential, you can adjust the time it takes to get
|
||||
from one germ_level to another using the rough formula:
|
||||
|
||||
@@ -349,71 +349,100 @@ the actual time is dependent on RNG.
|
||||
|
||||
INFECTION_LEVEL_ONE below this germ level nothing happens, and the infection doesn't grow
|
||||
INFECTION_LEVEL_TWO above this germ level the infection will start to spread to internal and adjacent organs
|
||||
INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without
|
||||
INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without
|
||||
antitox. also, above this germ level you will need to overdose on spaceacillin to reduce the germ_level.
|
||||
|
||||
Note that amputating the affected organ does in fact remove the infection from the
|
||||
player's body, though, antitox and spaceacillin are easy enough to get I doubt it will ever be needed.
|
||||
Note that amputating the affected organ does in fact remove the infection from the player's body.
|
||||
*/
|
||||
/datum/organ/external/proc/update_germs()
|
||||
|
||||
if(status & (ORGAN_ROBOT|ORGAN_DESTROYED)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
|
||||
if(status & (ORGAN_ROBOT|ORGAN_DESTROYED) || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//Syncing germ levels with external wounds
|
||||
for(var/datum/wound/W in wounds)
|
||||
//Open wounds can become infected
|
||||
if (owner.germ_level > W.germ_level && W.infection_check())
|
||||
W.germ_level++
|
||||
|
||||
//Infected wounds raise the organ's germ level
|
||||
W.germ_level = max(W.germ_level, germ_level) //Wounds get all the germs
|
||||
if (W.germ_level > germ_level) //Badly infected wounds raise internal germ levels
|
||||
germ_level++
|
||||
//** Syncing germ levels with external wounds
|
||||
handle_germ_sync()
|
||||
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
if (germ_level > 0 && antibiotics > 5)
|
||||
if (prob(4*antibiotics)) germ_level-- //the higher the germ level the more antibiotics you'll need.
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
//having an infection raises your body temperature
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature
|
||||
if (owner.bodytemperature < fever_temperature)
|
||||
//world << "fever: [owner.bodytemperature] < [fever_temperature], raising temperature."
|
||||
owner.bodytemperature++
|
||||
|
||||
if(prob(round(germ_level/10)))
|
||||
//** Handle the effects of infections
|
||||
handle_germ_effects()
|
||||
|
||||
/datum/organ/external/proc/handle_germ_sync()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
for(var/datum/wound/W in wounds)
|
||||
//Open wounds can become infected
|
||||
if (owner.germ_level > W.germ_level && W.infection_check())
|
||||
W.germ_level++
|
||||
|
||||
if (antibiotics < 5)
|
||||
for(var/datum/wound/W in wounds)
|
||||
//Infected wounds raise the organ's germ level
|
||||
if (W.germ_level > germ_level)
|
||||
germ_level++
|
||||
if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections
|
||||
owner.adjustToxLoss(1)
|
||||
break //limit increase to a maximum of one per second
|
||||
|
||||
/datum/organ/external/proc/handle_germ_effects()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE && prob(60)) //this could be an else clause, but it looks cleaner this way
|
||||
germ_level-- //since germ_level increases at a rate of 1 per second with dirty wounds, prob(60) should give us about 5 minutes before level one.
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
//having an infection raises your body temperature
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature
|
||||
if (owner.bodytemperature < fever_temperature)
|
||||
//world << "fever: [owner.bodytemperature] < [fever_temperature], raising temperature."
|
||||
owner.bodytemperature++
|
||||
|
||||
if(prob(round(germ_level/10)))
|
||||
if (antibiotics < 5)
|
||||
germ_level++
|
||||
|
||||
if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < 5)
|
||||
//spread the infection to internal organs
|
||||
var/datum/organ/internal/target_organ = null //make internal organs become infected one at a time instead of all at once
|
||||
for (var/datum/organ/internal/I in internal_organs)
|
||||
if (I.germ_level > 0 && I.germ_level < min(germ_level, INFECTION_LEVEL_TWO)) //once the organ reaches whatever we can give it, or level two, switch to a different one
|
||||
if (!target_organ || I.germ_level > target_organ.germ_level) //choose the organ with the highest germ_level
|
||||
target_organ = I
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
//spread the infection
|
||||
if (!target_organ)
|
||||
//figure out which organs we can spread germs to and pick one at random
|
||||
var/list/candidate_organs = list()
|
||||
for (var/datum/organ/internal/I in internal_organs)
|
||||
if (I.germ_level < germ_level)
|
||||
I.germ_level++
|
||||
|
||||
if (children) //To child organs
|
||||
for (var/datum/organ/external/child in children)
|
||||
if (child.germ_level < germ_level && !(child.status & ORGAN_ROBOT))
|
||||
if (child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
child.germ_level++
|
||||
|
||||
if (parent)
|
||||
if (parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT))
|
||||
if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
parent.germ_level++
|
||||
candidate_organs += I
|
||||
if (candidate_organs.len)
|
||||
target_organ = pick(candidate_organs)
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections
|
||||
if (!(status & ORGAN_DEAD))
|
||||
status |= ORGAN_DEAD
|
||||
owner << "<span class='notice'>You can't feel your [display_name] anymore...</span>"
|
||||
|
||||
germ_level++
|
||||
owner.adjustToxLoss(1)
|
||||
if (target_organ)
|
||||
target_organ.germ_level++
|
||||
|
||||
//spread the infection to child and parent organs
|
||||
if (children)
|
||||
for (var/datum/organ/external/child in children)
|
||||
if (child.germ_level < germ_level && !(child.status & ORGAN_ROBOT))
|
||||
if (child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
child.germ_level++
|
||||
|
||||
if (parent)
|
||||
if (parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT))
|
||||
if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
parent.germ_level++
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections
|
||||
if (!(status & ORGAN_DEAD))
|
||||
status |= ORGAN_DEAD
|
||||
owner << "<span class='notice'>You can't feel your [display_name] anymore...</span>"
|
||||
|
||||
germ_level++
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
//Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections
|
||||
/datum/organ/external/proc/update_wounds()
|
||||
@@ -429,7 +458,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
// let the GC handle the deletion of the wound
|
||||
|
||||
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
|
||||
if(W.internal && !W.is_treated() && owner.bodytemperature >= 170)
|
||||
if(W.internal && !W.can_autoheal() && owner.bodytemperature >= 170)
|
||||
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
|
||||
var/inaprovaline = owner.reagents.get_reagent_amount("inaprovaline")
|
||||
if(!bicardose || !inaprovaline) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, and also stop bleeding
|
||||
@@ -446,7 +475,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
var/heal_amt = 0
|
||||
|
||||
// if damage >= 50 AFTER treatment then it's probably too severe to heal within the timeframe of a round.
|
||||
if (W.is_treated() && W.wound_damage() < 50)
|
||||
if (W.can_autoheal() && W.wound_damage() < 50)
|
||||
heal_amt += 0.5
|
||||
|
||||
//we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime
|
||||
@@ -461,8 +490,8 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
|
||||
// Salving also helps against infection
|
||||
if(W.germ_level > 0 && W.salved && prob(2))
|
||||
W.germ_level = 0
|
||||
W.disinfected = 1
|
||||
W.germ_level = 0
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
@@ -665,6 +694,15 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
W.bandaged = 1
|
||||
return rval
|
||||
|
||||
/datum/organ/external/proc/disinfect()
|
||||
var/rval = 0
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.internal) continue
|
||||
rval |= !W.disinfected
|
||||
W.disinfected = 1
|
||||
W.germ_level = 0
|
||||
return rval
|
||||
|
||||
/datum/organ/external/proc/clamp()
|
||||
var/rval = 0
|
||||
src.status &= ~ORGAN_BLEEDING
|
||||
@@ -726,7 +764,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
|
||||
/datum/organ/external/proc/has_infected_wound()
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(W.germ_level > 150)
|
||||
if(W.germ_level > INFECTION_LEVEL_ONE)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -753,7 +791,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
/datum/organ/external/proc/process_grasp(var/obj/item/c_hand, var/hand_name)
|
||||
if (!c_hand)
|
||||
return
|
||||
|
||||
|
||||
if(is_broken())
|
||||
owner.u_equip(c_hand)
|
||||
var/emote_scream = pick("screams in pain and", "lets out a sharp cry and", "cries out and")
|
||||
@@ -768,6 +806,17 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
|
||||
/datum/organ/external/proc/embed(var/obj/item/weapon/W, var/silent = 0)
|
||||
if(!silent)
|
||||
owner.visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
implants += W
|
||||
owner.embedded_flag = 1
|
||||
owner.verbs += /mob/proc/yank_out_object
|
||||
W.add_blood(owner)
|
||||
if(ismob(W.loc))
|
||||
var/mob/living/H = W.loc
|
||||
H.drop_item()
|
||||
W.loc = owner
|
||||
|
||||
/****************************************************
|
||||
ORGAN DEFINES
|
||||
@@ -797,7 +846,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = ARM_LEFT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.l_hand, "left hand")
|
||||
@@ -818,7 +867,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 50
|
||||
min_broken_damage = 20
|
||||
body_part = ARM_RIGHT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.r_hand, "right hand")
|
||||
@@ -857,7 +906,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_RIGHT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.r_hand, "right hand")
|
||||
@@ -869,7 +918,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i
|
||||
max_damage = 30
|
||||
min_broken_damage = 15
|
||||
body_part = HAND_LEFT
|
||||
|
||||
|
||||
process()
|
||||
..()
|
||||
process_grasp(owner.l_hand, "left hand")
|
||||
|
||||
@@ -27,40 +27,40 @@
|
||||
var/datum/organ/external/E = H.organs_by_name[src.parent_organ]
|
||||
if(E.internal_organs == null)
|
||||
E.internal_organs = list()
|
||||
E.internal_organs += src
|
||||
H.internal_organs[src.name] = src
|
||||
E.internal_organs |= src
|
||||
H.internal_organs |= src
|
||||
src.owner = H
|
||||
|
||||
/datum/organ/internal/process()
|
||||
|
||||
//Process infections
|
||||
if (!germ_level)
|
||||
return
|
||||
|
||||
if (robotic >= 2) //TODO make robotic internal and external organs separate types of organ instead of a flag
|
||||
if (robotic >= 2 || (owner.species && owner.species.flags & IS_PLANT)) //TODO make robotic internal and external organs separate types of organ instead of a flag
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
|
||||
if (germ_level > 0 && antibiotics > 5)
|
||||
if (prob(4*antibiotics)) germ_level--
|
||||
if (antibiotics > 30) germ_level--
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_ONE/2)
|
||||
if(prob(round(germ_level/6))) //aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes
|
||||
germ_level++
|
||||
if(prob(1))
|
||||
take_damage(1,silent=0)
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_TWO)
|
||||
var/datum/organ/external/parent = owner.get_organ(parent_organ)
|
||||
if (parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
|
||||
parent.germ_level++
|
||||
//** Handle the effects of infections
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if (prob(5)) //about once every 20 seconds
|
||||
take_damage(1,silent=prob(30))
|
||||
if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30))
|
||||
germ_level--
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_ONE/2)
|
||||
//aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes
|
||||
if(antibiotics < 5 && prob(round(germ_level/6)))
|
||||
germ_level++
|
||||
|
||||
if (germ_level >= INFECTION_LEVEL_TWO)
|
||||
var/datum/organ/external/parent = owner.get_organ(parent_organ)
|
||||
//spread germs
|
||||
if (antibiotics < 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
|
||||
parent.germ_level++
|
||||
|
||||
if (prob(3)) //about once every 30 seconds
|
||||
take_damage(1,silent=prob(30))
|
||||
|
||||
/datum/organ/internal/proc/take_damage(amount, var/silent=0)
|
||||
if(src.robotic == 2)
|
||||
@@ -121,6 +121,11 @@
|
||||
parent_organ = "chest"
|
||||
|
||||
process()
|
||||
..()
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(5))
|
||||
owner.emote("cough") //respitory tract infection
|
||||
|
||||
if(is_bruised())
|
||||
if(prob(2))
|
||||
spawn owner.emote("me", 1, "coughs up blood!")
|
||||
@@ -135,6 +140,14 @@
|
||||
var/process_accuracy = 10
|
||||
|
||||
process()
|
||||
..()
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(1))
|
||||
owner << "\red Your skin itches."
|
||||
if (germ_level > INFECTION_LEVEL_TWO)
|
||||
if(prob(1))
|
||||
spawn owner.vomit()
|
||||
|
||||
if(owner.life_tick % process_accuracy == 0)
|
||||
if(src.damage < 0)
|
||||
src.damage = 0
|
||||
@@ -177,6 +190,7 @@
|
||||
parent_organ = "head"
|
||||
|
||||
process() //Eye damage replaces the old eye_stat var.
|
||||
..()
|
||||
if(is_bruised())
|
||||
owner.eye_blurry = 20
|
||||
if(is_broken())
|
||||
|
||||
@@ -102,8 +102,7 @@ mob/living/carbon/human/proc/handle_pain()
|
||||
pain(damaged_organ.display_name, maxdam, 0)
|
||||
|
||||
// Damage to internal organs hurts a lot.
|
||||
for(var/organ_name in internal_organs)
|
||||
var/datum/organ/internal/I = internal_organs[organ_name]
|
||||
for(var/datum/organ/internal/I in internal_organs)
|
||||
if(I.damage > 2) if(prob(2))
|
||||
var/datum/organ/external/parent = get_organ(I.parent_organ)
|
||||
src.custom_pain("You feel a sharp pain in your [parent.display_name]", 1)
|
||||
|
||||
@@ -85,24 +85,25 @@
|
||||
proc/wound_damage()
|
||||
return src.damage / src.amount
|
||||
|
||||
// checks whether the wound has been appropriately treated
|
||||
// always returns 1 for wounds that are too minor to need treatment
|
||||
proc/is_treated()
|
||||
proc/can_autoheal()
|
||||
if(src.wound_damage() <= autoheal_cutoff)
|
||||
return 1
|
||||
|
||||
|
||||
return is_treated()
|
||||
|
||||
// checks whether the wound has been appropriately treated
|
||||
proc/is_treated()
|
||||
if(damage_type == BRUISE || damage_type == CUT)
|
||||
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.is_treated()) != !(src.is_treated())) 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
|
||||
@@ -120,20 +121,28 @@
|
||||
// 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 (is_treated() && damage < 10)
|
||||
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) && bleeding() //bruises only infectable if bleeding
|
||||
return prob(dam_coef*5)
|
||||
if (BURN)
|
||||
return prob(dam_coef*10)
|
||||
if (CUT)
|
||||
return prob(dam_coef*20)
|
||||
|
||||
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
|
||||
@@ -183,10 +192,20 @@
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
proc/bleeding()
|
||||
// internal wounds don't bleed in the sense of this function
|
||||
return ((wound_damage() > 30 || bleed_timer > 0) && !(bandaged||clamped) && (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5) && current_stage <= max_bleeding_stage && !src.internal)
|
||||
if (src.internal)
|
||||
return 0 // internal wounds don't bleed in the sense of this function
|
||||
|
||||
if (current_stage > max_bleeding_stage)
|
||||
return 0
|
||||
|
||||
if (bandaged||clamped)
|
||||
return 0
|
||||
|
||||
if (wound_damage() <= 30 && bleed_timer <= 0)
|
||||
return 0 //Bleed timer has run out. Wounds with more than 30 damage don't stop bleeding on their own.
|
||||
|
||||
return (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5)
|
||||
|
||||
/** CUTS **/
|
||||
/datum/wound/cut/small
|
||||
|
||||
@@ -61,7 +61,10 @@
|
||||
usr << browse("", "window=[name]") //Closes the dialog
|
||||
P = src[page]
|
||||
P.attackby(W, user)
|
||||
|
||||
|
||||
update_icon()
|
||||
attack_self(usr) //Update the browsed page.
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
@@ -1288,6 +1288,7 @@
|
||||
chargecount++
|
||||
else
|
||||
chargecount = 0
|
||||
charging = 0
|
||||
|
||||
if(chargecount == 10)
|
||||
|
||||
|
||||
@@ -621,7 +621,7 @@
|
||||
|
||||
// called when on fire
|
||||
|
||||
/obj/machinery/light/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/machinery/light/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C
|
||||
broken()
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
turbine = locate() in get_step(src, get_dir(inturf, src))
|
||||
if(!turbine)
|
||||
stat |= BROKEN
|
||||
else
|
||||
turbine.stat &= !BROKEN
|
||||
turbine.compressor = src
|
||||
|
||||
|
||||
#define COMPFRICTION 5e5
|
||||
@@ -105,6 +108,9 @@
|
||||
compressor = locate() in get_step(src, get_dir(outturf, src))
|
||||
if(!compressor)
|
||||
stat |= BROKEN
|
||||
else
|
||||
compressor.stat &= !BROKEN
|
||||
compressor.turbine = src
|
||||
|
||||
|
||||
#define TURBPRES 9000000
|
||||
|
||||
@@ -133,6 +133,10 @@
|
||||
|
||||
var/mode = 1
|
||||
|
||||
sprite_sheets = list(
|
||||
"Vox Armalis" = 'icons/mob/species/armalis/held.dmi'
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/energy/noisecannon/attack_hand(mob/user as mob)
|
||||
if(loc != user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
#define REAGENTS_OVERDOSE 30
|
||||
#define REM REAGENTS_EFFECT_MULTIPLIER
|
||||
|
||||
//Some on_mob_life() procs check for alien races.
|
||||
#define IS_DIONA 1
|
||||
#define IS_VOX 2
|
||||
|
||||
//The reaction procs must ALWAYS set src = null, this detaches the proc from the object (the reagent)
|
||||
//so that it can continue working when the reagent is deleted while the proc is still active.
|
||||
|
||||
@@ -26,6 +22,7 @@ datum
|
||||
var/custom_metabolism = REAGENTS_METABOLISM
|
||||
var/overdose = 0
|
||||
var/overdose_dam = 1
|
||||
var/scannable = 0 //shows up on health analyzers
|
||||
//var/list/viruses = list()
|
||||
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
|
||||
|
||||
@@ -412,6 +409,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE*2
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -782,6 +780,8 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C855DC"
|
||||
overdose = 60
|
||||
scannable = 1
|
||||
custom_metabolism = 0.025 // Lasts 10 minutes for 15 units
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if (volume > overdose)
|
||||
@@ -796,6 +796,8 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC"
|
||||
overdose = 30
|
||||
scannable = 1
|
||||
custom_metabolism = 0.025 // Lasts 10 minutes for 15 units
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if (volume > overdose)
|
||||
@@ -810,6 +812,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C805DC"
|
||||
overdose = 20
|
||||
custom_metabolism = 0.25 // Lasts 10 minutes for 15 units
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if (volume > overdose)
|
||||
@@ -839,6 +842,18 @@ datum
|
||||
description = "Sterilizes wounds in preparation for surgery."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
|
||||
//makes you squeaky clean
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||
if (method == TOUCH)
|
||||
M.germ_level -= min(volume*20, M.germ_level)
|
||||
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
O.germ_level -= min(volume*20, O.germ_level)
|
||||
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
T.germ_level -= min(volume*20, T.germ_level)
|
||||
|
||||
/* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||
src = null
|
||||
if (method==TOUCH)
|
||||
@@ -1000,6 +1015,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1035,6 +1051,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1052,6 +1069,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE/2
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN
|
||||
@@ -1069,6 +1087,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1092,6 +1111,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE/2
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1114,6 +1134,7 @@ datum
|
||||
description = "Tricordrazine is a highly potent stimulant, originally derived from cordrazine. Can be used to treat a wide range of injuries."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1133,6 +1154,7 @@ datum
|
||||
description = "Dylovene is a broad-spectrum antitoxin."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1191,6 +1213,7 @@ datum
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
custom_metabolism = 0.01
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1230,6 +1253,7 @@ datum
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
custom_metabolism = 0.05
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1265,6 +1289,7 @@ datum
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
custom_metabolism = 0.05
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1279,6 +1304,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1286,7 +1312,7 @@ datum
|
||||
M.eye_blind = max(M.eye_blind-5 , 0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
|
||||
if(istype(E))
|
||||
if(E.damage > 0)
|
||||
E.damage -= 1
|
||||
@@ -1300,13 +1326,15 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = 10
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/chest/C = H.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in C.internal_organs)
|
||||
|
||||
//Peridaxon is hard enough to get, it's probably fair to make this all internal organs
|
||||
for(var/datum/organ/internal/I in H.internal_organs)
|
||||
if(I.damage > 0)
|
||||
I.damage -= 0.20
|
||||
..()
|
||||
@@ -1319,6 +1347,7 @@ datum
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
if(M.stat == 2.0)
|
||||
@@ -1350,6 +1379,7 @@ datum
|
||||
description = "A chemical mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 170K for it to metabolise correctly."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1367,6 +1397,7 @@ datum
|
||||
description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1385,6 +1416,7 @@ datum
|
||||
reagent_state = SOLID
|
||||
color = "#669900" // rgb: 102, 153, 0
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -1414,6 +1446,7 @@ datum
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
custom_metabolism = 0.01
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
scannable = 1
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
..()
|
||||
@@ -1581,14 +1614,14 @@ datum
|
||||
var/turf/the_turf = get_turf(O)
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/datum/gas/volatile_fuel/fuel = new
|
||||
fuel.moles = 5
|
||||
fuel.moles = volume
|
||||
napalm.trace_gases += fuel
|
||||
the_turf.assume_air(napalm)
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
src = null
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/datum/gas/volatile_fuel/fuel = new
|
||||
fuel.moles = 5
|
||||
fuel.moles = volume
|
||||
napalm.trace_gases += fuel
|
||||
T.assume_air(napalm)
|
||||
return
|
||||
@@ -2970,7 +3003,7 @@ datum
|
||||
var/blur_start = 300 //amount absorbed after which mob starts getting blurred vision
|
||||
var/pass_out = 400 //amount absorbed after which mob starts passing out
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
on_mob_life(var/mob/living/M as mob, var/alien)
|
||||
M:nutrition += nutriment_factor
|
||||
holder.remove_reagent(src.id, FOOD_METABOLISM)
|
||||
|
||||
@@ -2986,6 +3019,9 @@ datum
|
||||
for(var/datum/reagent/ethanol/A in holder.reagent_list)
|
||||
if(isnum(A.data)) d += A.data
|
||||
|
||||
if(alien && alien == IS_SKRELL) //Skrell get very drunk very quickly.
|
||||
d*=5
|
||||
|
||||
M.dizziness += dizzy_adj.
|
||||
if(d >= slur_start && d < pass_out)
|
||||
if (!M:slurring) M:slurring = 1
|
||||
@@ -3001,7 +3037,7 @@ datum
|
||||
M:drowsyness = max(M:drowsyness, 30)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/liver/L = H.internal_organs["liver"]
|
||||
var/datum/organ/internal/liver/L = H.internal_organs_by_name["liver"]
|
||||
if (istype(L))
|
||||
L.take_damage(0.1, 1)
|
||||
H.adjustToxLoss(0.1)
|
||||
@@ -3238,13 +3274,13 @@ datum
|
||||
if(prob(30)) M.adjustToxLoss(2)
|
||||
if(prob(5)) if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/heart/L = H.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"]
|
||||
if (istype(L))
|
||||
L.take_damage(5, 0)
|
||||
if (300 to INFINITY)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/heart/L = H.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"]
|
||||
if (istype(L))
|
||||
L.take_damage(100, 0)
|
||||
holder.remove_reagent(src.id, FOOD_METABOLISM)
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
return
|
||||
if (can_operate(M)) //Checks if mob is lying down on table for surgery
|
||||
if (do_surgery(M,user,src))
|
||||
return
|
||||
|
||||
// this prevented pills, food, and other things from being picked up by bags.
|
||||
// possibly intentional, but removing it allows us to not duplicate functionality.
|
||||
|
||||
@@ -308,4 +308,4 @@
|
||||
desc = "A cup with the British flag emblazoned on it."
|
||||
icon_state = "britcup"
|
||||
volume = 30
|
||||
CoM = list("x"=15, "y"=13)
|
||||
CoM = list("x"=15, "y"=13)
|
||||
|
||||
@@ -1538,7 +1538,7 @@
|
||||
filling_color = "#ADAC7F"
|
||||
|
||||
var/wrapped = 0
|
||||
var/monkey_type = null
|
||||
var/monkey_type = /mob/living/carbon/monkey
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -1556,19 +1556,46 @@
|
||||
if(wrapped)
|
||||
Unwrap(user)
|
||||
|
||||
On_Consume(var/mob/M)
|
||||
M << "<span class = 'warning'>Something inside of you suddently expands!</span>"
|
||||
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
//Do not try to understand.
|
||||
var/obj/item/weapon/surprise = new/obj/item/weapon(M)
|
||||
var/mob/living/carbon/monkey/ook = new monkey_type(null) //no other way to get access to the vars, alas
|
||||
surprise.icon = ook.icon
|
||||
surprise.icon_state = ook.icon_state
|
||||
surprise.name = "malformed [ook.name]"
|
||||
surprise.desc = "Looks like \a very deformed [ook.name], a little small for its kind. It shows no signs of life."
|
||||
del(ook) //rip nullspace monkey
|
||||
surprise.transform *= 0.6
|
||||
surprise.add_blood(M)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/E = H.get_organ("chest")
|
||||
E.fracture()
|
||||
for (var/datum/organ/internal/I in E.internal_organs)
|
||||
I.take_damage(rand(I.min_bruised_damage, I.min_broken_damage+1))
|
||||
|
||||
if (!E.hidden && prob(60)) //set it snuggly
|
||||
E.hidden = surprise
|
||||
E.cavity = 0
|
||||
else //someone is having a bad day
|
||||
E.createwound(CUT, 30)
|
||||
E.embed(surprise)
|
||||
else if (ismonkey(M))
|
||||
M.visible_message("<span class='danger'>[M] suddenly tears in half!</span>")
|
||||
var/mob/living/carbon/monkey/ook = new monkey_type(M.loc)
|
||||
ook.name = "malformed [ook.name]"
|
||||
ook.transform *= 0.6
|
||||
ook.add_blood(M)
|
||||
M.gib()
|
||||
..()
|
||||
|
||||
proc/Expand()
|
||||
for(var/mob/M in viewers(src,7))
|
||||
M << "\red \The [src] expands!"
|
||||
if(monkey_type)
|
||||
switch(monkey_type)
|
||||
if("tajara")
|
||||
new /mob/living/carbon/monkey/tajara(get_turf(src))
|
||||
if("unathi")
|
||||
new /mob/living/carbon/monkey/unathi(get_turf(src))
|
||||
if("skrell")
|
||||
new /mob/living/carbon/monkey/skrell(get_turf(src))
|
||||
else
|
||||
new /mob/living/carbon/monkey(get_turf(src))
|
||||
new monkey_type(src)
|
||||
del(src)
|
||||
|
||||
proc/Unwrap(mob/user as mob)
|
||||
@@ -1586,18 +1613,18 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/farwacube
|
||||
name = "farwa cube"
|
||||
monkey_type ="tajara"
|
||||
monkey_type = /mob/living/carbon/monkey/tajara
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube
|
||||
name = "farwa cube"
|
||||
monkey_type ="tajara"
|
||||
monkey_type =/mob/living/carbon/monkey/tajara
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/stokcube
|
||||
name = "stok cube"
|
||||
monkey_type ="unathi"
|
||||
monkey_type = /mob/living/carbon/monkey/unathi
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube
|
||||
name = "stok cube"
|
||||
monkey_type ="unathi"
|
||||
monkey_type =/mob/living/carbon/monkey/unathi
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/neaeracube
|
||||
@@ -1605,7 +1632,7 @@
|
||||
monkey_type ="skrell"
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube
|
||||
name = "neaera cube"
|
||||
monkey_type ="skrell"
|
||||
monkey_type =/mob/living/carbon/monkey/skrell
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/spellburger
|
||||
|
||||
@@ -731,7 +731,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
var/mob/M = AM
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP))
|
||||
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled)
|
||||
return
|
||||
|
||||
M.stop_pulling()
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
/obj/structure/reagent_dispensers/fueltank/fire_act(datum/gas_mixture/air, temperature, volume)
|
||||
if(temperature > T0C+500)
|
||||
explode()
|
||||
return ..()
|
||||
|
||||
@@ -261,7 +261,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
files.UpdateTech(T, temp_tech[T])
|
||||
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
|
||||
files.UpdateDesign(linked_destroy.loaded_item.type)
|
||||
if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any.
|
||||
if(linked_lathe && linked_destroy.loaded_item.matter) //Also sends salvaged materials to a linked protolathe, if any.
|
||||
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["metal"]*linked_destroy.decon_mod))
|
||||
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
|
||||
linked_destroy.loaded_item = null
|
||||
|
||||
@@ -32,7 +32,7 @@ datum/genesequence
|
||||
var/list/accepted_fossil_types = list(/obj/item/weapon/fossil/plant)
|
||||
|
||||
|
||||
/obj/machinery/computer/reconstitutor/New()
|
||||
/obj/machinery/computer/reconstitutor/initialize()
|
||||
if(!undiscovered_genesequences)
|
||||
undiscovered_genesequences = master_controller.all_plant_genesequences.Copy()
|
||||
..()
|
||||
@@ -43,7 +43,7 @@ datum/genesequence
|
||||
pod1 = null
|
||||
circuit = "/obj/item/weapon/circuitboard/reconstitutor/animal"
|
||||
|
||||
/obj/machinery/computer/reconstitutor/animal/New()
|
||||
/obj/machinery/computer/reconstitutor/animal/initialize()
|
||||
undiscovered_genesequences = master_controller.all_animal_genesequences.Copy()
|
||||
..()
|
||||
|
||||
|
||||
@@ -110,4 +110,4 @@
|
||||
|
||||
/obj/machinery/alarm/isolation
|
||||
name = "Isolation room air control"
|
||||
req_access = list(access_research)
|
||||
req_one_access = list(access_research, access_atmospherics, access_engine_equip)
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/obj/machinery/computer/shuttle_control/mining
|
||||
name = "mining shuttle console"
|
||||
shuttle_tag = "Mining"
|
||||
req_access = list(access_mining)
|
||||
//req_access = list(access_mining)
|
||||
circuit = /obj/item/weapon/circuitboard/mining_shuttle
|
||||
|
||||
/obj/machinery/computer/shuttle_control/engineering
|
||||
name = "engineering shuttle console"
|
||||
shuttle_tag = "Engineering"
|
||||
req_one_access_txt = "11;24"
|
||||
//req_one_access_txt = "11;24"
|
||||
circuit = /obj/item/weapon/circuitboard/engineering_shuttle
|
||||
|
||||
/obj/machinery/computer/shuttle_control/research
|
||||
name = "research shuttle console"
|
||||
shuttle_tag = "Research"
|
||||
req_access = list(access_research)
|
||||
//req_access = list(access_research)
|
||||
circuit = /obj/item/weapon/circuitboard/research_shuttle
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
//shuttle moving state defines are in setup.dm
|
||||
|
||||
var/global/list/shuttles
|
||||
|
||||
/datum/shuttle
|
||||
var/warmup_time = 0
|
||||
var/moving_status = SHUTTLE_IDLE //prevents people from doing things they shouldn't when the shuttle is in transit
|
||||
var/moving_status = SHUTTLE_IDLE
|
||||
|
||||
var/docking_controller_tag //tag of the controller used to coordinate docking
|
||||
var/datum/computer/file/embedded_program/docking/docking_controller //the controller itself
|
||||
var/datum/computer/file/embedded_program/docking/docking_controller //the controller itself. (micro-controller, not game controller)
|
||||
|
||||
var/arrive_time = 0 //the time at which the shuttle arrives when long jumping
|
||||
|
||||
/datum/shuttle/proc/short_jump(var/area/origin,var/area/destination)
|
||||
if(moving_status != SHUTTLE_IDLE) return
|
||||
@@ -24,7 +24,8 @@ var/global/list/shuttles
|
||||
move(origin, destination)
|
||||
moving_status = SHUTTLE_IDLE
|
||||
|
||||
/datum/shuttle/proc/long_jump(var/area/departing,var/area/destination,var/area/interim,var/travel_time)
|
||||
/datum/shuttle/proc/long_jump(var/area/departing, var/area/destination, var/area/interim, var/travel_time, var/direction)
|
||||
//world << "shuttle/long_jump: departing=[departing], destination=[destination], interim=[interim], travel_time=[travel_time]"
|
||||
if(moving_status != SHUTTLE_IDLE) return
|
||||
|
||||
//it would be cool to play a sound here
|
||||
@@ -33,15 +34,17 @@ var/global/list/shuttles
|
||||
if (moving_status == SHUTTLE_IDLE)
|
||||
return //someone cancelled the launch
|
||||
|
||||
move(locate(departing),locate(interim))
|
||||
move(departing, interim, direction)
|
||||
|
||||
sleep(travel_time)
|
||||
moving_status = SHUTTLE_INTRANSIT
|
||||
arrive_time = world.time + travel_time*10
|
||||
while (world.time < arrive_time)
|
||||
sleep(5)
|
||||
|
||||
move(locate(interim),locate(destination))
|
||||
move(interim, destination, direction)
|
||||
|
||||
moving_status = SHUTTLE_IDLE
|
||||
|
||||
|
||||
/datum/shuttle/proc/dock()
|
||||
if (!docking_controller)
|
||||
return
|
||||
@@ -55,7 +58,6 @@ var/global/list/shuttles
|
||||
/datum/shuttle/proc/undock()
|
||||
if (!docking_controller)
|
||||
return
|
||||
|
||||
docking_controller.initiate_undocking()
|
||||
|
||||
/datum/shuttle/proc/current_dock_target()
|
||||
@@ -67,18 +69,19 @@ var/global/list/shuttles
|
||||
return 0
|
||||
|
||||
//just moves the shuttle from A to B, if it can be moved
|
||||
/datum/shuttle/proc/move(var/area/origin,var/area/destination)
|
||||
/datum/shuttle/proc/move(var/area/origin, var/area/destination, var/direction=null)
|
||||
|
||||
//world << "move_shuttle() called for [shuttle_tag] leaving [origin] en route to [destination]."
|
||||
|
||||
//world << "area_coming_from: [area_coming_from]"
|
||||
//world << "area_coming_from: [origin]"
|
||||
//world << "destination: [destination]"
|
||||
|
||||
if(origin == destination)
|
||||
//world << "cancelling move, shuttle will overlap."
|
||||
return
|
||||
|
||||
moving_status = SHUTTLE_INTRANSIT
|
||||
|
||||
if (docking_controller && !docking_controller.undocked())
|
||||
docking_controller.force_undock()
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
@@ -101,7 +104,7 @@ var/global/list/shuttles
|
||||
for(var/mob/living/simple_animal/pest in destination)
|
||||
pest.gib()
|
||||
|
||||
origin.move_contents_to(destination) //might need to use the "direction" argument here, I dunno.
|
||||
origin.move_contents_to(destination, direction=direction)
|
||||
|
||||
for(var/mob/M in destination)
|
||||
if(M.client)
|
||||
@@ -118,198 +121,6 @@ var/global/list/shuttles
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
/proc/setup_shuttles()
|
||||
shuttles = list()
|
||||
|
||||
var/datum/shuttle/ferry/shuttle
|
||||
|
||||
// Escape shuttle and pods
|
||||
shuttle = new/datum/shuttle/ferry/emergency()
|
||||
shuttle.location = 1
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/shuttle/escape/centcom)
|
||||
shuttle.area_station = locate(/area/shuttle/escape/station)
|
||||
shuttle.area_transition = locate(/area/shuttle/escape/transit)
|
||||
shuttle.travel_time = SHUTTLE_TRANSIT_DURATION
|
||||
//shuttle.docking_controller_tag = "supply_shuttle"
|
||||
//shuttle.dock_target_station = "cargo_bay"
|
||||
shuttles["Escape"] = shuttle
|
||||
|
||||
emergency_shuttle.shuttle = shuttle
|
||||
emergency_shuttle.setup_pods()
|
||||
|
||||
// Supply shuttle
|
||||
shuttle = new/datum/shuttle/ferry/supply()
|
||||
shuttle.location = 1
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/supply/dock)
|
||||
shuttle.area_station = locate(/area/supply/station)
|
||||
shuttle.docking_controller_tag = "supply_shuttle"
|
||||
shuttle.dock_target_station = "cargo_bay"
|
||||
shuttles["Supply"] = shuttle
|
||||
|
||||
supply_controller.shuttle = shuttle
|
||||
|
||||
// Admin shuttles.
|
||||
shuttle = new()
|
||||
shuttle.location = 1
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/shuttle/transport1/centcom)
|
||||
shuttle.area_station = locate(/area/shuttle/transport1/station)
|
||||
shuttle.docking_controller_tag = "centcom_shuttle"
|
||||
shuttle.dock_target_station = "centcom_shuttle_dock_airlock"
|
||||
shuttle.dock_target_offsite = "centcom_shuttle_bay"
|
||||
shuttles["Centcom"] = shuttle
|
||||
|
||||
shuttle = new()
|
||||
shuttle.location = 1
|
||||
shuttle.warmup_time = 10 //want some warmup time so people can cancel.
|
||||
shuttle.area_offsite = locate(/area/shuttle/administration/centcom)
|
||||
shuttle.area_station = locate(/area/shuttle/administration/station)
|
||||
shuttle.docking_controller_tag = "admin_shuttle"
|
||||
shuttle.dock_target_station = "admin_shuttle_dock_airlock"
|
||||
shuttle.dock_target_offsite = "admin_shuttle_bay"
|
||||
shuttles["Administration"] = shuttle
|
||||
|
||||
shuttle = new()
|
||||
shuttle.area_offsite = locate(/area/shuttle/alien/base)
|
||||
shuttle.area_station = locate(/area/shuttle/alien/mine)
|
||||
shuttles["Alien"] = shuttle
|
||||
|
||||
// Public shuttles
|
||||
shuttle = new()
|
||||
shuttle.location = 1
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/shuttle/constructionsite/site)
|
||||
shuttle.area_station = locate(/area/shuttle/constructionsite/station)
|
||||
shuttle.docking_controller_tag = "engineering_shuttle"
|
||||
shuttle.dock_target_station = "engineering_dock_airlock"
|
||||
shuttle.dock_target_offsite = "engineering_station_airlock"
|
||||
shuttles["Engineering"] = shuttle
|
||||
|
||||
shuttle = new()
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/shuttle/mining/outpost)
|
||||
shuttle.area_station = locate(/area/shuttle/mining/station)
|
||||
shuttle.docking_controller_tag = "mining_shuttle"
|
||||
shuttle.dock_target_station = "mining_dock_airlock"
|
||||
shuttle.dock_target_offsite = "mining_outpost_airlock"
|
||||
shuttles["Mining"] = shuttle
|
||||
|
||||
shuttle = new()
|
||||
shuttle.warmup_time = 10
|
||||
shuttle.area_offsite = locate(/area/shuttle/research/outpost)
|
||||
shuttle.area_station = locate(/area/shuttle/research/station)
|
||||
shuttle.docking_controller_tag = "research_shuttle"
|
||||
shuttle.dock_target_station = "research_dock_airlock"
|
||||
shuttle.dock_target_offsite = "research_outpost_dock"
|
||||
shuttles["Research"] = shuttle
|
||||
|
||||
// ERT Shuttle
|
||||
var/datum/shuttle/ferry/multidock/specops/ERT = new()
|
||||
ERT.location = 0
|
||||
ERT.warmup_time = 10
|
||||
ERT.area_offsite = locate(/area/shuttle/specops/station) //centcom is the home station, the Exodus is offsite
|
||||
ERT.area_station = locate(/area/shuttle/specops/centcom)
|
||||
ERT.docking_controller_tag = "specops_shuttle_port"
|
||||
ERT.docking_controller_tag_station = "specops_shuttle_port"
|
||||
ERT.docking_controller_tag_offsite = "specops_shuttle_fore"
|
||||
ERT.dock_target_station = "specops_centcom_dock"
|
||||
ERT.dock_target_offsite = "specops_dock_airlock"
|
||||
shuttles["Special Operations"] = ERT
|
||||
|
||||
//Vox Shuttle.
|
||||
var/datum/shuttle/multi_shuttle/VS = new/datum/shuttle/multi_shuttle()
|
||||
VS.origin = /area/shuttle/vox/station
|
||||
|
||||
VS.destinations = list(
|
||||
"Fore Starboard Solars" = /area/vox_station/northeast_solars,
|
||||
"Fore Port Solars" = /area/vox_station/northwest_solars,
|
||||
"Aft Starboard Solars" = /area/vox_station/southeast_solars,
|
||||
"Aft Port Solars" = /area/vox_station/southwest_solars,
|
||||
"Mining asteroid" = /area/vox_station/mining
|
||||
)
|
||||
|
||||
VS.announcer = "NSV Icarus"
|
||||
VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
|
||||
VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
|
||||
VS.interim = /area/vox_station/transit
|
||||
|
||||
VS.warmup_time = 10
|
||||
shuttles["Vox Skipjack"] = VS
|
||||
|
||||
//Nuke Ops shuttle.
|
||||
var/datum/shuttle/multi_shuttle/MS = new/datum/shuttle/multi_shuttle()
|
||||
MS.origin = /area/syndicate_station/start
|
||||
|
||||
MS.destinations = list(
|
||||
"Northwest of the station" = /area/syndicate_station/northwest,
|
||||
"North of the station" = /area/syndicate_station/north,
|
||||
"Northeast of the station" = /area/syndicate_station/northeast,
|
||||
"Southwest of the station" = /area/syndicate_station/southwest,
|
||||
"South of the station" = /area/syndicate_station/south,
|
||||
"Southeast of the station" = /area/syndicate_station/southeast,
|
||||
"Telecomms Satellite" = /area/syndicate_station/commssat,
|
||||
"Mining Asteroid" = /area/syndicate_station/mining
|
||||
)
|
||||
|
||||
MS.announcer = "NSV Icarus"
|
||||
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
|
||||
MS.interim = /area/syndicate_station/transit
|
||||
|
||||
MS.warmup_time = 10
|
||||
shuttles["Syndicate"] = MS
|
||||
|
||||
|
||||
/proc/setup_shuttle_docks()
|
||||
var/datum/shuttle/shuttle
|
||||
var/datum/shuttle/ferry/multidock/multidock
|
||||
var/list/dock_controller_map = list() //so we only have to iterate once through each list
|
||||
|
||||
//multidock shuttles
|
||||
var/list/dock_controller_map_station = list()
|
||||
var/list/dock_controller_map_offsite = list()
|
||||
|
||||
for (var/shuttle_tag in shuttles)
|
||||
shuttle = shuttles[shuttle_tag]
|
||||
if (shuttle.docking_controller_tag)
|
||||
dock_controller_map[shuttle.docking_controller_tag] = shuttle
|
||||
if (istype(shuttle, /datum/shuttle/ferry/multidock))
|
||||
multidock = shuttle
|
||||
dock_controller_map_station[multidock.docking_controller_tag_station] = multidock
|
||||
dock_controller_map_offsite[multidock.docking_controller_tag_offsite] = multidock
|
||||
|
||||
//search for the controllers, if we have one.
|
||||
if (dock_controller_map.len)
|
||||
for (var/obj/machinery/embedded_controller/radio/C in machines) //only radio controllers are supported at the moment
|
||||
if (istype(C.program, /datum/computer/file/embedded_program/docking))
|
||||
if (C.id_tag in dock_controller_map)
|
||||
shuttle = dock_controller_map[C.id_tag]
|
||||
shuttle.docking_controller = C.program
|
||||
dock_controller_map -= C.id_tag
|
||||
if (C.id_tag in dock_controller_map_station)
|
||||
multidock = dock_controller_map_station[C.id_tag]
|
||||
if (istype(multidock))
|
||||
multidock.docking_controller_station = C.program
|
||||
dock_controller_map_station -= C.id_tag
|
||||
if (C.id_tag in dock_controller_map_offsite)
|
||||
multidock = dock_controller_map_offsite[C.id_tag]
|
||||
if (istype(multidock))
|
||||
multidock.docking_controller_offsite = C.program
|
||||
dock_controller_map_offsite -= C.id_tag
|
||||
|
||||
//sanity check
|
||||
if (dock_controller_map.len || dock_controller_map_station.len || dock_controller_map_offsite.len)
|
||||
var/dat = ""
|
||||
for (var/dock_tag in dock_controller_map + dock_controller_map_station + dock_controller_map_offsite)
|
||||
dat += "\"[dock_tag]\", "
|
||||
world << "/red /b warning: shuttles with docking tags [dat] could not find their controllers!"
|
||||
|
||||
//makes all shuttles docked to something at round start go into the docked state
|
||||
for (var/shuttle_tag in shuttles)
|
||||
shuttle = shuttles[shuttle_tag]
|
||||
shuttle.dock()
|
||||
|
||||
//returns 1 if the shuttle has a valid arrive time
|
||||
/datum/shuttle/proc/has_arrive_time()
|
||||
return (moving_status == SHUTTLE_INTRANSIT)
|
||||
@@ -1,202 +1,26 @@
|
||||
#define IDLE_STATE 0
|
||||
#define WAIT_LAUNCH 1
|
||||
#define WAIT_ARRIVE 2
|
||||
#define WAIT_FINISH 3
|
||||
|
||||
|
||||
/datum/shuttle/ferry
|
||||
var/location = 0 //0 = at area_station, 1 = at area_offsite
|
||||
var/direction = 0 //0 = going to station, 1 = going to offsite.
|
||||
var/process_state = IDLE_STATE
|
||||
|
||||
//this mutex ensures that only one console is processing the shuttle's controls at a time
|
||||
var/obj/machinery/computer/shuttle_control/in_use = null //this doesn't have to be a console...
|
||||
|
||||
var/area_transition
|
||||
var/travel_time = 0
|
||||
|
||||
var/area_station
|
||||
var/area_offsite
|
||||
//TODO: change location to a string and use a mapping for area and dock targets.
|
||||
var/dock_target_station
|
||||
var/dock_target_offsite
|
||||
|
||||
/datum/shuttle/ferry/short_jump(var/area/origin,var/area/destination)
|
||||
if(isnull(location))
|
||||
return
|
||||
|
||||
if(!destination)
|
||||
destination = get_location_area(!location)
|
||||
if(!origin)
|
||||
origin = get_location_area(location)
|
||||
|
||||
direction = !location
|
||||
..(origin, destination)
|
||||
|
||||
/datum/shuttle/ferry/long_jump(var/area/departing,var/area/destination,var/area/interim,var/travel_time)
|
||||
if(isnull(location))
|
||||
return
|
||||
|
||||
if(!destination)
|
||||
destination = get_location_area(!location)
|
||||
if(!departing)
|
||||
departing = get_location_area(location)
|
||||
|
||||
direction = !location
|
||||
..(departing, destination, interim, travel_time)
|
||||
|
||||
/datum/shuttle/ferry/move(var/area/origin,var/area/destination)
|
||||
if(!destination)
|
||||
destination = get_location_area(!location)
|
||||
if(!origin)
|
||||
origin = get_location_area(location)
|
||||
|
||||
if (docking_controller && !docking_controller.undocked())
|
||||
docking_controller.force_undock()
|
||||
..(origin, destination)
|
||||
|
||||
|
||||
if (destination == area_station) location = 0
|
||||
if (destination == area_offsite) location = 1
|
||||
//if this is a long_jump retain the location we were last at until we get to the new one
|
||||
|
||||
/datum/shuttle/ferry/proc/get_location_area(location_id = null)
|
||||
if (isnull(location_id))
|
||||
location_id = location
|
||||
|
||||
if (!location_id)
|
||||
return area_station
|
||||
return area_offsite
|
||||
|
||||
/datum/shuttle/ferry/proc/process_shuttle()
|
||||
switch(process_state)
|
||||
if (WAIT_LAUNCH)
|
||||
if (skip_docking_checks() || docking_controller.can_launch())
|
||||
|
||||
if (travel_time && area_transition)
|
||||
long_jump(null, null, area_transition, travel_time)
|
||||
else
|
||||
short_jump()
|
||||
|
||||
process_state = WAIT_ARRIVE
|
||||
if (WAIT_ARRIVE)
|
||||
if (moving_status == SHUTTLE_IDLE)
|
||||
dock()
|
||||
process_state = WAIT_FINISH
|
||||
if (WAIT_FINISH)
|
||||
if (skip_docking_checks() || docking_controller.docked())
|
||||
process_state = IDLE_STATE
|
||||
in_use = null //release lock
|
||||
arrived()
|
||||
|
||||
/datum/shuttle/ferry/current_dock_target()
|
||||
var/dock_target
|
||||
if (!location) //station
|
||||
dock_target = dock_target_station
|
||||
else
|
||||
dock_target = dock_target_offsite
|
||||
return dock_target
|
||||
|
||||
|
||||
/datum/shuttle/ferry/proc/launch(var/obj/machinery/computer/shuttle_control/user)
|
||||
if (!can_launch()) return
|
||||
|
||||
in_use = user //obtain an exclusive lock on the shuttle
|
||||
|
||||
process_state = WAIT_LAUNCH
|
||||
undock()
|
||||
|
||||
/datum/shuttle/ferry/proc/force_launch(var/obj/machinery/computer/shuttle_control/user)
|
||||
if (!can_force()) return
|
||||
|
||||
in_use = user //obtain an exclusive lock on the shuttle
|
||||
|
||||
short_jump()
|
||||
|
||||
process_state = WAIT_ARRIVE
|
||||
|
||||
/datum/shuttle/ferry/proc/cancel_launch(var/obj/machinery/computer/shuttle_control/user)
|
||||
if (!can_cancel()) return
|
||||
|
||||
moving_status = SHUTTLE_IDLE
|
||||
process_state = WAIT_FINISH
|
||||
|
||||
if (docking_controller && !docking_controller.undocked())
|
||||
docking_controller.force_undock()
|
||||
|
||||
spawn(10)
|
||||
dock()
|
||||
|
||||
return
|
||||
|
||||
/datum/shuttle/ferry/proc/can_launch()
|
||||
if (moving_status != SHUTTLE_IDLE)
|
||||
return 0
|
||||
|
||||
if (in_use)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/datum/shuttle/ferry/proc/can_force()
|
||||
if (moving_status == SHUTTLE_IDLE && process_state == WAIT_LAUNCH)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/shuttle/ferry/proc/can_cancel()
|
||||
if (moving_status == SHUTTLE_WARMUP || process_state == WAIT_LAUNCH)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//This gets called when the shuttle finishes arriving at it's destination
|
||||
//This can be used by subtypes to do things when the shuttle arrives.
|
||||
/datum/shuttle/ferry/proc/arrived()
|
||||
return //do nothing for now
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle_control
|
||||
name = "shuttle control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
req_access = list(access_engine)
|
||||
circuit = null
|
||||
|
||||
var/shuttle_tag // Used to coordinate data in shuttle controller.
|
||||
var/hacked = 0 // Has been emagged, no access restrictions.
|
||||
var/launch_override = 0
|
||||
|
||||
|
||||
|
||||
//TODO move this stuff into the shuttle datum itself, instead of manipulating the shuttle's members
|
||||
/obj/machinery/computer/shuttle_control/process()
|
||||
if (!shuttles || !(shuttle_tag in shuttles))
|
||||
return
|
||||
|
||||
var/datum/shuttle/ferry/shuttle = shuttles[shuttle_tag]
|
||||
if (!istype(shuttle))
|
||||
return
|
||||
|
||||
if (shuttle.in_use == src)
|
||||
shuttle.process_shuttle()
|
||||
|
||||
/obj/machinery/computer/shuttle_control/Del()
|
||||
var/datum/shuttle/ferry/shuttle = shuttles[shuttle_tag]
|
||||
if (!istype(shuttle))
|
||||
return
|
||||
|
||||
if (shuttle.in_use == src)
|
||||
shuttle.in_use = null //shuttle may not dock properly if this gets deleted while in transit, but its not a big deal
|
||||
|
||||
/obj/machinery/computer/shuttle_control/attack_hand(user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
//src.add_fingerprint(user) //shouldn't need fingerprints just for looking at it.
|
||||
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied."
|
||||
return 1
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
var/data[0]
|
||||
var/datum/shuttle/ferry/shuttle = shuttles[shuttle_tag]
|
||||
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
|
||||
if (!istype(shuttle))
|
||||
return
|
||||
|
||||
@@ -241,7 +65,6 @@
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
//TODO: Canceling launches, dock overrides using the console, forcing dock/undock
|
||||
/obj/machinery/computer/shuttle_control/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
@@ -249,7 +72,7 @@
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
var/datum/shuttle/ferry/shuttle = shuttles[shuttle_tag]
|
||||
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
|
||||
if (!istype(shuttle))
|
||||
return
|
||||
|
||||
@@ -258,13 +81,13 @@
|
||||
if(href_list["force"])
|
||||
shuttle.force_launch(src)
|
||||
else if(href_list["cancel"])
|
||||
shuttle.cancel_launch()
|
||||
|
||||
shuttle.cancel_launch(src)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/emag))
|
||||
src.req_access = list()
|
||||
src.req_one_access = list()
|
||||
hacked = 1
|
||||
usr << "You short out the console's ID checking system. It's now available to everyone!"
|
||||
else
|
||||
@@ -272,9 +95,3 @@
|
||||
|
||||
/obj/machinery/computer/shuttle_control/bullet_act(var/obj/item/projectile/Proj)
|
||||
visible_message("[Proj] ricochets off [src]!")
|
||||
|
||||
#undef IDLE_STATE
|
||||
#undef WAIT_LAUNCH
|
||||
#undef WAIT_ARRIVE
|
||||
#undef WAIT_FINISH
|
||||
|
||||
|
||||
@@ -1,45 +1,260 @@
|
||||
|
||||
|
||||
/datum/shuttle/ferry/emergency
|
||||
var/jump_time = null //the time at which the shuttle last jumped. Used for ETAs
|
||||
//pass
|
||||
|
||||
/datum/shuttle/ferry/emergency/arrived()
|
||||
if (istype(in_use, /obj/machinery/computer/shuttle_control/emergency))
|
||||
var/obj/machinery/computer/shuttle_control/emergency/C = in_use
|
||||
C.reset_authorization()
|
||||
|
||||
emergency_shuttle.shuttle_arrived()
|
||||
|
||||
/datum/shuttle/ferry/emergency/move(var/area/origin,var/area/destination)
|
||||
if (destination == area_transition)
|
||||
jump_time = world.time
|
||||
/datum/shuttle/ferry/emergency/long_jump(var/area/departing, var/area/destination, var/area/interim, var/travel_time, var/direction)
|
||||
//world << "shuttle/ferry/emergency/long_jump: departing=[departing], destination=[destination], interim=[interim], travel_time=[travel_time]"
|
||||
if (!location)
|
||||
travel_time = SHUTTLE_TRANSIT_DURATION_RETURN
|
||||
else
|
||||
jump_time = null
|
||||
|
||||
if (!location) //leaving the station
|
||||
travel_time = SHUTTLE_TRANSIT_DURATION
|
||||
|
||||
//update move_time so we get correct ETAs
|
||||
move_time = travel_time
|
||||
|
||||
..()
|
||||
|
||||
/datum/shuttle/ferry/emergency/move(var/area/origin,var/area/destination)
|
||||
if (origin == area_station) //leaving the station
|
||||
emergency_shuttle.departed = 1
|
||||
captain_announce("The Emergency Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
||||
|
||||
if (emergency_shuttle.evac)
|
||||
captain_announce("The Emergency Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
||||
else
|
||||
captain_announce("The Crew Transfer Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
||||
|
||||
..(origin, destination)
|
||||
|
||||
/datum/shuttle/ferry/emergency/can_launch(var/user)
|
||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
|
||||
var/obj/machinery/computer/shuttle_control/emergency/C = user
|
||||
if (!C.has_authorization())
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/shuttle/ferry/emergency/can_force(var/user)
|
||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
|
||||
var/obj/machinery/computer/shuttle_control/emergency/C = user
|
||||
|
||||
//initiating or cancelling a launch ALWAYS requires authorization, but if we are already set to launch anyways than forcing does not.
|
||||
//this is so that people can force launch if the docking controller cannot safely undock without needing X heads to swipe.
|
||||
if (process_state != WAIT_LAUNCH && !C.has_authorization())
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/shuttle/ferry/emergency/can_cancel(var/user)
|
||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
|
||||
var/obj/machinery/computer/shuttle_control/emergency/C = user
|
||||
if (!C.has_authorization())
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/datum/shuttle/ferry/emergency/launch(var/user)
|
||||
if (!can_launch(user)) return
|
||||
|
||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
|
||||
if (emergency_shuttle.autopilot)
|
||||
emergency_shuttle.autopilot = 0
|
||||
world << "\blue <B>Alert: The shuttle autopilot has been overridden. Launch sequence initiated!</B>"
|
||||
|
||||
..(user)
|
||||
|
||||
/datum/shuttle/ferry/emergency/force_launch(var/user)
|
||||
if (!can_force(user)) return
|
||||
|
||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
|
||||
if (emergency_shuttle.autopilot)
|
||||
emergency_shuttle.autopilot = 0
|
||||
world << "\blue <B>Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!</B>"
|
||||
|
||||
..(user)
|
||||
|
||||
/datum/shuttle/ferry/emergency/cancel_launch(var/user)
|
||||
if (!can_cancel(user)) return
|
||||
|
||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
|
||||
if (emergency_shuttle.autopilot)
|
||||
emergency_shuttle.autopilot = 0
|
||||
world << "\blue <B>Alert: The shuttle autopilot has been overridden. Launch sequence aborted!</B>"
|
||||
|
||||
..(user)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emergency
|
||||
shuttle_tag = "Escape"
|
||||
var/debug = 0
|
||||
var/req_authorizations = 2
|
||||
var/list/authorized = list()
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emergency/proc/has_authorization()
|
||||
return (authorized.len >= req_authorizations || emagged)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emergency/proc/reset_authorization()
|
||||
//no need to reset emagged status. If they really want to go back to the station they can.
|
||||
authorized = initial(authorized)
|
||||
|
||||
//returns 1 if the ID was accepted and a new authorization was added, 0 otherwise
|
||||
/obj/machinery/computer/shuttle_control/emergency/proc/read_authorization(var/ident)
|
||||
if (!ident)
|
||||
return 0
|
||||
if (authorized.len >= req_authorizations)
|
||||
return 0 //don't need any more
|
||||
|
||||
var/list/access
|
||||
var/auth_name
|
||||
var/dna_hash
|
||||
|
||||
if(istype(ident, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/ID = ident
|
||||
access = ID.access
|
||||
auth_name = "[ID.registered_name] ([ID.assignment])"
|
||||
dna_hash = ID.dna_hash
|
||||
|
||||
if(istype(ident, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/PDA = ident
|
||||
access = PDA.id.access
|
||||
auth_name = "[PDA.id.registered_name] ([PDA.id.assignment])"
|
||||
dna_hash = PDA.id.dna_hash
|
||||
|
||||
if (!access || !istype(access))
|
||||
return 0 //not an ID
|
||||
|
||||
if (dna_hash in authorized)
|
||||
src.visible_message("[src] buzzes. That ID has already been scanned.")
|
||||
return 0
|
||||
|
||||
if (!(access_heads in access))
|
||||
src.visible_message("[src] buzzes, rejecting [ident].")
|
||||
return 0
|
||||
|
||||
src.visible_message("[src] beeps as it scans [ident].")
|
||||
authorized[dna_hash] = auth_name
|
||||
if (req_authorizations - authorized.len)
|
||||
world << "\blue <B>Alert: [req_authorizations - authorized.len] authorization\s needed to override the shuttle autopilot.</B>"
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
user << "\blue You short out the [src]'s authorization protocols."
|
||||
emagged = 1
|
||||
return
|
||||
|
||||
read_authorization(W)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emergency/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
var/data[0]
|
||||
var/datum/shuttle/ferry/emergency/shuttle = shuttle_controller.shuttles[shuttle_tag]
|
||||
if (!istype(shuttle))
|
||||
return
|
||||
|
||||
var/shuttle_state
|
||||
switch(shuttle.moving_status)
|
||||
if(SHUTTLE_IDLE) shuttle_state = "idle"
|
||||
if(SHUTTLE_WARMUP) shuttle_state = "warmup"
|
||||
if(SHUTTLE_INTRANSIT) shuttle_state = "in_transit"
|
||||
|
||||
var/shuttle_status
|
||||
switch (shuttle.process_state)
|
||||
if(IDLE_STATE)
|
||||
if (shuttle.in_use)
|
||||
shuttle_status = "Busy."
|
||||
else if (!shuttle.location)
|
||||
shuttle_status = "Standing-by at [station_name]."
|
||||
else
|
||||
shuttle_status = "Standing-by at Central Command."
|
||||
if(WAIT_LAUNCH)
|
||||
shuttle_status = "Shuttle has recieved command and will depart shortly."
|
||||
if(WAIT_ARRIVE)
|
||||
shuttle_status = "Proceeding to destination."
|
||||
if(WAIT_FINISH)
|
||||
shuttle_status = "Arriving at destination now."
|
||||
|
||||
//build a list of authorizations
|
||||
var/list/auth_list[req_authorizations]
|
||||
|
||||
if (!emagged)
|
||||
var/i = 1
|
||||
for (var/dna_hash in authorized)
|
||||
auth_list[i++] = list("auth_name"=authorized[dna_hash], "auth_hash"=dna_hash)
|
||||
|
||||
while (i <= req_authorizations) //fill up the rest of the list with blank entries
|
||||
auth_list[i++] = list("auth_name"="", "auth_hash"=null)
|
||||
else
|
||||
for (var/i = 1; i <= req_authorizations; i++)
|
||||
auth_list[i] = list("auth_name"="<font color=\"red\">ERROR</font>", "auth_hash"=null)
|
||||
|
||||
var/has_auth = has_authorization()
|
||||
|
||||
data = list(
|
||||
"shuttle_status" = shuttle_status,
|
||||
"shuttle_state" = shuttle_state,
|
||||
"has_docking" = shuttle.docking_controller? 1 : 0,
|
||||
"docking_status" = shuttle.docking_controller? shuttle.docking_controller.get_docking_status() : null,
|
||||
"docking_override" = shuttle.docking_controller? shuttle.docking_controller.override_enabled : null,
|
||||
"can_launch" = shuttle.can_launch(src),
|
||||
"can_cancel" = shuttle.can_cancel(src),
|
||||
"can_force" = shuttle.can_force(src),
|
||||
"auth_list" = auth_list,
|
||||
"has_auth" = has_auth,
|
||||
"user" = debug? user : null,
|
||||
)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "escape_shuttle_control_console.tmpl", "Shuttle Control", 470, 420)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emergency/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(href_list["auth"])
|
||||
/*
|
||||
//This doesn't work at all.
|
||||
if (!emagged && href_list["auth"] == -1)
|
||||
//They selected an empty entry. Try to scan their id.
|
||||
if (ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!read_authorization(H.get_active_hand())) //try to read what's in their hand first
|
||||
read_authorization(H.wear_id)
|
||||
else
|
||||
*/
|
||||
//remove the authorization
|
||||
var/dna_hash = href_list["auth"]
|
||||
authorized -= dna_hash
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/shuttle/ferry/escape_pod
|
||||
//pass
|
||||
var/datum/computer/file/embedded_program/docking/simple/escape_pod/arming_controller
|
||||
|
||||
/datum/shuttle/ferry/escape_pod/can_launch()
|
||||
if(arming_controller && !arming_controller.armed)
|
||||
return 0
|
||||
if(location)
|
||||
return 0 //it's a one-way trip.
|
||||
return ..()
|
||||
|
||||
/datum/shuttle/ferry/escape_pod/can_force()
|
||||
return 0
|
||||
if (arming_controller.eject_time && world.time < arming_controller.eject_time + 50)
|
||||
return 0 //dont allow force launching until 5 seconds after the arming controller has reached it's countdown
|
||||
return ..()
|
||||
|
||||
/datum/shuttle/ferry/escape_pod/can_cancel()
|
||||
return 0
|
||||
|
||||
//TODO replace this with proper door controllers
|
||||
/datum/shuttle/ferry/escape_pod/move(var/area/origin,var/area/destination)
|
||||
for(var/obj/machinery/door/D in origin)
|
||||
spawn(0)
|
||||
D.close()
|
||||
|
||||
..(origin, destination)
|
||||
|
||||
for(var/obj/machinery/door/D in destination)
|
||||
spawn(0)
|
||||
D.open()
|
||||
@@ -0,0 +1,165 @@
|
||||
#define IDLE_STATE 0
|
||||
#define WAIT_LAUNCH 1
|
||||
#define WAIT_ARRIVE 2
|
||||
#define WAIT_FINISH 3
|
||||
|
||||
#define DOCK_ATTEMPT_TIMEOUT 200 //how long in ticks we wait before assuming the docking controller is broken or blown up.
|
||||
|
||||
/datum/shuttle/ferry
|
||||
var/location = 0 //0 = at area_station, 1 = at area_offsite
|
||||
var/direction = 0 //0 = going to station, 1 = going to offsite.
|
||||
var/process_state = IDLE_STATE
|
||||
|
||||
var/in_use = null //tells the controller whether this shuttle needs processing
|
||||
|
||||
var/area_transition
|
||||
var/move_time = 0 //the time spent in the transition area
|
||||
var/transit_direction = null //needed for area/move_contents_to() to properly handle shuttle corners - not exactly sure how it works.
|
||||
|
||||
var/area_station
|
||||
var/area_offsite
|
||||
//TODO: change location to a string and use a mapping for area and dock targets.
|
||||
var/dock_target_station
|
||||
var/dock_target_offsite
|
||||
|
||||
var/last_dock_attempt_time = 0
|
||||
|
||||
/datum/shuttle/ferry/short_jump(var/area/origin,var/area/destination)
|
||||
if(isnull(location))
|
||||
return
|
||||
|
||||
if(!destination)
|
||||
destination = get_location_area(!location)
|
||||
if(!origin)
|
||||
origin = get_location_area(location)
|
||||
|
||||
direction = !location
|
||||
..(origin, destination)
|
||||
|
||||
/datum/shuttle/ferry/long_jump(var/area/departing, var/area/destination, var/area/interim, var/travel_time, var/direction)
|
||||
//world << "shuttle/ferry/long_jump: departing=[departing], destination=[destination], interim=[interim], travel_time=[travel_time]"
|
||||
if(isnull(location))
|
||||
return
|
||||
|
||||
if(!destination)
|
||||
destination = get_location_area(!location)
|
||||
if(!departing)
|
||||
departing = get_location_area(location)
|
||||
|
||||
direction = !location
|
||||
..(departing, destination, interim, travel_time, direction)
|
||||
|
||||
/datum/shuttle/ferry/move(var/area/origin,var/area/destination)
|
||||
..(origin, destination)
|
||||
|
||||
if (destination == area_station) location = 0
|
||||
if (destination == area_offsite) location = 1
|
||||
//if this is a long_jump retain the location we were last at until we get to the new one
|
||||
|
||||
/datum/shuttle/ferry/dock()
|
||||
..()
|
||||
last_dock_attempt_time = world.time
|
||||
|
||||
/datum/shuttle/ferry/proc/get_location_area(location_id = null)
|
||||
if (isnull(location_id))
|
||||
location_id = location
|
||||
|
||||
if (!location_id)
|
||||
return area_station
|
||||
return area_offsite
|
||||
|
||||
/datum/shuttle/ferry/proc/process()
|
||||
switch(process_state)
|
||||
if (WAIT_LAUNCH)
|
||||
if (skip_docking_checks() || docking_controller.can_launch())
|
||||
|
||||
//world << "shuttle/ferry/process: area_transition=[area_transition], travel_time=[travel_time]"
|
||||
if (move_time && area_transition)
|
||||
long_jump(interim=area_transition, travel_time=move_time, direction=transit_direction)
|
||||
else
|
||||
short_jump()
|
||||
|
||||
process_state = WAIT_ARRIVE
|
||||
if (WAIT_ARRIVE)
|
||||
if (moving_status == SHUTTLE_IDLE)
|
||||
dock()
|
||||
in_use = null //release lock
|
||||
process_state = WAIT_FINISH
|
||||
if (WAIT_FINISH)
|
||||
if (skip_docking_checks() || docking_controller.docked() || world.time > last_dock_attempt_time + DOCK_ATTEMPT_TIMEOUT)
|
||||
process_state = IDLE_STATE
|
||||
arrived()
|
||||
|
||||
/datum/shuttle/ferry/current_dock_target()
|
||||
var/dock_target
|
||||
if (!location) //station
|
||||
dock_target = dock_target_station
|
||||
else
|
||||
dock_target = dock_target_offsite
|
||||
return dock_target
|
||||
|
||||
|
||||
/datum/shuttle/ferry/proc/launch(var/user)
|
||||
if (!can_launch()) return
|
||||
|
||||
in_use = user //obtain an exclusive lock on the shuttle
|
||||
|
||||
process_state = WAIT_LAUNCH
|
||||
undock()
|
||||
|
||||
/datum/shuttle/ferry/proc/force_launch(var/user)
|
||||
if (!can_force()) return
|
||||
|
||||
in_use = user //obtain an exclusive lock on the shuttle
|
||||
|
||||
if (move_time && area_transition)
|
||||
long_jump(interim=area_transition, travel_time=move_time, direction=transit_direction)
|
||||
else
|
||||
short_jump()
|
||||
|
||||
|
||||
process_state = WAIT_ARRIVE
|
||||
|
||||
/datum/shuttle/ferry/proc/cancel_launch(var/user)
|
||||
if (!can_cancel()) return
|
||||
|
||||
moving_status = SHUTTLE_IDLE
|
||||
process_state = WAIT_FINISH
|
||||
in_use = null
|
||||
|
||||
if (docking_controller && !docking_controller.undocked())
|
||||
docking_controller.force_undock()
|
||||
|
||||
spawn(10)
|
||||
dock()
|
||||
|
||||
return
|
||||
|
||||
/datum/shuttle/ferry/proc/can_launch()
|
||||
if (moving_status != SHUTTLE_IDLE)
|
||||
return 0
|
||||
|
||||
if (in_use)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/datum/shuttle/ferry/proc/can_force()
|
||||
if (moving_status == SHUTTLE_IDLE && process_state == WAIT_LAUNCH)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/shuttle/ferry/proc/can_cancel()
|
||||
if (moving_status == SHUTTLE_WARMUP || process_state == WAIT_LAUNCH)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//returns 1 if the shuttle is getting ready to move, but is not in transit yet
|
||||
/datum/shuttle/ferry/proc/is_launching()
|
||||
return (moving_status == SHUTTLE_WARMUP || process_state == WAIT_LAUNCH)
|
||||
|
||||
//This gets called when the shuttle finishes arriving at it's destination
|
||||
//This can be used by subtypes to do things when the shuttle arrives.
|
||||
/datum/shuttle/ferry/proc/arrived()
|
||||
return //do nothing for now
|
||||
|
||||
@@ -35,19 +35,22 @@
|
||||
if(announcer)
|
||||
announcer.autosay(message, "A.L.I.C.E.", "Response Team")
|
||||
|
||||
/datum/shuttle/ferry/multidock/specops/launch(var/obj/machinery/computer/shuttle_control/user)
|
||||
/datum/shuttle/ferry/multidock/specops/launch(var/user)
|
||||
if (!can_launch())
|
||||
return
|
||||
|
||||
if(world.time <= reset_time)
|
||||
user.visible_message("\blue Central Command will not allow the Special Operations shuttle to launch yet.")
|
||||
if (((world.time - reset_time)/10) > 60)
|
||||
user.visible_message("\blue [-((world.time - reset_time)/10)/60] minutes remain!")
|
||||
else
|
||||
user.visible_message("\blue [-(world.time - reset_time)/10] seconds remain!")
|
||||
return
|
||||
if (istype(user, /obj/machinery/computer))
|
||||
var/obj/machinery/computer/C = user
|
||||
|
||||
if(world.time <= reset_time)
|
||||
C.visible_message("\blue Central Command will not allow the Special Operations shuttle to launch yet.")
|
||||
if (((world.time - reset_time)/10) > 60)
|
||||
C.visible_message("\blue [-((world.time - reset_time)/10)/60] minutes remain!")
|
||||
else
|
||||
C.visible_message("\blue [-(world.time - reset_time)/10] seconds remain!")
|
||||
return
|
||||
|
||||
user.visible_message("\blue The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds.")
|
||||
C.visible_message("\blue The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds.")
|
||||
|
||||
if (location) //returning
|
||||
radio_announce("THE SPECIAL OPERATIONS SHUTTLE IS PREPARING TO RETURN")
|
||||
@@ -55,10 +58,6 @@
|
||||
radio_announce("THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH")
|
||||
|
||||
sleep_until_launch()
|
||||
if (cancel_countdown)
|
||||
radio_announce("ALERT: LAUNCH SEQUENCE ABORTED")
|
||||
user.visible_message("\red Launch sequence aborted.")
|
||||
return
|
||||
|
||||
//launch
|
||||
radio_announce("ALERT: INITIATING LAUNCH SEQUENCE")
|
||||
@@ -79,8 +78,17 @@
|
||||
reset_time = world.time + specops_return_delay //set the timeout
|
||||
|
||||
/datum/shuttle/ferry/multidock/specops/cancel_launch()
|
||||
..()
|
||||
if (!can_cancel())
|
||||
return
|
||||
|
||||
cancel_countdown = 1
|
||||
radio_announce("ALERT: LAUNCH SEQUENCE ABORTED")
|
||||
if (istype(in_use, /obj/machinery/computer))
|
||||
var/obj/machinery/computer/C = in_use
|
||||
C.visible_message("\red Launch sequence aborted.")
|
||||
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/datum/shuttle/ferry/multidock/specops/can_launch()
|
||||
@@ -120,6 +128,7 @@
|
||||
//Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
|
||||
|
||||
sleep(5)
|
||||
|
||||
launch_prep = 0
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
/datum/shuttle/ferry/supply
|
||||
var/away_location = 1 //the location to hide at while pretending to be in-transit
|
||||
var/arrive_time = 0
|
||||
var/late_chance = 80
|
||||
var/max_late_time = 300
|
||||
|
||||
@@ -32,6 +31,7 @@
|
||||
|
||||
if (at_station() && forbidden_atoms_check())
|
||||
//cancel the launch because of forbidden atoms. announce over supply channel?
|
||||
moving_status = SHUTTLE_IDLE
|
||||
return
|
||||
|
||||
//We pretend it's a long_jump by making the shuttle stay at centcom for the "in-transit" period.
|
||||
@@ -47,20 +47,17 @@
|
||||
sleep(5)
|
||||
|
||||
if (destination != away_area)
|
||||
//late
|
||||
if (prob(late_chance))
|
||||
sleep(rand(0,max_late_time))
|
||||
|
||||
move(away_area, destination)
|
||||
|
||||
//late
|
||||
if (prob(late_chance))
|
||||
sleep(rand(0,max_late_time))
|
||||
|
||||
moving_status = SHUTTLE_IDLE
|
||||
|
||||
if (!at_station()) //at centcom
|
||||
supply_controller.sell()
|
||||
|
||||
/datum/shuttle/ferry/emergency/long_jump(var/area/departing,var/area/destination,var/area/interim,var/travel_time)
|
||||
short_jump(departing, destination) //long jumps are disabled
|
||||
|
||||
// returns 1 if the supply shuttle should be prevented from moving because it contains forbidden atoms
|
||||
/datum/shuttle/ferry/supply/proc/forbidden_atoms_check()
|
||||
if (!at_station())
|
||||
@@ -71,10 +68,6 @@
|
||||
/datum/shuttle/ferry/supply/proc/at_station()
|
||||
return (!location)
|
||||
|
||||
//returns 1 if the shuttle is moving and we can show valid ETAs
|
||||
/datum/shuttle/ferry/supply/proc/has_eta()
|
||||
return (moving_status == SHUTTLE_INTRANSIT)
|
||||
|
||||
//returns 1 if the shuttle is idle and we can still mess with the cargo shopping list
|
||||
/datum/shuttle/ferry/supply/proc/idle()
|
||||
return (moving_status == SHUTTLE_IDLE)
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
|
||||
var/cloaked = 1
|
||||
var/at_origin = 1
|
||||
var/returned_home = 0
|
||||
var/move_time = 240
|
||||
var/cooldown = 200
|
||||
var/last_move = 0
|
||||
var/cooldown = 20
|
||||
var/last_move = 0 //the time at which we last moved
|
||||
|
||||
var/announcer
|
||||
var/arrival_message
|
||||
@@ -21,6 +22,12 @@
|
||||
..()
|
||||
if(origin) last_departed = origin
|
||||
|
||||
/datum/shuttle/multi_shuttle/move(var/area/origin, var/area/destination)
|
||||
..()
|
||||
last_move = world.time
|
||||
if (destination == src.origin)
|
||||
returned_home = 1
|
||||
|
||||
/datum/shuttle/multi_shuttle/proc/announce_departure()
|
||||
|
||||
if(cloaked || isnull(departure_message))
|
||||
@@ -35,6 +42,7 @@
|
||||
|
||||
command_alert(arrival_message,(announcer ? announcer : "Central Command"))
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle_control/multi
|
||||
icon_state = "syndishuttle"
|
||||
|
||||
@@ -44,7 +52,7 @@
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
|
||||
var/datum/shuttle/multi_shuttle/MS = shuttles[shuttle_tag]
|
||||
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
|
||||
if(!istype(MS)) return
|
||||
|
||||
var/dat
|
||||
@@ -57,7 +65,7 @@
|
||||
var/area/areacheck = get_area(src)
|
||||
dat += "Location: [areacheck.name]<br>"
|
||||
|
||||
if((MS.last_move + MS.cooldown) > world.time)
|
||||
if((MS.last_move + MS.cooldown*10) > world.time)
|
||||
dat += "<font color='red'>Engines charging.</font><br>"
|
||||
else
|
||||
dat += "<font color='green'>Engines ready.</font><br>"
|
||||
@@ -69,24 +77,21 @@
|
||||
user << browse("[dat]", "window=[shuttle_tag]shuttlecontrol;size=300x600")
|
||||
|
||||
/obj/machinery/computer/shuttle_control/multi/Topic(href, href_list)
|
||||
|
||||
if(..())
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
var/datum/shuttle/multi_shuttle/MS = shuttles[shuttle_tag]
|
||||
var/datum/shuttle/multi_shuttle/MS = shuttle_controller.shuttles[shuttle_tag]
|
||||
if(!istype(MS)) return
|
||||
|
||||
//world << "multi_shuttle: last_departed=[MS.last_departed], origin=[MS.origin], interim=[MS.interim], travel_time=[MS.move_time]"
|
||||
|
||||
if (MS.moving_status != SHUTTLE_IDLE)
|
||||
usr << "\blue [shuttle_tag] vessel is moving."
|
||||
return
|
||||
|
||||
if((MS.last_move + MS.cooldown) > world.time)
|
||||
usr << "\red The ship is inoperable while the engines are charging."
|
||||
return
|
||||
|
||||
if(href_list["start"])
|
||||
|
||||
if(MS.at_origin)
|
||||
@@ -98,7 +103,7 @@
|
||||
//TODO: Actually end the mission.
|
||||
MS.return_warning = 1
|
||||
return
|
||||
|
||||
|
||||
MS.long_jump(MS.last_departed,MS.origin,MS.interim,MS.move_time)
|
||||
MS.last_departed = MS.origin
|
||||
MS.at_origin = 1
|
||||
@@ -109,6 +114,9 @@
|
||||
usr << "\red Ship stealth systems have been [(MS.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival."
|
||||
|
||||
if(href_list["move_multi"])
|
||||
if((MS.last_move + MS.cooldown*10) > world.time)
|
||||
usr << "\red The ship's drive is inoperable while the engines are charging."
|
||||
return
|
||||
|
||||
var/choice = input("Select a destination.") as null|anything in MS.destinations
|
||||
if(!choice) return
|
||||
@@ -121,7 +129,7 @@
|
||||
MS.at_origin = 0
|
||||
|
||||
|
||||
MS.long_jump(MS.last_departed,MS.destinations[choice],MS.interim,MS.move_time)
|
||||
MS.long_jump(MS.last_departed, MS.destinations[choice], MS.interim, MS.move_time)
|
||||
MS.last_departed = MS.destinations[choice]
|
||||
return
|
||||
|
||||
@@ -129,7 +137,7 @@
|
||||
|
||||
MS.announce_departure()
|
||||
|
||||
MS.short_jump(locate(MS.last_departed),locate(MS.destinations[choice]))
|
||||
MS.short_jump(MS.last_departed, MS.destinations[choice])
|
||||
MS.last_departed = MS.destinations[choice]
|
||||
|
||||
updateUsrDialog()
|
||||
@@ -1,10 +1,7 @@
|
||||
|
||||
#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
|
||||
#define THERMAL_RELEASE_MODIFIER 10 //Higher == less heat released during reaction
|
||||
#define PHORON_RELEASE_MODIFIER 1500 //Higher == less phoron released by reaction
|
||||
#define OXYGEN_RELEASE_MODIFIER 750 //Higher == less oxygen released at high temperature/power
|
||||
#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
|
||||
#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
|
||||
#define PHORON_RELEASE_MODIFIER 1500 //Higher == less phoron released by reaction
|
||||
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
|
||||
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
B.transfer_identity(target)
|
||||
|
||||
target.internal_organs -= B
|
||||
target.internal_organs_by_name -= "brain"
|
||||
|
||||
target:brain_op_stage = 4.0
|
||||
target.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
|
||||
@@ -173,7 +174,7 @@
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] mends hematoma in [target]'s brain with \the [tool].", \
|
||||
"\blue You mend hematoma in [target]'s brain with \the [tool].")
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs["brain"]
|
||||
var/datum/organ/internal/brain/sponge = target.internal_organs_by_name["brain"]
|
||||
if (sponge)
|
||||
sponge.damage = 0
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
target.blinded += 1.5
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, slicing [target]'s eyes wth \the [tool]!" , \
|
||||
"\red Your hand slips, slicing [target]'s eyes wth \the [tool]!" )
|
||||
@@ -69,7 +69,7 @@
|
||||
target.op_stage.eyes = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, damaging [target]'s eyes with \the [tool]!", \
|
||||
"\red Your hand slips, damaging [target]'s eyes with \the [tool]!")
|
||||
@@ -100,7 +100,7 @@
|
||||
target.op_stage.eyes = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, stabbing \the [tool] into [target]'s eye!", \
|
||||
"\red Your hand slips, stabbing \the [tool] into [target]'s eye!")
|
||||
@@ -126,7 +126,7 @@
|
||||
"You are beginning to cauterize the incision around [target]'s eyes with \the [tool].")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
user.visible_message("\blue [user] cauterizes the incision around [target]'s eyes with \the [tool].", \
|
||||
"\blue You cauterize the incision around [target]'s eyes with \the [tool].")
|
||||
if (target.op_stage.eyes == 3)
|
||||
@@ -136,7 +136,7 @@
|
||||
target.op_stage.eyes = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs["eyes"]
|
||||
var/datum/organ/internal/eyes/eyes = target.internal_organs_by_name["eyes"]
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, searing [target]'s eyes with \the [tool]!", \
|
||||
"\red Your hand slips, searing [target]'s eyes with \the [tool]!")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE)
|
||||
return affected.status & ORGAN_CUT_AWAY && target.op_stage.head_reattach == 0 && !(affected.status & ORGAN_ATTACHABLE)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -73,10 +73,9 @@
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].", \
|
||||
"\blue You have finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].")
|
||||
affected.open = 3
|
||||
target.op_stage.head_reattach = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -97,8 +96,7 @@
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 3
|
||||
return target.op_stage.head_reattach == 1
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] is stapling and suturing flesh into place in [target]'s esophagal and vocal region with \the [tool].", \
|
||||
@@ -106,10 +104,9 @@
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has finished stapling [target]'s neck into place with \the [tool].", \
|
||||
"\blue You have finished stapling [target]'s neck into place with \the [tool].")
|
||||
affected.open = 4
|
||||
target.op_stage.head_reattach = 2
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -132,8 +129,7 @@
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 4
|
||||
return target.op_stage.head_reattach == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts adjusting area around [target]'s neck with \the [tool].", \
|
||||
@@ -144,6 +140,7 @@
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has finished adjusting the area around [target]'s neck with \the [tool].", \
|
||||
"\blue You have finished adjusting the area around [target]'s neck with \the [tool].")
|
||||
target.op_stage.head_reattach = 0
|
||||
affected.status |= ORGAN_ATTACHABLE
|
||||
affected.amputated = 1
|
||||
affected.setAmputatedTree()
|
||||
|
||||
@@ -51,3 +51,121 @@
|
||||
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \
|
||||
"\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!")
|
||||
affected.take_damage(5, 0)
|
||||
|
||||
/datum/surgery_step/fix_dead_tissue //Debridement
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/scalpel = 100, \
|
||||
/obj/item/weapon/kitchenknife = 75, \
|
||||
/obj/item/weapon/shard = 50, \
|
||||
)
|
||||
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
|
||||
min_duration = 110
|
||||
max_duration = 160
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
if (target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
return affected.open == 2 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool]." , \
|
||||
"You start cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool].")
|
||||
target.custom_pain("The pain in [affected.display_name] is unbearable!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You have cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].")
|
||||
affected.open = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!")
|
||||
affected.createwound(CUT, 20, 1)
|
||||
|
||||
/datum/surgery_step/treat_necrosis
|
||||
priority = 2
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/reagent_containers/dropper = 100,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle = 75,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 75,
|
||||
/obj/item/weapon/reagent_containers/spray = 50,
|
||||
/obj/item/weapon/reagent_containers/glass/bucket = 50,
|
||||
)
|
||||
|
||||
can_infect = 0
|
||||
blood_level = 0
|
||||
|
||||
min_duration = 50
|
||||
max_duration = 60
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
if(!container.reagents.has_reagent("peridaxon"))
|
||||
return 0
|
||||
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
if (target_zone == "mouth" || target_zone == "eyes")
|
||||
return 0
|
||||
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected.open == 3 && (affected.status & ORGAN_DEAD)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool]." , \
|
||||
"You start applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool].")
|
||||
target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1)
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
if (trans > 0)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
|
||||
if(container.reagents.has_reagent("peridaxon"))
|
||||
affected.status &= ~ORGAN_DEAD
|
||||
|
||||
user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.display_name]", \
|
||||
"\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.display_name] with \the [tool].")
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
if (!istype(tool, /obj/item/weapon/reagent_containers))
|
||||
return
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!" , \
|
||||
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!")
|
||||
|
||||
//no damage or anything, just wastes medicine
|
||||
|
||||
@@ -202,9 +202,10 @@
|
||||
|
||||
var/is_chest_organ_damaged = 0
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs) if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
break
|
||||
for(var/datum/organ/internal/I in chest.internal_organs)
|
||||
if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
break
|
||||
return ..() && is_chest_organ_damaged && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -285,7 +286,7 @@
|
||||
return 0
|
||||
|
||||
var/is_chest_organ_damaged = 0
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
var/datum/organ/external/chest/chest = target.get_organ("chest")
|
||||
for(var/datum/organ/internal/I in chest.internal_organs) if(I.damage > 0)
|
||||
is_chest_organ_damaged = 1
|
||||
@@ -293,7 +294,7 @@
|
||||
return ..() && is_chest_organ_damaged && heart.robotic == 2 && target.op_stage.ribcage == 2
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
|
||||
if(heart.damage > 0)
|
||||
user.visible_message("[user] starts mending the mechanisms on [target]'s heart with \the [tool].", \
|
||||
@@ -302,14 +303,14 @@
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
if(heart.damage > 0)
|
||||
user.visible_message("\blue [user] repairs [target]'s heart with \the [tool].", \
|
||||
"\blue You repair [target]'s heart with \the [tool]." )
|
||||
heart.damage = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs["heart"]
|
||||
var/datum/organ/internal/heart/heart = target.internal_organs_by_name["heart"]
|
||||
user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!!" , \
|
||||
"\red Your hand slips, smearing [tool] in the incision in [target]'s heart, gumming it up!")
|
||||
heart.take_damage(5, 0)
|
||||
|
||||
@@ -111,4 +111,5 @@ proc/sort_surgeries()
|
||||
var/eyes = 0
|
||||
var/face = 0
|
||||
var/appendix = 0
|
||||
var/ribcage = 0
|
||||
var/ribcage = 0
|
||||
var/head_reattach = 0
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
var/emagged = 0
|
||||
var/powered = 0 //set if vehicle is powered and should use fuel when moving
|
||||
var/move_delay = 1 //set this to limit the speed of the vehicle
|
||||
var/movable = 1
|
||||
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/power_use = 5 //set this to adjust the amount of power the vehicle uses per move
|
||||
@@ -47,7 +48,7 @@
|
||||
if(on && powered)
|
||||
cell.use(power_use)
|
||||
anchored = init_anc
|
||||
|
||||
|
||||
if(load)
|
||||
load.loc = loc
|
||||
load.dir = dir
|
||||
@@ -288,7 +289,7 @@
|
||||
/obj/vehicle/proc/unload(var/mob/user, var/direction)
|
||||
if(!load)
|
||||
return
|
||||
|
||||
|
||||
var/turf/dest = null
|
||||
|
||||
//find a turf to unload to
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/datum/organ/internal/brain/B = H.internal_organs["brain"]
|
||||
var/datum/organ/internal/brain/B = H.internal_organs_by_name["brain"]
|
||||
if (B.damage < B.min_broken_damage)
|
||||
B.take_damage(5)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user