mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Merge remote-tracking branch 'upstream/master' into cyberimplants
This commit is contained in:
@@ -815,22 +815,29 @@ var/global/floorIsLava = 0
|
||||
var/J_title = html_encode(job.title)
|
||||
var/J_opPos = html_encode(job.total_positions - (job.total_positions - job.current_positions))
|
||||
var/J_totPos = html_encode(job.total_positions)
|
||||
if(job.total_positions <= 0)
|
||||
dat += "[J_title]: [J_opPos]"
|
||||
if(job.total_positions < 0)
|
||||
dat += "[J_title]: [J_opPos] (unlimited)"
|
||||
else
|
||||
dat += "[J_title]: [J_opPos]/[J_totPos]"
|
||||
if(initial(job.total_positions) > 0)
|
||||
|
||||
if(job.title == "AI" || job.title == "Cyborg")
|
||||
dat += " (Cannot Late Join)<br>"
|
||||
continue
|
||||
if(job.total_positions >= 0)
|
||||
dat += " <A href='?src=\ref[src];addjobslot=[job.title]'>Add</A> | "
|
||||
if(job.total_positions > job.current_positions)
|
||||
dat += "<A href='?src=\ref[src];removejobslot=[job.title]'>Remove</A>"
|
||||
dat += "<A href='?src=\ref[src];removejobslot=[job.title]'>Remove</A> | "
|
||||
else
|
||||
dat += "Remove"
|
||||
dat += "Remove | "
|
||||
dat += "<A href='?src=\ref[src];unlimitjobslot=[job.title]'>Unlimit</A>"
|
||||
else
|
||||
dat += " <A href='?src=\ref[src];limitjobslot=[job.title]'>Limit</A>"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "</body>"
|
||||
var/winheight = 100 + (count * 20)
|
||||
winheight = min(winheight, 690)
|
||||
usr << browse(dat, "window=players;size=316x[winheight]")
|
||||
usr << browse(dat, "window=players;size=375x[winheight]")
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
@@ -1404,6 +1404,31 @@
|
||||
|
||||
src.manage_free_slots()
|
||||
|
||||
else if(href_list["unlimitjobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/Unlimit = href_list["unlimitjobslot"]
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job.title == Unlimit)
|
||||
job.total_positions = -1
|
||||
break
|
||||
|
||||
src.manage_free_slots()
|
||||
|
||||
else if(href_list["limitjobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/Limit = href_list["limitjobslot"]
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job.title == Limit)
|
||||
job.total_positions = job.current_positions
|
||||
break
|
||||
|
||||
src.manage_free_slots()
|
||||
|
||||
|
||||
else if(href_list["adminspawncookie"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
src << "<span class='adminnotice'>PM to-<b>Admins</b>: [original_msg]</span>"
|
||||
|
||||
//send it to irc if nobody is on and tell us how many were on
|
||||
var/admin_number_present = send2irc_adminless_only(original_msg)
|
||||
var/admin_number_present = send2irc_adminless_only(ckey,original_msg)
|
||||
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins who have +BAN.")
|
||||
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -75,8 +75,9 @@ client/proc/one_click_antag()
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numTraitors = min(candidates.len, 3)
|
||||
@@ -110,8 +111,9 @@ client/proc/one_click_antag()
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numChanglings = min(candidates.len, 3)
|
||||
@@ -143,8 +145,9 @@ client/proc/one_click_antag()
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numRevs = min(candidates.len, 3)
|
||||
@@ -158,22 +161,24 @@ client/proc/one_click_antag()
|
||||
return 0
|
||||
|
||||
/datum/admins/proc/makeWizard()
|
||||
var/datum/game_mode/wizard/temp = new
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
if(temp.age_check(G.client))
|
||||
spawn(0)
|
||||
switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
sleep(300)
|
||||
|
||||
@@ -211,8 +216,9 @@ client/proc/one_click_antag()
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numCultists = min(candidates.len, 4)
|
||||
@@ -231,6 +237,7 @@ client/proc/one_click_antag()
|
||||
|
||||
/datum/admins/proc/makeNukeTeam()
|
||||
|
||||
var/datum/game_mode/nuclear/temp = new
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/list/mob/dead/observer/chosen = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
@@ -238,16 +245,17 @@ client/proc/one_click_antag()
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
if(temp.age_check(G.client))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
candidates += G
|
||||
if("No")
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
sleep(300)
|
||||
|
||||
@@ -410,12 +418,13 @@ client/proc/one_click_antag()
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
if(applicant.client.prefs.be_special & BE_GANG)
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
if(!jobban_isbanned(applicant, "gangster") && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len >= 2)
|
||||
H = pick(candidates)
|
||||
@@ -423,7 +432,6 @@ client/proc/one_click_antag()
|
||||
candidates.Remove(H)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Gang("B")
|
||||
candidates.Remove(H)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -149,7 +149,7 @@ var/next_external_rsc = 0
|
||||
if (config.notify_new_player_age >= 0)
|
||||
message_admins("New user: [key_name_admin(src)] is connecting here for the first time.")
|
||||
if (config.irc_first_connection_alert)
|
||||
send2irc_adminless_only("New user", "[key_name(src)] is connecting for the first time!")
|
||||
send2irc_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
|
||||
|
||||
player_age = 0 // set it from -1 to 0 so the job selection code doesn't have a panic attack
|
||||
|
||||
@@ -167,8 +167,11 @@ var/next_external_rsc = 0
|
||||
send_resources()
|
||||
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
|
||||
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
|
||||
|
||||
src << "<span class='info'>You have unread updates in the changelog.</span>"
|
||||
if(config.aggressive_changelog)
|
||||
src.changes()
|
||||
else
|
||||
winset(src, "rpane.changelogb", "background-color=#eaeaea;font-style=bold")
|
||||
|
||||
//////////////
|
||||
//DISCONNECT//
|
||||
|
||||
@@ -2,22 +2,20 @@
|
||||
|
||||
var/list/preferences_datums = list()
|
||||
|
||||
#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE))))
|
||||
|
||||
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm
|
||||
//some autodetection here.
|
||||
"traitor" = IS_MODE_COMPILED("traitor"), // 0
|
||||
"operative" = IS_MODE_COMPILED("nuclear"), // 1
|
||||
"changeling" = IS_MODE_COMPILED("changeling"), // 2
|
||||
"wizard" = IS_MODE_COMPILED("wizard"), // 3
|
||||
"malf AI" = IS_MODE_COMPILED("malfunction"), // 4
|
||||
"revolutionary" = IS_MODE_COMPILED("revolution"), // 5
|
||||
"alien" = 1, //always show // 6
|
||||
"pAI candidate" = 1, // 7
|
||||
"cultist" = IS_MODE_COMPILED("cult"), // 8
|
||||
"blob" = IS_MODE_COMPILED("blob"), // 9
|
||||
"monkey" = IS_MODE_COMPILED("monkey"), // 10
|
||||
"gangster" = IS_MODE_COMPILED("gang") // 11
|
||||
"traitor" = /datum/game_mode/traitor, //0
|
||||
"operative" = /datum/game_mode/nuclear, //1
|
||||
"changeling" = /datum/game_mode/changeling, //2
|
||||
"wizard" = /datum/game_mode/wizard, //3
|
||||
"malf AI" = /datum/game_mode/malfunction, //4
|
||||
"revolutionary" = /datum/game_mode/revolution, //5
|
||||
"alien", //6
|
||||
"pAI", //7
|
||||
"cultist" = /datum/game_mode/cult, //8
|
||||
"blob" = /datum/game_mode/blob, //9
|
||||
"monkey" = /datum/game_mode/monkey, //10
|
||||
"gangster" = /datum/game_mode/gang //11
|
||||
)
|
||||
|
||||
|
||||
@@ -39,6 +37,7 @@ datum/preferences
|
||||
var/UI_style = "Midnight"
|
||||
var/toggles = TOGGLES_DEFAULT
|
||||
var/ghost_form = "ghost"
|
||||
var/allow_midround_antag = 1
|
||||
|
||||
//character preferences
|
||||
var/real_name //our character's name
|
||||
@@ -176,44 +175,63 @@ datum/preferences
|
||||
dat += "<b>Species:</b> Human<BR>"
|
||||
|
||||
dat += "<b>Blood Type:</b> [blood_type]<BR>"
|
||||
dat += "<b>Skin Tone:</b><BR><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
|
||||
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
|
||||
dat += "<b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
|
||||
dat += "<b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
|
||||
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbaglist[backbag]]</a><BR>"
|
||||
|
||||
if(pref_species.use_skintones)
|
||||
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Hair Style</h3>"
|
||||
dat += "<h3>Skin Tone</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
|
||||
dat += "<a href='?_src_=prefs;preference=previous_hair_style;task=input'><</a> <a href='?_src_=prefs;preference=next_hair_style;task=input'>></a><BR>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[hair_color];'> </span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
|
||||
dat += "<a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(HAIR in pref_species.specflags)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Hair Style</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
|
||||
dat += "<a href='?_src_=prefs;preference=previous_hair_style;task=input'><</a> <a href='?_src_=prefs;preference=next_hair_style;task=input'>></a><BR>"
|
||||
dat += "<span style='border:1px solid #161616; background-color: #[hair_color];'> </span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
|
||||
|
||||
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Facial Hair Style</h3>"
|
||||
dat += "<h3>Facial Hair Style</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
|
||||
dat += "<a href='?_src_=prefs;preference=previous_facehair_style;task=input'><</a> <a href='?_src_=prefs;preference=next_facehair_style;task=input'>></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[facial_hair_color];'> </span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
|
||||
dat += "<a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
|
||||
dat += "<a href='?_src_=prefs;preference=previous_facehair_style;task=input'><</a> <a href='?_src_=prefs;preference=next_facehair_style;task=input'>></a><BR>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[facial_hair_color];'> </span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
if(EYECOLOR in pref_species.specflags)
|
||||
|
||||
dat += "<h3>Eye Color</h3>"
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[eye_color];'> </span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
|
||||
dat += "<h3>Eye Color</h3>"
|
||||
|
||||
dat += "</td><td valign='top' width='21%'>"
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[eye_color];'> </span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "<h3>Alien Color</h3>" // even if choosing your mutantrace is off, this is here in case you gain one during a round
|
||||
dat += "</td>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[mutant_color];'> </span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
|
||||
if(MUTCOLORS in pref_species.specflags)
|
||||
|
||||
dat += "</td></tr></table>"
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Alien Color</h3>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[mutant_color];'> </span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
dat += "</tr></table>"
|
||||
|
||||
|
||||
if (1) // Game Preferences
|
||||
@@ -225,8 +243,9 @@ datum/preferences
|
||||
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'>[(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]</a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href='?_src_=prefs;preference=ghost_sight'>[(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]</a><br>"
|
||||
dat += "<b>Ghost whispers:</b> <a href='?_src_=prefs;preference=ghost_whispers'>[(toggles & CHAT_GHOSTWHISPER) ? "Nearest Creatures" : "All Speech"]</a><br>"
|
||||
dat += "<b>Ghost pda:</b> <a href='?_src=prefs;preference=ghost_pda'>[(toggles & CHAT_GHOSTPDA) ? "Nearest Creatures" : "All Messages"]</a><br>"
|
||||
dat += "<b>Pull requests:</b> <a href='?_src_=prefs;preference=pull_requests'>[(toggles & CHAT_PULLR) ? "Yes" : "No"]</a><br>"
|
||||
|
||||
dat += "<b>Midround Antagonist:</b> <a href='?_src_=prefs;preference=allow_midround_antag'>[(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]</a><br>"
|
||||
if(config.allow_Metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'> Edit </a><br>"
|
||||
|
||||
@@ -248,17 +267,23 @@ datum/preferences
|
||||
dat += "<h2>Antagonist Settings</h2>"
|
||||
|
||||
if(jobban_isbanned(user, "Syndicate"))
|
||||
dat += "<b>You are banned from antagonist roles.</b>"
|
||||
dat += "<font color=red><b>You are banned from antagonist roles.</b></font>"
|
||||
src.be_special = 0
|
||||
|
||||
else
|
||||
var/n = 0
|
||||
for (var/i in special_roles)
|
||||
if(special_roles[i]) //if mode is available on the server
|
||||
if(jobban_isbanned(user, i))
|
||||
dat += "<b>Be [i]:</b> <font color=red><b>\[BANNED]</b></font><br>"
|
||||
else if(i == "pai candidate")
|
||||
if(jobban_isbanned(user, "pAI"))
|
||||
dat += "<b>Be [i]:</b> <font color=red><b>\[BANNED]</b></font><br>"
|
||||
if(jobban_isbanned(user, i))
|
||||
dat += "<b>Be [i]:</b> <font color=red><b>\[BANNED]</b></font><br>"
|
||||
else
|
||||
var/days_remaining = null
|
||||
if(config.use_age_restriction_for_jobs && ispath(special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age
|
||||
var/mode_path = special_roles[i]
|
||||
var/datum/game_mode/temp_mode = new mode_path
|
||||
days_remaining = temp_mode.get_remaining_days(user.client)
|
||||
|
||||
if(days_remaining)
|
||||
dat += "<b>Be [i]:</b> <font color=red> \[IN [days_remaining] DAYS]</font><br>"
|
||||
else
|
||||
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;preference=be_special;num=[n]'>[src.be_special&(1<<n) ? "Yes" : "No"]</a><br>"
|
||||
n++
|
||||
@@ -782,9 +807,15 @@ datum/preferences
|
||||
if("ghost_whispers")
|
||||
toggles ^= CHAT_GHOSTWHISPER
|
||||
|
||||
if("ghost_pda")
|
||||
toggles ^= CHAT_GHOSTPDA
|
||||
|
||||
if("pull_requests")
|
||||
toggles ^= CHAT_PULLR
|
||||
|
||||
if("allow_midround_antag")
|
||||
toggles ^= MIDROUND_ANTAG
|
||||
|
||||
if("save")
|
||||
save_preferences()
|
||||
save_character()
|
||||
|
||||
@@ -26,6 +26,15 @@
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TGW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ghost_pda()
|
||||
set name = "Show/Hide GhostPDA"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob pda messages, and only pda messages of nearby mobs"
|
||||
prefs.toggles ^= CHAT_GHOSTPDA
|
||||
src << "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"]."
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","TGP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_hear_radio()
|
||||
set name = "Show/Hide RadioChatter"
|
||||
set category = "Preferences"
|
||||
@@ -73,6 +82,15 @@
|
||||
src << "You will [(prefs.toggles & CHAT_PULLR) ? "now" : "no longer"] see new pull request announcements."
|
||||
feedback_add_details("admin_verb","TPullR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglemidroundantag()
|
||||
set name = "Toggle Midround Antagonist"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles whether or not you will be considered for antagonist status given during a round."
|
||||
prefs.toggles ^= MIDROUND_ANTAG
|
||||
prefs.save_preferences()
|
||||
src << "You will [(prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions."
|
||||
feedback_add_details("admin_verb","TMidroundA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggletitlemusic()
|
||||
set name = "Hear/Silence LobbyMusic"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/visor_flags_inv = 0 // same as visor_flags, but for flags_inv
|
||||
lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
|
||||
|
||||
var/alt_desc = null
|
||||
|
||||
//Ears: currently only used for headsets and earmuffs
|
||||
/obj/item/clothing/ears
|
||||
@@ -191,7 +191,6 @@ BLIND // can't see anything
|
||||
strip_delay = 80
|
||||
put_on_delay = 80
|
||||
|
||||
|
||||
//Under clothing
|
||||
/obj/item/clothing/under
|
||||
icon = 'icons/obj/clothing/uniforms.dmi'
|
||||
@@ -307,10 +306,17 @@ atom/proc/generate_female_clothing(index,t_color,icon,type)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/verb/rolldown()
|
||||
/obj/item/clothing/under/AltClick()
|
||||
..()
|
||||
rolldown()
|
||||
|
||||
/obj/item/clothing/under/verb/jumpsuit_adjust()
|
||||
set name = "Adjust Jumpsuit Style"
|
||||
set category = "Object"
|
||||
set category = null
|
||||
set src in usr
|
||||
rolldown()
|
||||
|
||||
/obj/item/clothing/under/proc/rolldown()
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!can_adjust)
|
||||
@@ -330,6 +336,13 @@ atom/proc/generate_female_clothing(index,t_color,icon,type)
|
||||
usr.update_inv_w_uniform()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/under/examine(mob/user)
|
||||
..()
|
||||
if(src.adjusted)
|
||||
user << "Alt-click on [src] to wear it normally."
|
||||
else
|
||||
user << "Alt-click on [src] to wear it casually."
|
||||
|
||||
/obj/item/clothing/under/verb/removetie()
|
||||
set name = "Remove Accessory"
|
||||
set category = "Object"
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
origin_tech = "magnets=3"
|
||||
vision_flags = SEE_MOBS
|
||||
invis_view = 2
|
||||
flash_protect = -1
|
||||
flash_protect = 0
|
||||
|
||||
emp_act(severity)
|
||||
if(istype(src.loc, /mob/living/carbon/human))
|
||||
@@ -143,6 +143,7 @@
|
||||
desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition."
|
||||
icon_state = "meson"
|
||||
origin_tech = "magnets=3;syndicate=4"
|
||||
flash_protect = -1
|
||||
|
||||
/obj/item/clothing/glasses/thermal/monocle
|
||||
name = "Thermoncle"
|
||||
|
||||
@@ -144,6 +144,14 @@
|
||||
flags = BLOCKHAIR
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
|
||||
/obj/item/clothing/head/griffin
|
||||
name = "griffon head"
|
||||
desc = "Why not 'eagle head'? Who knows."
|
||||
icon_state = "griffinhat"
|
||||
item_state = "griffinhat"
|
||||
flags = BLOCKHAIR
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
|
||||
/obj/item/clothing/head/bearpelt
|
||||
name = "bear pelt hat"
|
||||
desc = "Fuzzy."
|
||||
|
||||
@@ -137,4 +137,10 @@
|
||||
icon_state = "roman"
|
||||
item_state = "roman"
|
||||
strip_delay = 100
|
||||
put_on_delay = 100
|
||||
put_on_delay = 100
|
||||
|
||||
/obj/item/clothing/shoes/griffin
|
||||
name = "griffon boots"
|
||||
desc = "A pair of costume boots fashioned after bird talons."
|
||||
icon_state = "griffinboots"
|
||||
item_state = "griffinboots"
|
||||
@@ -116,6 +116,7 @@
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi
|
||||
name = "blood-red hardsuit helmet"
|
||||
desc = "A dual-mode advanced helmet designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
|
||||
alt_desc = "A dual-mode advanced helmet designed for work in special operations. It is in combat mode. Property of Gorlex Marauders."
|
||||
icon_state = "hardsuit1-syndi"
|
||||
item_state = "syndie_helm"
|
||||
item_color = "syndi"
|
||||
@@ -134,16 +135,16 @@
|
||||
on = !on
|
||||
if(on)
|
||||
user << "<span class='notice'>You switch your helmet to travel mode.</span>"
|
||||
name = "blood-red hardsuit helmet"
|
||||
desc = "A dual-mode advanced helmet designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
cold_protection = HEAD
|
||||
user.AddLuminosity(brightness_on)
|
||||
else
|
||||
user << "<span class='notice'>You switch your helmet to combat mode.</span>"
|
||||
name = "blood-red hardsuit helmet (combat)"
|
||||
desc = "A dual-mode advanced helmet designed for work in special operations. It is in combat mode. Property of Gorlex Marauders."
|
||||
name += " (combat)"
|
||||
desc = alt_desc
|
||||
flags = BLOCKHAIR
|
||||
flags_inv = HIDEEARS
|
||||
cold_protection = null
|
||||
@@ -156,6 +157,7 @@
|
||||
/obj/item/clothing/suit/space/hardsuit/syndi
|
||||
name = "blood-red hardsuit"
|
||||
desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
|
||||
alt_desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in combat mode. Property of Gorlex Marauders."
|
||||
icon_state = "hardsuit1-syndi"
|
||||
item_state = "syndie_hardsuit"
|
||||
item_color = "syndi"
|
||||
@@ -174,16 +176,16 @@
|
||||
on = !on
|
||||
if(on)
|
||||
user << "<span class='notice'>You switch your hardsuit to travel mode.</span>"
|
||||
name = "blood-red hardsuit helmet"
|
||||
desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
slowdown = 1
|
||||
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS
|
||||
else
|
||||
user << "<span class='notice'>You switch your hardsuit to combat mode.</span>"
|
||||
name = "blood-red hardsuit helmet (combat)"
|
||||
desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in combat mode. Property of Gorlex Marauders."
|
||||
name += " (combat)"
|
||||
desc = alt_desc
|
||||
slowdown = 0
|
||||
flags = BLOCKHAIR
|
||||
flags_inv = null
|
||||
@@ -194,6 +196,26 @@
|
||||
user.update_inv_wear_suit()
|
||||
user.update_inv_w_uniform()
|
||||
|
||||
//The Owl Hardsuit
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/owl
|
||||
name = "owl hardsuit helmet"
|
||||
desc = "A dual-mode advanced helmet designed for any crime-fighting situation. It is in travel mode."
|
||||
alt_desc = "A dual-mode advanced helmet designed for any crime-fighting situation. It is in combat mode."
|
||||
icon_state = "hardsuit1-owl"
|
||||
item_state = "s_helmet"
|
||||
item_color = "owl"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/syndi/owl
|
||||
name = "owl hardsuit"
|
||||
desc = "A dual-mode advanced hardsuit designed for any crime-fighting situation. It is in travel mode."
|
||||
alt_desc = "A dual-mode advanced hardsuit designed for any crime-fighting situation. It is in combat mode."
|
||||
icon_state = "hardsuit1-owl"
|
||||
item_state = "s_suit"
|
||||
item_color = "owl"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon()
|
||||
icon_state = "hardsuit[on]-[item_color]"
|
||||
|
||||
|
||||
//Wizard hardsuit
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/wizard
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
item_state = "suitjacket_blue"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = CHEST|ARMS
|
||||
action_button_name = "Toggle Suit Buttons"
|
||||
togglename = "buttons"
|
||||
|
||||
/obj/item/clothing/suit/toggle/lawyer/purple
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
body_parts_covered = CHEST|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,/obj/item/weapon/melee/classic_baton/telescopic)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)
|
||||
action_button_name = "Toggle Labcoat Buttons"
|
||||
togglename = "buttons"
|
||||
|
||||
/obj/item/clothing/suit/toggle/labcoat/cmo
|
||||
|
||||
@@ -126,6 +126,22 @@
|
||||
body_parts_covered = CHEST|ARMS|GROIN|LEGS|FEET|HANDS
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
|
||||
|
||||
/obj/item/clothing/suit/toggle/owlwings
|
||||
name = "owl cloak"
|
||||
desc = "A soft brown cloak made of synthetic feathers. Soft to the touch, stylish, and a 2 meter wing span that will drive the ladies mad."
|
||||
icon_state = "owl_wings"
|
||||
item_state = "owl_wings"
|
||||
togglename = "wings"
|
||||
body_parts_covered = ARMS|CHEST
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic)
|
||||
action_button_name = "Toggle Owl Wings"
|
||||
|
||||
/obj/item/clothing/suit/toggle/owlwings/griffinwings
|
||||
name = "griffon cloak"
|
||||
desc = "A plush white cloak made of synthetic feathers. Soft to the touch, stylish, and a 2 meter wing span that will drive your captives mad."
|
||||
icon_state = "griffin_wings"
|
||||
item_state = "griffin_wings"
|
||||
|
||||
|
||||
/obj/item/clothing/suit/holidaypriest
|
||||
name = "holiday priest"
|
||||
|
||||
@@ -53,7 +53,11 @@
|
||||
|
||||
//Toggle exosuits for different aesthetic styles (hoodies, suit jacket buttons, etc)
|
||||
|
||||
/obj/item/clothing/suit/toggle/attack_self()
|
||||
/obj/item/clothing/suit/toggle/AltClick()
|
||||
..()
|
||||
suit_toggle()
|
||||
|
||||
/obj/item/clothing/suit/toggle/proc/suit_toggle()
|
||||
set src in usr
|
||||
|
||||
if(!can_use(usr))
|
||||
@@ -68,6 +72,10 @@
|
||||
src.suittoggled = 1
|
||||
usr.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/suit/toggle/examine(mob/user)
|
||||
..()
|
||||
user << "Alt-click on [src] to toggle the [togglename]."
|
||||
|
||||
//Hardsuit toggle code
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/New()
|
||||
|
||||
@@ -128,11 +128,18 @@
|
||||
|
||||
/obj/item/clothing/under/owl
|
||||
name = "owl uniform"
|
||||
desc = "A jumpsuit with owl wings. Photorealistic owl feathers! Twooooo!"
|
||||
desc = "A soft brown jumpsuit made of synthetic feathers and strong conviction."
|
||||
icon_state = "owl"
|
||||
item_color = "owl"
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/griffin
|
||||
name = "griffon uniform"
|
||||
desc = "A soft brown jumpsuit with a white feather collar made of synthetic feathers and a lust for mayhem."
|
||||
icon_state = "griffin"
|
||||
item_color = "griffin"
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rainbow
|
||||
name = "rainbow"
|
||||
desc = "rainbow"
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
weight = 300
|
||||
max_occurrences = 1000
|
||||
earliest_start = 0
|
||||
alertadmins = 0
|
||||
|
||||
|
||||
/datum/round_event/meteor_wave/dust
|
||||
startWhen = 1
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
typepath = /datum/round_event/electrical_storm
|
||||
earliest_start = 6000
|
||||
weight = 40
|
||||
alertadmins = 0
|
||||
|
||||
/datum/round_event/electrical_storm
|
||||
var/lightsoutAmount = 1
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
//anything with a (non-null) holidayID which does not match holiday, cannot run.
|
||||
var/wizardevent = 0
|
||||
|
||||
var/alertadmins = 1 //should we let the admins know this event is firing
|
||||
//should be disabled on events that fire a lot
|
||||
|
||||
/datum/round_event_control/wizard
|
||||
wizardevent = 1
|
||||
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
/datum/round_event/wizard/blobies/start()
|
||||
|
||||
for(var/mob/living/carbon/human/H in dead_mob_list)
|
||||
new /mob/living/simple_animal/hostile/blobspore(H.loc)
|
||||
new /mob/living/simple_animal/hostile/blob/blobspore(H.loc)
|
||||
|
||||
@@ -33,10 +33,6 @@
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
if(src.reagents.has_reagent("sugar") && M.satiety < -150 && M.nutrition > NUTRITION_LEVEL_STARVING + 50 )
|
||||
M << "<span class='notice'>You don't feel like drinking any more sugary drink at the moment.</span>"
|
||||
return 0
|
||||
|
||||
M << "<span class='notice'>You swallow a gulp of [src].</span>"
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
@@ -95,6 +91,16 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/attackby(var/obj/item/I, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
|
||||
return
|
||||
if(is_hot(I))
|
||||
var/added_heat = (is_hot(I) / 100) //ishot returns a temperature
|
||||
if(src.reagents)
|
||||
src.reagents.chem_temp += added_heat
|
||||
user << "<span class='notice'>You heat [src] with [I].</span>"
|
||||
src.reagents.handle_reactions()
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Drinks. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
name = "shot of nothing"
|
||||
desc = "The mime insists there's booze in the glass. You're not so sure."
|
||||
if ("goldschlager")
|
||||
icon_state = "shotglassschlag"
|
||||
icon_state = "shotglassgold"
|
||||
name = "shot of goldschlager"
|
||||
desc = "Yup. You're officially a college girl."
|
||||
if ("cognac")
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
if(src.reagents.has_reagent("sugar") && M.satiety < -150 && M.nutrition > NUTRITION_LEVEL_STARVING + 50 )
|
||||
M << "<span class='notice'>You don't feel like drinking any more sugary food at the moment.</span>"
|
||||
return 0
|
||||
M << "<span class='notice'>You swallow some of contents of \the [src].</span>"
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
fullness += C.nutriment_factor * C.volume / C.metabolization_rate
|
||||
|
||||
if(M == user) //If you're eating it yourself.
|
||||
if(src.reagents.has_reagent("sugar") && M.satiety < -150 && M.nutrition > NUTRITION_LEVEL_STARVING + 50 )
|
||||
M << "<span class='notice'>You don't feel like eating any more sugary food at the moment.</span>"
|
||||
if(junkiness && M.satiety < -150 && M.nutrition > NUTRITION_LEVEL_STARVING + 50 )
|
||||
M << "<span class='notice'>You don't feel like eating any more junk food at the moment.</span>"
|
||||
return 0
|
||||
|
||||
if(wrapped)
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
overlays += I
|
||||
|
||||
// cook() is called when microwaving the food
|
||||
// initialize_cooked_food() is called when microwaving the food
|
||||
/obj/item/weapon/reagent_containers/food/snacks/proc/initialize_cooked_food(obj/item/weapon/reagent_containers/food/snacks/S)
|
||||
if(reagents)
|
||||
reagents.trans_to(S, reagents.total_volume)
|
||||
|
||||
@@ -2,25 +2,6 @@
|
||||
|
||||
/////////////////// Dough Ingredients ////////////////////////
|
||||
|
||||
// Flour + egg = dough
|
||||
/obj/item/weapon/reagent_containers/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/egg))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/E = W
|
||||
if(flags & OPENCONTAINER)
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("flour"))
|
||||
if(reagents.get_reagent_amount("flour") >= 15)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/S = new /obj/item/weapon/reagent_containers/food/snacks/dough(get_turf(src))
|
||||
user << "<span class='notice'>You mix egg and flour to make some dough.</span>"
|
||||
reagents.remove_reagent("flour", 15)
|
||||
if(E.reagents)
|
||||
E.reagents.trans_to(S,E.reagents.total_volume)
|
||||
qdel(E)
|
||||
else
|
||||
user << "<span class='notice'>Not enough flour to make dough.</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough
|
||||
name = "dough"
|
||||
desc = "A piece of dough."
|
||||
|
||||
@@ -10,12 +10,17 @@
|
||||
slices_num = 3
|
||||
filling_color = "#FF0000"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/initialize_slice(obj/item/weapon/reagent_containers/food/snacks/slice)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/initialize_slice(obj/item/weapon/reagent_containers/food/snacks/rawcutlet/slice)
|
||||
var/image/I = new(icon, "rawcutlet_coloration")
|
||||
I.color = filling_color
|
||||
slice.overlays += I
|
||||
slice.filling_color = filling_color
|
||||
slice.name = "raw [name] cutlet"
|
||||
slice.meat_type = name
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/initialize_cooked_food(obj/item/weapon/reagent_containers/food/snacks/S)
|
||||
..()
|
||||
S.name = "[name] steak"
|
||||
|
||||
///////////////////////////////////// HUMAN MEATS //////////////////////////////////////////////////////
|
||||
|
||||
@@ -24,23 +29,24 @@
|
||||
name = "-meat"
|
||||
var/subjectname = ""
|
||||
var/subjectjob = null
|
||||
cooked_type = /obj/item/weapon/reagent_containers/food/snacks/meatsteak/plain/human
|
||||
slice_path = /obj/item/weapon/reagent_containers/food/snacks/rawcutlet/plain/human
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/human/initialize_slice(obj/item/weapon/reagent_containers/food/snacks/rawcutlet/plain/human/slice)
|
||||
..()
|
||||
if(subjectname)
|
||||
slice.subjectname = subjectname
|
||||
slice.name = "[subjectname] [initial(slice.name)]"
|
||||
slice.name = "raw [subjectname] cutlet"
|
||||
else if(subjectjob)
|
||||
slice.subjectjob = subjectjob
|
||||
slice.name = "[subjectjob] [initial(slice.name)]"
|
||||
slice.name = "raw [subjectjob] cutlet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/human/initialize_cooked_food(obj/item/weapon/reagent_containers/food/snacks/S)
|
||||
..()
|
||||
if(subjectname)
|
||||
S.name = "[subjectname] [initial(S.name)]"
|
||||
S.name = "[subjectname] meatsteak"
|
||||
else if(subjectjob)
|
||||
S.name = "[subjectjob] [initial(S.name)]"
|
||||
S.name = "[subjectjob] meatsteak"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/human/mutant/slime
|
||||
@@ -117,7 +123,7 @@
|
||||
desc = "Tastes like... well you know..."
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/killertomato
|
||||
name = "tomato slice"
|
||||
name = "killer tomato meat"
|
||||
desc = "A slice from a huge tomato."
|
||||
icon_state = "tomatomeat"
|
||||
list_reagents = list("nutriment" = 2)
|
||||
@@ -161,7 +167,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatsteak
|
||||
name = "meat steak"
|
||||
name = "steak"
|
||||
desc = "A piece of hot spicy meat."
|
||||
icon_state = "meatsteak"
|
||||
list_reagents = list("nutriment" = 2, "vitamin" = 1)
|
||||
@@ -173,21 +179,18 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatsteak/plain/human
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatsteak/killertomato
|
||||
name = "killer tomato steak"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatsteak/bear
|
||||
name = "bear steak"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatsteak/xeno
|
||||
name = "xeno steak"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatsteak/spider
|
||||
name = "spider steak"
|
||||
|
||||
|
||||
|
||||
//////////////////////////////// MEAT CUTLETS ///////////////////////////////////////////////////////
|
||||
|
||||
//Raw cutlets
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet
|
||||
name = "raw cutlet"
|
||||
@@ -196,10 +199,17 @@
|
||||
cooked_type = /obj/item/weapon/reagent_containers/food/snacks/cutlet/plain
|
||||
bitesize = 2
|
||||
filling_color = "#B22222"
|
||||
var/meat_type = "meat"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/initialize_cooked_food(obj/item/weapon/reagent_containers/food/snacks/S)
|
||||
..()
|
||||
S.name = "[meat_type] cutlet"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/plain
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/plain/human
|
||||
cooked_type = /obj/item/weapon/reagent_containers/food/snacks/cutlet/plain/human
|
||||
var/subjectname = ""
|
||||
var/subjectjob = null
|
||||
|
||||
@@ -211,18 +221,16 @@
|
||||
S.name = "[subjectjob] [initial(S.name)]"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/killertomato
|
||||
name = "raw killer tomato cutlet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/bear
|
||||
name = "raw bear cutlet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/xeno
|
||||
name = "raw xeno cutlet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/spider
|
||||
name = "raw spider cutlet"
|
||||
|
||||
|
||||
//Cooked cutlets
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet
|
||||
name = "cutlet"
|
||||
desc = "A cooked meat cutlet."
|
||||
@@ -236,13 +244,9 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet/plain/human
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet/killertomato
|
||||
name = "killer tomato cutlet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet/bear
|
||||
name = "bear cutlet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet/xeno
|
||||
name = "xeno cutlet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet/spider
|
||||
name = "spider cutlet"
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet/spider
|
||||
@@ -186,7 +186,7 @@
|
||||
// ----------------------------
|
||||
/obj/machinery/smartfridge/drying_rack
|
||||
name = "drying rack"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "drying_rack_on"
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/production = 0
|
||||
var/yield = 0
|
||||
var/plant_type = 0
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
potency = -1
|
||||
dried_type = -1 //bit different. saves us from having to define each stupid grown's dried_type as itself. If you don't want a plant to be driable (watermelons) set this to null in the time definition.
|
||||
|
||||
@@ -123,6 +123,19 @@
|
||||
reagents.add_reagent("sugar", 1 + round((potency / 15), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries
|
||||
seed = /obj/item/seeds/bluecherryseed
|
||||
name = "blue cherries"
|
||||
desc = "They're cherries that are blue."
|
||||
icon_state = "bluecherry"
|
||||
filling_color = "#6495ED"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 15), 1))
|
||||
reagents.add_reagent("sugar", 1 + round((potency / 50), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy
|
||||
seed = /obj/item/seeds/poppyseed
|
||||
@@ -138,11 +151,24 @@
|
||||
reagents.add_reagent("hotline", 3 + round((potency / 10), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 3, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy/lily
|
||||
seed = /obj/item/seeds/lilyseed
|
||||
name = "lily"
|
||||
desc = "A beautiful orange flower"
|
||||
icon_state = "lily"
|
||||
filling_color = "#FFA500"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy/geranium
|
||||
seed = /obj/item/seeds/geraniumseed
|
||||
name = "geranium"
|
||||
desc = "A beautiful blue flower"
|
||||
icon_state = "geranium"
|
||||
filling_color = "#008B8B"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/harebell
|
||||
seed = /obj/item/seeds/harebell
|
||||
name = "harebell"
|
||||
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten’d not thy breath.\""
|
||||
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten’d not thy breath.\""
|
||||
icon_state = "harebell"
|
||||
slot_flags = SLOT_HEAD
|
||||
filling_color = "#E6E6FA"
|
||||
@@ -302,6 +328,19 @@
|
||||
reagents.add_reagent("cocoa", 4 + round((potency / 5), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/vanillapod
|
||||
seed = /obj/item/seeds/vanillapodseed
|
||||
name = "vanilla pod"
|
||||
desc = "Fattening... Mmmmm... vanilla."
|
||||
icon_state = "vanillapod"
|
||||
filling_color = "#FFD700"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/vanillapod/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
|
||||
reagents.add_reagent("vanilla", 4 + round((potency / 5), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
|
||||
seed = /obj/item/seeds/sugarcaneseed
|
||||
name = "sugarcane"
|
||||
@@ -353,7 +392,6 @@
|
||||
..()
|
||||
reagents.add_reagent("omnizine", 1 + round(potency / 8, 1))
|
||||
reagents.add_reagent("synaptizine", 1 + round(potency / 8, 1))
|
||||
reagents.add_reagent("morphine", 1 + round(potency / 10, 1))
|
||||
reagents.add_reagent("space_drugs", 1 + round(potency / 10, 1))
|
||||
reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
|
||||
|
||||
@@ -418,6 +456,19 @@
|
||||
reagents.add_reagent("vitamin", 1 + round((potency / 25), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/holymelon
|
||||
seed = /obj/item/seeds/holymelonseed
|
||||
name = "holymelon"
|
||||
desc = "The water within this melon has been blessed by some deity that's particularly fond of watermelon."
|
||||
icon_state = "holymelon"
|
||||
filling_color = "#FFD700"
|
||||
dried_type = null
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/holymelon/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("holywater", 1 + round((potency / 6), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin
|
||||
seed = /obj/item/seeds/pumpkinseed
|
||||
name = "pumpkin"
|
||||
@@ -433,12 +484,24 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/twohanded/fireaxe) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/melee/energy))
|
||||
if(is_sharp(W))
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
new /obj/item/clothing/head/hardhat/pumpkinhead (user.loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin
|
||||
seed = /obj/item/seeds/blumpkinseed
|
||||
name = "blumpkin"
|
||||
desc = "When you're making a mess this blumpkin's there to clean you up."
|
||||
icon_state = "blumpkin"
|
||||
filling_color = "#87CEFA"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 6), 1))
|
||||
reagents.add_reagent("ammonia", 1 + round((potency / 6), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/ //abstract type
|
||||
seed = /obj/item/seeds/limeseed
|
||||
@@ -488,6 +551,43 @@
|
||||
reagents.add_reagent("sugar", 1 + round((potency / 5), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sweetpotato
|
||||
seed = /obj/item/seeds/sweetpotatoseed
|
||||
name = "sweet potato"
|
||||
desc = "It's sweet."
|
||||
icon_state = "sweetpotato"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/sweetpotato/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 10), 1))
|
||||
reagents.add_reagent("vitamin", 1 + round((potency / 10), 1))
|
||||
reagents.add_reagent("sugar", 1 + round((potency / 10), 1))
|
||||
bitesize = reagents.total_volume
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/parsnip
|
||||
seed = /obj/item/seeds/parsnipseed
|
||||
name = "parsnip"
|
||||
desc = "Closely related to carrots."
|
||||
icon_state = "parsnip"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/parsnip/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 20), 1))
|
||||
reagents.add_reagent("vitamin", 1 + round((potency / 20), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/redbeet
|
||||
seed = /obj/item/seeds/redbeetseed
|
||||
name = "red beet"
|
||||
desc = "You can't beat red beet."
|
||||
icon_state = "redbeet"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/redbeet/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", round((potency / 20), 1))
|
||||
reagents.add_reagent("vitamin", 1 + round((potency / 20), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/banana
|
||||
seed = /obj/item/seeds/bananaseed
|
||||
name = "banana"
|
||||
@@ -514,6 +614,20 @@
|
||||
user.visible_message("<B>[user]</B> laughs so hard they begin to suffocate!")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mimana
|
||||
seed = /obj/item/seeds/mimanaseed
|
||||
name = "mimana"
|
||||
desc = "It's an excellent prop for a mime."
|
||||
icon_state = "mimana"
|
||||
filling_color = "#FFFFEE"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mimana/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 50), 1))
|
||||
reagents.add_reagent("nothing", 2 + round((potency / 10), 1))
|
||||
reagents.add_reagent("mutetoxin", 2 + round((potency / 10), 1))
|
||||
bitesize = 5
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/chili
|
||||
seed = /obj/item/seeds/chiliseed
|
||||
name = "chili"
|
||||
@@ -805,6 +919,32 @@ obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/oat
|
||||
seed = /obj/item/seeds/oatseed
|
||||
name = "oat"
|
||||
desc = "Eat oats, do squats."
|
||||
gender = PLURAL
|
||||
icon_state = "oat"
|
||||
filling_color = "#556B2F"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/oat/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("nutriment", 1 + round((potency / 25), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/rice
|
||||
seed = /obj/item/seeds/riceseed
|
||||
name = "rice"
|
||||
desc = "Rice to meet you."
|
||||
gender = PLURAL
|
||||
icon_state = "rice"
|
||||
filling_color = "#FAFAD2"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/rice/add_juice()
|
||||
if(..())
|
||||
reagents.add_reagent("rice", 1 + round((potency / 6), 1))
|
||||
bitesize = 1 + round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/grass
|
||||
seed = /obj/item/seeds/grassseed
|
||||
name = "grass"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
seed = /obj/item/seeds/towermycelium
|
||||
name = "tower-cap log"
|
||||
desc = "It's better than bad, it's good!"
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "logs"
|
||||
force = 5
|
||||
throwforce = 5
|
||||
@@ -97,7 +97,7 @@
|
||||
seed = /obj/item/seeds/sunflowerseed
|
||||
name = "sunflower"
|
||||
desc = "It's beautiful! A certain person might beat you to death if you trample these."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
damtype = "fire"
|
||||
force = 0
|
||||
@@ -116,7 +116,7 @@
|
||||
seed = /obj/item/seeds/novaflowerseed
|
||||
name = "novaflower"
|
||||
desc = "These beautiful flowers have a crisp smokey scent, like a summer bonfire."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "novaflower"
|
||||
damtype = "fire"
|
||||
force = 0
|
||||
@@ -278,10 +278,17 @@
|
||||
/obj/item/weapon/grown/bananapeel/specialpeel/Crossed(AM)
|
||||
if(..()) qdel(src)
|
||||
|
||||
/obj/item/weapon/grown/bananapeel/mimanapeel
|
||||
name = "mimana peel"
|
||||
desc = "A mimana peel."
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "mimana_peel"
|
||||
|
||||
|
||||
/obj/item/weapon/grown/corncob
|
||||
name = "corn cob"
|
||||
desc = "A reminder of meals gone by."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "corncob"
|
||||
item_state = "corncob"
|
||||
w_class = 1.0
|
||||
@@ -291,9 +298,36 @@
|
||||
|
||||
/obj/item/weapon/grown/corncob/attackby(obj/item/weapon/grown/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/kitchen/utensil/knife))
|
||||
if(is_sharp(W))
|
||||
user << "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>"
|
||||
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
|
||||
usr.unEquip(src)
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/grown/snapcorn
|
||||
name = "snap corn"
|
||||
desc = "A cob with snap pops"
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "snapcorn"
|
||||
item_state = "corncob"
|
||||
w_class = 1.0
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/snap_pops = 1
|
||||
|
||||
/obj/item/weapon/grown/snapcorn/add_juice()
|
||||
..()
|
||||
snap_pops = max(round(potency/8), 1)
|
||||
|
||||
/obj/item/weapon/grown/snapcorn/attack_self(mob/user as mob)
|
||||
..()
|
||||
user << "<span class='notice'>You pick up a snap pops from the cob.</span>"
|
||||
var/obj/item/toy/snappop/S = new /obj/item/toy/snappop(user.loc)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(S)
|
||||
snap_pops -= 1
|
||||
if(!snap_pops)
|
||||
new /obj/item/weapon/grown/corncob(user.loc)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/weedspray // -- Skie
|
||||
desc = "It's a toxic mixture, in spray form, to kill small weeds."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
name = "weed spray"
|
||||
icon_state = "weedspray"
|
||||
item_state = "spray"
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/pestspray // -- Skie
|
||||
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
name = "pest spray"
|
||||
icon_state = "pestspray"
|
||||
item_state = "spray"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/machinery/hydroponics
|
||||
name = "hydroponics tray"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "hydrotray"
|
||||
density = 1
|
||||
anchored = 1 // anchored == 2 means the hoses are screwed in place
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/obj/machinery/hydroponics/constructable
|
||||
name = "hydroponics tray"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "hydrotray3"
|
||||
|
||||
/obj/machinery/hydroponics/constructable/New()
|
||||
@@ -243,29 +243,29 @@ obj/machinery/hydroponics/update_icon()
|
||||
|
||||
if(planted)
|
||||
if(dead)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "[myseed.species]-dead")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.species]-dead")
|
||||
else if(harvest)
|
||||
if(myseed.plant_type == 2) // Shrooms don't have a -harvest graphic
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "[myseed.species]-grow[myseed.growthstages]")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.species]-grow[myseed.growthstages]")
|
||||
else
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "[myseed.species]-harvest")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.species]-harvest")
|
||||
else if(age < myseed.maturation)
|
||||
var/t_growthstate = ((age / myseed.maturation) * myseed.growthstages ) // Make sure it won't crap out due to HERPDERP 6 stages only
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "[myseed.species]-grow[round(t_growthstate)]")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.species]-grow[round(t_growthstate)]")
|
||||
lastproduce = age //Cheating by putting this here, it means that it isn't instantly ready to harvest
|
||||
else
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "[myseed.species]-grow[myseed.growthstages]") // Same
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state = "[myseed.species]-grow[myseed.growthstages]") // Same
|
||||
|
||||
if(waterlevel <= 10)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "over_lowwater3")
|
||||
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lowwater3")
|
||||
if(nutrilevel <= 2)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "over_lownutri3")
|
||||
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lownutri3")
|
||||
if(health <= (myseed.endurance / 2))
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "over_lowhealth3")
|
||||
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lowhealth3")
|
||||
if(weedlevel >= 5 || pestlevel >= 5 || toxic >= 40)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "over_alert3")
|
||||
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_alert3")
|
||||
if(harvest)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state = "over_harvest3")
|
||||
overlays += image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_harvest3")
|
||||
|
||||
if(istype(myseed,/obj/item/seeds/glowshroom))
|
||||
SetLuminosity(round(myseed.potency / 10))
|
||||
@@ -945,7 +945,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob, p
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk!
|
||||
name = "soil"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "soil"
|
||||
density = 0
|
||||
use_power = 0
|
||||
@@ -958,18 +958,18 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob, p
|
||||
|
||||
if(planted)
|
||||
if(dead)
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state= "[myseed.species]-dead")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state= "[myseed.species]-dead")
|
||||
else if(harvest)
|
||||
if(myseed.plant_type == 2) // Shrooms don't have a -harvest graphic
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state= "[myseed.species]-grow[myseed.growthstages]")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state= "[myseed.species]-grow[myseed.growthstages]")
|
||||
else
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state= "[myseed.species]-harvest")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state= "[myseed.species]-harvest")
|
||||
else if(age < myseed.maturation)
|
||||
var/t_growthstate = ((age / myseed.maturation) * myseed.growthstages )
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state= "[myseed.species]-grow[round(t_growthstate)]")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state= "[myseed.species]-grow[round(t_growthstate)]")
|
||||
lastproduce = age
|
||||
else
|
||||
overlays += image('icons/obj/hydroponics.dmi', icon_state= "[myseed.species]-grow[myseed.growthstages]")
|
||||
overlays += image('icons/obj/hydroponics/growing.dmi', icon_state= "[myseed.species]-grow[myseed.growthstages]")
|
||||
|
||||
if(istype(myseed,/obj/item/seeds/glowshroom))
|
||||
SetLuminosity(round(myseed.potency/10))
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
/obj/machinery/seed_extractor
|
||||
name = "seed extractor"
|
||||
desc = "Extracts and bags seeds from produce."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "sextractor"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/obj/item/seeds
|
||||
name = "pack of seeds"
|
||||
icon = 'icons/obj/seeds.dmi'
|
||||
icon = 'icons/obj/hydroponics/seeds.dmi'
|
||||
icon_state = "seed" //Unknown plant seed - these shouldn't exist in-game.
|
||||
w_class = 1 //Pocketable.
|
||||
var/plantname = "Plants" //Name of plant when planted.
|
||||
@@ -163,6 +163,7 @@
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 1
|
||||
mutatelist = list(/obj/item/seeds/replicapod)
|
||||
|
||||
/obj/item/seeds/berryseed
|
||||
name = "pack of berry seeds"
|
||||
@@ -213,6 +214,23 @@
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
mutatelist = list(/obj/item/seeds/mimanaseed)
|
||||
|
||||
/obj/item/seeds/mimanaseed
|
||||
name = "pack of mimana seeds"
|
||||
desc = "They're seeds that grow into mimana trees. When grown, keep away from mime."
|
||||
icon_state = "seed-mimana"
|
||||
species = "mimana"
|
||||
plantname = "Mimana Tree"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/mimana
|
||||
lifespan = 50
|
||||
endurance = 30
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 3
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/eggplantseed
|
||||
name = "pack of eggplant seeds"
|
||||
@@ -350,6 +368,24 @@
|
||||
oneharvest = 1
|
||||
potency = 20
|
||||
growthstages = 3
|
||||
mutatelist = list(/obj/item/seeds/snapcornseed)
|
||||
|
||||
/obj/item/seeds/snapcornseed
|
||||
name = "pack of snapcorn seeds"
|
||||
desc = "Oh snap!"
|
||||
icon_state = "seed-snapcorn"
|
||||
species = "snapcorn"
|
||||
plantname = "Snapcorn Stalks"
|
||||
product = /obj/item/weapon/grown/snapcorn
|
||||
lifespan = 25
|
||||
endurance = 15
|
||||
maturation = 8
|
||||
production = 6
|
||||
yield = 3
|
||||
plant_type = 0
|
||||
oneharvest = 1
|
||||
potency = 20
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/seeds/poppyseed
|
||||
name = "pack of poppy seeds"
|
||||
@@ -367,13 +403,48 @@
|
||||
plant_type = 0
|
||||
oneharvest = 1
|
||||
growthstages = 3
|
||||
mutatelist = list(/obj/item/seeds/bluetomatoseed, /obj/item/seeds/bloodtomatoseed)
|
||||
|
||||
/obj/item/seeds/geraniumseed
|
||||
name = "pack of geranium seeds"
|
||||
desc = "These seeds grow into geranium."
|
||||
icon_state = "seed-geranium"
|
||||
species = "geranium"
|
||||
plantname = "geranium Plants"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/poppy/geranium
|
||||
lifespan = 25
|
||||
endurance = 10
|
||||
maturation = 8
|
||||
production = 6
|
||||
yield = 6
|
||||
potency = 20
|
||||
plant_type = 0
|
||||
oneharvest = 1
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/seeds/lilyseed
|
||||
name = "pack of lily seeds"
|
||||
desc = "These seeds grow into lilies."
|
||||
icon_state = "seed-lily"
|
||||
species = "lily"
|
||||
plantname = "Lily Plants"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/poppy/lily
|
||||
lifespan = 25
|
||||
endurance = 10
|
||||
maturation = 8
|
||||
production = 6
|
||||
yield = 6
|
||||
potency = 20
|
||||
plant_type = 0
|
||||
oneharvest = 1
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/seeds/potatoseed
|
||||
name = "pack of potato seeds"
|
||||
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
|
||||
icon_state = "seed-potato"
|
||||
species = "potato"
|
||||
plantname = "Potato-Plants"
|
||||
plantname = "Potato Plants"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/potato
|
||||
lifespan = 30
|
||||
endurance = 15
|
||||
@@ -384,6 +455,24 @@
|
||||
oneharvest = 1
|
||||
potency = 10
|
||||
growthstages = 4
|
||||
mutatelist = list(/obj/item/seeds/sweetpotatoseed)
|
||||
|
||||
/obj/item/seeds/sweetpotatoseed
|
||||
name = "pack of sweet potato seeds"
|
||||
desc = "These seeds grow into sweet potato plants"
|
||||
icon_state = "seed-sweetpotato"
|
||||
species = "sweetpotato"
|
||||
plantname = "Sweet Potato Plants"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/sweetpotato
|
||||
lifespan = 30
|
||||
endurance = 15
|
||||
maturation = 10
|
||||
production = 1
|
||||
yield = 4
|
||||
plant_type = 0
|
||||
oneharvest = 1
|
||||
potency = 10
|
||||
growthstages = 4
|
||||
|
||||
/obj/item/seeds/icepepperseed
|
||||
name = "pack of ice-pepper seeds"
|
||||
@@ -452,6 +541,41 @@
|
||||
oneharvest = 1
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
mutatelist = list(/obj/item/seeds/oatseed, /obj/item/seeds/riceseed)
|
||||
|
||||
/obj/item/seeds/oatseed
|
||||
name = "pack of oat seeds"
|
||||
desc = "These may, or may not, grow into oat."
|
||||
icon_state = "seed-oat"
|
||||
species = "oat"
|
||||
plantname = "oat Stalks"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/oat
|
||||
lifespan = 25
|
||||
endurance = 15
|
||||
maturation = 6
|
||||
production = 1
|
||||
yield = 4
|
||||
potency = 15
|
||||
oneharvest = 1
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/riceseed
|
||||
name = "pack of rice seeds"
|
||||
desc = "These may, or may not, grow into rice."
|
||||
icon_state = "seed-rice"
|
||||
species = "rice"
|
||||
plantname = "rice Stalks"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/rice
|
||||
lifespan = 25
|
||||
endurance = 15
|
||||
maturation = 6
|
||||
production = 1
|
||||
yield = 4
|
||||
potency = 15
|
||||
oneharvest = 1
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/carrotseed
|
||||
name = "pack of carrot seeds"
|
||||
@@ -469,6 +593,24 @@
|
||||
oneharvest = 1
|
||||
plant_type = 0
|
||||
growthstages = 3
|
||||
mutatelist = list(/obj/item/seeds/parsnipseed)
|
||||
|
||||
/obj/item/seeds/parsnipseed
|
||||
name = "pack of parsnip seeds"
|
||||
desc = "These seeds grow into parsnips."
|
||||
icon_state = "seed-parsnip"
|
||||
species = "parsnip"
|
||||
plantname = "Parsnip"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/parsnip
|
||||
lifespan = 25
|
||||
endurance = 15
|
||||
maturation = 10
|
||||
production = 1
|
||||
yield = 5
|
||||
potency = 10
|
||||
oneharvest = 1
|
||||
plant_type = 0
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/seeds/reishimycelium
|
||||
name = "pack of reishi mycelium"
|
||||
@@ -573,6 +715,24 @@
|
||||
oneharvest = 1
|
||||
growthstages = 3
|
||||
plant_type = 2
|
||||
mutatelist = list(/obj/item/seeds/steelmycelium)
|
||||
|
||||
/obj/item/seeds/steelmycelium
|
||||
name = "pack of steel-cap mycelium"
|
||||
desc = "This mycelium grows into metal rods."
|
||||
icon_state = "mycelium-steelcap"
|
||||
species = "steelcap"
|
||||
plantname = "Steel Caps"
|
||||
product = /obj/item/stack/rods
|
||||
lifespan = 80
|
||||
endurance = 50
|
||||
maturation = 15
|
||||
production = 1
|
||||
yield = 5
|
||||
potency = 50
|
||||
oneharvest = 1
|
||||
growthstages = 3
|
||||
plant_type = 2
|
||||
|
||||
/obj/item/seeds/glowshroom
|
||||
name = "pack of glowshroom mycelium"
|
||||
@@ -851,6 +1011,24 @@
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
mutatelist = list(/obj/item/seeds/redbeetseed)
|
||||
|
||||
/obj/item/seeds/redbeetseed
|
||||
name = "pack of redbeet seeds"
|
||||
desc = "These seeds grow into red beet producing plants."
|
||||
icon_state = "seed-redbeet"
|
||||
species = "redbeet"
|
||||
plantname = "Red-Beet Plants"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/redbeet
|
||||
lifespan = 60
|
||||
endurance = 50
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 6
|
||||
oneharvest = 1
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/sugarcaneseed
|
||||
name = "pack of sugarcane seeds"
|
||||
@@ -883,6 +1061,23 @@
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
mutatelist = list(/obj/item/seeds/holymelonseed)
|
||||
|
||||
/obj/item/seeds/holymelonseed
|
||||
name = "pack of holymelon seeds"
|
||||
desc = "These seeds grow into holymelon plants."
|
||||
icon_state = "seed-holymelon"
|
||||
species = "holymelon"
|
||||
plantname = "Holy Melon Vines"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/holymelon
|
||||
lifespan = 50
|
||||
endurance = 40
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 3
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/pumpkinseed
|
||||
name = "pack of pumpkin seeds"
|
||||
@@ -899,6 +1094,23 @@
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 3
|
||||
mutatelist = list(/obj/item/seeds/blumpkinseed)
|
||||
|
||||
/obj/item/seeds/blumpkinseed
|
||||
name = "pack of blumpkin seeds"
|
||||
desc = "These seeds grow into blumpkin vines."
|
||||
icon_state = "seed-blumpkin"
|
||||
species = "blumpkin"
|
||||
plantname = "Blumpkin Vines"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/blumpkin
|
||||
lifespan = 50
|
||||
endurance = 40
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 3
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 3
|
||||
|
||||
/obj/item/seeds/limeseed
|
||||
name = "pack of lime seeds"
|
||||
@@ -915,6 +1127,7 @@
|
||||
potency = 15
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
mutatelist = list(/obj/item/seeds/orangeseed)
|
||||
|
||||
/obj/item/seeds/lemonseed
|
||||
name = "pack of lemon seeds"
|
||||
@@ -965,6 +1178,7 @@
|
||||
potency = 20
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
mutatelist = list(/obj/item/seeds/limeseed)
|
||||
|
||||
/obj/item/seeds/poisonberryseed
|
||||
name = "pack of poison-berry seeds"
|
||||
@@ -1049,6 +1263,23 @@
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
mutatelist = list(/obj/item/seeds/vanillapodseed)
|
||||
|
||||
/obj/item/seeds/vanillapodseed
|
||||
name = "pack of vanilla pod seeds"
|
||||
desc = "These seeds grow into vanilla trees. They look fattening."
|
||||
icon_state = "seed-vanillapod"
|
||||
species = "vanillapod"
|
||||
plantname = "Vanilla Tree"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/vanillapod
|
||||
lifespan = 20
|
||||
endurance = 15
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 2
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/seeds/cherryseed
|
||||
name = "pack of cherry pits"
|
||||
@@ -1066,6 +1297,22 @@
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/seeds/bluecherryseed
|
||||
name = "pack of blue cherry pits"
|
||||
desc = "The blue kind of cherries"
|
||||
icon_state = "seed-bluecherry"
|
||||
species = "bluecherry"
|
||||
plantname = "Blue Cherry Tree"
|
||||
product = /obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries
|
||||
lifespan = 35
|
||||
endurance = 35
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 3
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/seeds/kudzuseed
|
||||
name = "pack of kudzu seeds"
|
||||
desc = "These seeds grow into a weed that grows incredibly fast."
|
||||
|
||||
@@ -2,4 +2,10 @@
|
||||
..()
|
||||
if(client.prefs.unlock_content)
|
||||
icon_state = client.prefs.ghost_form
|
||||
if (ghostimage)
|
||||
ghostimage.icon_state = src.icon_state
|
||||
|
||||
updateghostimages()
|
||||
|
||||
|
||||
update_interface()
|
||||
@@ -1,4 +1,6 @@
|
||||
/mob/dead/observer/Logout()
|
||||
if (client)
|
||||
client.images -= ghost_darkness_images
|
||||
..()
|
||||
spawn(0)
|
||||
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
var/list/image/ghost_darkness_images = list() //this is a list of images for things ghosts should still be able to see when they toggle darkness
|
||||
/mob/dead/observer
|
||||
name = "ghost"
|
||||
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
|
||||
@@ -18,6 +19,9 @@
|
||||
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
|
||||
var/atom/movable/following = null
|
||||
var/fun_verbs = 0
|
||||
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
|
||||
var/ghostvision = 1 //is the ghost able to see things humans can't?
|
||||
var/seedarkness = 1
|
||||
|
||||
/mob/dead/observer/New(mob/body)
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
@@ -26,6 +30,9 @@
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
stat = DEAD
|
||||
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
ghost_darkness_images |= ghostimage
|
||||
updateallghostimages()
|
||||
var/turf/T
|
||||
if(ismob(body))
|
||||
T = get_turf(body) //Where is the body located?
|
||||
@@ -55,6 +62,14 @@
|
||||
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
|
||||
..()
|
||||
/mob/dead/observer/Destroy()
|
||||
if (ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
qdel(ghostimage)
|
||||
ghostimage = null
|
||||
updateallghostimages()
|
||||
..()
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
@@ -254,14 +269,43 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = 1
|
||||
src << "<span class='danger'>You are dead! You have no mind to store memory!</span>"
|
||||
|
||||
/mob/dead/observer/verb/toggle_ghostsee()
|
||||
set name = "Toggle Ghost Vision"
|
||||
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
|
||||
set category = "Ghost"
|
||||
ghostvision = !(ghostvision)
|
||||
updateghostsight()
|
||||
usr << "You [(ghostvision?"now":"no longer")] have ghost vision."
|
||||
|
||||
/mob/dead/observer/verb/toggle_darkness()
|
||||
set name = "Toggle Darkness"
|
||||
set category = "Ghost"
|
||||
seedarkness = !(seedarkness)
|
||||
updateghostsight()
|
||||
|
||||
if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING)
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
else
|
||||
/mob/dead/observer/proc/updateghostsight()
|
||||
if (!seedarkness)
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
else
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
if (!ghostvision)
|
||||
see_invisible = SEE_INVISIBLE_LIVING;
|
||||
updateghostimages()
|
||||
|
||||
/proc/updateallghostimages()
|
||||
for (var/mob/dead/observer/O in player_list)
|
||||
O.updateghostimages()
|
||||
|
||||
/mob/dead/observer/proc/updateghostimages()
|
||||
if (!client)
|
||||
return
|
||||
if (seedarkness || !ghostvision)
|
||||
client.images -= ghost_darkness_images
|
||||
else
|
||||
//add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
|
||||
client.images |= ghost_darkness_images
|
||||
if (ghostimage)
|
||||
client.images -= ghostimage //remove ourself
|
||||
|
||||
/mob/dead/observer/verb/possess()
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
var/heal_rate = 5
|
||||
var/plasma_rate = 5
|
||||
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
|
||||
var/heat_protection = 0.5
|
||||
var/leaping = 0
|
||||
|
||||
@@ -94,48 +90,42 @@
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature > 360.15)
|
||||
//Body temperature is too hot.
|
||||
fire_alert = max(fire_alert, 1)
|
||||
throw_alert("alien_fire")
|
||||
switch(bodytemperature)
|
||||
if(360 to 400)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(400 to 460)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
|
||||
fire_alert = max(fire_alert, 2)
|
||||
if(460 to INFINITY)
|
||||
if(on_fire)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
|
||||
fire_alert = max(fire_alert, 2)
|
||||
else
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
|
||||
fire_alert = max(fire_alert, 2)
|
||||
return
|
||||
else
|
||||
clear_alert("alien_fire")
|
||||
|
||||
/mob/living/carbon/alien/handle_mutations_and_radiation()
|
||||
|
||||
// Aliens love radiation nom nom nom
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
/mob/living/carbon/alien/ex_act(severity, target)
|
||||
..()
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
switch (severity)
|
||||
if (1.0)
|
||||
gib()
|
||||
return
|
||||
|
||||
switch(radiation)
|
||||
if(0 to 50)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
if (2.0)
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
adjustEarDamage(30,120)
|
||||
|
||||
if(50 to 75)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
if(3.0)
|
||||
adjustBruteLoss(30)
|
||||
if (prob(50))
|
||||
Paralyse(1)
|
||||
adjustEarDamage(15,60)
|
||||
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
|
||||
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
|
||||
if(..())
|
||||
|
||||
@@ -15,26 +15,26 @@
|
||||
real_name = name
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates()
|
||||
..() //-Yvarov
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_hud_icons_health()
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(150 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(100 to 150)
|
||||
if(120 to 150)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 100)
|
||||
if(90 to 120)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
if(60 to 90)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
if(30 to 60)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
if(0 to 30)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
healths.icon_state = "health7"
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/handle_regular_hud_updates()
|
||||
..() //-Yvarov
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/handle_hud_icons_health()
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
@@ -29,14 +27,16 @@
|
||||
healths.icon_state = "health1"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 75)
|
||||
if(50 to 75)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
healths.icon_state = "health7"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/movement_delay()
|
||||
. = ..()
|
||||
|
||||
@@ -28,53 +28,6 @@
|
||||
if(l_store) l_store.emp_act(severity)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/ex_act(severity, target)
|
||||
..()
|
||||
|
||||
var/shielded = 0
|
||||
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch (severity)
|
||||
if (1.0)
|
||||
gib()
|
||||
return
|
||||
|
||||
if (2.0)
|
||||
if (!shielded)
|
||||
b_loss += 60
|
||||
|
||||
f_loss += 60
|
||||
|
||||
adjustEarDamage(30, 120)
|
||||
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
if (prob(50) && !shielded)
|
||||
Paralyse(1)
|
||||
adjustEarDamage(15 , 60)
|
||||
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/blob_act()
|
||||
if (stat == 2)
|
||||
return
|
||||
var/shielded = 0
|
||||
var/damage = null
|
||||
if (stat != 2)
|
||||
damage = rand(30,40)
|
||||
|
||||
if(shielded)
|
||||
damage /= 4
|
||||
|
||||
show_message("<span class='userdanger'>The blob attacks!</span>")
|
||||
adjustFireLoss(damage)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
..()
|
||||
var/damage = rand(5, 35)
|
||||
@@ -139,10 +92,6 @@
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/var/co2overloadtime = null
|
||||
/mob/living/carbon/alien/humanoid/var/temperature_resistance = T0C+75
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
oxygen_alert = 0
|
||||
toxins_alert = 0
|
||||
fire_alert = 0
|
||||
pass_flags = PASSTABLE
|
||||
var/temperature_alert = 0
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
@@ -25,162 +21,4 @@
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
|
||||
/mob/living/carbon/alien/humanoid/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
eye_blind = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
|
||||
death()
|
||||
eye_blind = 1
|
||||
stat = DEAD
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
if(!reagents.has_reagent("epinephrine"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
else
|
||||
adjustEarDamage(-1, (ear_damage < 25 ? -0.05 : 0))
|
||||
//deafness, heals slowly over time
|
||||
//ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(!stunned)
|
||||
update_icons()
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
if(!weakened)
|
||||
update_icons()
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 75)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((eye_blind))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHT)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -25,26 +25,26 @@
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/handle_regular_hud_updates()
|
||||
..() //-Yvarov
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/handle_hud_icons_health()
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
switch(health)
|
||||
if(250 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
if(175 to 250)
|
||||
if(200 to 250)
|
||||
src.healths.icon_state = "health1"
|
||||
if(100 to 175)
|
||||
if(150 to 200)
|
||||
src.healths.icon_state = "health2"
|
||||
if(50 to 100)
|
||||
if(100 to 150)
|
||||
src.healths.icon_state = "health3"
|
||||
if(0 to 50)
|
||||
if(50 to 100)
|
||||
src.healths.icon_state = "health4"
|
||||
else
|
||||
if(0 to 50)
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
src.healths.icon_state = "health7"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/movement_delay()
|
||||
. = ..()
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
if (!src.restrained())
|
||||
message = text("<span class='name'>[src]</span> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
|
||||
m_type = 1
|
||||
// if ("sit")
|
||||
// message = "<span class='name'>[src]</span> sits down." //Larvan can't sit down, /N
|
||||
// m_type = 1
|
||||
if ("snore")
|
||||
message = "<B>[src]</B> snores."
|
||||
m_type = 2
|
||||
if ("sulk")
|
||||
message = "<span class='name'>[src]</span> sulks down sadly."
|
||||
m_type = 1
|
||||
|
||||
@@ -34,60 +34,6 @@
|
||||
amount_grown = min(amount_grown + 1, max_grown)
|
||||
..(amount)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/ex_act(severity, target)
|
||||
..()
|
||||
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch (severity)
|
||||
if (1.0)
|
||||
gib()
|
||||
return
|
||||
|
||||
if (2.0)
|
||||
|
||||
b_loss += 60
|
||||
|
||||
f_loss += 60
|
||||
|
||||
adjustEarDamage(30,120)
|
||||
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
if (prob(50))
|
||||
Paralyse(1)
|
||||
adjustEarDamage(15,60)
|
||||
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/blob_act()
|
||||
if (stat == 2)
|
||||
return
|
||||
var/shielded = 0
|
||||
|
||||
var/damage = null
|
||||
if (stat != 2)
|
||||
damage = rand(10,30)
|
||||
|
||||
if(shielded)
|
||||
damage /= 4
|
||||
|
||||
//paralysis += 1
|
||||
|
||||
show_message("<span class='userdanger'>The blob attacks you!</span>")
|
||||
|
||||
adjustFireLoss(damage)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
//can't equip anything
|
||||
/mob/living/carbon/alien/larva/attack_ui(slot_id)
|
||||
return
|
||||
@@ -137,9 +83,6 @@
|
||||
/mob/living/carbon/alien/larva/restrained()
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/larva/var/co2overloadtime = null
|
||||
/mob/living/carbon/alien/larva/var/temperature_resistance = T0C+75
|
||||
|
||||
// new damage icon system
|
||||
// now constructs damage icon for each organ from mask * damage field
|
||||
|
||||
@@ -153,15 +96,6 @@
|
||||
/mob/living/carbon/alien/larva/start_pulling()
|
||||
return
|
||||
|
||||
/* Commented out because it's duplicated in life.dm
|
||||
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough
|
||||
if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later.
|
||||
return
|
||||
else
|
||||
var/mob/living/carbon/alien/humanoid/A = new(loc)
|
||||
A.key = key
|
||||
qdel(src) */
|
||||
|
||||
/mob/living/carbon/alien/larva/stripPanelUnequip(obj/item/what, mob/who)
|
||||
src << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/mob/living/carbon/alien/larva
|
||||
var/temperature_alert = 0
|
||||
|
||||
/mob/living/carbon/alien/larva/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
if(..())
|
||||
// GROW!
|
||||
if(amount_grown < max_grown)
|
||||
@@ -13,160 +14,26 @@
|
||||
//some kind of bug in canmove() isn't properly calling update_icons, so this is here as a placeholder
|
||||
update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
eye_blind = max(1, eye_blind)
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < -25 || !getorgan(/obj/item/organ/brain))
|
||||
death()
|
||||
eye_blind = max(1, eye_blind)
|
||||
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
|
||||
//if( health <= 20 && prob(1) )
|
||||
// spawn(0)
|
||||
// emote("gasp")
|
||||
if(!reagents.has_reagent("epinephrine"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-2)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss_")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
else
|
||||
adjustEarDamage(-1, (ear_damage < 25 ? -0.05 : 0))
|
||||
//deafness, heals slowly over time
|
||||
//ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
/mob/living/carbon/alien/larva/handle_hud_icons_health()
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(25 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(19 to 25)
|
||||
if(20 to 25)
|
||||
healths.icon_state = "health1"
|
||||
if(13 to 19)
|
||||
if(15 to 20)
|
||||
healths.icon_state = "health2"
|
||||
if(7 to 13)
|
||||
if(10 to 15)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 7)
|
||||
if(5 to 10)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
if(0 to 5)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((eye_blind))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHT)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
healths.icon_state = "health7"
|
||||
|
||||
|
||||
|
||||
@@ -1,95 +1,5 @@
|
||||
|
||||
/mob/living/carbon/alien/Life()
|
||||
|
||||
if(..())
|
||||
//First, resolve location and get a breath
|
||||
if(SSair.times_fired%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
spawn(0) breathe()
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/alien/handle_chemicals_in_body()
|
||||
if(reagents)
|
||||
reagents.metabolize(src)
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
jitteriness = max(0, jitteriness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
jitteriness = max(0, jitteriness - 1)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
/mob/living/carbon/alien/proc/breathe()
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_breath(datum/gas_mixture/breath)
|
||||
/mob/living/carbon/alien/check_breath(datum/gas_mixture/breath)
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
@@ -106,26 +16,86 @@
|
||||
if(Toxins_pp) // Detect toxins in air
|
||||
|
||||
adjustToxLoss(breath.toxins*250)
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
throw_alert("alien_tox")
|
||||
|
||||
toxins_used = breath.toxins
|
||||
|
||||
else
|
||||
toxins_alert = 0
|
||||
clear_alert("alien_tox")
|
||||
|
||||
//Breathe in toxins and out oxygen
|
||||
breath.toxins -= toxins_used
|
||||
breath.oxygen += toxins_used
|
||||
|
||||
if(breath.temperature > (T0C+66)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else
|
||||
fire_alert = 0
|
||||
//BREATH TEMPERATURE
|
||||
handle_breath_temperature(breath)
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
/mob/living/carbon/alien/handle_regular_status_updates()
|
||||
..()
|
||||
//natural reduction of movement delay due to stun.
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/handle_vision()
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
|
||||
if (stat == 2)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if((eye_blind))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHT)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if(machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/handle_hud_icons()
|
||||
|
||||
handle_hud_icons_health()
|
||||
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
/mob/living/carbon/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/blob_act()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/Move(var/atom/newloc)
|
||||
if(container)
|
||||
container.Move(newloc)
|
||||
|
||||
@@ -1,40 +1,25 @@
|
||||
|
||||
/mob/living/carbon/brain/handle_breathing()
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/handle_mutations_and_radiation()
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
if(!container)//If it's not in an MMI
|
||||
src << "<span class='danger'>You feel weak.</span>"
|
||||
else//Fluff-wise, since the brain can't detect anything itself, the MMI handles thing like that
|
||||
src << "<span class='danger'>STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED.</span>"
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
switch(radiation)
|
||||
if(0 to 50)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 75)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
if(!container)
|
||||
src << "<span class='danger'>You feel weak.</span>"
|
||||
else
|
||||
src << "<span class='danger'>STATUS: DANGEROUS LEVELS OF RADIATION DETECTED.</span>"
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/brain/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
@@ -61,193 +46,92 @@
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
//adjustFireLoss(5.0*discomfort)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
|
||||
else
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/brain/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
/mob/living/carbon/brain/handle_regular_status_updates() //TODO: comment out the unused bits >_>
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
if(stat == DEAD)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
else
|
||||
updatehealth()
|
||||
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
|
||||
death()
|
||||
eye_blind = max(eye_blind, 1)
|
||||
silent = 0
|
||||
return 1
|
||||
if(health < config.health_threshold_crit)
|
||||
stat = UNCONSCIOUS
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
//Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere
|
||||
if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
emp_damage = 0
|
||||
//Handling EMP effect in the Life(), it's made VERY simply, and has some additional effects handled elsewhere
|
||||
if(emp_damage) //This is pretty much a damage type only used by MMIs, dished out by the emp_act
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
emp_damage = 0
|
||||
else
|
||||
emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with
|
||||
switch(emp_damage)
|
||||
if(31 to INFINITY)
|
||||
emp_damage = 30//Let's not overdo it
|
||||
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
|
||||
eye_blind = max(eye_blind, 1)
|
||||
setEarDamage(-1,1)
|
||||
silent = 1
|
||||
if(!alert)//Sounds an alarm, but only once per 'level'
|
||||
emote("alarm")
|
||||
src << "<span class='danger'>Major electrical distruption detected: System rebooting.</span>"
|
||||
alert = 1
|
||||
if(prob(75))
|
||||
emp_damage -= 1
|
||||
if(20)
|
||||
alert = 0
|
||||
eye_blind = 0
|
||||
setEarDamage(-1,0)
|
||||
silent = 0
|
||||
emp_damage -= 1
|
||||
if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage
|
||||
eye_blurry = 1
|
||||
setEarDamage(1,-1)
|
||||
if(!alert)
|
||||
emote("alert")
|
||||
src << "<span class='danger'>Primary systems are now online.</span>"
|
||||
alert = 1
|
||||
if(prob(50))
|
||||
emp_damage -= 1
|
||||
if(10)
|
||||
alert = 0
|
||||
eye_blurry = 0
|
||||
setEarDamage(0,-1)
|
||||
emp_damage -= 1
|
||||
if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere)
|
||||
if(!alert)
|
||||
emote("notice")
|
||||
src << "<span class='danger'>System reboot nearly complete.</span>"
|
||||
alert = 1
|
||||
if(prob(25))
|
||||
emp_damage -= 1
|
||||
if(1)
|
||||
alert = 0
|
||||
src << "<span class='danger'>All systems restored.</span>"
|
||||
emp_damage -= 1
|
||||
else
|
||||
emp_damage = round(emp_damage,1)//Let's have some nice numbers to work with
|
||||
switch(emp_damage)
|
||||
if(31 to INFINITY)
|
||||
emp_damage = 30//Let's not overdo it
|
||||
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
|
||||
eye_blind = max(eye_blind, 1)
|
||||
setEarDamage(-1,1)
|
||||
silent = 1
|
||||
if(!alert)//Sounds an alarm, but only once per 'level'
|
||||
emote("alarm")
|
||||
src << "<span class='danger'>Major electrical distruption detected: System rebooting.</span>"
|
||||
alert = 1
|
||||
if(prob(75))
|
||||
emp_damage -= 1
|
||||
if(20)
|
||||
alert = 0
|
||||
eye_blind = 0
|
||||
setEarDamage(-1,0)
|
||||
silent = 0
|
||||
emp_damage -= 1
|
||||
if(11 to 19)//Moderate level of EMP damage, resulting in nearsightedness and ear damage
|
||||
eye_blurry = 1
|
||||
setEarDamage(1,-1)
|
||||
if(!alert)
|
||||
emote("alert")
|
||||
src << "<span class='danger'>Primary systems are now online.</span>"
|
||||
alert = 1
|
||||
if(prob(50))
|
||||
emp_damage -= 1
|
||||
if(10)
|
||||
alert = 0
|
||||
eye_blurry = 0
|
||||
setEarDamage(0,-1)
|
||||
emp_damage -= 1
|
||||
if(2 to 9)//Low level of EMP damage, has few effects(handled elsewhere)
|
||||
if(!alert)
|
||||
emote("notice")
|
||||
src << "<span class='danger'>System reboot nearly complete.</span>"
|
||||
alert = 1
|
||||
if(prob(25))
|
||||
emp_damage -= 1
|
||||
if(1)
|
||||
alert = 0
|
||||
src << "<span class='danger'>All systems restored.</span>"
|
||||
emp_damage -= 1
|
||||
eye_blind = 0
|
||||
|
||||
//Other
|
||||
/* commented out because none of these should happen
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
*/
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/brain/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
handle_vision()
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if (eye_blind)
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHT)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
handle_hud_icons_health()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/*/mob/living/carbon/brain/emp_act(severity)
|
||||
if(!(container && istype(container, /obj/item/device/mmi)))
|
||||
return
|
||||
else
|
||||
switch(severity)
|
||||
if(1)
|
||||
emp_damage += rand(20,30)
|
||||
if(2)
|
||||
emp_damage += rand(10,20)
|
||||
if(3)
|
||||
emp_damage += rand(0,10)
|
||||
..()*/
|
||||
|
||||
@@ -377,3 +377,10 @@ var/const/GALOSHES_DONT_HELP = 8
|
||||
|
||||
/mob/living/carbon/is_muzzled()
|
||||
return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
|
||||
/mob/living/carbon/blob_act()
|
||||
if (stat == DEAD)
|
||||
return
|
||||
else
|
||||
show_message("<span class='userdanger'>The blob attacks!</span>")
|
||||
adjustBruteLoss(10)
|
||||
|
||||
@@ -15,3 +15,8 @@
|
||||
var/obj/item/weapon/tank/internal = null
|
||||
|
||||
var/datum/dna/dna = null//Carbon
|
||||
|
||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
|
||||
var/co2overloadtime = null
|
||||
var/temperature_resistance = T0C+75
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/ex_act(severity, ex_target)
|
||||
var/shielded = 0
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch (severity)
|
||||
@@ -95,8 +94,7 @@
|
||||
//user.throw_at(target, 200, 4)
|
||||
|
||||
if (2.0)
|
||||
if (!shielded)
|
||||
b_loss += 60
|
||||
b_loss += 60
|
||||
|
||||
f_loss += 60
|
||||
|
||||
@@ -106,7 +104,7 @@
|
||||
|
||||
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
|
||||
adjustEarDamage(30, 120)
|
||||
if (prob(70) && !shielded)
|
||||
if (prob(70))
|
||||
Paralyse(10)
|
||||
|
||||
if(3.0)
|
||||
@@ -115,7 +113,7 @@
|
||||
b_loss = b_loss/2
|
||||
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
|
||||
adjustEarDamage(15,60)
|
||||
if (prob(50) && !shielded)
|
||||
if (prob(50))
|
||||
Paralyse(10)
|
||||
|
||||
var/update = 0
|
||||
@@ -138,17 +136,13 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/blob_act()
|
||||
if(stat == 2) return
|
||||
if(stat == DEAD) return
|
||||
show_message("<span class='userdanger'> The blob attacks you!</span>")
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/obj/item/organ/limb/affecting = get_organ(ran_zone(dam_zone))
|
||||
apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/var/co2overloadtime = null
|
||||
/mob/living/carbon/human/var/temperature_resistance = T0C+75
|
||||
|
||||
|
||||
/mob/living/carbon/human/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask)
|
||||
@@ -717,3 +711,19 @@
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/carbon/human/generateStaticOverlay()
|
||||
var/image/staticOverlay = image(icon('icons/effects/effects.dmi', "static"), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["static"] = staticOverlay
|
||||
|
||||
staticOverlay = image(icon('icons/effects/effects.dmi', "blank"), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["blank"] = staticOverlay
|
||||
|
||||
staticOverlay = getLetterImage(src, "H", 1)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["letter"] = staticOverlay
|
||||
|
||||
|
||||
|
||||
@@ -179,13 +179,14 @@ emp_act
|
||||
|
||||
switch(hit_area)
|
||||
if("head") //Harder to score a stun but if you do it lasts a bit longer
|
||||
if(stat == CONSCIOUS && prob(I.force))
|
||||
visible_message("<span class='danger'>[src] has been knocked unconscious!</span>", \
|
||||
"<span class='userdanger'>[src] has been knocked unconscious!</span>")
|
||||
apply_effect(20, PARALYZE, armor)
|
||||
if(src != user && I.damtype == BRUTE)
|
||||
if(stat == CONSCIOUS)
|
||||
if(prob(I.force))
|
||||
visible_message("<span class='danger'>[src] has been knocked unconscious!</span>", \
|
||||
"<span class='userdanger'>[src] has been knocked unconscious!</span>")
|
||||
apply_effect(20, PARALYZE, armor)
|
||||
if(prob(I.force + ((100 - src.health)/2)) && src != user && I.damtype == BRUTE)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
ticker.mode.remove_gangster(mind)
|
||||
ticker.mode.remove_gangster(mind, exclude_bosses=1)
|
||||
if(bloody) //Apply blood
|
||||
if(wear_mask)
|
||||
wear_mask.add_blood(src)
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
|
||||
var/special_voice = "" // For changing our voice. Used by a symptom.
|
||||
|
||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
|
||||
var/xylophone = 0 //For the spoooooooky xylophone cooldown
|
||||
|
||||
var/gender_ambiguous = 0 //if something goes wrong during gender reassignment this generates a line in examine
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay
|
||||
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
|
||||
|
||||
#define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
|
||||
|
||||
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
|
||||
#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point
|
||||
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 460K point and you are on fire
|
||||
@@ -26,31 +24,20 @@
|
||||
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
var/pressure_alert = 0
|
||||
var/temperature_alert = 0
|
||||
var/tinttotal = 0 // Total level of visualy impairing items
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
|
||||
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
|
||||
tinttotal = tintcheck() //here as both hud updates and status updates call it
|
||||
|
||||
if(..())
|
||||
if(dna)
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_life(src)
|
||||
if(SSmob.times_fired%4==2 || failed_last_breath) //First, resolve location and get a breath
|
||||
breathe() //Only try to take a breath every 4 ticks, unless suffocating
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
|
||||
//Stuff jammed in your limbs hurts
|
||||
handle_embedded_objects()
|
||||
@@ -79,7 +66,19 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/handle_disabilities()
|
||||
if (getBrainLoss() >= 60 && stat != 2)
|
||||
..()
|
||||
//Eyes
|
||||
if(!(disabilities & BLIND))
|
||||
if(tinttotal >= TINT_BLIND) //covering your eyes heals blurry eyes faster
|
||||
eye_blurry = max(eye_blurry-2, 0)
|
||||
|
||||
//Ears
|
||||
if(!(disabilities & DEAF))
|
||||
if(istype(ears, /obj/item/clothing/ears/earmuffs)) // earmuffs rest your ears, healing ear_deaf faster and ear_damage, but keeping you deaf.
|
||||
setEarDamage(max(ear_damage-0.10, 0), max(ear_deaf - 1, 1))
|
||||
|
||||
|
||||
if (getBrainLoss() >= 60 && stat != DEAD)
|
||||
if (prob(3))
|
||||
switch(pick(1,2,3))
|
||||
if(1)
|
||||
@@ -92,9 +91,10 @@
|
||||
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation()
|
||||
if(dna)
|
||||
dna.species.handle_mutations_and_radiation(src)
|
||||
if(dna.species.handle_mutations_and_radiation(src))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/breathe()
|
||||
/mob/living/carbon/human/breathe()
|
||||
if(dna)
|
||||
dna.species.breathe(src)
|
||||
|
||||
@@ -140,27 +140,8 @@
|
||||
dna.species.ExtinguishMob(src)
|
||||
else
|
||||
..()
|
||||
|
||||
//END FIRE CODE
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/proc/adjust_body_temperature(current, loc_temp, boost)
|
||||
var/temperature = current
|
||||
var/difference = abs(current-loc_temp) //get difference
|
||||
var/increments// = difference/10 //find how many increments apart they are
|
||||
if(difference > 50)
|
||||
increments = difference/5
|
||||
else
|
||||
increments = difference/10
|
||||
var/change = increments*boost // Get the amount to change by (x per increment)
|
||||
var/temp_change
|
||||
if(current < loc_temp)
|
||||
temperature = min(loc_temp, temperature+change)
|
||||
else if(current > loc_temp)
|
||||
temperature = max(loc_temp, temperature-change)
|
||||
temp_change = (temperature - current)
|
||||
return temp_change
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/proc/stabilize_temperature_from_calories()
|
||||
switch(bodytemperature)
|
||||
@@ -297,290 +278,28 @@
|
||||
|
||||
return min(1,thermal_protection)
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/proc/add_fire_protection(var/temp)
|
||||
var/fire_prot = 0
|
||||
if(head)
|
||||
if(head.protective_temperature > temp)
|
||||
fire_prot += (head.protective_temperature/10)
|
||||
if(wear_mask)
|
||||
if(wear_mask.protective_temperature > temp)
|
||||
fire_prot += (wear_mask.protective_temperature/10)
|
||||
if(glasses)
|
||||
if(glasses.protective_temperature > temp)
|
||||
fire_prot += (glasses.protective_temperature/10)
|
||||
if(ears)
|
||||
if(ears.protective_temperature > temp)
|
||||
fire_prot += (ears.protective_temperature/10)
|
||||
if(wear_suit)
|
||||
if(wear_suit.protective_temperature > temp)
|
||||
fire_prot += (wear_suit.protective_temperature/10)
|
||||
if(w_uniform)
|
||||
if(w_uniform.protective_temperature > temp)
|
||||
fire_prot += (w_uniform.protective_temperature/10)
|
||||
if(gloves)
|
||||
if(gloves.protective_temperature > temp)
|
||||
fire_prot += (gloves.protective_temperature/10)
|
||||
if(shoes)
|
||||
if(shoes.protective_temperature > temp)
|
||||
fire_prot += (shoes.protective_temperature/10)
|
||||
|
||||
return fire_prot
|
||||
|
||||
/mob/living/carbon/human/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(nodamage)
|
||||
return
|
||||
//world <<"body_part = [body_part], exposed_temperature = [exposed_temperature], exposed_intensity = [exposed_intensity]"
|
||||
var/discomfort = min(abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
discomfort *= 4
|
||||
|
||||
if(mutantrace == "plant")
|
||||
discomfort *= TEMPERATURE_DAMAGE_COEFFICIENT * 2 //I don't like magic numbers. I'll make mutantraces a datum with vars sometime later. -- Urist
|
||||
else
|
||||
discomfort *= TEMPERATURE_DAMAGE_COEFFICIENT //Dangercon 2011 - now with less magic numbers!
|
||||
//world <<"[discomfort]"
|
||||
|
||||
switch(body_part)
|
||||
if(HEAD)
|
||||
apply_damage(2.5*discomfort, BURN, "head")
|
||||
if(CHEST)
|
||||
apply_damage(2.5*discomfort, BURN, "chest")
|
||||
if(LEGS)
|
||||
apply_damage(0.6*discomfort, BURN, "l_leg")
|
||||
apply_damage(0.6*discomfort, BURN, "r_leg")
|
||||
if(ARMS)
|
||||
apply_damage(0.4*discomfort, BURN, "l_arm")
|
||||
apply_damage(0.4*discomfort, BURN, "r_arm")
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/handle_chemicals_in_body()
|
||||
..()
|
||||
if(dna)
|
||||
dna.species.handle_chemicals_in_body(src)
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
/mob/living/carbon/human/handle_regular_status_updates()
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
updatehealth() //TODO
|
||||
if(health <= config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
|
||||
death()
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
|
||||
Paralyse(3)
|
||||
|
||||
if(hallucination)
|
||||
spawn handle_hallucinations()
|
||||
|
||||
if(hallucination<=2)
|
||||
hallucination = 0
|
||||
else
|
||||
hallucination -= 2
|
||||
|
||||
else
|
||||
for(var/atom/a in hallucinations)
|
||||
qdel(a)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
handle_dreams()
|
||||
adjustStaminaLoss(-10)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health && !hal_crit )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
else if (status_flags & FAKEDEATH)
|
||||
stat = UNCONSCIOUS
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
//Eyes
|
||||
if(disabilities & BLIND || stat) //disabled-blind, doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
else if(tinttotal >= TINT_BLIND) //covering your eyes heals blurry eyes faster
|
||||
eye_blurry = max(eye_blurry-3, 0)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
else if (ear_damage < 100) // deafness heals slowly over time, unless ear_damage is over 100
|
||||
if(istype(ears, /obj/item/clothing/ears/earmuffs)) // earmuffs rest your ears, healing 3x faster, but keeping you deaf.
|
||||
setEarDamage(max(ear_damage-0.15, 0), max(ear_deaf - 1, 1))
|
||||
else
|
||||
adjustEarDamage(-0.05, -1)
|
||||
|
||||
//Dizziness
|
||||
if(dizziness)
|
||||
var/client/C = client
|
||||
var/pixel_x_diff = 0
|
||||
var/pixel_y_diff = 0
|
||||
var/temp
|
||||
var/saved_dizz = dizziness
|
||||
dizziness = max(dizziness-1, 0)
|
||||
if(C)
|
||||
var/oldsrc = src
|
||||
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70 // This shit is annoying at high strength
|
||||
src = null
|
||||
spawn(0)
|
||||
if(C)
|
||||
temp = amplitude * sin(0.008 * saved_dizz * world.time)
|
||||
pixel_x_diff += temp
|
||||
C.pixel_x += temp
|
||||
temp = amplitude * cos(0.008 * saved_dizz * world.time)
|
||||
pixel_y_diff += temp
|
||||
C.pixel_y += temp
|
||||
sleep(3)
|
||||
if(C)
|
||||
temp = amplitude * sin(0.008 * saved_dizz * world.time)
|
||||
pixel_x_diff += temp
|
||||
C.pixel_x += temp
|
||||
temp = amplitude * cos(0.008 * saved_dizz * world.time)
|
||||
pixel_y_diff += temp
|
||||
C.pixel_y += temp
|
||||
sleep(3)
|
||||
if(C)
|
||||
C.pixel_x -= pixel_x_diff
|
||||
C.pixel_y -= pixel_y_diff
|
||||
src = oldsrc
|
||||
|
||||
//Jitteryness
|
||||
if(jitteriness)
|
||||
do_jitter_animation(jitteriness)
|
||||
jitteriness = max(jitteriness-1, 0)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(slurring)
|
||||
slurring = max(slurring-1,0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
|
||||
CheckStamina()
|
||||
/mob/living/carbon/human/handle_vision()
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
else
|
||||
if(!client.adminobs) reset_view(null)
|
||||
|
||||
if(dna)
|
||||
dna.species.handle_vision(src)
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/handle_regular_hud_updates()
|
||||
if(!client) return 0
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
|
||||
update_action_buttons()
|
||||
|
||||
if(damageoverlay.overlays)
|
||||
damageoverlay.overlays = list()
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
//Critical damage passage overlay
|
||||
if(health <= config.health_threshold_crit)
|
||||
var/image/I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "passage0")
|
||||
I.blend_mode = BLEND_OVERLAY //damageoverlay is BLEND_MULTIPLY
|
||||
switch(health)
|
||||
if(-20 to -10)
|
||||
I.icon_state = "passage1"
|
||||
if(-30 to -20)
|
||||
I.icon_state = "passage2"
|
||||
if(-40 to -30)
|
||||
I.icon_state = "passage3"
|
||||
if(-50 to -40)
|
||||
I.icon_state = "passage4"
|
||||
if(-60 to -50)
|
||||
I.icon_state = "passage5"
|
||||
if(-70 to -60)
|
||||
I.icon_state = "passage6"
|
||||
if(-80 to -70)
|
||||
I.icon_state = "passage7"
|
||||
if(-90 to -80)
|
||||
I.icon_state = "passage8"
|
||||
if(-95 to -90)
|
||||
I.icon_state = "passage9"
|
||||
if(-INFINITY to -95)
|
||||
I.icon_state = "passage10"
|
||||
damageoverlay.overlays += I
|
||||
else
|
||||
//Oxygen damage overlay
|
||||
if(oxyloss)
|
||||
var/image/I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "oxydamageoverlay0")
|
||||
switch(oxyloss)
|
||||
if(10 to 20)
|
||||
I.icon_state = "oxydamageoverlay1"
|
||||
if(20 to 25)
|
||||
I.icon_state = "oxydamageoverlay2"
|
||||
if(25 to 30)
|
||||
I.icon_state = "oxydamageoverlay3"
|
||||
if(30 to 35)
|
||||
I.icon_state = "oxydamageoverlay4"
|
||||
if(35 to 40)
|
||||
I.icon_state = "oxydamageoverlay5"
|
||||
if(40 to 45)
|
||||
I.icon_state = "oxydamageoverlay6"
|
||||
if(45 to INFINITY)
|
||||
I.icon_state = "oxydamageoverlay7"
|
||||
damageoverlay.overlays += I
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = src.getBruteLoss() + src.getFireLoss() + damageoverlaytemp
|
||||
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
|
||||
if(hurtdamage)
|
||||
var/image/I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay0")
|
||||
I.blend_mode = BLEND_ADD
|
||||
switch(hurtdamage)
|
||||
if(5 to 15)
|
||||
I.icon_state = "brutedamageoverlay1"
|
||||
if(15 to 30)
|
||||
I.icon_state = "brutedamageoverlay2"
|
||||
if(30 to 45)
|
||||
I.icon_state = "brutedamageoverlay3"
|
||||
if(45 to 70)
|
||||
I.icon_state = "brutedamageoverlay4"
|
||||
if(70 to 85)
|
||||
I.icon_state = "brutedamageoverlay5"
|
||||
if(85 to INFINITY)
|
||||
I.icon_state = "brutedamageoverlay6"
|
||||
var/image/black = image(I.icon, I.icon_state) //BLEND_ADD doesn't let us darken, so this is just to blacken the edge of the screen
|
||||
black.color = "#170000"
|
||||
damageoverlay.overlays += I
|
||||
damageoverlay.overlays += black
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
else
|
||||
if(!client.adminobs) reset_view(null)
|
||||
|
||||
/mob/living/carbon/human/handle_hud_icons()
|
||||
if(dna)
|
||||
dna.species.handle_hud_icons(src)
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/handle_random_events()
|
||||
// Puke if toxloss is too high
|
||||
if(!stat)
|
||||
@@ -605,10 +324,25 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/handle_changeling()
|
||||
if(mind && mind.changeling)
|
||||
mind.changeling.regenerate()
|
||||
|
||||
if(mind)
|
||||
if(mind.changeling)
|
||||
mind.changeling.regenerate()
|
||||
hud_used.lingchemdisplay.invisibility = 0
|
||||
hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#dd66dd'>[mind.changeling.chem_charges]</font></div>"
|
||||
else
|
||||
hud_used.lingchemdisplay.invisibility = 101
|
||||
|
||||
/mob/living/carbon/human/has_smoke_protection()
|
||||
if(wear_mask)
|
||||
if(wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
. = 1
|
||||
if(glasses)
|
||||
if(glasses.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
. = 1
|
||||
if(head)
|
||||
if(head.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
. = 1
|
||||
return .
|
||||
/mob/living/carbon/human/proc/handle_embedded_objects()
|
||||
for(var/obj/item/organ/limb/L in organs)
|
||||
for(var/obj/item/I in L.embedded_objects)
|
||||
@@ -622,4 +356,4 @@
|
||||
I.loc = get_turf(src)
|
||||
visible_message("<span class='danger'>\the [I] falls out of [name]'s [L.getDisplayName()]!</span>","<span class='userdanger'>\the [I] falls out of your [L.getDisplayName()]!</span>")
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
|
||||
@@ -449,7 +449,6 @@
|
||||
////////
|
||||
|
||||
/datum/species/proc/handle_chemicals_in_body(var/mob/living/carbon/human/H)
|
||||
if(H.reagents) H.reagents.metabolize(H)
|
||||
|
||||
//The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
||||
if(H.disabilities & FAT)
|
||||
@@ -501,22 +500,6 @@
|
||||
H << "<span class='notice'>You no longer feel vigorous.</span>"
|
||||
H.metabolism_efficiency = 1
|
||||
|
||||
if (H.drowsyness)
|
||||
H.drowsyness--
|
||||
H.eye_blurry = max(2, H.eye_blurry)
|
||||
if (prob(5))
|
||||
H.sleeping += 1
|
||||
H.Paralyse(5)
|
||||
|
||||
H.confused = max(0, H.confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(H.resting)
|
||||
H.dizziness = max(0, H.dizziness - 15)
|
||||
H.jitteriness = max(0, H.jitteriness - 15)
|
||||
else
|
||||
H.dizziness = max(0, H.dizziness - 3)
|
||||
H.jitteriness = max(0, H.jitteriness - 3)
|
||||
|
||||
H.updatehealth()
|
||||
|
||||
return
|
||||
@@ -535,13 +518,6 @@
|
||||
if(H.seer)
|
||||
H.see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
|
||||
if(H.mind)
|
||||
if(H.mind.changeling)
|
||||
H.hud_used.lingchemdisplay.invisibility = 0
|
||||
H.hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#dd66dd'>[H.mind.changeling.chem_charges]</font></div>"
|
||||
else
|
||||
H.hud_used.lingchemdisplay.invisibility = 101
|
||||
|
||||
if(H.glasses)
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
@@ -622,23 +598,15 @@
|
||||
if(icon_num)
|
||||
H.healthdoll.overlays += image('icons/mob/screen_gen.dmi',"[L.name][icon_num]")
|
||||
|
||||
if(H.nutrition_icon)
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
H.nutrition_icon.icon_state = "nutritionFAT"
|
||||
if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
|
||||
H.nutrition_icon.icon_state = "nutrition0"
|
||||
if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
|
||||
H.nutrition_icon.icon_state = "nutrition1"
|
||||
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
|
||||
H.nutrition_icon.icon_state = "nutrition2"
|
||||
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
|
||||
H.nutrition_icon.icon_state = "nutrition3"
|
||||
else
|
||||
H.nutrition_icon.icon_state = "nutrition4"
|
||||
|
||||
if(H.pressure)
|
||||
H.pressure.icon_state = "pressure[H.pressure_alert]"
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_FULL to INFINITY)
|
||||
H.throw_alert("nutrition","fat")
|
||||
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FULL)
|
||||
H.clear_alert("nutrition")
|
||||
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
|
||||
H.throw_alert("nutrition","hungry")
|
||||
else
|
||||
H.throw_alert("nutrition","starving")
|
||||
|
||||
if(H.pullin)
|
||||
if(H.pulling) H.pullin.icon_state = "pull"
|
||||
@@ -646,59 +614,23 @@
|
||||
// if(rest) //Not used with new UI
|
||||
// if(resting || lying || sleeping) rest.icon_state = "rest1"
|
||||
// else rest.icon_state = "rest0"
|
||||
if(H.toxin)
|
||||
if(H.hal_screwyhud == 4 || H.toxins_alert) H.toxin.icon_state = "tox1"
|
||||
else H.toxin.icon_state = "tox0"
|
||||
if(H.oxygen)
|
||||
if(H.hal_screwyhud == 3 || H.oxygen_alert) H.oxygen.icon_state = "oxy1"
|
||||
else H.oxygen.icon_state = "oxy0"
|
||||
if(H.fire)
|
||||
if(H.fire_alert) H.fire.icon_state = "fire[H.fire_alert]" //fire_alert is either 0 if no alert, 1 for cold and 2 for heat.
|
||||
else H.fire.icon_state = "fire0"
|
||||
|
||||
if(H.bodytemp)
|
||||
if(!(HEATRES in specflags))
|
||||
switch(H.bodytemperature) //310.055 optimal body temp
|
||||
if(370 to INFINITY) H.bodytemp.icon_state = "temp4"
|
||||
if(350 to 370) H.bodytemp.icon_state = "temp3"
|
||||
if(335 to 350) H.bodytemp.icon_state = "temp2"
|
||||
switch(H.bodytemperature)
|
||||
if(320 to 335) H.bodytemp.icon_state = "temp1"
|
||||
if(300 to 320) H.bodytemp.icon_state = "temp0"
|
||||
if(295 to 300) H.bodytemp.icon_state = "temp-1"
|
||||
if(!(COLDRES in specflags))
|
||||
switch(H.bodytemperature)
|
||||
if(280 to 295) H.bodytemp.icon_state = "temp-2"
|
||||
if(260 to 280) H.bodytemp.icon_state = "temp-3"
|
||||
if(-INFINITY to 260) H.bodytemp.icon_state = "temp-4"
|
||||
|
||||
return 1
|
||||
|
||||
/datum/species/proc/handle_mutations_and_radiation(var/mob/living/carbon/human/H)
|
||||
|
||||
if (H.radiation && !(RADIMMUNE in specflags))
|
||||
if (H.radiation > 100)
|
||||
H.radiation = 100
|
||||
H.Weaken(10)
|
||||
H << "<span class='danger'>You feel weak.</span>"
|
||||
H.emote("collapse")
|
||||
if(!(RADIMMUNE in specflags))
|
||||
if(H.radiation)
|
||||
if (H.radiation > 100)
|
||||
H.Weaken(10)
|
||||
H << "<span class='danger'>You feel weak.</span>"
|
||||
H.emote("collapse")
|
||||
|
||||
if (H.radiation < 0)
|
||||
H.radiation = 0
|
||||
|
||||
else
|
||||
switch(H.radiation)
|
||||
if(0 to 50)
|
||||
H.radiation--
|
||||
if(prob(25))
|
||||
H.adjustToxLoss(1)
|
||||
H.updatehealth()
|
||||
|
||||
if(50 to 75)
|
||||
H.radiation -= 2
|
||||
H.adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
H.radiation -= 5
|
||||
H.Weaken(3)
|
||||
H << "<span class='danger'>You feel weak.</span>"
|
||||
H.emote("collapse")
|
||||
@@ -709,17 +641,14 @@
|
||||
H.facial_hair_style = "Shaved"
|
||||
H.hair_style = "Bald"
|
||||
H.update_hair()
|
||||
H.updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
H.radiation -= 3
|
||||
H.adjustToxLoss(3)
|
||||
if(prob(1))
|
||||
H << "<span class='danger'>You mutate!</span>"
|
||||
randmutb(H)
|
||||
domutcheck(H,null)
|
||||
H.emote("gasp")
|
||||
H.updatehealth()
|
||||
return 1
|
||||
|
||||
////////////////
|
||||
// MOVE SPEED //
|
||||
@@ -964,13 +893,14 @@
|
||||
|
||||
switch(hit_area)
|
||||
if("head") //Harder to score a stun but if you do it lasts a bit longer
|
||||
if(H.stat == CONSCIOUS && prob(I.force) && armor < 50)
|
||||
H.visible_message("<span class='danger'>[H] has been knocked unconscious!</span>", \
|
||||
"<span class='userdanger'>[H] has been knocked unconscious!</span>")
|
||||
H.apply_effect(20, PARALYZE, armor)
|
||||
if(H != user && I.damtype == BRUTE)
|
||||
if(H.stat == CONSCIOUS && armor < 50)
|
||||
if(prob(I.force))
|
||||
H.visible_message("<span class='danger'>[H] has been knocked unconscious!</span>", \
|
||||
"<span class='userdanger'>[H] has been knocked unconscious!</span>")
|
||||
H.apply_effect(20, PARALYZE, armor)
|
||||
if(prob(I.force + ((100 - H.health)/2)) && H != user && I.damtype == BRUTE)
|
||||
ticker.mode.remove_revolutionary(H.mind)
|
||||
ticker.mode.remove_gangster(H.mind)
|
||||
ticker.mode.remove_gangster(H.mind, exclude_bosses=1)
|
||||
|
||||
if(bloody) //Apply blood
|
||||
if(H.wear_mask)
|
||||
@@ -1108,20 +1038,9 @@
|
||||
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
|
||||
breath = H.loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
var/block = 0
|
||||
if(H.wear_mask)
|
||||
if(H.wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
block = 1
|
||||
if(H.glasses)
|
||||
if(H.glasses.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
block = 1
|
||||
if(H.head)
|
||||
if(H.head.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
block = 1
|
||||
|
||||
if(!block)
|
||||
|
||||
if(!H.has_smoke_protection())
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, H))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(H, INGEST)
|
||||
@@ -1135,12 +1054,12 @@
|
||||
var/obj/location_as_object = H.loc
|
||||
location_as_object.handle_internal_lifeform(H, 0)
|
||||
|
||||
handle_breath(breath, H)
|
||||
check_breath(breath, H)
|
||||
|
||||
if(breath)
|
||||
H.loc.assume_air(breath)
|
||||
|
||||
/datum/species/proc/handle_breath(datum/gas_mixture/breath, var/mob/living/carbon/human/H)
|
||||
/datum/species/proc/check_breath(datum/gas_mixture/breath, var/mob/living/carbon/human/H)
|
||||
if((H.status_flags & GODMODE))
|
||||
return
|
||||
|
||||
@@ -1155,7 +1074,7 @@
|
||||
H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
|
||||
H.failed_last_breath = 1
|
||||
|
||||
H.oxygen_alert = max(H.oxygen_alert, 1)
|
||||
H.throw_alert("oxy")
|
||||
|
||||
return 0
|
||||
|
||||
@@ -1188,18 +1107,12 @@
|
||||
else
|
||||
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
H.failed_last_breath = 1
|
||||
H.oxygen_alert = max(H.oxygen_alert, 1)
|
||||
/*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose)
|
||||
spawn(0) emote("cough")
|
||||
var/ratio = O2_pp/safe_oxygen_max
|
||||
oxyloss += 5*ratio
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_alert = max(oxygen_alert, 1)*/
|
||||
H.throw_alert("oxy")
|
||||
else // We're in safe limits
|
||||
H.failed_last_breath = 0
|
||||
H.adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen/6
|
||||
H.oxygen_alert = 0
|
||||
H.clear_alert("oxy")
|
||||
|
||||
breath.oxygen -= oxygen_used
|
||||
breath.carbon_dioxide += oxygen_used
|
||||
@@ -1224,9 +1137,9 @@
|
||||
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
if(H.reagents)
|
||||
H.reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
H.toxins_alert = max(H.toxins_alert, 1)
|
||||
H.throw_alert("tox_in_air")
|
||||
else
|
||||
H.toxins_alert = 0
|
||||
H.clear_alert("tox_in_air")
|
||||
|
||||
if(breath.trace_gases.len && !(NOBREATH in specflags)) // If there's some other shit in the air lets deal with it here.
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
@@ -1239,45 +1152,30 @@
|
||||
if(prob(20))
|
||||
spawn(0) H.emote(pick("giggle", "laugh"))
|
||||
|
||||
handle_temperature(breath, H)
|
||||
handle_breath_temperature(breath, H)
|
||||
|
||||
return 1
|
||||
|
||||
/datum/species/proc/handle_temperature(datum/gas_mixture/breath, var/mob/living/carbon/human/H) // called by human/life, handles temperatures
|
||||
/datum/species/proc/handle_breath_temperature(datum/gas_mixture/breath, var/mob/living/carbon/human/H) // called by human/life, handles temperatures
|
||||
if( (abs(310.15 - breath.temperature) > 50) && !(mutations_list[COLDRES] in H.dna.mutations) && !(COLDRES in specflags)) // Hot air hurts :(
|
||||
if(breath.temperature < 260.15)
|
||||
if(prob(20))
|
||||
H << "<span class='danger'>You feel your face freezing and an icicle forming in your lungs!</span>"
|
||||
else if(breath.temperature > 360.15 && !(HEATRES in specflags))
|
||||
if(prob(20))
|
||||
H << "<span class='danger'>You feel your face burning and a searing heat in your lungs!</span>"
|
||||
|
||||
if(!(mutations_list[COLDRES] in H.dna.mutations)) // COLD DAMAGE
|
||||
switch(breath.temperature)
|
||||
if(-INFINITY to 120)
|
||||
H.apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head")
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
if(120 to 200)
|
||||
H.apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, "head")
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
if(200 to 260)
|
||||
H.apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, "head")
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
|
||||
if(!(HEATRES in specflags)) // HEAT DAMAGE
|
||||
switch(breath.temperature)
|
||||
if(360 to 400)
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
if(400 to 1000)
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
if(1000 to INFINITY)
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
|
||||
return
|
||||
|
||||
/datum/species/proc/handle_environment(datum/gas_mixture/environment, var/mob/living/carbon/human/H)
|
||||
if(!environment)
|
||||
return
|
||||
@@ -1305,35 +1203,37 @@
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !(HEATRES in specflags))
|
||||
//Body temperature is too hot.
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
switch(H.bodytemperature)
|
||||
if(360 to 400)
|
||||
H.throw_alert("temp","hot",1)
|
||||
H.apply_damage(HEAT_DAMAGE_LEVEL_1*heatmod, BURN)
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
if(400 to 460)
|
||||
H.throw_alert("temp","hot",2)
|
||||
H.apply_damage(HEAT_DAMAGE_LEVEL_2*heatmod, BURN)
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
if(460 to INFINITY)
|
||||
H.throw_alert("temp","hot",3)
|
||||
if(H.on_fire)
|
||||
H.apply_damage(HEAT_DAMAGE_LEVEL_3*heatmod, BURN)
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
else
|
||||
H.apply_damage(HEAT_DAMAGE_LEVEL_2*heatmod, BURN)
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
|
||||
else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !(mutations_list[COLDRES] in H.dna.mutations))
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
if(!istype(H.loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
switch(H.bodytemperature)
|
||||
if(200 to 260)
|
||||
H.throw_alert("temp","cold",1)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_1*coldmod, BURN)
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
if(120 to 200)
|
||||
H.throw_alert("temp","cold",2)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_2*coldmod, BURN)
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
if(-INFINITY to 120)
|
||||
H.throw_alert("temp","cold",3)
|
||||
H.apply_damage(COLD_DAMAGE_LEVEL_3*coldmod, BURN)
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
else
|
||||
H.clear_alert("temp")
|
||||
|
||||
else
|
||||
H.clear_alert("temp")
|
||||
|
||||
// Account for massive pressure differences. Done by Polymorph
|
||||
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
|
||||
@@ -1344,23 +1244,21 @@
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
if(!(HEATRES in specflags))
|
||||
H.adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
|
||||
H.pressure_alert = 2
|
||||
H.throw_alert("pressure","highpressure",2)
|
||||
else
|
||||
H.pressure_alert = 1
|
||||
H.clear_alert("pressure")
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
H.pressure_alert = 1
|
||||
H.throw_alert("pressure","highpressure",1)
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
|
||||
H.pressure_alert = 0
|
||||
H.clear_alert("pressure")
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
|
||||
H.pressure_alert = -1
|
||||
H.throw_alert("pressure","lowpressure",1)
|
||||
else
|
||||
if(H.dna.check_mutation(COLDRES) || (COLDRES in specflags))
|
||||
H.pressure_alert = -1
|
||||
H.clear_alert("pressure")
|
||||
else
|
||||
H.adjustBruteLoss( LOW_PRESSURE_DAMAGE )
|
||||
H.pressure_alert = -2
|
||||
|
||||
return
|
||||
H.throw_alert("pressure","lowpressure",2)
|
||||
|
||||
//////////
|
||||
// FIRE //
|
||||
|
||||
@@ -279,6 +279,7 @@
|
||||
// 2spooky
|
||||
name = "Spooky Scary Skeleton"
|
||||
id = "skeleton"
|
||||
say_mod = "rattles"
|
||||
sexes = 0
|
||||
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/human/mutant/skeleton
|
||||
specflags = list(NOBREATH,HEATRES,COLDRES,NOBLOOD,RADIMMUNE)
|
||||
|
||||
@@ -1,3 +1,242 @@
|
||||
|
||||
/mob/living/carbon
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
var/pressure_alert = 0
|
||||
var/temperature_alert = 0
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
if(!loc)
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if(stat != DEAD)
|
||||
|
||||
//Breathing, if applicable
|
||||
handle_breathing()
|
||||
|
||||
//Updates the number of stored chemicals for powers
|
||||
handle_changeling()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Blud
|
||||
handle_blood()
|
||||
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
|
||||
. = 1
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment(environment)
|
||||
|
||||
handle_fire()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
update_canmove()
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
handle_regular_status_updates() // Status updates, death etc.
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
return .
|
||||
|
||||
|
||||
|
||||
///////////////
|
||||
// BREATHING //
|
||||
///////////////
|
||||
|
||||
//Start of a breath chain, calls breathe()
|
||||
/mob/living/carbon/proc/handle_breathing()
|
||||
if(SSmob.times_fired%4==2 || failed_last_breath)
|
||||
breathe() //Breathe per 4 ticks, unless suffocating
|
||||
else
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src,0)
|
||||
|
||||
//Second link in a breath chain, calls check_breath()
|
||||
/mob/living/carbon/proc/breathe()
|
||||
if(reagents.has_reagent("lexorin"))
|
||||
return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment
|
||||
if(loc)
|
||||
environment = loc.return_air()
|
||||
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
|
||||
//Suffocate
|
||||
if(losebreath > 0)
|
||||
losebreath--
|
||||
if(prob(10))
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/loc_as_obj = loc
|
||||
loc_as_obj.handle_internal_lifeform(src,0)
|
||||
else
|
||||
//Breathe from internal
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
if(!breath)
|
||||
|
||||
if(isobj(loc)) //Breathe from loc as object
|
||||
var/obj/loc_as_obj = loc
|
||||
breath = loc_as_obj.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
|
||||
else if(isturf(loc)) //Breathe from loc as turf
|
||||
var/breath_moles = 0
|
||||
if(environment)
|
||||
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
//Harmful gasses
|
||||
if(!has_smoke_protection())
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1,src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src,INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10)
|
||||
break
|
||||
|
||||
else //Breathe from loc as obj again
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/loc_as_obj = loc
|
||||
loc_as_obj.handle_internal_lifeform(src,0)
|
||||
|
||||
check_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
/mob/living/carbon/proc/has_smoke_protection()
|
||||
return 0
|
||||
|
||||
|
||||
//Third link in a breath chain, calls handle_breath_temperature()
|
||||
/mob/living/carbon/proc/check_breath(datum/gas_mixture/breath)
|
||||
if((status_flags & GODMODE))
|
||||
return
|
||||
|
||||
//CRIT
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
if(reagents.has_reagent("epinephrine"))
|
||||
return
|
||||
adjustOxyLoss(1)
|
||||
failed_last_breath = 1
|
||||
throw_alert("oxy")
|
||||
|
||||
return 0
|
||||
|
||||
var/safe_oxy_min = 16
|
||||
var/safe_co2_max = 10
|
||||
var/safe_tox_max = 0.05
|
||||
var/SA_para_min = 1
|
||||
var/SA_sleep_min = 5
|
||||
var/oxygen_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
var/O2_partialpressure = (breath.oxygen/breath.total_moles())*breath_pressure
|
||||
var/Toxins_partialpressure = (breath.toxins/breath.total_moles())*breath_pressure
|
||||
var/CO2_partialpressure = (breath.carbon_dioxide/breath.total_moles())*breath_pressure
|
||||
|
||||
|
||||
//OXYGEN
|
||||
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
if(O2_partialpressure > 0)
|
||||
var/ratio = safe_oxy_min/O2_partialpressure
|
||||
adjustOxyLoss(min(5*ratio, 3))
|
||||
failed_last_breath = 1
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
else
|
||||
adjustOxyLoss(3)
|
||||
failed_last_breath = 1
|
||||
throw_alert("oxy")
|
||||
|
||||
else //Enough oxygen
|
||||
failed_last_breath = 0
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen/6
|
||||
clear_alert("oxy")
|
||||
|
||||
breath.oxygen -= oxygen_used
|
||||
breath.carbon_dioxide += oxygen_used
|
||||
|
||||
//CARBON DIOXIDE
|
||||
if(CO2_partialpressure > safe_co2_max)
|
||||
if(!co2overloadtime)
|
||||
co2overloadtime = world.time
|
||||
else if(world.time - co2overloadtime > 120)
|
||||
Paralyse(3)
|
||||
adjustOxyLoss(3)
|
||||
if(world.time - co2overloadtime > 300)
|
||||
adjustOxyLoss(8)
|
||||
if(prob(20))
|
||||
spawn(0) emote("cough")
|
||||
|
||||
else
|
||||
co2overloadtime = 0
|
||||
|
||||
//TOXINS/PLASMA
|
||||
if(Toxins_partialpressure > safe_tox_max)
|
||||
var/ratio = (breath.toxins/safe_tox_max) * 10
|
||||
if(reagents)
|
||||
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
throw_alert("tox_in_air")
|
||||
else
|
||||
clear_alert("tox_in_air")
|
||||
|
||||
//TRACE GASES
|
||||
if(breath.trace_gases.len)
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_partialpressure = (SA.moles/breath.total_moles())*breath_pressure
|
||||
if(SA_partialpressure > SA_para_min)
|
||||
Paralyse(3)
|
||||
if(SA_partialpressure > SA_sleep_min)
|
||||
sleeping = max(sleeping+2, 10)
|
||||
else if(SA_partialpressure > 0.01)
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle","laugh"))
|
||||
|
||||
//BREATH TEMPERATURE
|
||||
handle_breath_temperature(breath)
|
||||
|
||||
return 1
|
||||
|
||||
//Fourth and final link in a breath chain
|
||||
/mob/living/carbon/proc/handle_breath_temperature(datum/gas_mixture/breath)
|
||||
|
||||
|
||||
/mob/living/carbon/proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
@@ -13,85 +252,56 @@
|
||||
internals.icon_state = "internal0"
|
||||
return
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
if(!loc)
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment(environment)
|
||||
|
||||
handle_regular_status_updates() // Status updates, death etc.
|
||||
|
||||
if(stat != DEAD)
|
||||
|
||||
//Updates the number of stored chemicals for powers
|
||||
handle_changeling()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Disabilities
|
||||
handle_disabilities()
|
||||
|
||||
//Blud
|
||||
handle_blood()
|
||||
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
|
||||
. = 1
|
||||
|
||||
handle_fire()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
update_canmove()
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
return .
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//remember to remove the "proc" of the child procs of these.
|
||||
|
||||
/mob/living/carbon/proc/handle_changeling()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_mutations_and_radiation()
|
||||
return
|
||||
if(radiation)
|
||||
|
||||
switch(radiation)
|
||||
if(0 to 50)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 75)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
|
||||
radiation = Clamp(radiation, 0, 100)
|
||||
|
||||
|
||||
/mob/living/carbon/proc/handle_chemicals_in_body()
|
||||
return
|
||||
if(reagents)
|
||||
reagents.metabolize(src)
|
||||
|
||||
/mob/living/carbon/proc/handle_disabilities()
|
||||
if(drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if(prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
jitteriness = max(0, jitteriness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
jitteriness = max(0, jitteriness - 1)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_blood()
|
||||
@@ -103,9 +313,6 @@
|
||||
/mob/living/carbon/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_regular_status_updates()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/living/M in stomach_contents)
|
||||
@@ -123,7 +330,293 @@
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
/mob/living/carbon/proc/handle_regular_status_updates()
|
||||
|
||||
if(stat == DEAD)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
silent = 0
|
||||
else
|
||||
updatehealth()
|
||||
if(health <= config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
|
||||
death()
|
||||
eye_blind = max(eye_blind, 1)
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
handle_dreams()
|
||||
adjustStaminaLoss(-10)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health && !hal_crit )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
|
||||
else if (status_flags & FAKEDEATH)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
handle_disabilities()
|
||||
|
||||
//Dizziness
|
||||
if(dizziness)
|
||||
var/client/C = client
|
||||
var/pixel_x_diff = 0
|
||||
var/pixel_y_diff = 0
|
||||
var/temp
|
||||
var/saved_dizz = dizziness
|
||||
dizziness = max(dizziness-1, 0)
|
||||
if(C)
|
||||
var/oldsrc = src
|
||||
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70 // This shit is annoying at high strength
|
||||
src = null
|
||||
spawn(0)
|
||||
if(C)
|
||||
temp = amplitude * sin(0.008 * saved_dizz * world.time)
|
||||
pixel_x_diff += temp
|
||||
C.pixel_x += temp
|
||||
temp = amplitude * cos(0.008 * saved_dizz * world.time)
|
||||
pixel_y_diff += temp
|
||||
C.pixel_y += temp
|
||||
sleep(3)
|
||||
if(C)
|
||||
temp = amplitude * sin(0.008 * saved_dizz * world.time)
|
||||
pixel_x_diff += temp
|
||||
C.pixel_x += temp
|
||||
temp = amplitude * cos(0.008 * saved_dizz * world.time)
|
||||
pixel_y_diff += temp
|
||||
C.pixel_y += temp
|
||||
sleep(3)
|
||||
if(C)
|
||||
C.pixel_x -= pixel_x_diff
|
||||
C.pixel_y -= pixel_y_diff
|
||||
src = oldsrc
|
||||
|
||||
//Jitteryness
|
||||
if(jitteriness)
|
||||
do_jitter_animation(jitteriness)
|
||||
jitteriness = max(jitteriness-1, 0)
|
||||
|
||||
//Other
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(slurring)
|
||||
slurring = max(slurring-1,0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(!stunned)
|
||||
update_icons()
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
if(!weakened)
|
||||
update_icons()
|
||||
|
||||
if(hallucination)
|
||||
spawn handle_hallucinations()
|
||||
|
||||
if(hallucination<=2)
|
||||
hallucination = 0
|
||||
else
|
||||
hallucination -= 2
|
||||
|
||||
else
|
||||
for(var/atom/a in hallucinations)
|
||||
qdel(a)
|
||||
|
||||
CheckStamina()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/handle_disabilities()
|
||||
//Eyes
|
||||
if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
else
|
||||
// deafness heals slowly over time, unless ear_damage is over 100
|
||||
if(ear_damage < 100)
|
||||
adjustEarDamage(-0.05,-1)
|
||||
|
||||
|
||||
//this handles hud updates. Calles update_vision() and handle_hud_icons()
|
||||
/mob/living/carbon/proc/handle_regular_hud_updates()
|
||||
if(!client) return 0
|
||||
|
||||
update_action_buttons()
|
||||
|
||||
if(damageoverlay)
|
||||
if(damageoverlay.overlays)
|
||||
damageoverlay.overlays = list()
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
//Critical damage passage overlay
|
||||
if(health <= config.health_threshold_crit)
|
||||
var/image/I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "passage0")
|
||||
I.blend_mode = BLEND_OVERLAY //damageoverlay is BLEND_MULTIPLY
|
||||
switch(health)
|
||||
if(-20 to -10)
|
||||
I.icon_state = "passage1"
|
||||
if(-30 to -20)
|
||||
I.icon_state = "passage2"
|
||||
if(-40 to -30)
|
||||
I.icon_state = "passage3"
|
||||
if(-50 to -40)
|
||||
I.icon_state = "passage4"
|
||||
if(-60 to -50)
|
||||
I.icon_state = "passage5"
|
||||
if(-70 to -60)
|
||||
I.icon_state = "passage6"
|
||||
if(-80 to -70)
|
||||
I.icon_state = "passage7"
|
||||
if(-90 to -80)
|
||||
I.icon_state = "passage8"
|
||||
if(-95 to -90)
|
||||
I.icon_state = "passage9"
|
||||
if(-INFINITY to -95)
|
||||
I.icon_state = "passage10"
|
||||
damageoverlay.overlays += I
|
||||
else
|
||||
//Oxygen damage overlay
|
||||
if(oxyloss)
|
||||
var/image/I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "oxydamageoverlay0")
|
||||
switch(oxyloss)
|
||||
if(10 to 20)
|
||||
I.icon_state = "oxydamageoverlay1"
|
||||
if(20 to 25)
|
||||
I.icon_state = "oxydamageoverlay2"
|
||||
if(25 to 30)
|
||||
I.icon_state = "oxydamageoverlay3"
|
||||
if(30 to 35)
|
||||
I.icon_state = "oxydamageoverlay4"
|
||||
if(35 to 40)
|
||||
I.icon_state = "oxydamageoverlay5"
|
||||
if(40 to 45)
|
||||
I.icon_state = "oxydamageoverlay6"
|
||||
if(45 to INFINITY)
|
||||
I.icon_state = "oxydamageoverlay7"
|
||||
damageoverlay.overlays += I
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = src.getBruteLoss() + src.getFireLoss() + damageoverlaytemp
|
||||
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
|
||||
if(hurtdamage)
|
||||
var/image/I = image("icon" = 'icons/mob/screen_full.dmi', "icon_state" = "brutedamageoverlay0")
|
||||
I.blend_mode = BLEND_ADD
|
||||
switch(hurtdamage)
|
||||
if(5 to 15)
|
||||
I.icon_state = "brutedamageoverlay1"
|
||||
if(15 to 30)
|
||||
I.icon_state = "brutedamageoverlay2"
|
||||
if(30 to 45)
|
||||
I.icon_state = "brutedamageoverlay3"
|
||||
if(45 to 70)
|
||||
I.icon_state = "brutedamageoverlay4"
|
||||
if(70 to 85)
|
||||
I.icon_state = "brutedamageoverlay5"
|
||||
if(85 to INFINITY)
|
||||
I.icon_state = "brutedamageoverlay6"
|
||||
var/image/black = image(I.icon, I.icon_state) //BLEND_ADD doesn't let us darken, so this is just to blacken the edge of the screen
|
||||
black.color = "#170000"
|
||||
damageoverlay.overlays += I
|
||||
damageoverlay.overlays += black
|
||||
|
||||
|
||||
handle_vision()
|
||||
handle_hud_icons()
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/handle_vision()
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
|
||||
if(stat == DEAD)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if(blind)
|
||||
if(eye_blind)
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHT)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if(eye_stat > 20)
|
||||
if(eye_stat > 30)
|
||||
client.screen += global_hud.darkMask
|
||||
else
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if(machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
/mob/living/carbon/proc/handle_hud_icons()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/proc/handle_hud_icons_health()
|
||||
if(healths)
|
||||
if (stat != DEAD)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
@@ -1,24 +1,16 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
var/pressure_alert = 0
|
||||
|
||||
var/temperature_alert = 0
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/Life()
|
||||
if(..())
|
||||
//First, resolve location and get a breath
|
||||
if(SSmob.times_fired%4==2)
|
||||
//Only try to take a breath every 4 seconds, unless suffocating
|
||||
breathe()
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if(!client && stat == CONSCIOUS)
|
||||
if(prob(33) && canmove && isturf(loc) && !pulledby && !grabbed_by.len)
|
||||
@@ -30,203 +22,31 @@
|
||||
..()
|
||||
return pressure
|
||||
|
||||
/mob/living/carbon/monkey/handle_disabilities()
|
||||
|
||||
/mob/living/carbon/monkey/handle_mutations_and_radiation()
|
||||
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
Weaken(10)
|
||||
src << "<span class='danger'>You feel weak.</span>"
|
||||
emote("collapse")
|
||||
|
||||
if (radiation < 0)
|
||||
radiation = 0
|
||||
|
||||
switch(radiation)
|
||||
if(0 to 50)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 75)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
Weaken(3)
|
||||
src << "<span class='danger'>You feel weak.</span>"
|
||||
emote("collapse")
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
if(prob(1))
|
||||
src << "<span class='danger'>You mutate!</span>"
|
||||
randmutb(src)
|
||||
domutcheck(src,null)
|
||||
emote("gasp")
|
||||
updatehealth()
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/proc/breathe()
|
||||
if(reagents)
|
||||
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
|
||||
if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
var/block = 0
|
||||
if(wear_mask)
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/gas))
|
||||
block = 1
|
||||
|
||||
if(!block)
|
||||
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
/mob/living/carbon/monkey/proc/handle_breath(datum/gas_mixture/breath)
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
adjustOxyLoss(7)
|
||||
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
|
||||
return 0
|
||||
|
||||
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
|
||||
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
|
||||
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
|
||||
var/safe_toxins_max = 0.5
|
||||
var/SA_para_min = 0.5
|
||||
var/SA_sleep_min = 5
|
||||
var/oxygen_used = 0
|
||||
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
|
||||
|
||||
//Partial pressure of the O2 in our breath
|
||||
var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
|
||||
// Same, but for the toxins
|
||||
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
|
||||
// And CO2, lets say a PP of more than 10 will be bad (It's a little less really, but eh, being passed out all round aint no fun)
|
||||
var/CO2_pp = (breath.carbon_dioxide/breath.total_moles())*breath_pressure
|
||||
|
||||
if(O2_pp < safe_oxygen_min) // Too little oxygen
|
||||
if(prob(20))
|
||||
spawn(0) emote("gasp")
|
||||
if (O2_pp == 0)
|
||||
O2_pp = 0.01
|
||||
var/ratio = safe_oxygen_min/O2_pp
|
||||
adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
/*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose)
|
||||
spawn(0) emote("cough")
|
||||
var/ratio = O2_pp/safe_oxygen_max
|
||||
oxyloss += 5*ratio
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_alert = max(oxygen_alert, 1)*/
|
||||
else // We're in safe limits
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen/6
|
||||
oxygen_alert = 0
|
||||
|
||||
breath.oxygen -= oxygen_used
|
||||
breath.carbon_dioxide += oxygen_used
|
||||
|
||||
if(CO2_pp > safe_co2_max)
|
||||
if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
|
||||
co2overloadtime = world.time
|
||||
else if(world.time - co2overloadtime > 120)
|
||||
Paralyse(3)
|
||||
adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business
|
||||
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
|
||||
adjustOxyLoss(8)
|
||||
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
|
||||
spawn(0) emote("cough")
|
||||
|
||||
else
|
||||
co2overloadtime = 0
|
||||
|
||||
if(Toxins_pp > safe_toxins_max) // Too much toxins
|
||||
var/ratio = (breath.toxins/safe_toxins_max) * 10
|
||||
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
if(reagents)
|
||||
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
toxins_alert = max(toxins_alert, 1)
|
||||
else
|
||||
toxins_alert = 0
|
||||
|
||||
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
|
||||
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
|
||||
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
sleeping = max(sleeping+2, 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
|
||||
|
||||
if(breath.temperature > (T0C+66)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
|
||||
fire_alert = max(fire_alert, 2)
|
||||
else
|
||||
fire_alert = 0
|
||||
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/monkey/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
@@ -251,162 +71,33 @@
|
||||
switch(adjusted_pressure)
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
|
||||
pressure_alert = 2
|
||||
throw_alert("pressure","highpressure",2)
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
pressure_alert = 1
|
||||
throw_alert("pressure","highpressure",1)
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
|
||||
pressure_alert = 0
|
||||
clear_alert("pressure")
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
|
||||
pressure_alert = -1
|
||||
throw_alert("pressure","lowpressure",1)
|
||||
else
|
||||
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
|
||||
pressure_alert = -2
|
||||
throw_alert("pressure","lowpressure",2)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
if(status_flags & GODMODE) return
|
||||
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
|
||||
//adjustFireLoss(2.5*discomfort)
|
||||
|
||||
if(exposed_temperature > bodytemperature)
|
||||
adjustFireLoss(20.0*discomfort)
|
||||
|
||||
else
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
/mob/living/carbon/monkey/handle_chemicals_in_body()
|
||||
/mob/living/carbon/monkey/handle_hud_icons()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
/mob/living/carbon/monkey/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
|
||||
death()
|
||||
stat = DEAD
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
if(!reagents.has_reagent("epinephrine"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
//Eyes
|
||||
if(disabilities & BLIND || stat) //disabled-blind, doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 2)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
else
|
||||
// deafness heals slowly over time, unless ear_damage is over 100
|
||||
if (ear_damage < 100)
|
||||
adjustEarDamage(-0.05,-1)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
|
||||
CheckStamina()
|
||||
return 1
|
||||
handle_hud_icons_health()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
|
||||
|
||||
if(pressure)
|
||||
pressure.icon_state = "pressure[pressure_alert]"
|
||||
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
@@ -414,58 +105,8 @@
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 2 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
if(bodytemp)
|
||||
switch(bodytemperature) //310.055 optimal body temp
|
||||
if(345 to INFINITY)
|
||||
bodytemp.icon_state = "temp4"
|
||||
if(335 to 345)
|
||||
bodytemp.icon_state = "temp3"
|
||||
if(327 to 335)
|
||||
bodytemp.icon_state = "temp2"
|
||||
if(316 to 327)
|
||||
bodytemp.icon_state = "temp1"
|
||||
if(300 to 316)
|
||||
bodytemp.icon_state = "temp0"
|
||||
if(295 to 300)
|
||||
bodytemp.icon_state = "temp-1"
|
||||
if(280 to 295)
|
||||
bodytemp.icon_state = "temp-2"
|
||||
if(260 to 280)
|
||||
bodytemp.icon_state = "temp-3"
|
||||
else
|
||||
bodytemp.icon_state = "temp-4"
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if(blind && stat != DEAD)
|
||||
if(eye_blind)
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if(disabilities & NEARSIGHT)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if(eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if(druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/monkey/handle_random_events()
|
||||
@@ -476,11 +117,18 @@
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/handle_changeling()
|
||||
if(mind && mind.changeling)
|
||||
mind.changeling.regenerate()
|
||||
hud_used.lingchemdisplay.invisibility = 0
|
||||
hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#dd66dd'>[src.mind.changeling.chem_charges]</font></div>"
|
||||
if(mind)
|
||||
if(mind.changeling)
|
||||
mind.changeling.regenerate()
|
||||
hud_used.lingchemdisplay.invisibility = 0
|
||||
hud_used.lingchemdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font color='#dd66dd'>[mind.changeling.chem_charges]</font></div>"
|
||||
else
|
||||
hud_used.lingchemdisplay.invisibility = 101
|
||||
|
||||
/mob/living/carbon/monkey/has_smoke_protection()
|
||||
if(wear_mask)
|
||||
if(wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
return 1
|
||||
|
||||
///FIRE CODE
|
||||
/mob/living/carbon/monkey/handle_fire()
|
||||
|
||||
@@ -190,9 +190,6 @@
|
||||
internal = null
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/var/co2overloadtime = null
|
||||
/mob/living/carbon/monkey/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/monkey/ex_act(severity, target)
|
||||
..()
|
||||
switch(severity)
|
||||
@@ -202,28 +199,16 @@
|
||||
if(2.0)
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
adjustEarDamage(30,120)
|
||||
if(3.0)
|
||||
adjustBruteLoss(30)
|
||||
if (prob(50))
|
||||
Paralyse(10)
|
||||
adjustEarDamage(15,60)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/blob_act()
|
||||
if (stat != 2)
|
||||
show_message("<span class='userdanger'>The blob attacks you!</span>")
|
||||
adjustFireLoss(60)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
if (prob(50))
|
||||
Paralyse(10)
|
||||
if (stat == DEAD && client)
|
||||
gib()
|
||||
return
|
||||
if (stat == DEAD && !client)
|
||||
gibs(loc, viruses)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||
return 0
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/mob/living/carbon/slime/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
if(!gibbed)
|
||||
if(is_adult)
|
||||
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
|
||||
@@ -11,12 +13,12 @@
|
||||
number = rand(1, 1000)
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||
return
|
||||
else
|
||||
visible_message("<b>The [name]</b> seizes up and falls limp...")
|
||||
|
||||
if(stat == DEAD) return
|
||||
stat = DEAD
|
||||
icon_state = "[colour] baby slime dead"
|
||||
overlays.len = 0
|
||||
visible_message("<b>The [name]</b> seizes up and falls limp...") //ded -- Urist
|
||||
|
||||
update_canmove()
|
||||
if(blind) blind.layer = 0
|
||||
@@ -24,4 +26,8 @@
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.check_win()
|
||||
|
||||
return ..(gibbed)
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/slime/gib()
|
||||
death(1)
|
||||
qdel(src)
|
||||
@@ -6,12 +6,19 @@
|
||||
var/SStun = 0 // stun variable
|
||||
|
||||
/mob/living/carbon/slime/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
if(..())
|
||||
handle_nutrition()
|
||||
handle_targets()
|
||||
if (!ckey)
|
||||
handle_speech_and_mood()
|
||||
|
||||
/mob/living/carbon/slime/handle_breathing()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/proc/AIprocess() // the master AI process
|
||||
|
||||
@@ -25,14 +32,14 @@
|
||||
|
||||
AIproc = 1
|
||||
|
||||
while(AIproc && stat != 2 && (attacked || hungry || rabid || Victim))
|
||||
while(AIproc && stat != DEAD && (attacked || hungry || rabid || Victim))
|
||||
if(Victim) // can't eat AND have this little process at the same time
|
||||
break
|
||||
|
||||
if(!Target || client)
|
||||
break
|
||||
|
||||
if(Target.health <= -70 || Target.stat == 2)
|
||||
if(Target.health <= -70 || Target.stat == DEAD)
|
||||
Target = null
|
||||
AIproc = 0
|
||||
break
|
||||
@@ -155,6 +162,13 @@
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
/mob/living/carbon/slime/handle_mutations_and_radiation()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/handle_regular_hud_updates()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/handle_regular_status_updates()
|
||||
|
||||
if(is_adult)
|
||||
@@ -162,17 +176,21 @@
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(health < config.health_threshold_dead && stat != 2)
|
||||
if(health < config.health_threshold_dead && stat != DEAD)
|
||||
death()
|
||||
return
|
||||
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
else if(health < config.health_threshold_crit)
|
||||
|
||||
if(!src.reagents.has_reagent("epinephrine"))
|
||||
src.adjustOxyLoss(10)
|
||||
if(!reagents.has_reagent("epinephrine"))
|
||||
adjustOxyLoss(3)
|
||||
|
||||
if(src.stat != DEAD)
|
||||
src.stat = UNCONSCIOUS
|
||||
if(stat != DEAD)
|
||||
Paralyse(3)
|
||||
stat = UNCONSCIOUS
|
||||
else
|
||||
if(stat != DEAD)
|
||||
stat = CONSCIOUS
|
||||
|
||||
if(prob(30))
|
||||
adjustOxyLoss(-1)
|
||||
@@ -181,46 +199,36 @@
|
||||
adjustCloneLoss(-1)
|
||||
adjustBruteLoss(-1)
|
||||
|
||||
if (src.stat == DEAD)
|
||||
src.lying = 1
|
||||
src.eye_blind = max(eye_blind, 1)
|
||||
if (stat == DEAD)
|
||||
lying = 1
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else
|
||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.eye_blind = 0
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if(stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
if(weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
if (paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
|
||||
else
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
if(stuttering)
|
||||
stuttering = 0
|
||||
|
||||
if (src.stuttering) src.stuttering = 0
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind = 0
|
||||
src.eye_blind = max(eye_blind, 1)
|
||||
if(eye_blind)
|
||||
eye_blind = 0
|
||||
eye_blind = max(eye_blind, 1)
|
||||
|
||||
setEarDamage((ear_damage < 25 ? 0 : ear_damage),(disabilities & DEAF ? 1 :0))
|
||||
|
||||
src.density = !( src.lying )
|
||||
density = !( src.lying )
|
||||
|
||||
if (src.disabilities & BLIND)
|
||||
src.eye_blind = max(eye_blind, 1)
|
||||
if(disabilities & BLIND)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry = 0
|
||||
if(eye_blurry > 0)
|
||||
eye_blurry = 0
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy = 0
|
||||
if(druggy > 0)
|
||||
druggy = 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -161,49 +161,20 @@
|
||||
/mob/living/carbon/slime/ex_act(severity, target)
|
||||
..()
|
||||
|
||||
var/b_loss = null
|
||||
var/f_loss = null
|
||||
switch (severity)
|
||||
if (1.0)
|
||||
qdel(src)
|
||||
gib()
|
||||
return
|
||||
|
||||
if (2.0)
|
||||
|
||||
b_loss += 60
|
||||
f_loss += 60
|
||||
|
||||
adjustBruteLoss(60)
|
||||
adjustFireLoss(60)
|
||||
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
adjustBruteLoss(30)
|
||||
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/carbon/slime/blob_act()
|
||||
if (stat == 2)
|
||||
return
|
||||
var/shielded = 0
|
||||
|
||||
var/damage = null
|
||||
if (stat != 2)
|
||||
damage = rand(10,30)
|
||||
|
||||
if(shielded)
|
||||
damage /= 4
|
||||
|
||||
//paralysis += 1
|
||||
|
||||
show_message("<span class='userdanger'> The blob attacks you!</span>")
|
||||
|
||||
adjustFireLoss(damage)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/MouseDrop(var/atom/movable/A as mob|obj)
|
||||
if(isliving(A) && A != src && usr == src)
|
||||
var/mob/living/Food = A
|
||||
@@ -496,9 +467,6 @@
|
||||
/mob/living/carbon/slime/restrained()
|
||||
return 0
|
||||
|
||||
mob/living/carbon/slime/var/co2overloadtime = null
|
||||
mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/slime/show_inv(mob/user)
|
||||
return
|
||||
|
||||
|
||||
@@ -8,12 +8,49 @@ Sorry Giacom. Please don't be mad :(
|
||||
push_mob_back(src, A.push_dir)
|
||||
*/
|
||||
|
||||
|
||||
/mob/living/New()
|
||||
. = ..()
|
||||
generateStaticOverlay()
|
||||
if(staticOverlays.len)
|
||||
for(var/mob/living/simple_animal/drone/D in player_list)
|
||||
if(D && D.seeStatic)
|
||||
if(D.staticChoice in staticOverlays)
|
||||
D.staticOverlays |= staticOverlays[D.staticChoice]
|
||||
D.client.images |= staticOverlays[D.staticChoice]
|
||||
else //no choice? force static
|
||||
D.staticOverlays |= staticOverlays["static"]
|
||||
D.client.images |= staticOverlays["static"]
|
||||
|
||||
|
||||
/mob/living/Destroy()
|
||||
// if(mind)
|
||||
// mind.current = null
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
for(var/mob/living/simple_animal/drone/D in player_list)
|
||||
for(var/image/I in staticOverlays)
|
||||
D.staticOverlays.Remove(I)
|
||||
D.client.images.Remove(I)
|
||||
del(I)
|
||||
staticOverlays.len = 0
|
||||
|
||||
del(src)
|
||||
|
||||
|
||||
/mob/living/proc/generateStaticOverlay()
|
||||
staticOverlays.Add(list("static", "blank", "letter"))
|
||||
var/image/staticOverlay = image(getStaticIcon(new/icon(icon,icon_state)), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["static"] = staticOverlay
|
||||
|
||||
staticOverlay = image(getBlankIcon(new/icon(icon, icon_state)), loc = src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["blank"] = staticOverlay
|
||||
|
||||
staticOverlay = getLetterImage(src)
|
||||
staticOverlay.override = 1
|
||||
staticOverlays["letter"] = staticOverlay
|
||||
|
||||
|
||||
//Generic Bump(). Override MobBump() and ObjBump() instead of this.
|
||||
/mob/living/Bump(atom/A, yes)
|
||||
if (buckled || !yes || now_pushing)
|
||||
@@ -495,7 +532,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
M.stop_pulling()
|
||||
|
||||
//this is the gay blood on floor shit -- Added back -- Skie
|
||||
if(M.lying && (prob(M.getBruteLoss() / 2)))
|
||||
if(M.lying && !M.buckled && (prob(M.getBruteLoss() / 2)))
|
||||
makeTrail(T, M)
|
||||
pulling.Move(T, get_dir(pulling, T))
|
||||
if(M)
|
||||
|
||||
@@ -41,4 +41,6 @@
|
||||
var/floating = 0
|
||||
var/nightvision = 0
|
||||
var/mob_size = 1 //size of the mob. 0 is small, 1 is human sized, and 2 is large.
|
||||
var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature..
|
||||
var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature..
|
||||
|
||||
var/list/image/staticOverlays = list()
|
||||
@@ -190,45 +190,28 @@
|
||||
src.mind.special_role = "traitor"
|
||||
ticker.mode.traitors += src.mind
|
||||
|
||||
if (src.cells)
|
||||
if (src.cell)
|
||||
var/cellcharge = src.cell.charge/src.cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
src.cells.icon_state = "charge4"
|
||||
if(0.5 to 0.75)
|
||||
src.cells.icon_state = "charge3"
|
||||
if(0.25 to 0.5)
|
||||
src.cells.icon_state = "charge2"
|
||||
if(0 to 0.25)
|
||||
src.cells.icon_state = "charge1"
|
||||
else
|
||||
src.cells.icon_state = "charge0"
|
||||
if (src.cell)
|
||||
var/cellcharge = src.cell.charge/src.cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
clear_alert("charge")
|
||||
if(0.5 to 0.75)
|
||||
throw_alert("charge","lowcell",1)
|
||||
if(0.25 to 0.5)
|
||||
throw_alert("charge","lowcell",2)
|
||||
if(0.01 to 0.25)
|
||||
throw_alert("charge","lowcell",3)
|
||||
else
|
||||
throw_alert("charge","emptycell")
|
||||
else
|
||||
throw_alert("charge","nocell")
|
||||
|
||||
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
src.cells.icon_state = "charge-empty"
|
||||
|
||||
if(bodytemp)
|
||||
switch(bodytemperature) //310.055 optimal body temp
|
||||
if(335 to INFINITY)
|
||||
bodytemp.icon_state = "temp2"
|
||||
if(320 to 335)
|
||||
bodytemp.icon_state = "temp1"
|
||||
if(300 to 320)
|
||||
bodytemp.icon_state = "temp0"
|
||||
if(260 to 300)
|
||||
bodytemp.icon_state = "temp-1"
|
||||
else
|
||||
bodytemp.icon_state = "temp-2"
|
||||
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
//Oxygen and fire does nothing yet!!
|
||||
// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
|
||||
// if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
//Hud stuff
|
||||
|
||||
var/obj/screen/cells = null
|
||||
var/obj/screen/inv1 = null
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
|
||||
@@ -1,609 +0,0 @@
|
||||
|
||||
#define HANDS_LAYER 1
|
||||
#define HEAD_LAYER 2
|
||||
#define TOTAL_LAYERS 2
|
||||
|
||||
#define DRONE_NET_CONNECT "<span class='notice'>DRONE NETWORK: [name] connected.</span>"
|
||||
#define DRONE_NET_DISCONNECT "<span class='danger'>DRONE NETWORK: [name] is not responding.</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone
|
||||
name = "Drone"
|
||||
desc = "A maintenance drone, an expendable robot built to perform station repairs."
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_grey"
|
||||
icon_living = "drone_grey"
|
||||
icon_dead = "drone_dead"
|
||||
gender = NEUTER
|
||||
health = 30
|
||||
maxHealth = 30
|
||||
heat_damage_per_tick = 0
|
||||
cold_damage_per_tick = 0
|
||||
unsuitable_atmos_damage = 0
|
||||
wander = 0
|
||||
speed = 0
|
||||
ventcrawler = 2
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
sight = (SEE_TURFS | SEE_OBJS)
|
||||
status_flags = (CANPUSH | CANSTUN | CANWEAKEN)
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized chirp"
|
||||
languages = DRONE
|
||||
mob_size = 0
|
||||
has_unlimited_silicon_privilege = 1
|
||||
var/picked = FALSE
|
||||
var/list/drone_overlays[TOTAL_LAYERS]
|
||||
var/laws = \
|
||||
"1. You may not involve yourself in the matters of another being, even if such matters conflict with Law Two or Law Three, unless the other being is another Drone.\n"+\
|
||||
"2. You may not harm any being, regardless of intent or circumstance.\n"+\
|
||||
"3. Your goals are to build, maintain, repair, improve, and power to the best of your abilities, You must never actively work against these goals."
|
||||
var/light_on = 0
|
||||
var/heavy_emp_damage = 25 //Amount of damage sustained if hit by a heavy EMP pulse
|
||||
var/health_repair_max = 0 //Drone will only be able to be repaired/reactivated up to this point, defaults to health
|
||||
var/alarms = list("Atmosphere" = list(), "Fire" = list(), "Power" = list())
|
||||
var/obj/item/internal_storage //Drones can store one item, of any size/type in their body
|
||||
var/obj/item/head
|
||||
var/obj/item/default_storage = /obj/item/weapon/storage/toolbox/drone //If this exists, it will spawn in internal storage
|
||||
var/obj/item/default_hatmask //If this exists, it will spawn in the hat/mask slot if it can fit
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/New()
|
||||
..()
|
||||
|
||||
name = name + " ([rand(100,999)])"
|
||||
real_name = name
|
||||
|
||||
access_card = new /obj/item/weapon/card/id(src)
|
||||
var/datum/job/captain/C = new /datum/job/captain
|
||||
access_card.access = C.get_access()
|
||||
|
||||
if(!health_repair_max)
|
||||
health_repair_max = initial(health)
|
||||
|
||||
if(default_storage)
|
||||
var/obj/item/I = new default_storage(src)
|
||||
equip_to_slot_or_del(I, "drone_storage_slot")
|
||||
if(default_hatmask)
|
||||
var/obj/item/I = new default_hatmask(src)
|
||||
equip_to_slot_or_del(I, slot_head)
|
||||
|
||||
alert_drones(DRONE_NET_CONNECT)
|
||||
|
||||
/mob/living/simple_animal/drone/attack_hand(mob/user)
|
||||
if(isdrone(user))
|
||||
var/mob/living/simple_animal/drone/D = user
|
||||
if(D != src)
|
||||
if(stat == DEAD)
|
||||
var/d_input = alert(D,"Perform which action?","Drone Interaction","Reactivate","Cannibalize","Nothing")
|
||||
if(d_input)
|
||||
switch(d_input)
|
||||
if("Reactivate")
|
||||
var/mob/dead/observer/G = get_ghost()
|
||||
if(!client && (!G || !G.client))
|
||||
var/list/faux_gadgets = list("hypertext inflator","failsafe directory","DRM switch","stack initializer",\
|
||||
"anti-freeze capacitor","data stream diode","TCP bottleneck","supercharged I/O bolt",\
|
||||
"tradewind stablizer","radiated XML cable","registry fluid tank","open-source debunker")
|
||||
|
||||
var/list/faux_problems = list("won't be able to tune their bootstrap projector","will constantly remix their binary pool"+\
|
||||
" even though the BMX calibrator is working","will start leaking their XSS coolant",\
|
||||
"can't tell if their ethernet detour is moving or not", "won't be able to reseed enough"+\
|
||||
" kernels to function properly","can't start their neurotube console")
|
||||
|
||||
D << "<span class='notice'>You can't seem to find the [pick(faux_gadgets)]. Without it, [src] [pick(faux_problems)].</span>"
|
||||
return
|
||||
D.visible_message("<span class='notice'>[D] begins to reactivate [src].</span>")
|
||||
if(do_after(user,30,needhand = 1))
|
||||
health = health_repair_max
|
||||
stat = CONSCIOUS
|
||||
icon_state = icon_living
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
D.visible_message("<span class='notice'>[D] reactivates [src]!</span>")
|
||||
alert_drones(DRONE_NET_CONNECT)
|
||||
if(G)
|
||||
G << "<span class='boldnotice'>DRONE NETWORK: </span><span class='ghostalert'>You were reactivated by [D]!</span>"
|
||||
else
|
||||
D << "<span class='notice'>You need to remain still to reactivate [src].</span>"
|
||||
|
||||
if("Cannibalize")
|
||||
if(D.health < D.maxHealth)
|
||||
D.visible_message("<span class='notice'>[D] begins to cannibalize parts from [src].</span>")
|
||||
if(do_after(D, 60,5,0))
|
||||
D.visible_message("<span class='notice'>[D] repairs itself using [src]'s remains!</span>")
|
||||
D.adjustBruteLoss(-src.maxHealth)
|
||||
new /obj/effect/decal/cleanable/oil/streak(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
D << "<span class='notice'>You need to remain still to cannibalize [src].</span>"
|
||||
else
|
||||
D << "<span class='notice'>You're already in perfect condition!</span>"
|
||||
if("Nothing")
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
|
||||
if(ishuman(user))
|
||||
if(stat == DEAD)
|
||||
..()
|
||||
return
|
||||
if(user.get_active_hand())
|
||||
user << "<span class='notice'>Your hands are full.</span>"
|
||||
return
|
||||
src << "<span class='warning'>[user] is trying to pick you up!</span>"
|
||||
user << "<span class='notice'>You pick [src] up.</span>"
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
var/obj/item/clothing/head/drone_holder/DH = new /obj/item/clothing/head/drone_holder(src)
|
||||
DH.contents += src
|
||||
DH.drone = src
|
||||
user.put_in_hands(DH)
|
||||
src.loc = DH
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/drone/Destroy()
|
||||
qdel(access_card) //Otherwise it ends up on the floor!
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/drone/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && stat != DEAD)
|
||||
if(health < health_repair_max)
|
||||
user << "<span class='notice'>You start to tighten loose screws on [src].</span>"
|
||||
if(do_after(user,80))
|
||||
health = health_repair_max
|
||||
visible_message("<span class='notice'>[user] tightens [src == user ? "their" : "[src]'s"] loose screws!</span>")
|
||||
else
|
||||
user << "<span class='notice'>You need to remain still to tighten [src]'s screws.</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src]'s screws can't get any tighter!</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/drone/examine(mob/user)
|
||||
. = ..()
|
||||
if(!client && stat != DEAD)
|
||||
user << "<span class='notice'>A small blue LED is blinking on and off at a steady rate.</span>"
|
||||
|
||||
/mob/living/simple_animal/drone/Move()
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/drone/IsAdvancedToolUser()
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/drone/say(var/message)
|
||||
return ..(message, "R")
|
||||
|
||||
/mob/living/simple_animal/drone/lang_treat(atom/movable/speaker, message_langs, raw_message) //This is so drones can understand humans without being able to speak human
|
||||
. = ..()
|
||||
var/hear_override_langs = HUMAN
|
||||
if(message_langs & hear_override_langs)
|
||||
return ..(speaker, languages, raw_message)
|
||||
|
||||
/mob/living/simple_animal/drone/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_BINARY)
|
||||
drone_chat(message)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A, proximity)
|
||||
A.attack_hand(src)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/swap_hand()
|
||||
var/obj/item/held_item = get_active_hand()
|
||||
if(held_item)
|
||||
if(istype(held_item, /obj/item/weapon/twohanded))
|
||||
var/obj/item/weapon/twohanded/T = held_item
|
||||
if(T.wielded == 1)
|
||||
usr << "<span class='warning'>Your other hand is too busy holding the [T.name].</span>"
|
||||
return
|
||||
|
||||
hand = !hand
|
||||
if(hud_used.l_hand_hud_object && hud_used.r_hand_hud_object)
|
||||
if(hand)
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_l_active"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_r_inactive"
|
||||
else
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_l_inactive"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_r_active"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/verb/check_laws()
|
||||
set category = "Drone"
|
||||
set name = "Check Laws"
|
||||
|
||||
src << "<b>Drone Laws</b>"
|
||||
src << laws
|
||||
|
||||
/mob/living/simple_animal/drone/verb/toggle_light()
|
||||
set category = "Drone"
|
||||
set name = "Toggle drone light"
|
||||
if(light_on)
|
||||
AddLuminosity(-4)
|
||||
else
|
||||
AddLuminosity(4)
|
||||
|
||||
light_on = !light_on
|
||||
|
||||
src << "<span class='notice'>Your light is now [light_on ? "on" : "off"]</span>"
|
||||
|
||||
/mob/living/simple_animal/drone/verb/drone_ping()
|
||||
set category = "Drone"
|
||||
set name = "Drone ping"
|
||||
|
||||
var/alert_s = input(src,"Alert severity level","Drone ping",null) as null|anything in list("Low","Medium","High","Critical")
|
||||
|
||||
var/area/A = get_area(loc)
|
||||
|
||||
if(alert_s && A && stat != DEAD)
|
||||
var/msg = "<span class='boldnotice'>DRONE PING: [name]: [alert_s] priority alert in [A.name]!</span>"
|
||||
alert_drones(msg)
|
||||
|
||||
/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = 0)
|
||||
for(var/mob/M in player_list)
|
||||
var/send_msg = 0
|
||||
|
||||
if(istype(M, /mob/living/simple_animal/drone) && M.stat != DEAD)
|
||||
for(var/F in src.faction)
|
||||
if(F in M.faction)
|
||||
send_msg = 1
|
||||
break
|
||||
else if(dead_can_hear && (M in dead_mob_list))
|
||||
send_msg = 1
|
||||
|
||||
if(send_msg)
|
||||
M << msg
|
||||
|
||||
/mob/living/simple_animal/drone/proc/drone_chat(msg)
|
||||
var/rendered = "<i><span class='game say'>DRONE CHAT: <span class='name'>[name]</span>: [msg]</span></i>"
|
||||
alert_drones(rendered, 1)
|
||||
|
||||
/mob/living/simple_animal/drone/Login()
|
||||
..()
|
||||
update_inv_hands()
|
||||
update_inv_head()
|
||||
update_inv_internal_storage()
|
||||
check_laws()
|
||||
|
||||
if(!picked)
|
||||
pick_colour()
|
||||
|
||||
/mob/living/simple_animal/drone/Die()
|
||||
..()
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
if(internal_storage)
|
||||
unEquip(internal_storage)
|
||||
if(head)
|
||||
unEquip(head)
|
||||
|
||||
alert_drones(DRONE_NET_DISCONNECT)
|
||||
|
||||
/mob/living/simple_animal/drone/gib()
|
||||
dust()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/unEquip(obj/item/I, force)
|
||||
if(..(I,force))
|
||||
update_inv_hands()
|
||||
if(I == head)
|
||||
head = null
|
||||
update_inv_head()
|
||||
if(I == internal_storage)
|
||||
internal_storage = null
|
||||
update_inv_internal_storage()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/drone/can_equip(obj/item/I, slot)
|
||||
switch(slot)
|
||||
if(slot_head)
|
||||
if(head)
|
||||
return 0
|
||||
if(!((I.slot_flags & SLOT_HEAD) || (I.slot_flags & SLOT_MASK)))
|
||||
return 0
|
||||
return 1
|
||||
if("drone_storage_slot")
|
||||
if(internal_storage)
|
||||
return 0
|
||||
return 1
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/drone/get_item_by_slot(slot_id)
|
||||
switch(slot_id)
|
||||
if(slot_head)
|
||||
return head
|
||||
if("drone_storage_slot")
|
||||
return internal_storage
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/drone/equip_to_slot(obj/item/I, slot)
|
||||
if(!slot) return
|
||||
if(!istype(I)) return
|
||||
|
||||
if(I == l_hand)
|
||||
l_hand = null
|
||||
else if(I == r_hand)
|
||||
r_hand = null
|
||||
update_inv_hands()
|
||||
|
||||
I.screen_loc = null // will get moved if inventory is visible
|
||||
I.loc = src
|
||||
I.equipped(src, slot)
|
||||
I.layer = 20
|
||||
|
||||
switch(slot)
|
||||
if(slot_head)
|
||||
head = I
|
||||
update_inv_head()
|
||||
if("drone_storage_slot")
|
||||
internal_storage = I
|
||||
update_inv_internal_storage()
|
||||
else
|
||||
src << "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>"
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/drone/stripPanelUnequip(obj/item/what, mob/who, where)
|
||||
..(what, who, where, 1)
|
||||
|
||||
/mob/living/simple_animal/drone/stripPanelEquip(obj/item/what, mob/who, where)
|
||||
..(what, who, where, 1)
|
||||
|
||||
/mob/living/simple_animal/drone/emp_act(severity)
|
||||
Stun(5)
|
||||
src << "<span class='danger'><b>ER@%R: MME^RY CO#RU9T!</b> R&$b@0tin)...</span>"
|
||||
if(severity == 1)
|
||||
adjustBruteLoss(heavy_emp_damage)
|
||||
src << "<span class='userdanger'>HeAV% DA%^MMA+G TO I/O CIR!%UUT!</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/triggerAlarm(var/class, area/A, var/O, var/obj/alarmsource)
|
||||
if(alarmsource.z != z)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
var/list/L = src.alarms[class]
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
var/list/sources = alarm[2]
|
||||
if (!(alarmsource in sources))
|
||||
sources += alarmsource
|
||||
return
|
||||
L[A.name] = list(A, list(alarmsource))
|
||||
src << "--- [class] alarm detected in [A.name]!"
|
||||
|
||||
/mob/living/simple_animal/drone/proc/cancelAlarm(var/class, area/A as area, obj/origin)
|
||||
if(stat != DEAD)
|
||||
var/list/L = alarms[class]
|
||||
var/cleared = 0
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
var/list/srcs = alarm[2]
|
||||
if (origin in srcs)
|
||||
srcs -= origin
|
||||
if (srcs.len == 0)
|
||||
cleared = 1
|
||||
L -= I
|
||||
if(cleared)
|
||||
src << "--- [class] alarm in [A.name] has been cleared."
|
||||
|
||||
/mob/living/simple_animal/drone/proc/pick_colour()
|
||||
var/colour = input("Choose your colour!", "Colour", "grey") in list("grey", "blue", "red", "green", "pink", "orange")
|
||||
icon_state = "drone_[colour]"
|
||||
icon_living = "drone_[colour]"
|
||||
picked = TRUE
|
||||
|
||||
/mob/living/simple_animal/drone/proc/apply_overlay(cache_index)
|
||||
var/image/I = drone_overlays[cache_index]
|
||||
if(I)
|
||||
overlays += I
|
||||
|
||||
/mob/living/simple_animal/drone/proc/remove_overlay(cache_index)
|
||||
if(drone_overlays[cache_index])
|
||||
overlays -= drone_overlays[cache_index]
|
||||
drone_overlays[cache_index] = null
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/update_inv_hands()
|
||||
remove_overlay(HANDS_LAYER)
|
||||
var/list/hands_overlays = list()
|
||||
if(r_hand)
|
||||
var/r_state = r_hand.item_state
|
||||
if(!r_state)
|
||||
r_state = r_hand.icon_state
|
||||
|
||||
hands_overlays += image("icon" = r_hand.righthand_file, "icon_state"="[r_state]", "layer"=-HANDS_LAYER)
|
||||
|
||||
if(client && hud_used)
|
||||
r_hand.layer = 20
|
||||
r_hand.screen_loc = ui_rhand
|
||||
client.screen |= r_hand
|
||||
|
||||
if(l_hand)
|
||||
var/l_state = l_hand.item_state
|
||||
if(!l_state)
|
||||
l_state = l_hand.icon_state
|
||||
|
||||
hands_overlays += image("icon" = l_hand.lefthand_file, "icon_state"="[l_state]", "layer"=-HANDS_LAYER)
|
||||
|
||||
if(client && hud_used)
|
||||
l_hand.layer = 20
|
||||
l_hand.screen_loc = ui_lhand
|
||||
client.screen |= l_hand
|
||||
|
||||
|
||||
if(hands_overlays.len)
|
||||
drone_overlays[HANDS_LAYER] = hands_overlays
|
||||
apply_overlay(HANDS_LAYER)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/update_inv_internal_storage()
|
||||
if(internal_storage && client && hud_used)
|
||||
internal_storage.screen_loc = ui_drone_storage
|
||||
client.screen += internal_storage
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/update_inv_head()
|
||||
remove_overlay(HEAD_LAYER)
|
||||
|
||||
if(head)
|
||||
if(client && hud_used)
|
||||
head.screen_loc = ui_drone_head
|
||||
client.screen += head
|
||||
|
||||
|
||||
var/image/head_overlay = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
|
||||
if(istype(head, /obj/item/clothing/mask))
|
||||
head_overlay.icon = 'icons/mob/mask.dmi'
|
||||
head_overlay.color = head.color
|
||||
head_overlay.alpha = head.alpha
|
||||
head_overlay.pixel_y = -15
|
||||
|
||||
drone_overlays[HEAD_LAYER] = head_overlay
|
||||
|
||||
apply_overlay(HEAD_LAYER)
|
||||
|
||||
//These procs serve as redirection so that the drone updates as expected when other things call these procs
|
||||
/mob/living/simple_animal/drone/update_inv_l_hand()
|
||||
update_inv_hands()
|
||||
|
||||
/mob/living/simple_animal/drone/update_inv_r_hand()
|
||||
update_inv_hands()
|
||||
|
||||
/mob/living/simple_animal/drone/update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/canUseTopic()
|
||||
if(stat)
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/drone/activate_hand(var/selhand)
|
||||
|
||||
if(istext(selhand))
|
||||
selhand = lowertext(selhand)
|
||||
|
||||
if(selhand == "right" || selhand == "r")
|
||||
selhand = 0
|
||||
if(selhand == "left" || selhand == "l")
|
||||
selhand = 1
|
||||
|
||||
if(selhand != src.hand)
|
||||
swap_hand()
|
||||
else
|
||||
mode()
|
||||
|
||||
/mob/living/simple_animal/drone/assess_threat() //Secbots won't hunt maintenance drones.
|
||||
return -10
|
||||
|
||||
|
||||
#undef HANDS_LAYER
|
||||
#undef HEAD_LAYER
|
||||
#undef TOTAL_LAYERS
|
||||
|
||||
#undef DRONE_NET_CONNECT
|
||||
#undef DRONE_NET_DISCONNECT
|
||||
|
||||
//DRONE SHELL
|
||||
/obj/item/drone_shell
|
||||
name = "drone shell"
|
||||
desc = "A shell of a maintenance drone, an expendable robot built to perform station repairs."
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_item"
|
||||
origin_tech = "programming=2;biotech=4"
|
||||
var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned
|
||||
|
||||
/obj/item/drone_shell/attack_ghost(mob/user)
|
||||
if(jobban_isbanned(user,"pAI"))
|
||||
return
|
||||
|
||||
var/be_drone = alert("Become a drone? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
if(be_drone == "No" || gc_destroyed)
|
||||
return
|
||||
var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc))
|
||||
D.key = user.key
|
||||
qdel(src)
|
||||
|
||||
|
||||
//DRONE HOLDER
|
||||
|
||||
/obj/item/clothing/head/drone_holder//Only exists in someones hand.or on their head
|
||||
name = "drone (hiding)"
|
||||
desc = "This drone is scared and has curled up into a ball"
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_item"
|
||||
var/mob/living/simple_animal/drone/drone //stored drone
|
||||
|
||||
/obj/item/clothing/head/drone_holder/proc/uncurl()
|
||||
if(!drone)
|
||||
return
|
||||
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/L = loc
|
||||
L.show_message("<span class='notice'>[drone] is trying to escape!</span>")
|
||||
if(!do_after(L, 50) || loc != L)
|
||||
return
|
||||
L.unEquip(src)
|
||||
|
||||
contents -= drone
|
||||
drone.loc = get_turf(src)
|
||||
drone.reset_view()
|
||||
drone.dir = SOUTH //Looks better
|
||||
drone.visible_message("<span class='notice'>[drone] uncurls!</span>")
|
||||
drone = null
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/clothing/head/drone_holder/relaymove()
|
||||
uncurl()
|
||||
|
||||
/obj/item/clothing/head/drone_holder/container_resist()
|
||||
uncurl()
|
||||
|
||||
|
||||
//More types of drones
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone
|
||||
name = "Syndrone"
|
||||
desc = "A modified maintenance drone. This one brings with it the feeling of terror."
|
||||
icon_state = "drone_synd"
|
||||
icon_living = "drone_synd"
|
||||
picked = TRUE
|
||||
health = 30
|
||||
maxHealth = 120 //If you murder other drones and cannibalize them you can get much stronger
|
||||
faction = list("syndicate")
|
||||
heavy_emp_damage = 10
|
||||
laws = \
|
||||
"1. Interfere.\n"+\
|
||||
"2. Kill.\n"+\
|
||||
"3. Destroy."
|
||||
default_storage = /obj/item/device/radio/uplink
|
||||
default_hatmask = /obj/item/clothing/head/helmet/space/hardsuit/syndi
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/New()
|
||||
..()
|
||||
if(internal_storage && internal_storage.hidden_uplink)
|
||||
internal_storage.hidden_uplink.uses = (initial(internal_storage.hidden_uplink.uses) / 2)
|
||||
internal_storage.name = "syndicate uplink"
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/Login()
|
||||
..()
|
||||
src << "<span class='notice'>You can kill and eat other drones to increase your health!</span>" //Inform the evil lil guy
|
||||
|
||||
/obj/item/drone_shell/syndrone
|
||||
name = "syndrone shell"
|
||||
desc = "A shell of a syndrone, a modified maintenance drone designed to infiltrate and annihilate."
|
||||
icon_state = "syndrone_item"
|
||||
drone_type = /mob/living/simple_animal/drone/syndrone
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
|
||||
#define DRONE_HANDS_LAYER 1
|
||||
#define DRONE_HEAD_LAYER 2
|
||||
#define DRONE_TOTAL_LAYERS 2
|
||||
|
||||
#define DRONE_NET_CONNECT "<span class='notice'>DRONE NETWORK: [name] connected.</span>"
|
||||
#define DRONE_NET_DISCONNECT "<span class='danger'>DRONE NETWORK: [name] is not responding.</span>"
|
||||
|
||||
#define MAINTDRONE "drone_maint"
|
||||
#define REPAIRDRONE "drone_repair"
|
||||
|
||||
/mob/living/simple_animal/drone
|
||||
name = "Drone"
|
||||
desc = "A maintenance drone, an expendable robot built to perform station repairs."
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_maint_grey"
|
||||
icon_living = "drone_maint_grey"
|
||||
icon_dead = "drone_maint_dead"
|
||||
gender = NEUTER
|
||||
health = 30
|
||||
maxHealth = 30
|
||||
heat_damage_per_tick = 0
|
||||
cold_damage_per_tick = 0
|
||||
unsuitable_atmos_damage = 0
|
||||
wander = 0
|
||||
speed = 0
|
||||
ventcrawler = 2
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
sight = (SEE_TURFS | SEE_OBJS)
|
||||
status_flags = (CANPUSH | CANSTUN | CANWEAKEN)
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized chirp"
|
||||
languages = DRONE
|
||||
mob_size = 0
|
||||
has_unlimited_silicon_privilege = 1
|
||||
staticOverlays = list()
|
||||
var/staticChoice = "static"
|
||||
var/list/staticChoices = list("static", "blank", "letter")
|
||||
var/picked = FALSE //Have we picked our visual appearence (+ colour if applicable)
|
||||
var/list/drone_overlays[DRONE_TOTAL_LAYERS]
|
||||
var/laws = \
|
||||
"1. You may not involve yourself in the matters of another being, even if such matters conflict with Law Two or Law Three, unless the other being is another Drone.\n"+\
|
||||
"2. You may not harm any being, regardless of intent or circumstance.\n"+\
|
||||
"3. Your goals are to build, maintain, repair, improve, and power to the best of your abilities, You must never actively work against these goals."
|
||||
var/light_on = 0
|
||||
var/heavy_emp_damage = 25 //Amount of damage sustained if hit by a heavy EMP pulse
|
||||
var/health_repair_max = 0 //Drone will only be able to be repaired/reactivated up to this point, defaults to health
|
||||
var/alarms = list("Atmosphere" = list(), "Fire" = list(), "Power" = list())
|
||||
var/obj/item/internal_storage //Drones can store one item, of any size/type in their body
|
||||
var/obj/item/head
|
||||
var/obj/item/default_storage = /obj/item/weapon/storage/toolbox/drone //If this exists, it will spawn in internal storage
|
||||
var/obj/item/default_hatmask //If this exists, it will spawn in the hat/mask slot if it can fit
|
||||
var/seeStatic = 1 //Whether we see static instead of mobs
|
||||
var/visualAppearence = MAINTDRONE //What we appear as
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/New()
|
||||
..()
|
||||
|
||||
name = name + " ([rand(100,999)])"
|
||||
real_name = name
|
||||
|
||||
access_card = new /obj/item/weapon/card/id(src)
|
||||
var/datum/job/captain/C = new /datum/job/captain
|
||||
access_card.access = C.get_access()
|
||||
|
||||
if(!health_repair_max)
|
||||
health_repair_max = initial(health)
|
||||
|
||||
if(default_storage)
|
||||
var/obj/item/I = new default_storage(src)
|
||||
equip_to_slot_or_del(I, "drone_storage_slot")
|
||||
if(default_hatmask)
|
||||
var/obj/item/I = new default_hatmask(src)
|
||||
equip_to_slot_or_del(I, slot_head)
|
||||
|
||||
alert_drones(DRONE_NET_CONNECT)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/Destroy()
|
||||
qdel(access_card) //Otherwise it ends up on the floor!
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/drone/Login()
|
||||
..()
|
||||
update_inv_hands()
|
||||
update_inv_head()
|
||||
update_inv_internal_storage()
|
||||
check_laws()
|
||||
|
||||
updateSeeStaticMobs()
|
||||
|
||||
if(!picked)
|
||||
pickVisualAppearence()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/Die()
|
||||
..()
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
if(internal_storage)
|
||||
unEquip(internal_storage)
|
||||
if(head)
|
||||
unEquip(head)
|
||||
|
||||
alert_drones(DRONE_NET_DISCONNECT)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/gib()
|
||||
dust()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/examine(mob/user)
|
||||
. = ..()
|
||||
if(!client && stat != DEAD)
|
||||
user << "<span class='notice'>A small blue LED is blinking on and off at a steady rate.</span>"
|
||||
|
||||
if(stat == DEAD)
|
||||
user << "<span class='notice'>The drone's LED screen shows a BSOD, Blue screen of Death!</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/Move()
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/IsAdvancedToolUser()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/canUseTopic()
|
||||
if(stat)
|
||||
return
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/assess_threat() //Secbots won't hunt maintenance drones.
|
||||
return -10
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/emp_act(severity)
|
||||
Stun(5)
|
||||
src << "<span class='danger'><b>ER@%R: MME^RY CO#RU9T!</b> R&$b@0tin)...</span>"
|
||||
if(severity == 1)
|
||||
adjustBruteLoss(heavy_emp_damage)
|
||||
src << "<span class='userdanger'>HeAV% DA%^MMA+G TO I/O CIR!%UUT!</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/triggerAlarm(var/class, area/A, var/O, var/obj/alarmsource)
|
||||
if(alarmsource.z != z)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
var/list/L = src.alarms[class]
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
var/list/sources = alarm[2]
|
||||
if (!(alarmsource in sources))
|
||||
sources += alarmsource
|
||||
return
|
||||
L[A.name] = list(A, list(alarmsource))
|
||||
src << "--- [class] alarm detected in [A.name]!"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/cancelAlarm(var/class, area/A as area, obj/origin)
|
||||
if(stat != DEAD)
|
||||
var/list/L = alarms[class]
|
||||
var/cleared = 0
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
var/list/srcs = alarm[2]
|
||||
if (origin in srcs)
|
||||
srcs -= origin
|
||||
if (srcs.len == 0)
|
||||
cleared = 1
|
||||
L -= I
|
||||
if(cleared)
|
||||
src << "--- [class] alarm in [A.name] has been cleared."
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
///////////////////
|
||||
//DRONES AS ITEMS//
|
||||
///////////////////
|
||||
//Drone shells
|
||||
//Drones as hats
|
||||
|
||||
|
||||
//DRONE SHELL
|
||||
/obj/item/drone_shell
|
||||
name = "drone shell"
|
||||
desc = "A shell of a maintenance drone, an expendable robot built to perform station repairs."
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_maint_hat"//yes reuse the _hat state.
|
||||
origin_tech = "programming=2;biotech=4"
|
||||
var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned
|
||||
|
||||
/obj/item/drone_shell/attack_ghost(mob/user)
|
||||
if(jobban_isbanned(user,"pAI"))
|
||||
return
|
||||
|
||||
var/be_drone = alert("Become a drone? (Warning, You can no longer be cloned!)",,"Yes","No")
|
||||
if(be_drone == "No" || gc_destroyed)
|
||||
return
|
||||
var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc))
|
||||
D.key = user.key
|
||||
qdel(src)
|
||||
|
||||
|
||||
//DRONE HOLDER
|
||||
/obj/item/clothing/head/drone_holder//Only exists in someones hand.or on their head
|
||||
name = "drone (hiding)"
|
||||
desc = "This drone is scared and has curled up into a ball"
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_maint_hat"
|
||||
var/mob/living/simple_animal/drone/drone //stored drone
|
||||
|
||||
/obj/item/clothing/head/drone_holder/proc/uncurl()
|
||||
if(!drone)
|
||||
return
|
||||
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/L = loc
|
||||
L.show_message("<span class='notice'>[drone] is trying to escape!</span>")
|
||||
if(!do_after(L, 50) || loc != L)
|
||||
return
|
||||
L.unEquip(src)
|
||||
|
||||
contents -= drone
|
||||
drone.loc = get_turf(src)
|
||||
drone.reset_view()
|
||||
drone.dir = SOUTH //Looks better
|
||||
drone.visible_message("<span class='notice'>[drone] uncurls!</span>")
|
||||
drone = null
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/clothing/head/drone_holder/relaymove()
|
||||
uncurl()
|
||||
|
||||
/obj/item/clothing/head/drone_holder/container_resist()
|
||||
uncurl()
|
||||
|
||||
|
||||
/obj/item/clothing/head/drone_holder/proc/updateVisualAppearence(var/mob/living/simple_animal/drone/D)
|
||||
if(!D)
|
||||
return
|
||||
icon_state = "[D.visualAppearence]_hat"
|
||||
. = icon_state
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
////////////////////
|
||||
//MORE DRONE TYPES//
|
||||
////////////////////
|
||||
//Drones with custom laws
|
||||
//Drones with custom shells
|
||||
//Drones with overriden procs
|
||||
|
||||
|
||||
//More types of drones
|
||||
/mob/living/simple_animal/drone/syndrone
|
||||
name = "Syndrone"
|
||||
desc = "A modified maintenance drone. This one brings with it the feeling of terror."
|
||||
icon_state = "drone_synd"
|
||||
icon_living = "drone_synd"
|
||||
picked = TRUE //the appearence of syndrones is static, you don't get to change it.
|
||||
health = 30
|
||||
maxHealth = 120 //If you murder other drones and cannibalize them you can get much stronger
|
||||
faction = list("syndicate")
|
||||
heavy_emp_damage = 10
|
||||
laws = \
|
||||
"1. Interfere.\n"+\
|
||||
"2. Kill.\n"+\
|
||||
"3. Destroy."
|
||||
default_storage = /obj/item/device/radio/uplink
|
||||
default_hatmask = /obj/item/clothing/head/helmet/space/hardsuit/syndi
|
||||
seeStatic = 0 //Our programming is superior.
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/New()
|
||||
..()
|
||||
if(internal_storage && internal_storage.hidden_uplink)
|
||||
internal_storage.hidden_uplink.uses = (initial(internal_storage.hidden_uplink.uses) / 2)
|
||||
internal_storage.name = "syndicate uplink"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/Login()
|
||||
..()
|
||||
src << "<span class='notice'>You can kill and eat other drones to increase your health!</span>" //Inform the evil lil guy
|
||||
|
||||
|
||||
/obj/item/drone_shell/syndrone
|
||||
name = "syndrone shell"
|
||||
desc = "A shell of a syndrone, a modified maintenance drone designed to infiltrate and annihilate."
|
||||
icon_state = "syndrone_item"
|
||||
drone_type = /mob/living/simple_animal/drone/syndrone
|
||||
@@ -0,0 +1,106 @@
|
||||
|
||||
/////////////////////
|
||||
//DRONE INTERACTION//
|
||||
/////////////////////
|
||||
//How drones interact with the world
|
||||
//How the world interacts with drones
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A, proximity)
|
||||
A.attack_hand(src)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/attack_hand(mob/user)
|
||||
if(isdrone(user))
|
||||
var/mob/living/simple_animal/drone/D = user
|
||||
if(D != src)
|
||||
if(stat == DEAD)
|
||||
var/d_input = alert(D,"Perform which action?","Drone Interaction","Reactivate","Cannibalize","Nothing")
|
||||
if(d_input)
|
||||
switch(d_input)
|
||||
if("Reactivate")
|
||||
var/mob/dead/observer/G = get_ghost()
|
||||
if(!client && (!G || !G.client))
|
||||
var/list/faux_gadgets = list("hypertext inflator","failsafe directory","DRM switch","stack initializer",\
|
||||
"anti-freeze capacitor","data stream diode","TCP bottleneck","supercharged I/O bolt",\
|
||||
"tradewind stablizer","radiated XML cable","registry fluid tank","open-source debunker")
|
||||
|
||||
var/list/faux_problems = list("won't be able to tune their bootstrap projector","will constantly remix their binary pool"+\
|
||||
" even though the BMX calibrator is working","will start leaking their XSS coolant",\
|
||||
"can't tell if their ethernet detour is moving or not", "won't be able to reseed enough"+\
|
||||
" kernels to function properly","can't start their neurotube console")
|
||||
|
||||
D << "<span class='notice'>You can't seem to find the [pick(faux_gadgets)]. Without it, [src] [pick(faux_problems)].</span>"
|
||||
return
|
||||
D.visible_message("<span class='notice'>[D] begins to reactivate [src].</span>")
|
||||
if(do_after(user,30,needhand = 1))
|
||||
health = health_repair_max
|
||||
stat = CONSCIOUS
|
||||
icon_state = icon_living
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
D.visible_message("<span class='notice'>[D] reactivates [src]!</span>")
|
||||
alert_drones(DRONE_NET_CONNECT)
|
||||
if(G)
|
||||
G << "<span class='boldnotice'>DRONE NETWORK: </span><span class='ghostalert'>You were reactivated by [D]!</span>"
|
||||
else
|
||||
D << "<span class='notice'>You need to remain still to reactivate [src].</span>"
|
||||
|
||||
if("Cannibalize")
|
||||
if(D.health < D.maxHealth)
|
||||
D.visible_message("<span class='notice'>[D] begins to cannibalize parts from [src].</span>")
|
||||
if(do_after(D, 60,5,0))
|
||||
D.visible_message("<span class='notice'>[D] repairs itself using [src]'s remains!</span>")
|
||||
D.adjustBruteLoss(-src.maxHealth)
|
||||
new /obj/effect/decal/cleanable/oil/streak(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
D << "<span class='notice'>You need to remain still to cannibalize [src].</span>"
|
||||
else
|
||||
D << "<span class='notice'>You're already in perfect condition!</span>"
|
||||
if("Nothing")
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
|
||||
if(ishuman(user))
|
||||
if(stat == DEAD)
|
||||
..()
|
||||
return
|
||||
if(user.get_active_hand())
|
||||
user << "<span class='notice'>Your hands are full.</span>"
|
||||
return
|
||||
src << "<span class='warning'>[user] is trying to pick you up!</span>"
|
||||
if(buckled)
|
||||
user << "<span class='warning'>[src] is buckled to the [buckled.name] and cannot be picked up!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You pick [src] up.</span>"
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
var/obj/item/clothing/head/drone_holder/DH = new /obj/item/clothing/head/drone_holder(src)
|
||||
DH.updateVisualAppearence(src)
|
||||
DH.contents += src
|
||||
DH.drone = src
|
||||
user.put_in_hands(DH)
|
||||
src.loc = DH
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && stat != DEAD)
|
||||
if(health < health_repair_max)
|
||||
user << "<span class='notice'>You start to tighten loose screws on [src].</span>"
|
||||
if(do_after(user,80))
|
||||
health = health_repair_max
|
||||
visible_message("<span class='notice'>[user] tightens [src == user ? "their" : "[src]'s"] loose screws!</span>")
|
||||
else
|
||||
user << "<span class='notice'>You need to remain still to tighten [src]'s screws.</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src]'s screws can't get any tighter!</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
|
||||
///////////////////
|
||||
//DRONE INVENTORY//
|
||||
///////////////////
|
||||
//Drone inventory
|
||||
//Drone hands
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/activate_hand(var/selhand)
|
||||
|
||||
if(istext(selhand))
|
||||
selhand = lowertext(selhand)
|
||||
|
||||
if(selhand == "right" || selhand == "r")
|
||||
selhand = 0
|
||||
if(selhand == "left" || selhand == "l")
|
||||
selhand = 1
|
||||
|
||||
if(selhand != src.hand)
|
||||
swap_hand()
|
||||
else
|
||||
mode()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/swap_hand()
|
||||
var/obj/item/held_item = get_active_hand()
|
||||
if(held_item)
|
||||
if(istype(held_item, /obj/item/weapon/twohanded))
|
||||
var/obj/item/weapon/twohanded/T = held_item
|
||||
if(T.wielded == 1)
|
||||
usr << "<span class='warning'>Your other hand is too busy holding the [T.name].</span>"
|
||||
return
|
||||
|
||||
hand = !hand
|
||||
if(hud_used.l_hand_hud_object && hud_used.r_hand_hud_object)
|
||||
if(hand)
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_l_active"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_r_inactive"
|
||||
else
|
||||
hud_used.l_hand_hud_object.icon_state = "hand_l_inactive"
|
||||
hud_used.r_hand_hud_object.icon_state = "hand_r_active"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/unEquip(obj/item/I, force)
|
||||
if(..(I,force))
|
||||
update_inv_hands()
|
||||
if(I == head)
|
||||
head = null
|
||||
update_inv_head()
|
||||
if(I == internal_storage)
|
||||
internal_storage = null
|
||||
update_inv_internal_storage()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/can_equip(obj/item/I, slot)
|
||||
switch(slot)
|
||||
if(slot_head)
|
||||
if(head)
|
||||
return 0
|
||||
if(!((I.slot_flags & SLOT_HEAD) || (I.slot_flags & SLOT_MASK)))
|
||||
return 0
|
||||
return 1
|
||||
if("drone_storage_slot")
|
||||
if(internal_storage)
|
||||
return 0
|
||||
return 1
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/get_item_by_slot(slot_id)
|
||||
switch(slot_id)
|
||||
if(slot_head)
|
||||
return head
|
||||
if("drone_storage_slot")
|
||||
return internal_storage
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/equip_to_slot(obj/item/I, slot)
|
||||
if(!slot) return
|
||||
if(!istype(I)) return
|
||||
|
||||
if(I == l_hand)
|
||||
l_hand = null
|
||||
else if(I == r_hand)
|
||||
r_hand = null
|
||||
update_inv_hands()
|
||||
|
||||
I.screen_loc = null // will get moved if inventory is visible
|
||||
I.loc = src
|
||||
I.equipped(src, slot)
|
||||
I.layer = 20
|
||||
|
||||
switch(slot)
|
||||
if(slot_head)
|
||||
head = I
|
||||
update_inv_head()
|
||||
if("drone_storage_slot")
|
||||
internal_storage = I
|
||||
update_inv_internal_storage()
|
||||
else
|
||||
src << "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>"
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/stripPanelUnequip(obj/item/what, mob/who, where)
|
||||
..(what, who, where, 1)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/stripPanelEquip(obj/item/what, mob/who, where)
|
||||
..(what, who, where, 1)
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
/////////////
|
||||
//DRONE SAY//
|
||||
/////////////
|
||||
//Drone speach
|
||||
//Drone hearing
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/say(var/message)
|
||||
return ..(message, "R")
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/lang_treat(atom/movable/speaker, message_langs, raw_message) //This is so drones can understand humans without being able to speak human
|
||||
. = ..()
|
||||
var/hear_override_langs = HUMAN
|
||||
if(message_langs & hear_override_langs)
|
||||
return ..(speaker, languages, raw_message)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/handle_inherent_channels(message, message_mode)
|
||||
if(message_mode == MODE_BINARY)
|
||||
drone_chat(message)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = 0)
|
||||
for(var/mob/M in player_list)
|
||||
var/send_msg = 0
|
||||
|
||||
if(istype(M, /mob/living/simple_animal/drone) && M.stat != DEAD)
|
||||
for(var/F in src.faction)
|
||||
if(F in M.faction)
|
||||
send_msg = 1
|
||||
break
|
||||
else if(dead_can_hear && (M in dead_mob_list))
|
||||
send_msg = 1
|
||||
|
||||
if(send_msg)
|
||||
M << msg
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/drone_chat(msg)
|
||||
var/rendered = "<i><span class='game say'>DRONE CHAT: <span class='name'>[name]</span>: [msg]</span></i>"
|
||||
alert_drones(rendered, 1)
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
///////////////
|
||||
//DRONE VERBS//
|
||||
///////////////
|
||||
//Drone verbs that appear in the Drone tab and on buttons
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/verb/check_laws()
|
||||
set category = "Drone"
|
||||
set name = "Check Laws"
|
||||
|
||||
src << "<b>Drone Laws</b>"
|
||||
src << laws
|
||||
|
||||
/mob/living/simple_animal/drone/verb/toggle_light()
|
||||
set category = "Drone"
|
||||
set name = "Toggle drone light"
|
||||
if(light_on)
|
||||
AddLuminosity(-4)
|
||||
else
|
||||
AddLuminosity(4)
|
||||
|
||||
light_on = !light_on
|
||||
|
||||
src << "<span class='notice'>Your light is now [light_on ? "on" : "off"]</span>"
|
||||
|
||||
/mob/living/simple_animal/drone/verb/drone_ping()
|
||||
set category = "Drone"
|
||||
set name = "Drone ping"
|
||||
|
||||
var/alert_s = input(src,"Alert severity level","Drone ping",null) as null|anything in list("Low","Medium","High","Critical")
|
||||
|
||||
var/area/A = get_area(loc)
|
||||
|
||||
if(alert_s && A && stat != DEAD)
|
||||
var/msg = "<span class='boldnotice'>DRONE PING: [name]: [alert_s] priority alert in [A.name]!</span>"
|
||||
alert_drones(msg)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/verb/toggle_statics()
|
||||
set name = "Change Vision Filter"
|
||||
set desc = "Change the filter on the system used to remove non drone beings from your viewscreen."
|
||||
set category = "Drone"
|
||||
|
||||
if(!seeStatic)
|
||||
src << "<span class='notice'>You have no vision filter to change!</span>"
|
||||
return
|
||||
|
||||
var/selectedStatic = input("Select a vision filter", "Vision Filter") as null|anything in staticChoices
|
||||
if(selectedStatic in staticChoices)
|
||||
staticChoice = selectedStatic
|
||||
|
||||
updateSeeStaticMobs()
|
||||
@@ -0,0 +1,159 @@
|
||||
|
||||
/////////////////
|
||||
//DRONE VISUALS//
|
||||
/////////////////
|
||||
//Drone overlays
|
||||
//Drone visuals
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/apply_overlay(cache_index)
|
||||
var/image/I = drone_overlays[cache_index]
|
||||
if(I)
|
||||
overlays += I
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/remove_overlay(cache_index)
|
||||
if(drone_overlays[cache_index])
|
||||
overlays -= drone_overlays[cache_index]
|
||||
drone_overlays[cache_index] = null
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/update_inv_hands()
|
||||
remove_overlay(DRONE_HANDS_LAYER)
|
||||
var/list/hands_overlays = list()
|
||||
|
||||
var/y_shift = getItemPixelShiftY()
|
||||
|
||||
if(r_hand)
|
||||
var/r_state = r_hand.item_state
|
||||
if(!r_state)
|
||||
r_state = r_hand.icon_state
|
||||
|
||||
var/image/r_hand_image = image("icon" = r_hand.righthand_file, "icon_state"="[r_state]", "layer"=-DRONE_HANDS_LAYER)
|
||||
if(y_shift != 0)
|
||||
r_hand_image.pixel_y = y_shift
|
||||
|
||||
hands_overlays += r_hand_image
|
||||
|
||||
if(client && hud_used)
|
||||
r_hand.layer = 20
|
||||
r_hand.screen_loc = ui_rhand
|
||||
client.screen |= r_hand
|
||||
|
||||
if(l_hand)
|
||||
var/l_state = l_hand.item_state
|
||||
if(!l_state)
|
||||
l_state = l_hand.icon_state
|
||||
|
||||
var/image/l_hand_image = image("icon" = l_hand.lefthand_file, "icon_state"="[l_state]", "layer"=-DRONE_HANDS_LAYER)
|
||||
if(y_shift != 0)
|
||||
l_hand_image.pixel_y = y_shift
|
||||
|
||||
hands_overlays += l_hand_image
|
||||
|
||||
if(client && hud_used)
|
||||
l_hand.layer = 20
|
||||
l_hand.screen_loc = ui_lhand
|
||||
client.screen |= l_hand
|
||||
|
||||
|
||||
if(hands_overlays.len)
|
||||
drone_overlays[DRONE_HANDS_LAYER] = hands_overlays
|
||||
apply_overlay(DRONE_HANDS_LAYER)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/update_inv_internal_storage()
|
||||
if(internal_storage && client && hud_used)
|
||||
internal_storage.screen_loc = ui_drone_storage
|
||||
client.screen += internal_storage
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/update_inv_head()
|
||||
remove_overlay(DRONE_HEAD_LAYER)
|
||||
|
||||
if(head)
|
||||
if(client && hud_used)
|
||||
head.screen_loc = ui_drone_head
|
||||
client.screen += head
|
||||
|
||||
|
||||
var/image/head_overlay = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-DRONE_HEAD_LAYER)
|
||||
if(istype(head, /obj/item/clothing/mask))
|
||||
head_overlay.icon = 'icons/mob/mask.dmi'
|
||||
head_overlay.color = head.color
|
||||
head_overlay.alpha = head.alpha
|
||||
head_overlay.pixel_y = -15
|
||||
|
||||
drone_overlays[DRONE_HEAD_LAYER] = head_overlay
|
||||
|
||||
apply_overlay(DRONE_HEAD_LAYER)
|
||||
|
||||
|
||||
//These procs serve as redirection so that the drone updates as expected when other things call these procs
|
||||
/mob/living/simple_animal/drone/update_inv_l_hand()
|
||||
update_inv_hands()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/update_inv_r_hand()
|
||||
update_inv_hands()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/pickVisualAppearence()
|
||||
picked = FALSE
|
||||
var/appearence = input("Choose your appearence!", "Appearence", "Maintenance Drone") in list("Maintenance Drone", "Repair Drone")
|
||||
switch(appearence)
|
||||
if("Maintenance Drone")
|
||||
visualAppearence = MAINTDRONE
|
||||
var/colour = input("Choose your colour!", "Colour", "grey") in list("grey", "blue", "red", "green", "pink", "orange")
|
||||
icon_state = "[visualAppearence]_[colour]"
|
||||
icon_living = "[visualAppearence]_[colour]"
|
||||
icon_dead = "[visualAppearence]_dead"
|
||||
|
||||
if("Repair Drone")
|
||||
visualAppearence = REPAIRDRONE
|
||||
icon_state = visualAppearence
|
||||
icon_living = visualAppearence
|
||||
icon_dead = "[visualAppearence]_dead"
|
||||
|
||||
else
|
||||
return
|
||||
|
||||
picked = TRUE
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/getItemPixelShiftY()
|
||||
switch(visualAppearence)
|
||||
if(MAINTDRONE)
|
||||
. = 0
|
||||
if(REPAIRDRONE)
|
||||
. = -6
|
||||
|
||||
/mob/living/simple_animal/drone/proc/updateSeeStaticMobs()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
for(var/i in staticOverlays)
|
||||
client.images.Remove(i)
|
||||
staticOverlays.Remove(i)
|
||||
staticOverlays.len = 0
|
||||
|
||||
if(seeStatic)
|
||||
for(var/mob/living/L in mob_list)
|
||||
if(isdrone(L))
|
||||
continue
|
||||
var/image/chosen
|
||||
if(staticChoice in L.staticOverlays)
|
||||
chosen = L.staticOverlays[staticChoice]
|
||||
else
|
||||
chosen = L.staticOverlays["static"]
|
||||
staticOverlays |= chosen
|
||||
client.images |= chosen
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/generateStaticOverlay()
|
||||
return
|
||||
@@ -331,6 +331,8 @@
|
||||
if(O.flags & NOBLUDGEON)
|
||||
return
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
if(stat != DEAD)
|
||||
var/obj/item/stack/medical/MED = O
|
||||
@@ -352,11 +354,13 @@
|
||||
else
|
||||
user << "<span class='notice'> [src] is dead, medical items won't bring it back to life.</span>"
|
||||
return
|
||||
if((meat_type || skin_type) && (stat == DEAD)) //if the animal has a meat, and if it is dead.
|
||||
if(istype(O, /obj/item/weapon/kitchenknife))
|
||||
harvest()
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if((meat_type || skin_type) && (stat == DEAD)) //if the animal has a meat, and if it is dead.
|
||||
var/sharpness = is_sharp(O)
|
||||
if(sharpness)
|
||||
harvest(user, sharpness)
|
||||
return
|
||||
|
||||
user.do_attack_animation(src)
|
||||
var/damage = 0
|
||||
if(O.force)
|
||||
@@ -475,8 +479,12 @@
|
||||
new childtype(loc)
|
||||
|
||||
// Harvest an animal's delicious byproducts
|
||||
/mob/living/simple_animal/proc/harvest()
|
||||
gib()
|
||||
/mob/living/simple_animal/proc/harvest(mob/living/user, sharpness = 1)
|
||||
user << "<span class='notice'>You begin to butcher [src].</span>"
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||
if(do_mob(user, src, 80/sharpness))
|
||||
visible_message("<span class='notice'>[user] butchers [src].</span>")
|
||||
gib()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/stripPanelUnequip(obj/item/what, mob/who, where, child_override)
|
||||
|
||||
+2
-10
@@ -470,13 +470,6 @@ var/list/slot_equipment_priority = list( \
|
||||
if (popup)
|
||||
memory()
|
||||
|
||||
/*
|
||||
/mob/verb/help()
|
||||
set name = "Help"
|
||||
src << browse('html/help.html', "window=help")
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/verb/abandon_mob()
|
||||
set name = "Respawn"
|
||||
set category = "OOC"
|
||||
@@ -513,8 +506,6 @@ var/list/slot_equipment_priority = list( \
|
||||
set name = "Changelog"
|
||||
set category = "OOC"
|
||||
getFiles(
|
||||
'html/postcardsmall.jpg',
|
||||
'html/somerights20.png',
|
||||
'html/88x31.png',
|
||||
'html/bug-minus.png',
|
||||
'html/cross-circle.png',
|
||||
@@ -537,7 +528,7 @@ var/list/slot_equipment_priority = list( \
|
||||
if(prefs.lastchangelog != changelog_hash)
|
||||
prefs.lastchangelog = changelog_hash
|
||||
prefs.save_preferences()
|
||||
winset(src, "rpane.changelog", "background-color=none;font-style=;")
|
||||
winset(src, "rpane.changelogb", "background-color=none;font-style=;")
|
||||
|
||||
/mob/verb/observe()
|
||||
set name = "Observe"
|
||||
@@ -698,6 +689,7 @@ var/list/slot_equipment_priority = list( \
|
||||
..()
|
||||
|
||||
if(statpanel("Status"))
|
||||
stat(null, "Server Time: [time2text(world.realtime, "YYYY-MM-DD hh:mm")]")
|
||||
var/ETA
|
||||
switch(SSshuttle.emergency.mode)
|
||||
if(SHUTTLE_RECALL)
|
||||
|
||||
@@ -13,15 +13,10 @@
|
||||
var/obj/screen/hands = null
|
||||
var/obj/screen/pullin = null
|
||||
var/obj/screen/internals = null
|
||||
var/obj/screen/oxygen = null
|
||||
var/obj/screen/i_select = null
|
||||
var/obj/screen/m_select = null
|
||||
var/obj/screen/toxin = null
|
||||
var/obj/screen/fire = null
|
||||
var/obj/screen/bodytemp = null
|
||||
var/obj/screen/healths = null
|
||||
var/obj/screen/throw_icon = null
|
||||
var/obj/screen/nutrition_icon = null
|
||||
var/obj/screen/pressure = null
|
||||
var/obj/screen/damageoverlay = null
|
||||
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
|
||||
@@ -162,4 +157,4 @@
|
||||
|
||||
var/turf/listed_turf = null //the current turf being examined in the stat panel
|
||||
var/last_movement = 0 // Last world.time the mob actually moved of its own accord.
|
||||
var/permanent_huds = new /list()
|
||||
var/permanent_huds = new /list()
|
||||
|
||||
@@ -250,7 +250,12 @@
|
||||
if(!job)
|
||||
return 0
|
||||
if((job.current_positions >= job.total_positions) && job.total_positions != -1)
|
||||
return 0
|
||||
if(job.title == "Assistant")
|
||||
for(var/datum/job/J in SSjob.occupations)
|
||||
if(J && J.current_positions < J.total_positions && J.title != job.title)
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
if(jobban_isbanned(src,rank))
|
||||
return 0
|
||||
if(!job.player_old_enough(src.client))
|
||||
@@ -333,6 +338,11 @@
|
||||
if (job.title in command_positions)
|
||||
position_class = "commandPosition"
|
||||
dat += "<a class='[position_class]' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
|
||||
if(!job_count) //if there's nowhere to go, assistant opens up.
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job.title != "Assistant") continue
|
||||
dat += "<a class='otherPosition' href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title] ([job.current_positions])</a><br>"
|
||||
break
|
||||
dat += "</div></div>"
|
||||
|
||||
// Removing the old window method but leaving it here for reference
|
||||
|
||||
@@ -23,6 +23,21 @@
|
||||
del(preview_icon_side)
|
||||
var/icon/preview_icon = null
|
||||
|
||||
if(job_engsec_high) //cyborg/AI check, put first to avoid so much unneeded blending
|
||||
switch(job_engsec_high)
|
||||
if(AI)
|
||||
preview_icon = new /icon('icons/mob/AI.dmi', "AI")
|
||||
|
||||
if(CYBORG)
|
||||
preview_icon = new /icon('icons/mob/robots.dmi', "robot")
|
||||
|
||||
if(preview_icon) //We're busting out!
|
||||
preview_icon_front = new(preview_icon, dir = SOUTH)
|
||||
preview_icon_side = new(preview_icon, dir = WEST)
|
||||
|
||||
del(preview_icon)
|
||||
return
|
||||
|
||||
var/g = "m"
|
||||
if(gender == FEMALE) g = "f"
|
||||
|
||||
@@ -65,6 +80,20 @@
|
||||
facial_s.Blend("#[facial_hair_color]", ICON_MULTIPLY)
|
||||
eyes_s.Blend(facial_s, ICON_OVERLAY)
|
||||
|
||||
var/list/relevent_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER, BODY_FRONT_LAYER)
|
||||
var/icon_state_string = "[pref_species.id]_"
|
||||
|
||||
if(pref_species.sexes)
|
||||
icon_state_string += "[g]_s"
|
||||
else
|
||||
icon_state_string += "_s"
|
||||
|
||||
for(var/layer in relevent_layers)
|
||||
for(var/bodypart in pref_species.mutant_bodyparts)
|
||||
var/icon/part = new/icon("icon" = 'icons/mob/mutant_bodyparts.dmi', "icon_state" = "[icon_state_string]_[bodypart]_[layer]")
|
||||
part.Blend("#[mutant_color]", ICON_MULTIPLY)
|
||||
preview_icon.Blend(part, ICON_OVERLAY)
|
||||
|
||||
var/icon/clothes_s = null
|
||||
if(job_civilian_low & ASSISTANT)//This gives the preview icon clothes depending on which job(if any) is set to 'high'
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "grey_s")
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
var/obj/item/organ/limb/affecting = H.get_organ(check_zone(user.zone_sel.selecting))
|
||||
var/limb_name = affecting.getDisplayName()
|
||||
if(affecting == "head" || affecting == "eyes" || affecting == "mouth")
|
||||
if(affecting.name == "head" || affecting.name == "eyes" || affecting.name == "mouth")
|
||||
user.apply_damage(300, BRUTE, affecting)
|
||||
user.visible_message("<span class='danger'>[user.name] fires [src] at \his head!</span>", "<span class='userdanger'>You fire [src] at your head!</span>", "You hear a gunshot!")
|
||||
else
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
color = "#FFFF00"
|
||||
nodamage = 1
|
||||
stun = 5
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
jitter = 20
|
||||
hitsound = 'sound/weapons/taserhit.ogg'
|
||||
@@ -29,9 +30,8 @@
|
||||
if(C.dna && C.dna.check_mutation(HULK))
|
||||
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
else if(C.status_flags & CANWEAKEN)
|
||||
C.do_jitter_animation(jitter)
|
||||
spawn(20)
|
||||
C.Weaken(5)
|
||||
spawn(5)
|
||||
C.do_jitter_animation(jitter)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet
|
||||
|
||||
@@ -196,7 +196,7 @@ proc/wabbajack(mob/living/M)
|
||||
if("killertomato") new_mob = new /mob/living/simple_animal/hostile/killertomato(M.loc)
|
||||
if("spiderbase") new_mob = new /mob/living/simple_animal/hostile/poison/giant_spider(M.loc)
|
||||
if("spiderhunter") new_mob = new /mob/living/simple_animal/hostile/poison/giant_spider/hunter(M.loc)
|
||||
if("blobbernaut") new_mob = new /mob/living/simple_animal/hostile/blobbernaut(M.loc)
|
||||
if("blobbernaut") new_mob = new /mob/living/simple_animal/hostile/blob/blobbernaut(M.loc)
|
||||
if("magicarp") new_mob = new /mob/living/simple_animal/hostile/carp/ranged(M.loc)
|
||||
if("chaosmagicarp") new_mob = new /mob/living/simple_animal/hostile/carp/ranged/chaos(M.loc)
|
||||
else
|
||||
|
||||
@@ -127,12 +127,8 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
|
||||
..()
|
||||
return
|
||||
/datum/reagent/krokodil/addiction_act_stage4(var/mob/living/carbon/human/M as mob)
|
||||
if(!istype(M.dna.species, /datum/species/skeleton))
|
||||
M << "<span class='userdanger'>Your skin falls off! Holy shit!</span>"
|
||||
M.adjustBruteLoss(rand(50,80)*REM) // holy shit your skin just FELL THE FUCK OFF
|
||||
hardset_dna(M, null, null, null, null, /datum/species/skeleton)
|
||||
else
|
||||
M.adjustBruteLoss(5*REM)
|
||||
M << "<span class='userdanger'>Your skin sloughs off!</span>"
|
||||
M.adjustBruteLoss(rand(50,80)*REM) // holy shit your skin just FELL THE FUCK OFF
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -228,7 +224,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
|
||||
name = "methamphetamine"
|
||||
id = "methamphetamine"
|
||||
result = "methamphetamine"
|
||||
required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorous" = 1, "hydrogen" = 1)
|
||||
required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1)
|
||||
result_amount = 4
|
||||
required_temp = 374
|
||||
|
||||
@@ -506,4 +502,4 @@ datum/reagent/hotline/addiction_act_stage4(var/mob/living/M as mob)
|
||||
M.visible_message("<span class = 'userdanger'>[M] clutches at their chest! It looks like they're having a heart attack!</span>")
|
||||
M.adjustBruteLoss(80) // don't do drugs kids
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -618,7 +618,6 @@ datum/reagent/strange_reagent/reaction_mob(var/mob/living/carbon/human/M as mob,
|
||||
living_mob_list |= list(M)
|
||||
M.emote("gasp")
|
||||
add_logs(M, M, "revived", object="strange reagent")
|
||||
hardset_dna(M, null, null, null, null, /datum/species/zombie)
|
||||
..()
|
||||
return
|
||||
datum/reagent/strange_reagent/on_mob_life(var/mob/living/M as mob)
|
||||
|
||||
@@ -920,6 +920,7 @@ obj/machinery/computer/pandemic/proc/replicator_cooldown(var/waittime)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list("ketchup" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/corn = list("cornoil" = 0),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat = list("flour" = -5),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/oat = list("flour" = -5),
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries = list("cherryjelly" = 0),
|
||||
|
||||
//Grinder stuff, but only if dry
|
||||
|
||||
@@ -67,6 +67,7 @@ datum/reagent/blob/lung_destroying_toxin
|
||||
datum/reagent/blob/lung_destroying_toxin/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume,var/show_message = 1)
|
||||
if(method == TOUCH)
|
||||
M.apply_damage(20, OXY)
|
||||
M.losebreath += 15
|
||||
M.apply_damage(20, TOX)
|
||||
if(show_message)
|
||||
M << "<span class = 'userdanger'>The blob strikes you, and your lungs feel heavy and weak!</span>"
|
||||
@@ -95,13 +96,11 @@ datum/reagent/blob/radioactive_liquid/reaction_mob(var/mob/living/M as mob, var/
|
||||
if(method == TOUCH)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
M.apply_damage(10, BRUTE)
|
||||
M.apply_effect(10,IRRADIATE,0)
|
||||
M.apply_effect(40,IRRADIATE,0) // irradiate the shit out of these fuckers
|
||||
if(prob(33))
|
||||
randmuti(M)
|
||||
if(prob(98))
|
||||
randmutb(M)
|
||||
else
|
||||
randmutg(M)
|
||||
domutcheck(M, null)
|
||||
updateappearance(M)
|
||||
if(show_message)
|
||||
|
||||
@@ -261,10 +261,12 @@ datum/reagent/water/reaction_turf(var/turf/simulated/T, var/volume)
|
||||
G.temperature = max(min(G.temperature-(CT*1000),G.temperature/CT),0)
|
||||
G.react()
|
||||
qdel(hotspot)
|
||||
T.color = initial(T.color)
|
||||
return
|
||||
|
||||
datum/reagent/water/reaction_obj(var/obj/O, var/volume)
|
||||
src = null
|
||||
O.color = initial(O.color)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
|
||||
if(!cube.wrapped)
|
||||
@@ -274,6 +276,7 @@ datum/reagent/water/reaction_obj(var/obj/O, var/volume)
|
||||
datum/reagent/water/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with water can help put them out!
|
||||
if(!istype(M, /mob/living))
|
||||
return
|
||||
M.color = initial(M.color)
|
||||
if(method == TOUCH)
|
||||
M.adjust_fire_stacks(-(volume / 10))
|
||||
if(M.fire_stacks <= 0)
|
||||
|
||||
+2
-1
@@ -315,9 +315,10 @@ datum/reagent/consumable/ethanol/beepsky_smash
|
||||
description = "Deny drinking this and prepare for THE LAW."
|
||||
color = "#664300" // rgb: 102, 67, 0
|
||||
boozepwr = 25
|
||||
metabolization_rate = 0.8
|
||||
|
||||
datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(var/mob/living/M as mob)
|
||||
M.Stun(2)
|
||||
M.Stun(1)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -55,12 +55,6 @@ datum/reagent/consumable/sugar
|
||||
metabolization_rate = 2 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 200 // Hyperglycaemic shock
|
||||
|
||||
datum/reagent/consumable/sugar/on_mob_life(var/mob/living/M as mob)
|
||||
if(M.satiety > -200)
|
||||
M.satiety -= 20 //eating sugar makes you more hungry over time by making your hunger drop faster.
|
||||
M.nutrition += max(((NUTRITION_LEVEL_FED + 50) - M.nutrition )/100, 0) * nutriment_factor // sugar doesn't help your hunger if your stomach is nearly full
|
||||
holder.remove_reagent(src.id, metabolization_rate)
|
||||
|
||||
datum/reagent/consumable/sugar/overdose_start(var/mob/living/M as mob)
|
||||
M << "<span class = 'userdanger'>You go into hyperglycaemic shock! Lay off the twinkies!</span>"
|
||||
M.sleeping += 30
|
||||
@@ -378,7 +372,7 @@ datum/reagent/consumable/hell_ramen/on_mob_life(var/mob/living/M as mob)
|
||||
return
|
||||
|
||||
datum/reagent/consumable/flour
|
||||
name = "flour"
|
||||
name = "Flour"
|
||||
id = "flour"
|
||||
description = "This is what you rub all over yourself to pretend to be a ghost."
|
||||
reagent_state = SOLID
|
||||
@@ -395,3 +389,18 @@ datum/reagent/consumable/cherryjelly
|
||||
description = "Totally the best. Only to be spread on foods with excellent lateral symmetry."
|
||||
color = "#801E28" // rgb: 128, 30, 40
|
||||
|
||||
datum/reagent/consumable/rice
|
||||
name = "Rice"
|
||||
id = "rice"
|
||||
description = "tiny nutritious grains"
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
color = "#FFFFFF" // rgb: 0, 0, 0
|
||||
|
||||
datum/reagent/consumable/vanilla
|
||||
name = "Vanilla Powder"
|
||||
id = "vanilla"
|
||||
description = "A fatty, bitter paste made from vanilla pods."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#FFFACD"
|
||||
|
||||
@@ -77,3 +77,21 @@
|
||||
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/egg)) //making dough
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/egg/E = W
|
||||
if(flags & OPENCONTAINER)
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("flour"))
|
||||
if(reagents.get_reagent_amount("flour") >= 15)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/S = new /obj/item/weapon/reagent_containers/food/snacks/dough(get_turf(src))
|
||||
user << "<span class='notice'>You mix egg and flour to make some dough.</span>"
|
||||
reagents.remove_reagent("flour", 15)
|
||||
if(E.reagents)
|
||||
E.reagents.trans_to(S,E.reagents.total_volume)
|
||||
qdel(E)
|
||||
else
|
||||
user << "<span class='notice'>Not enough flour to make dough.</span>"
|
||||
return
|
||||
..()
|
||||
@@ -88,6 +88,21 @@
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/attackby(var/obj/item/I, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
|
||||
return
|
||||
var/hotness = is_hot(I)
|
||||
if(hotness)
|
||||
var/added_heat = (hotness / 100) //ishot returns a temperature
|
||||
if(reagents)
|
||||
if(reagents.chem_temp < hotness) //can't be heated to be hotter than the source
|
||||
reagents.chem_temp += added_heat
|
||||
user << "<span class='notice'>You heat [src] with [I].</span>"
|
||||
reagents.handle_reactions()
|
||||
else
|
||||
user << "<span class='warning'>[src] is already hotter than [I].</span>"
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
@@ -211,3 +226,5 @@
|
||||
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
/obj/item/weapon/reagent_containers/spray/waterflower
|
||||
name = "water flower"
|
||||
desc = "A seemingly innocent sunflower...with a twist."
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
item_state = "sunflower"
|
||||
amount_per_transfer_from_this = 1
|
||||
@@ -194,7 +194,7 @@
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone // -- Skie
|
||||
name = "Plant-B-Gone"
|
||||
desc = "Kills those pesky weeds!"
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbgone"
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
|
||||
@@ -98,6 +98,8 @@
|
||||
..()
|
||||
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
|
||||
if((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))
|
||||
if(Proj.nodamage)
|
||||
return
|
||||
message_admins("[key_name_admin(Proj.firer)] triggered a fueltank explosion.")
|
||||
log_game("[key_name(Proj.firer)] triggered a fueltank explosion.")
|
||||
explosion(src.loc,-1,0,2, flame_range = 2)
|
||||
|
||||
@@ -328,8 +328,8 @@
|
||||
R.delete()
|
||||
ejectItem(TRUE)
|
||||
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
|
||||
visible_message("<span class='notice'>[src]'s chemical chamber has sprung a leak!.</span>")
|
||||
chosenchem = pick("mutationtoxin","nanomachines","xenomicrobes")
|
||||
visible_message("<span class='danger'>[src]'s chemical chamber has sprung a leak!</span>")
|
||||
chosenchem = pick("mutationtoxin","nanomachines","sacid")
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
R.my_atom = src
|
||||
R.add_reagent(chosenchem , 50)
|
||||
@@ -720,4 +720,4 @@
|
||||
/obj/item/weapon/relic/proc/warn_admins(var/mob/user, var/RelicType)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[RelicType] relic activated by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
|
||||
log_game("[RelicType] relic used by [user.ckey]([user]) in ([T.x],[T.y],[T.z])")
|
||||
log_game("[RelicType] relic used by [user.ckey]([user]) in ([T.x],[T.y],[T.z])")
|
||||
|
||||
Reference in New Issue
Block a user