# Conflicts:
#	code/game/gamemodes/events.dm
#	code/modules/awaymissions/bluespaceartillery.dm
This commit is contained in:
Markolie
2016-12-23 19:04:35 +01:00
361 changed files with 11075 additions and 10285 deletions
+21 -3
View File
@@ -1,6 +1,5 @@
var/global/BSACooldown = 0
var/global/floorIsLava = 0
var/global/nologevent = 0
////////////////////////////////
@@ -540,9 +539,9 @@ var/global/nologevent = 0
world.Reboot("Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key].", "end_error", "admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]", delay)
/datum/admins/proc/announce()
set category = "Special Verbs"
set category = "Admin"
set name = "Announce"
set desc="Announce your desires to the world"
set desc = "Announce your desires to the world"
if(!check_rights(R_ADMIN))
return
@@ -1002,3 +1001,22 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
qdel(frommob)
return 1
// Returns a list of the number of admins in various categories
// result[1] is the number of staff that match the rank mask and are active
// result[2] is the number of staff that do not match the rank mask
// result[3] is the number of staff that match the rank mask and are inactive
/proc/staff_countup(rank_mask = R_BAN)
var/list/result = list(0, 0, 0)
for(var/client/X in admins)
if(rank_mask && !check_rights_for(X, rank_mask))
result[2]++
continue
if(X.holder.fakekey)
result[2]++
continue
if(X.is_afk())
result[3]++
continue
result[1]++
return result
+1 -1
View File
@@ -534,7 +534,7 @@ var/list/admin_verbs_snpc = list(
#undef AUTOBANTIME
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
set category = "Special Verbs"
set category = "Event"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."
+3 -2
View File
@@ -396,7 +396,8 @@
/proc/togglebuildmode(mob/M as mob in player_list)
set name = "Toggle Build Mode"
set category = "Special Verbs"
set category = "Event"
if(M.client)
if(istype(M.client.click_intercept,/datum/click_intercept/buildmode))
var/datum/click_intercept/buildmode/B = M.client.click_intercept
@@ -404,7 +405,7 @@
log_admin("[key_name(usr)] has left build mode.")
else
new/datum/click_intercept/buildmode(M.client)
message_admins("[key_name(usr)] has entered build mode.")
message_admins("[key_name_admin(usr)] has entered build mode.")
log_admin("[key_name(usr)] has entered build mode.")
/datum/click_intercept/buildmode/InterceptClickOn(user,params,atom/object) //Click Intercept
+17 -28
View File
@@ -1597,11 +1597,11 @@
to_chat(usr, "This can only be used on instances of type /mob/living")
return
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
if(alert(owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
return
if(BSACooldown)
to_chat(src.owner, "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!")
to_chat(owner, "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!")
return
BSACooldown = 1
@@ -1609,28 +1609,23 @@
BSACooldown = 0
to_chat(M, "You've been hit by bluespace artillery!")
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [key_name(src.owner)]")
message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [key_name_admin(src.owner)]")
var/obj/effect/stop/S
S = new /obj/effect/stop
S.victim = M
S.loc = M.loc
spawn(20)
qdel(S)
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [key_name(owner)]")
message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [key_name_admin(owner)]")
var/turf/simulated/floor/T = get_turf(M)
if(istype(T))
if(prob(80)) T.break_tile_to_plating()
else T.break_tile()
if(prob(80))
T.break_tile_to_plating()
else
T.break_tile()
if(M.health == 1)
if(M.health <= 1)
M.gib()
else
M.adjustBruteLoss( min( 99 , (M.health - 1) ) )
M.adjustBruteLoss(min(99,(M.health - 1)))
M.Stun(20)
M.Weaken(20)
M.stuttering = 20
M.Stuttering(20)
else if(href_list["CentcommReply"])
if(!check_rights(R_ADMIN))
@@ -2240,14 +2235,6 @@
qdel(O)
for(var/obj/structure/grille/O in world)
qdel(O)
/* for(var/obj/machinery/vehicle/pod/O in world)
for(var/mob/M in src)
M.loc = src.loc
if(M.client)
M.client.perspective = MOB_PERSPECTIVE
M.client.eye = M
qdel(O)
ok = 1*/
if("monkey")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
@@ -2491,18 +2478,20 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LO")
message_admins("[key_name_admin(usr)] has broke a lot of lights", 1)
lightsout(1,2)
var/datum/event/electrical_storm/E = new /datum/event/electrical_storm
E.lightsoutAmount = 2
if("blackout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BO")
message_admins("[key_name_admin(usr)] broke all lights", 1)
lightsout(0,0)
for(var/obj/machinery/light/L in machines)
L.broken()
if("whiteout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","WO")
for(var/obj/machinery/light/L in world)
L.fix()
message_admins("[key_name_admin(usr)] fixed all lights", 1)
for(var/obj/machinery/light/L in machines)
L.fix()
if("floorlava")
feedback_inc("admin_secrets_fun_used", 1)
feedback_add_details("admin_secrets_fun_used", "LF")
+1 -1
View File
@@ -24,7 +24,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(!msg)
return
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN))
return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
+1 -1
View File
@@ -99,7 +99,7 @@
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN))
return
//clean the message if it's not sent by a high-rank admin
+2 -2
View File
@@ -1,5 +1,5 @@
/client/proc/cmd_admin_say(msg as text)
set category = "Special Verbs"
set category = "Admin"
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set hidden = 1
if(!check_rights(R_ADMIN)) return
@@ -17,7 +17,7 @@
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_mentor_say(msg as text)
set category = "Special Verbs"
set category = "Admin"
set name = "Msay"
set hidden = 1
+1 -1
View File
@@ -1,5 +1,5 @@
/client/proc/dsay(msg as text)
set category = "Special Verbs"
set category = "Admin"
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
set hidden = 1
+13 -10
View File
@@ -7,13 +7,15 @@
////////////////////////////////////////////////////////////////////////////////
var/global/list/frozen_mob_list = list()
/client/proc/freeze(var/mob/living/M as mob in mob_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Freeze"
if(!holder)
to_chat(src, "<font color='red'>Error: Freeze: Only administrators may use this command.</font>")
if(!check_rights(R_ADMIN))
return
if(!istype(M)) return
if(!check_rights(R_ADMIN)) return
if(!istype(M))
return
if(M in frozen_mob_list)
M.admin_unFreeze(src)
else
@@ -83,14 +85,15 @@ var/global/list/frozen_mob_list = list()
//////////////////////////Freeze Mech
/client/proc/freezemecha(var/obj/mecha/O as obj in mechas_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Freeze Mech"
if(!holder)
to_chat(src, "Only administrators may use this command.")
return
if(!check_rights(R_ADMIN))
return
var/obj/mecha/M = O
if(!istype(M,/obj/mecha))
to_chat(src, "<span class='danger'>This can only be used on Mechs!</span>")
to_chat(src, "<span class='danger'>This can only be used on mechs!</span>")
return
else
if(usr)
@@ -21,8 +21,8 @@ var/global/sent_syndicate_infiltration_team = 0
var/pick_manually = 0
if(alert("Pick the team members manually? If you select yes, you pick from ghosts. If you select no, ghosts get offered the chance to join.",,"Yes","No")=="Yes")
pick_manually = 1
var/list/teamsizeoptions = list(1,2,3,4,5)
var/teamsize = input(src, "How many team members, not counting the team leader?") as null|anything in teamsizeoptions
var/list/teamsizeoptions = list(2,3,4,5,6)
var/teamsize = input(src, "How many team members, including the team leader?") as null|anything in teamsizeoptions
if(!(teamsize in teamsizeoptions))
alert("Invalid team size specified. Aborting.")
return
@@ -102,11 +102,11 @@ var/global/sent_syndicate_infiltration_team = 0
to_chat(new_syndicate_infiltrator, "<span class='danger'>As team leader, it is up to you to organize your team! Give the job to someone else if you can't handle it. Only your ID opens the exit door.</span>")
else
to_chat(new_syndicate_infiltrator, "<span class='danger'>Your team leader is: [team_leader]. They are in charge!</span>")
teamsize--
teamsize--
to_chat(new_syndicate_infiltrator, "<span class='notice'>You have more helpful information stored in your Notes.</span>")
new_syndicate_infiltrator.mind.store_memory("<B>Mission:</B> [input] ")
new_syndicate_infiltrator.mind.store_memory("<B>Team Leader:</B> [team_leader] ")
new_syndicate_infiltrator.mind.store_memory("<B>Starting Equipment:</B> <BR>- Chameleon Jumpsuit ((right click to Change Color))<BR> - Agent ID card ((disguise as another job))<BR> - Uplink Implant ((top left of screen)) <BR> - Dust Implant ((destroys your body on death)) <BR> - Combat Gloves ((insulated, disguised as black gloves)) <BR> - Anything bought with your uplink implant")
new_syndicate_infiltrator.mind.store_memory("<B>Starting Equipment:</B> <BR>- Syndicate Headset ((.h for your radio))<BR>- Chameleon Jumpsuit ((right click to Change Color))<BR> - Agent ID card ((disguise as another job))<BR> - Uplink Implant ((top left of screen)) <BR> - Dust Implant ((destroys your body on death)) <BR> - Combat Gloves ((insulated, disguised as black gloves)) <BR> - Anything bought with your uplink implant")
var/datum/atom_hud/antag/opshud = huds[ANTAG_HUD_OPS]
opshud.join_hud(new_syndicate_infiltrator.mind.current)
ticker.mode.set_antag_hud(new_syndicate_infiltrator.mind.current, "hudoperative")
@@ -145,8 +145,7 @@ var/global/sent_syndicate_infiltration_team = 0
var/datum/preferences/A = new() //Randomize appearance
A.real_name = syndicate_infiltrator_name
A.copy_to(new_syndicate_infiltrator)
new_syndicate_infiltrator.dna.ready_dna(new_syndicate_infiltrator) //Creates DNA.
new_syndicate_infiltrator.dna.ready_dna(new_syndicate_infiltrator)
//Creates mind stuff.
new_syndicate_infiltrator.mind_initialize()
@@ -154,7 +153,6 @@ var/global/sent_syndicate_infiltration_team = 0
new_syndicate_infiltrator.mind.special_role = "Syndicate Infiltrator"
ticker.mode.traitors |= new_syndicate_infiltrator.mind //Adds them to extra antag list
new_syndicate_infiltrator.equip_syndicate_infiltrator(syndicate_leader_selected, uplink_tc, is_mgmt)
qdel(spawn_location)
return new_syndicate_infiltrator
// ---------------------------------------------------------------------------------------------------------
@@ -180,9 +178,6 @@ var/global/sent_syndicate_infiltration_team = 0
U.hidden_uplink.uses = 500
else
U.hidden_uplink.uses = num_tc
// Storage
//var/obj/item/weapon/implant/storage/T = new /obj/item/weapon/implant/storage(src)
//T.implant(src)
// Dust
var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(src)
D.implant(src)
@@ -196,7 +191,7 @@ var/global/sent_syndicate_infiltration_team = 0
// Other gear
equip_to_slot_or_del(new /obj/item/clothing/shoes/syndigaloshes(src), slot_shoes)
var/obj/item/weapon/card/id/syndicate/W = new(src) //Untrackable by AI
var/obj/item/weapon/card/id/syndicate/W = new(src)
if (flag_mgmt)
W.icon_state = "commander"
else
+6 -2
View File
@@ -269,8 +269,12 @@ client/proc/one_click_antag()
return 1
/datum/admins/proc/makeAliens()
alien_infestation(3)
return 1
var/datum/event/alien_infestation/E = new /datum/event/alien_infestation
E.spawncount = 3
// TODO The fact we have to do this rather than just have events start
// when we ask them to, is bad.
E.processing = TRUE
return TRUE
/*
/datum/admins/proc/makeSpaceNinja()
+1 -1
View File
@@ -9,7 +9,7 @@
if(usr.client.prefs.muted & MUTE_PRAY)
to_chat(usr, "\red You cannot pray (muted).")
return
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
if(client.handle_spam_prevention(msg, MUTE_PRAY, OOC_COOLDOWN))
return
var/image/cross = image('icons/obj/storage.dmi',"bible")
+9 -9
View File
@@ -139,7 +139,7 @@
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Godmode"
if(!check_rights(R_ADMIN))
@@ -287,7 +287,7 @@ Works kind of like entering the game with a new character. Character receives a
Traitors and the like can also be revived with the previous role mostly intact.
/N */
/client/proc/respawn_character()
set category = "Special Verbs"
set category = "Event"
set name = "Respawn Character"
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
@@ -520,7 +520,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)
set category = "Special Verbs"
set category = "Event"
set name = "Rejuvenate"
if(!check_rights(R_REJUVINATE))
@@ -659,7 +659,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in view())
set category = "Special Verbs"
set category = "Event"
set name = "EM Pulse"
if(!check_rights(R_DEBUG|R_EVENT))
@@ -682,7 +682,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
/client/proc/cmd_admin_gib(mob/M as mob in mob_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Gib"
if(!check_rights(R_ADMIN|R_EVENT))
@@ -722,7 +722,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Check Contents"
if(!check_rights(R_ADMIN))
@@ -734,7 +734,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_view_range()
set category = "Special Verbs"
set category = "Admin"
set name = "Change View Range"
set desc = "switches between 1x and custom views"
@@ -806,7 +806,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("[key_name_admin(usr)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
set category = "Special Verbs"
set category = "Admin"
set name = "Attack Log"
if(!check_rights(R_ADMIN))
@@ -875,7 +875,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Reset Telecomms Scripts"
set desc = "Blanks all telecomms scripts from all telecomms servers"
if(!check_rights(R_ADMIN, 1, src))
if(!check_rights(R_ADMIN))
return
var/confirm = alert(src, "You sure you want to blank all NTSL scripts?", "Confirm", "Yes", "No")
+18 -16
View File
@@ -7,18 +7,26 @@
var/last_fire = 0
var/reload_cooldown = 180 // 3 minute cooldown
var/area/targetarea
light_color = LIGHT_COLOR_LIGHTBLUE
/obj/machinery/computer/artillerycontrol/attack_ai(user as mob)
to_chat(user, "<span class='warning'>Access denied.</span>")
return
/obj/machinery/computer/artillerycontrol/attack_hand(user as mob)
ui_interact(user)
/obj/machinery/computer/artillerycontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "bluespace_artillery.tmpl", "Bluespace Control", 400, 260)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/artillerycontrol/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
var/time_to_wait = round(reload_cooldown - ((world.time / 10) - last_fire), 1)
var/mins = round(time_to_wait / 60)
var/seconds = time_to_wait - (60*mins)
@@ -30,32 +38,26 @@
else
data["target"] = "No Lock"
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
return data
if(!ui)
ui = new(user, src, ui_key, "bluespace_artillery.tmpl", "Bluespace Control", 400, 260)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/computer/artillerycontrol/Topic(href, href_list)
if(..())
return 1
if(href_list["area"])
if(href_list["area"])
var/A
A = input("Select the target area.", "Select Area", A) in ghostteleportlocs|null
var/area/thearea = ghostteleportlocs[A]
if(..() || !istype(thearea))
return
targetarea = thearea
if(href_list["fire"])
var/delta = (world.time / 10) - last_fire
if(reload_cooldown > delta)
return 1
event_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
var/list/L = list()
@@ -64,7 +66,7 @@
var/loc = pick(L)
explosion(loc,2,5,11)
last_fire = world.time / 10
nanomanager.update_uis(src)
/obj/structure/artilleryplaceholder
+7 -3
View File
@@ -4,8 +4,9 @@
////////////////
var/datum/admins/holder = null
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
var/last_message = "" //contains the last message sent by this client - used to protect against copy-paste spamming.
var/last_message_count = 0 //contains a number of how many times a message identical to last_message was sent.
var/last_message_time = 0 //holds the last time (based on world.time) a message was sent
/////////
//OTHER//
@@ -88,4 +89,7 @@
// Their chat window, sort of important.
// See /goon/code/datums/browserOutput.dm
var/datum/chatOutput/chatOutput
var/datum/chatOutput/chatOutput
// Donator stuff.
var/donator_level = DONATOR_LEVEL_NONE
+37 -12
View File
@@ -233,19 +233,25 @@
return 0
return 1
/client/proc/handle_spam_prevention(var/message, var/mute_type)
if(config.automute_on && !holder && src.last_message == message)
src.last_message_count++
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
to_chat(src, "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied.")
cmd_admin_mute(src.mob, mute_type, 1)
/client/proc/handle_spam_prevention(var/message, var/mute_type, var/throttle = 0)
if(throttle)
if((last_message_time + throttle > world.time) && !check_rights(R_ADMIN, 0))
var/wait_time = round(((last_message_time + throttle) - world.time) / 10, 1)
to_chat(src, "<span class='danger'>You are sending messages to quickly. Please wait [wait_time] [wait_time == 1 ? "second" : "seconds"] before sending another message.</span>")
return 1
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
to_chat(src, "\red You are nearing the spam filter limit for identical messages.")
last_message_time = world.time
if(config.automute_on && !check_rights(R_ADMIN, 0) && last_message == message)
last_message_count++
if(last_message_count >= SPAM_TRIGGER_AUTOMUTE)
to_chat(src, "<span class='danger'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>")
cmd_admin_mute(mob, mute_type, 1)
return 1
if(last_message_count >= SPAM_TRIGGER_WARNING)
to_chat(src, "<span class='danger'>You are nearing the spam filter limit for identical messages.</span>")
return 0
else
last_message = message
src.last_message_count = 0
last_message_count = 0
return 0
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
@@ -299,6 +305,8 @@
admins += src
holder.owner = src
donator_check()
//preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum)
prefs = preferences_datums[ckey]
if(!prefs)
@@ -372,10 +380,27 @@
return ..()
/client/proc/donator_check()
if(IsGuestKey(key))
return
establish_db_connection()
if(!dbcon.IsConnected())
return
//Donator stuff.
var/DBQuery/query_donor_select = dbcon.NewQuery("SELECT ckey, tier, active FROM `[format_table_name("donators")]` WHERE ckey = '[ckey]'")
query_donor_select.Execute()
while(query_donor_select.NextRow())
if(!text2num(query_donor_select.item[3]))
// Inactive donator.
donator_level = DONATOR_LEVEL_NONE
return
donator_level = text2num(query_donor_select.item[2])
break
/client/proc/log_client_to_db()
if( IsGuestKey(src.key) )
if(IsGuestKey(key))
return
establish_db_connection()
@@ -412,7 +437,7 @@
var/watchreason = check_watchlist(ckey)
if(watchreason)
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is on the watchlist and has just connected - Reason: [watchreason]</font>")
send2adminirc("Watchlist - [key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]")
send2irc(config.admin_notify_irc, "Watchlist - [key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]")
//Just the standard check to see if it's actually a number
if(sql_id)
@@ -4,6 +4,7 @@ var/list/gear_datums = list()
/datum/loadout_category
var/category = ""
var/list/gear = list()
var/donor_only = FALSE
/datum/loadout_category/New(cat)
category = cat
@@ -33,6 +34,8 @@ var/list/gear_datums = list()
if(!loadout_categories[use_category])
loadout_categories[use_category] = new /datum/loadout_category(use_category)
var/datum/loadout_category/LC = loadout_categories[use_category]
if(initial(G.donor_only))
LC.donor_only = TRUE
gear_datums[use_name] = new geartype
LC.gear[use_name] = gear_datums[use_name]
@@ -54,6 +57,7 @@ var/list/gear_datums = list()
var/list/gear_tweaks = list() //List of datums which will alter the item after it has been spawned.
var/subtype_path = /datum/gear //for skipping organizational subtypes (optional)
var/subtype_cost_overlap = TRUE //if subtypes can take points at the same time
var/donor_only = FALSE // if it's only available to donors
/datum/gear/New()
..()
@@ -76,4 +80,4 @@ var/list/gear_datums = list()
var/item = new gd.path(gd.location)
for(var/datum/gear_tweak/gt in gear_tweaks)
gt.tweak_item(item, metadata["[gt]"])
return item
return item
@@ -0,0 +1,90 @@
/datum/gear/donor
donor_only = TRUE
sort_category = "Donor"
subtype_path = /datum/gear/donor
/datum/gear/donor/furgloves
display_name = "Fur Gloves"
path = /obj/item/clothing/gloves/furgloves
/datum/gear/donor/furboots
display_name = "Fur Boots"
path = /obj/item/clothing/shoes/furboots
/datum/gear/donor/noble_boot
display_name = "Noble Boots"
path = /obj/item/clothing/shoes/fluff/noble_boot
/datum/gear/donor/furcape
display_name = "Fur Cape"
path = /obj/item/clothing/suit/furcape
cost = 2
/datum/gear/donor/furcoat
display_name = "Fur Coat"
path = /obj/item/clothing/suit/furcoat
cost = 2
/datum/gear/donor/lord_admiral
display_name = "Lord Admiral Coat"
path = /obj/item/clothing/suit/lordadmiral
/datum/gear/donor/lord_admiral_hat
display_name = "Lord Admiral Hat"
path = /obj/item/clothing/head/lordadmiralhat
/datum/gear/donor/kamina
display_name = "Spiky Orange-tinted Shades"
path = /obj/item/clothing/glasses/fluff/kamina
/datum/gear/donor/green
display_name = "Spiky Green-tinted Shades"
path = /obj/item/clothing/glasses/fluff/kamina/green
/datum/gear/donor/hipster
display_name = "Hipster Glasses"
path = /obj/item/clothing/glasses/regular/hipster
/datum/gear/donor/threedglasses
display_name = "Threed Glasses"
path = /obj/item/clothing/glasses/threedglasses
/datum/gear/donor/blacksombrero
display_name = "Black Sombrero"
path = /obj/item/clothing/head/fluff/blacksombrero
/datum/gear/donor/guardhelm
display_name = "Plastic Guard helm"
path = /obj/item/clothing/head/fluff/guardhelm
/datum/gear/donor/goldtophat
display_name = "Gold-trimmed Top Hat"
path = /obj/item/clothing/head/fluff/goldtophat
/datum/gear/donor/goldtophat/red
display_name = "Red Gold-trimmed Top Hat"
path = /obj/item/clothing/head/fluff/goldtophat/red
/datum/gear/donor/goldtophat/blue
display_name = "Blue Gold-trimmed Top Hat"
path = /obj/item/clothing/head/fluff/goldtophat/blue
/datum/gear/donor/mushhat
display_name = "Mushroom Hat"
path = /obj/item/clothing/head/fluff/mushhat
/datum/gear/donor/furcap
display_name = "Fur Cap"
path = /obj/item/clothing/head/furcap
/datum/gear/donor/mouse
display_name = "Mouse Headband"
path = /obj/item/clothing/head/kitty/mouse
/datum/gear/donor/fawkes
display_name = "Guy Fawkes mask"
path = /obj/item/clothing/mask/fawkes
/datum/gear/donor/noble_clothes
display_name = "Noble Clothes"
path = /obj/item/clothing/under/noble_clothes
+56 -36
View File
@@ -61,7 +61,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
#define MAX_SAVE_SLOTS 20 // Save slots for regular players
#define MAX_SAVE_SLOTS_MEMBER 20 // Save slots for BYOND members
#define MAX_GEAR_COST config.max_loadout_points
#define TAB_CHAR 0
#define TAB_GAME 1
@@ -73,6 +72,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
// var/savefile_version = 0
var/max_save_slots = MAX_SAVE_SLOTS
var/max_gear_slots = 0
//non-preference stuff
var/warns = 0
@@ -212,11 +212,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
/datum/preferences/New(client/C)
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
max_gear_slots = config.max_loadout_points
if(istype(C))
if(!IsGuestKey(C.key))
unlock_content = C.IsByondMember()
if(unlock_content)
max_save_slots = MAX_SAVE_SLOTS_MEMBER
if(C.donator_level >= DONATOR_LEVEL_ONE)
max_gear_slots += 5
var/loaded_preferences_successfully = load_preferences(C)
if(loaded_preferences_successfully)
if(load_character(C))
@@ -249,7 +254,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
switch(current_tab)
if(TAB_CHAR) // Character Settings
dat += "<div class='statusDisplay' style='max-width: 128px; position: absolute; left: 150px; top: 150px'><img src=previewicon.png height=64 width=64><img src=previewicon2.png height=64 width=64></div>"
dat += "<div class='statusDisplay' style='max-width: 128px; position: absolute; left: 150px; top: 150px'><img src=previewicon.png class='charPreview'><img src=previewicon2.png class='charPreview'></div>"
dat += "<table width='100%'><tr><td width='405px' height='25px' valign='top'>"
dat += "<b>Name: </b>"
dat += "<a href='?_src_=prefs;preference=name;task=input'><b>[real_name]</b></a>"
@@ -428,6 +433,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "<b>OOC notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'><b>Edit</b></a><br>"
if(unlock_content)
dat += "<b>BYOND Membership Publicity:</b> <a href='?_src_=prefs;preference=publicity'><b>[(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
if(user.client.donator_level >= DONATOR_LEVEL_ONE)
dat += "<b>Donator Publicity:</b> <a href='?_src_=prefs;preference=donor_public'><b>[(toggles & DONATOR_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
dat += "<b>Randomized character slot:</b> <a href='?_src_=prefs;preference=randomslot'><b>[randomslot ? "Yes" : "No"]</b></a><br>"
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]</b></a><br>"
@@ -464,14 +471,18 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
total_cost += G.cost
var/fcolor = "#3366CC"
if(total_cost < MAX_GEAR_COST)
if(total_cost < max_gear_slots)
fcolor = "#E67300"
dat += "<table align='center' width='100%'>"
dat += "<tr><td colspan=4><center><b><font color='[fcolor]'>[total_cost]/[MAX_GEAR_COST]</font> loadout points spent.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
dat += "<tr><td colspan=4><center><b><font color='[fcolor]'>[total_cost]/[max_gear_slots]</font> loadout points spent.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
dat += "<tr><td colspan=4><center><b>"
var/firstcat = 1
for(var/category in loadout_categories)
var/datum/loadout_category/LC = loadout_categories[category]
if(LC.donor_only)
if(user.client.donator_level < DONATOR_LEVEL_TWO) // level two donators get the donator loadout, so don't show it to anyone with less than that
continue
if(firstcat)
firstcat = 0
else
@@ -1097,6 +1108,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(TG.display_name in gear)
gear -= TG.display_name
else
if(TG.donor_only)
if(user.client.donator_level < DONATOR_LEVEL_TWO) // donator items are locked to > tier 2
//they normally can't even get this far- but just in case of href exploits, we check them here
return
var/total_cost = 0
var/list/type_blacklist = list()
for(var/gear_name in gear)
@@ -1108,7 +1123,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
type_blacklist += G.subtype_path
total_cost += G.cost
if((total_cost + TG.cost) <= MAX_GEAR_COST)
if((total_cost + TG.cost) <= max_gear_slots)
gear += TG.display_name
else if(href_list["gear"] && href_list["tweak"])
@@ -1875,6 +1890,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(unlock_content)
toggles ^= MEMBER_PUBLIC
if("donor_public")
if(user.client.donator_level >= DONATOR_LEVEL_ONE)
toggles ^= DONATOR_PUBLIC
if("gender")
if(gender == MALE)
gender = FEMALE
@@ -2079,37 +2098,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
I.robotize()
character.dna.b_type = b_type
if(disabilities & DISABILITY_FLAG_FAT && character.species.flags & CAN_BE_FAT)
character.dna.SetSEState(FATBLOCK,1,1)
character.mutations += FAT
character.mutations += OBESITY
character.overeatduration = 600
if(disabilities & DISABILITY_FLAG_NEARSIGHTED)
character.dna.SetSEState(GLASSESBLOCK,1,1)
character.disabilities|=NEARSIGHTED
if(disabilities & DISABILITY_FLAG_EPILEPTIC)
character.dna.SetSEState(EPILEPSYBLOCK,1,1)
character.disabilities|=EPILEPSY
if(disabilities & DISABILITY_FLAG_DEAF)
character.dna.SetSEState(DEAFBLOCK,1,1)
character.disabilities|=DEAF
if(disabilities & DISABILITY_FLAG_BLIND)
character.dna.SetSEState(BLINDBLOCK,1,1)
character.disabilities|=BLIND
if(disabilities & DISABILITY_FLAG_MUTE)
character.dna.SetSEState(MUTEBLOCK,1,1)
character.disabilities |= MUTE
S.handle_dna(character)
if(character.dna.dirtySE)
character.dna.UpdateSE()
domutcheck(character)
// Wheelchair necessary?
var/obj/item/organ/external/l_foot = character.get_organ("l_foot")
@@ -2150,6 +2138,38 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
character.change_eye_color(r_eyes, g_eyes, b_eyes)
if(disabilities & DISABILITY_FLAG_FAT && character.species.flags & CAN_BE_FAT)
character.dna.SetSEState(FATBLOCK,1,1)
character.mutations += FAT
character.mutations += OBESITY
character.overeatduration = 600
if(disabilities & DISABILITY_FLAG_NEARSIGHTED)
character.dna.SetSEState(GLASSESBLOCK,1,1)
character.disabilities |= NEARSIGHTED
if(disabilities & DISABILITY_FLAG_EPILEPTIC)
character.dna.SetSEState(EPILEPSYBLOCK,1,1)
character.disabilities |= EPILEPSY
if(disabilities & DISABILITY_FLAG_DEAF)
character.dna.SetSEState(DEAFBLOCK,1,1)
character.disabilities |= DEAF
if(disabilities & DISABILITY_FLAG_BLIND)
character.dna.SetSEState(BLINDBLOCK,1,1)
character.disabilities |= BLIND
if(disabilities & DISABILITY_FLAG_MUTE)
character.dna.SetSEState(MUTEBLOCK,1,1)
character.disabilities |= MUTE
S.handle_dna(character)
if(character.dna.dirtySE)
character.dna.UpdateSE()
domutcheck(character, null, MUTCHK_FORCED)
character.dna.ready_dna(character, flatten_SE = 0)
character.sync_organ_dna(assimilate=1)
character.UpdateAppearance()
+3 -1
View File
@@ -151,6 +151,8 @@
var/emagged = 0
var/vision_flags = 0
var/darkness_view = 0//Base human is 2
var/invis_override = 0
var/invis_view = SEE_INVISIBLE_LIVING
var/invisa_view = 0
var/color_view = null//overrides client.color while worn
strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets
@@ -343,6 +345,7 @@ BLIND // can't see anything
src.loc = user
user.wear_mask = null
user.put_in_hands(src)
H.wear_mask_update(src, toggle_off = mask_adjusted)
usr.update_inv_wear_mask()
usr.update_inv_head()
for(var/X in actions)
@@ -707,4 +710,3 @@ BLIND // can't see anything
for(var/obj/item/clothing/accessory/A in accessories)
A.emp_act(severity)
..()
+3 -2
View File
@@ -6,7 +6,6 @@
//slot_flags = SLOT_EYES
//var/vision_flags = 0
//var/darkness_view = 0//Base human is 2
//var/invisa_view = 0
var/prescription = 0
var/prescription_upgradable = 0
var/see_darkness = 1
@@ -360,7 +359,9 @@
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
usr.update_inv_glasses()
var/mob/living/carbon/user = usr
user.update_inv_glasses()
user.update_tint()
for(var/X in actions)
var/datum/action/A = X
@@ -67,6 +67,8 @@
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
var/mob/living/carbon/C = usr
C.update_tint()
usr.update_inv_head() //so our mob-overlays update
for(var/X in actions)
+21
View File
@@ -0,0 +1,21 @@
/*
Donator Glasses Loadout for Patreon
*/
//Kamina shades
/obj/item/clothing/glasses/fluff/kamina
name = "Spiky Orange-tinted Shades"
desc = "Row row!"
icon_state = "gar"
item_state = "gar"
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
//Green Kamina shades
/obj/item/clothing/glasses/fluff/kamina/green
name = "Spiky Green-tinted Shades"
desc = "Fight the power!"
icon_state = "garm"
item_state = "garm"
+63
View File
@@ -0,0 +1,63 @@
/*
Donator Loadout for Patreon
*/
//mushroom hat
/obj/item/clothing/head/fluff/mushhat
name = "Mushroom Hat"
desc = "A horrifying display of Nanotrasen's ruthless pursuit in being the forefront of fashion. Or genocide."
icon_state = "mushhat"
item_state = "mushhat"
flags = BLOCKHAIR
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi'
)
//gold top hat and recolours
/obj/item/clothing/head/fluff/goldtophat
name = "Gold-trimmed Top Hat"
desc = "Poshness incarnate."
icon_state = "goldtophat"
item_state = "goldtophat"
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi'
)
/obj/item/clothing/head/fluff/goldtophat/blue
name = "Gold-trimmed Blue Top Hat"
desc = "Poshness incarnate. With blue."
icon_state = "goldtophatblue"
item_state = "goldtophatblue"
/obj/item/clothing/head/fluff/goldtophat/red
name = "Gold-trimmed Red Top Hat"
desc = "Poshness incarnate. With red."
icon_state = "goldtophatred"
item_state = "goldtophatred"
//medieval guard helm
/obj/item/clothing/head/fluff/guardhelm
name = "Plastic Guard helm"
desc = "A plastic re-creation of a medieval-era headwear worn by extremely bored recruits of the local army. Kintergarden only."
icon_state = "guardhelm"
item_state = "guardhelm"
flags = BLOCKHAIR
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi'
)
//black sombrero
/obj/item/clothing/head/fluff/blacksombrero
name = "Black sombrero"
desc = "A rare identifying hat of the infamous ancient renegade gang known as 'El Loco Pocos'"
icon_state = "blacksombrero"
item_state = "blacksombrero"
flags = BLOCKHAIR
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi'
)
+10 -13
View File
@@ -504,11 +504,18 @@
cell.use(cost*10)
return 1
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/nano_state = inventory_state)
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
if(!user)
return
var/list/data = list()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/weapon/rig/ui_data(mob/user, datum/topic_state/state = inventory_state)
var/data[0]
data["primarysystem"] = null
if(selected_module)
@@ -575,12 +582,7 @@
if(module_list.len)
data["modules"] = module_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/item/weapon/rig/update_icon(var/update_mob_icon)
@@ -936,11 +938,6 @@
if(wearer.notransform || !wearer.canmove)
return
if(locate(/obj/effect/stop/, wearer.loc))
for(var/obj/effect/stop/S in wearer.loc)
if(S.victim == wearer)
return
if(!wearer.lastarea)
wearer.lastarea = get_area(wearer.loc)
+1 -1
View File
@@ -77,7 +77,7 @@
user.unset_machine()
return null
user.reset_view(S.current)
user.reset_perspective(S.current)
return 1
/*
+5 -5
View File
@@ -237,7 +237,7 @@
computer.update_icon()
for(var/mob/living/L in viewers(1))
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
L.reset_view(null)
L.reset_perspective(null)
Reset()
@@ -245,7 +245,7 @@
current = null
for(var/mob/living/L in viewers(1))
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
L.reset_view(null)
L.reset_perspective(null)
interact()
if(!interactable())
@@ -265,7 +265,7 @@
return
if(computer.camnet.verify_machine(current))
usr.reset_view(current)
usr.reset_perspective(current)
if(world.time - last_camera_refresh > 50 || !camera_list)
last_camera_refresh = world.time
@@ -302,13 +302,13 @@
var/obj/machinery/camera/C = locate(href_list["show"])
if(istype(C) && C.status)
current = C
usr.reset_view(C)
usr.reset_perspective(C)
interact()
return
if("keyselect" in href_list)
current = null
usr.reset_view(null)
usr.reset_perspective(null)
key = input(usr,"Select a camera network key:", "Key Select", null) as null|anything in computer.list_files(/datum/file/camnet_key)
camera_list = null
update_icon()
+1 -1
View File
@@ -104,7 +104,7 @@
if(!auth)
dat += "<br><hr><dd><span class='notice'>Please authenticate with the server in order to show additional options.</span>"
else
dat += "<br><hr><dd><span class='warning'>Reg, #514 forbids sending messages to a Head of Staff containing Erotic Rendering Properties.</span>"
dat += "<br><hr><dd><span class='warning'>Reg, #514 forbids sending messages containing Erotic Rendering Properties.</span>"
//Message Logs
if(1)
+3 -4
View File
@@ -71,12 +71,11 @@
/obj/item/clothing/suit/armor/vest = 1,
/obj/item/robot_parts/l_leg = 1,
/obj/item/robot_parts/r_leg = 1,
/obj/item/stack/sheet/metal = 5,
/obj/item/stack/cable_coil = 5,
/obj/item/stack/sheet/metal = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/weapon/gun/energy/gun/advtaser = 1,
/obj/item/weapon/stock_parts/cell = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/robot_parts/r_arm = 1)
/obj/item/device/assembly/prox_sensor = 1)
tools = list(/obj/item/weapon/weldingtool, /obj/item/weapon/screwdriver)
time = 60
category = CAT_ROBOT
+32
View File
@@ -225,6 +225,28 @@
to_chat(target, "<span class='notice'>You comb your tail with the [src].</span>")
used = 1
/obj/item/device/fluff/cardgage_helmet_kit //captain cardgage: Richard Ulery
name = "welding helmet modkit"
desc = "Some spraypaint and a stencil, perfect for painting flames onto a welding helmet!"
icon_state = "modkit"
w_class = 2
force = 0
throwforce = 0
/obj/item/device/fluff/cardgage_helmet_kit/afterattack(atom/target, mob/user, proximity)
if(!proximity || !ishuman(user) || user.lying)
return
if(istype(target, /obj/item/clothing/head/welding))
to_chat(user, "<span class='notice'>You modify the appearance of [target].</span>")
var/obj/item/clothing/head/welding/flamedecal/P = new(get_turf(target))
transfer_fingerprints_to(P)
qdel(target)
qdel(src)
return
to_chat(user, "<span class='warning'>You can't modify [target]!</span>")
#define USED_MOD_HELM 1
#define USED_MOD_SUIT 2
@@ -424,6 +446,11 @@
/obj/item/clothing/head/hood/fluff/linda //Epic_Charger: Linda Clark
icon_state = "greenhood"
/obj/item/clothing/suit/armor/shodanscoat // RazekPraxis: SHODAN
name = "SHODAN's Captain's Coat"
desc = "A black coat with gold trim and an old US Chevron printed on the back. Edgy."
icon_state = "shodancoat"
//////////// Uniforms ////////////
/obj/item/clothing/under/fluff/kharshai // Kharshai: Athena Castile
name = "Castile formal outfit"
@@ -628,3 +655,8 @@
suit_adjusted = 1
species_fit = null
sprite_sheets = null
/obj/item/weapon/storage/backpack/fluff/krich_back //lizardzsi: Krichahka
name = "Voxcaster"
desc = "Battered, Sol-made military radio backpack that had its speakers fried from playing Vox opera. The words 'Swift-Talon' are crudely scratched onto its side."
icon_state = "voxcaster_fluff"
+8 -6
View File
@@ -76,10 +76,16 @@
/obj/machinery/computer/account_database/attack_hand(mob/user as mob)
ui_interact(user)
/obj/machinery/computer/account_database/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/machinery/computer/account_database/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
user.set_machine(src)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640)
ui.open()
/obj/machinery/computer/account_database/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["src"] = UID()
data["id_inserted"] = !!held_card
data["id_card"] = held_card ? text("[held_card.registered_name], [held_card.assignment]") : "-----"
@@ -122,11 +128,7 @@
if(accounts.len > 0)
data["accounts"] = accounts
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640)
ui.set_initial_data(data)
ui.open()
return data
/obj/machinery/computer/account_database/Topic(href, href_list)
if(..())
+2 -4
View File
@@ -1,5 +1,3 @@
/var/global/sent_aliens_to_station = 0
/datum/event/alien_infestation
announceWhen = 400
var/spawncount = 1
@@ -7,8 +5,8 @@
/datum/event/alien_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(1, 2)
sent_aliens_to_station = 1
if(prob(50))
spawncount++
/datum/event/alien_infestation/announce()
if(successSpawn)
@@ -284,7 +284,7 @@
desc = "A throwing weapon used to ignite things, typically filled with an accelerant. Recommended highly by rioters and revolutionaries. Light and toss."
icon_state = "vodkabottle"
list_reagents = list()
var/list/accelerants = list(/datum/reagent/ethanol,/datum/reagent/fuel,/datum/reagent/clf3,/datum/reagent/phlogiston,
var/list/accelerants = list(/datum/reagent/consumable/ethanol,/datum/reagent/fuel,/datum/reagent/clf3,/datum/reagent/phlogiston,
/datum/reagent/napalm,/datum/reagent/hellwater,/datum/reagent/plasma,/datum/reagent/plasma_dust)
var/active = 0
@@ -36,523 +36,12 @@
reagents.clear_reagents()
extinguish()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change() // *scream
if(reagents.reagent_list.len > 0)
switch(reagents.get_master_reagent_id())
if("beer")
icon_state = "beerglass"
name = "Beer glass"
desc = "A freezing pint of beer"
if("cider")
icon_state = "rewriter"
name = "Cider"
desc = "a refreshing glass of traditional cider"
if("beer2")
icon_state = "beerglass"
name = "Beer glass"
desc = "A freezing pint of beer"
if("ale")
icon_state = "aleglass"
name = "Ale glass"
desc = "A freezing pint of delicious Ale"
if("milk")
icon_state = "glass_white"
name = "Glass of milk"
desc = "White and nutritious goodness!"
if("cream")
icon_state = "glass_white"
name = "Glass of cream"
desc = "Ewwww..."
if("chocolate")
icon_state = "chocolateglass"
name = "Glass of chocolate"
desc = "Tasty"
if("hot_coco")
icon_state = "hot_coco"
name = "Glass of hot coco"
desc = "Delicious and cozy"
if("lemonjuice")
icon_state = "lemonglass"
name = "Glass of lemonjuice"
desc = "Sour..."
if("cola")
icon_state = "glass_brown"
name = "Glass of Space Cola"
desc = "A glass of refreshing Space Cola"
if("nuka_cola")
icon_state = "nuka_colaglass"
name = "Nuka Cola"
desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland"
if("orangejuice")
icon_state = "glass_orange"
name = "Glass of Orange juice"
desc = "Vitamins! Yay!"
if("tomatojuice")
icon_state = "glass_red"
name = "Glass of Tomato juice"
desc = "Are you sure this is tomato juice?"
if("blood")
icon_state = "glass_red"
name = "Glass of Tomato juice"
desc = "Are you sure this is tomato juice?"
if("limejuice")
icon_state = "glass_green"
name = "Glass of Lime juice"
desc = "A glass of sweet-sour lime juice."
if("whiskey")
icon_state = "whiskeyglass"
name = "Glass of whiskey"
desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy."
if("gin")
icon_state = "ginvodkaglass"
name = "Glass of gin"
desc = "A crystal clear glass of Griffeater gin."
if("vodka")
icon_state = "ginvodkaglass"
name = "Glass of vodka"
desc = "The glass contain wodka. Xynta."
if("sake")
icon_state = "ginvodkaglass"
name = "Glass of Sake"
desc = "A glass of Sake."
if("goldschlager")
icon_state = "ginvodkaglass"
name = "Glass of goldschlager"
desc = "100 proof that teen girls will drink anything with gold in it."
if("wine")
icon_state = "wineglass"
name = "Glass of wine"
desc = "A very classy looking drink."
if("cognac")
icon_state = "cognacglass"
name = "Glass of cognac"
desc = "Damn, you feel like some kind of French aristocrat just by holding this."
if("kahlua")
icon_state = "kahluaglass"
name = "Glass of RR coffee Liquor"
desc = "DAMN, THIS THING LOOKS ROBUST"
if("vermouth")
icon_state = "vermouthglass"
name = "Glass of Vermouth"
desc = "You wonder why you're even drinking this straight."
if("triple_citrus")
icon_state = "triplecitrus"
name = "Glass of Triplecitrus Juice"
desc = "As colorful and healthy as it is delicious."
if("mojito")
icon_state = "mojito"
name = "Glass of Mojito"
desc = "Fresh from Spesscuba."
if("tequila")
icon_state = "tequilaglass"
name = "Glass of Tequila"
desc = "Now all that's missing is the weird colored shades!"
if("patron")
icon_state = "patronglass"
name = "Glass of Patron"
desc = "Drinking patron in the bar, with all the subpar ladies."
if("rum")
icon_state = "rumglass"
name = "Glass of Rum"
desc = "Now you want to Pray for a pirate suit, don't you?"
if("absinthe")
icon_state = "absinthebottle"
name = "Glass of Absinthe"
desc = "The green fairy is going to get you now!"
if("gintonic")
icon_state = "gintonicglass"
name = "Gin and Tonic"
desc = "A mild but still great cocktail. Drink up, like a true Englishman."
if("ginsonic")
icon_state = "ginsonic"
name = "Gin and Sonic"
desc = "An extremely high amperage drink. Absolutely not for the true Englishman."
if("whiskeycola")
icon_state = "whiskeycolaglass"
name = "Whiskey Cola"
desc = "An innocent-looking mixture of cola and Whiskey. Delicious."
if("whiterussian")
icon_state = "whiterussianglass"
name = "White Russian"
desc = "A very nice looking drink. But that's just, like, your opinion, man."
if("screwdrivercocktail")
icon_state = "screwdriverglass"
name = "Screwdriver"
desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer."
if("bloodymary")
icon_state = "bloodymaryglass"
name = "Bloody Mary"
desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder."
if("martini")
icon_state = "martiniglass"
name = "Classic Martini"
desc = "Damn, the bartender even stirred it, not shook it."
if("vodkamartini")
icon_state = "martiniglass"
name = "Vodka martini"
desc ="A bastardisation of the classic martini. Still great."
if("gargleblaster")
icon_state = "gargleblasterglass"
name = "Pan-Galactic Gargle Blaster"
desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy."
if("bravebull")
icon_state = "bravebullglass"
name = "Brave Bull"
desc = "Tequila and Coffee liquor, brought together in a mouthwatering mixture. Drink up."
if("tequilasunrise")
icon_state = "tequilasunriseglass"
name = "Tequila Sunrise"
desc = "Oh great, now you feel nostalgic about sunrises back on Terra..."
if("toxinsspecial")
icon_state = "toxinsspecialglass"
name = "Toxins Special"
desc = "Whoah, this thing is on FIRE"
if("beepskysmash")
icon_state = "beepskysmashglass"
name = "Beepsky Smash"
desc = "Heavy, hot and strong. Just like the Iron fist of the LAW."
if("doctorsdelight")
icon_state = "doctorsdelightglass"
name = "Doctor's Delight"
desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place."
if("manlydorf")
icon_state = "manlydorfglass"
name = "The Manly Dorf"
desc = "A manly concotion made from Ale and Beer. Intended for true men only."
if("irishcream")
icon_state = "irishcreamglass"
name = "Irish Cream"
desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?"
if("cubalibre")
icon_state = "cubalibreglass"
name = "Cuba Libre"
desc = "A classic mix of rum and cola."
if("b52")
icon_state = "b52glass"
name = "B-52"
desc = "Kahlua, Irish Cream, and congac. You will get bombed."
if("atomicbomb")
icon_state = "atomicbombglass"
name = "Atomic Bomb"
desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing."
if("longislandicedtea")
icon_state = "longislandicedteaglass"
name = "Long Island Iced Tea"
desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only."
if("threemileisland")
icon_state = "threemileislandglass"
name = "Three Mile Island Ice Tea"
desc = "A glass of this is sure to prevent a meltdown."
if("margarita")
icon_state = "margaritaglass"
name = "Margarita"
desc = "On the rocks with salt on the rim. Arriba~!"
if("blackrussian")
icon_state = "blackrussianglass"
name = "Black Russian"
desc = "For the lactose-intolerant. Still as classy as a White Russian."
if("vodkatonic")
icon_state = "vodkatonicglass"
name = "Vodka and Tonic"
desc = "For when a gin and tonic isn't russian enough."
if("manhattan")
icon_state = "manhattanglass"
name = "Manhattan"
desc = "The Detective's undercover drink of choice. He never could stomach gin..."
if("manhattan_proj")
icon_state = "proj_manhattanglass"
name = "Manhattan Project"
desc = "A scienitst drink of choice, for thinking how to blow up the station."
if("ginfizz")
icon_state = "ginfizzglass"
name = "Gin Fizz"
desc = "Refreshingly lemony, deliciously dry."
if("irishcoffee")
icon_state = "irishcoffeeglass"
name = "Irish Coffee"
desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning."
if("suicider")
icon_state = "suicider"
name = "Suicider"
desc = "You've really hit rock bottom now... your liver packed its bags and left last night."
if("whiskeysoda")
icon_state = "whiskeysodaglass2"
name = "Whiskey Soda"
desc = "Ultimate refreshment."
if("tonic")
icon_state = "glass_clear"
name = "Glass of Tonic Water"
desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away."
if("sodawater")
icon_state = "glass_clear"
name = "Glass of Soda Water"
desc = "Soda water. Why not make a scotch and soda?"
if("water")
icon_state = "glass_clear"
name = "Glass of Water"
desc = "The father of all refreshments."
if("spacemountainwind")
icon_state = "Space_mountain_wind_glass"
name = "Glass of Space Mountain Wind"
desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind."
if("thirteenloko")
icon_state = "thirteen_loko_glass"
name = "Glass of Thirteen Loko"
desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass"
if("dr_gibb")
icon_state = "dr_gibb_glass"
name = "Glass of Dr. Gibb"
desc = "Dr. Gibb. Not as dangerous as the name might imply."
if("space_up")
icon_state = "space-up_glass"
name = "Glass of Space-up"
desc = "Space-up. It helps keep your cool."
if("moonshine")
icon_state = "glass_clear"
name = "Moonshine"
desc = "You've really hit rock bottom now... your liver packed its bags and left last night."
if("soymilk")
icon_state = "glass_white"
name = "Glass of soy milk"
desc = "White and nutritious soy goodness!"
if("berryjuice")
icon_state = "berryjuice"
name = "Glass of berry juice"
desc = "Berry juice. Or maybe its jam. Who cares?"
if("poisonberryjuice")
icon_state = "poisonberryjuice"
name = "Glass of poison berry juice"
desc = "A glass of deadly juice."
if("carrotjuice")
icon_state = "carrotjuice"
name = "Glass of carrot juice"
desc = "It is just like a carrot but without crunching."
if("potato")
icon_state = "glass_brown"
name = "Glass of potato juice"
desc = "Who in the hell requests this? Gross!"
if("banana")
icon_state = "banana"
name = "Glass of banana juice"
desc = "The raw essence of a banana. HONK"
if("bahama_mama")
icon_state = "bahama_mama"
name = "Bahama Mama"
desc = "Tropic cocktail"
if("singulo")
icon_state = "singulo"
name = "Singulo"
desc = "A blue-space beverage."
if("alliescocktail")
icon_state = "alliescocktail"
name = "Allies cocktail"
desc = "A drink made from your allies."
if("antifreeze")
icon_state = "antifreeze"
name = "Anti-freeze"
desc = "The ultimate refreshment."
if("barefoot")
icon_state = "b&p"
name = "Barefoot"
desc = "Barefoot and pregnant"
if("demonsblood")
icon_state = "demonsblood"
name = "Demons Blood"
desc = "Just looking at this thing makes the hair at the back of your neck stand up."
if("booger")
icon_state = "booger"
name = "Booger"
desc = "Ewww..."
if("snowwhite")
icon_state = "snowwhite"
name = "Snow White"
desc = "A cold refreshment."
if("aloe")
icon_state = "aloe"
name = "Aloe"
desc = "Very, very, very good."
if("andalusia")
icon_state = "andalusia"
name = "Andalusia"
desc = "A nice, strange named drink."
if("sbiten")
icon_state = "sbitenglass"
name = "Sbiten"
desc = "A spicy mix of Vodka and Spice. Very hot."
if("red_mead")
icon_state = "red_meadglass"
name = "Red Mead"
desc = "A True Vikings Beverage, though its color is strange."
if("mead")
icon_state = "meadglass"
name = "Mead"
desc = "A Vikings Beverage, though a cheap one."
if("iced_beer")
icon_state = "iced_beerglass"
name = "Iced Beer"
desc = "A beer so frosty, the air around it freezes."
if("grog")
icon_state = "grogglass"
name = "Grog"
desc = "A fine and cepa drink for Space."
if("soy_latte")
icon_state = "soy_latte"
name = "Soy Latte"
desc = "A nice and refrshing beverage while you are reading."
if("cafe_latte")
icon_state = "cafe_latte"
name = "Cafe Latte"
desc = "A nice, strong and refreshing beverage while you are reading."
if("cafe_mocha")
icon_state = "cafe_latte"
name = "Cafe Mocha"
desc = "The perfect blend of coffe, milk, and chocolate."
if("acidspit")
icon_state = "acidspitglass"
name = "Acid Spit"
desc = "A drink from Nanotrasen. Made from live aliens."
if("amasec")
icon_state = "amasecglass"
name = "Amasec"
desc = "Always handy before COMBAT!!!"
if("neurotoxin")
icon_state = "neurotoxinglass"
name = "Neurotoxin"
desc = "A drink that is guaranteed to knock you silly."
if("hippiesdelight")
icon_state = "hippiesdelightglass"
name = "Hippie's Delight"
desc = "A drink enjoyed by people during the 1960's."
if("bananahonk")
icon_state = "bananahonkglass"
name = "Banana Honk"
desc = "A drink from Banana Heaven."
if("silencer")
icon_state = "silencerglass"
name = "Silencer"
desc = "A drink from mime Heaven."
if("nothing")
icon_state = "nothing"
name = "Nothing"
desc = "Absolutely nothing."
if("devilskiss")
icon_state = "devilskiss"
name = "Devils Kiss"
desc = "Creepy time!"
if("changelingsting")
icon_state = "changelingsting"
name = "Changeling Sting"
desc = "A stingy drink."
if("irishcarbomb")
icon_state = "irishcarbomb"
name = "Irish Car Bomb"
desc = "An irish car bomb."
if("syndicatebomb")
icon_state = "syndicatebomb"
name = "Syndicate Bomb"
desc = "A syndicate bomb."
if("erikasurprise")
icon_state = "erikasurprise"
name = "Erika Surprise"
desc = "The surprise is, it's green!"
if("driestmartini")
icon_state = "driestmartiniglass"
name = "Driest Martini"
desc = "Only for the experienced. You think you see sand floating in the glass."
if("ice")
icon_state = "iceglass"
name = "Glass of ice"
desc = "Generally, you're supposed to put something else in there too..."
if("icecoffee")
icon_state = "icedcoffeeglass"
name = "Iced Coffee"
desc = "A drink to perk you up and refresh you!"
if("coffee")
icon_state = "glass_brown"
name = "Glass of coffee"
desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
if("bilk")
icon_state = "glass_brown"
name = "Glass of bilk"
desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis."
if("fuel")
icon_state = "dr_gibb_glass"
name = "Glass of welder fuel"
desc = "Unless you are an industrial tool, this is probably not safe for consumption."
if("brownstar")
icon_state = "brownstar"
name = "Brown Star"
desc = "Its not what it sounds like..."
if("tea")
icon_state = "glass_brown"
name = "Glass of Tea"
desc = "A glass of hot tea. Perhaps a cup with a handle would have been smarter?"
if("icetea")
icon_state = "icetea"
name = "Iced Tea"
desc = "No relation to a certain rap artist/ actor."
if("milkshake")
icon_state = "milkshake"
name = "Milkshake"
desc = "Glorious brainfreezing mixture."
if("lemonade")
icon_state = "lemonade"
name = "Lemonade"
desc = "Oh the nostalgia..."
if("kiraspecial")
icon_state = "kiraspecial"
name = "Kira Special"
desc = "Long live the guy who everyone had mistaken for a girl. Baka!"
if("rewriter")
icon_state = "rewriter"
name = "Rewriter"
desc = "The secert of the sanctuary of the Libarian..."
if("applejack")
icon_state = "cognacglass"
name = "Glass of applejack"
desc = "When cider isn't strong enough, you gotta jack it."
if("jackrose")
icon_state = "patronglass"
name = "Jack Rose"
desc = "Drinking this makes you feel like you belong in a luxury hotel bar during the 1920s."
if("synthanol")
icon_state = "synthanolglass"
name = "Glass of Synthanol"
desc = "The equivalent of alcohol for synthetic crewmembers. They'd find it awful if they had tastebuds too."
if("robottears")
icon_state = "robottearsglass"
name = "Glass of Robot Tears"
desc = "No robots were hurt in the making of this drink."
if("trinary")
icon_state = "trinaryglass"
name = "Glass of Trinary"
desc = "Colorful drink made for synthetic crewmembers. It doesn't seem like it would taste well."
if("servo")
icon_state = "servoglass"
name = "Glass of Servo"
desc = "Chocolate - based drink made for IPCs. Not sure if anyone's actually tried out the recipe."
if("synthnsoda")
icon_state = "synthnsodaglass"
name = "Glass of Synth 'n Soda"
desc = "Classic drink altered to fit the tastes of a robot. Bad idea to drink if you're made of carbon."
if("synthignon")
icon_state = "synthignonglass"
name = "Glass of Synthignon"
desc = "Someone mixed good wine and robot booze. Romantic, but atrocious."
if("uplink")
icon_state = "uplinkglass"
name = "Glass of Uplink"
desc = "An exquisite mix of the finest liquoirs and synthanol. Meant only for synthetics."
if("holywater")
icon_state = "glass_clear"
name = "Glass of Water"
desc = "The father of all refreshments."
else
icon_state ="glass_brown"
name = "Glass of ..what?"
desc = "You can't really tell what this is."
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change()
if(reagents.reagent_list.len)
var/datum/reagent/R = reagents.get_master_reagent()
icon_state = R.drink_icon
name = R.drink_name
desc = R.drink_desc
else
icon_state = "glass_empty"
name = "glass"
@@ -24,10 +24,7 @@
/obj/machinery/icemachine/New()
var/datum/reagents/R = new/datum/reagents(500)
reagents = R
R.my_atom = src
create_reagents(500)
/obj/machinery/icemachine/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/reagent_containers/glass))
@@ -32,8 +32,7 @@
********************/
/obj/machinery/kitchen_machine/New()
reagents = new/datum/reagents(100)
reagents.my_atom = src
create_reagents(100)
if(!available_recipes)
available_recipes = new
acceptable_items = new
@@ -317,7 +317,14 @@
/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
user.set_machine(src)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "smartfridge.tmpl", name, 400, 500)
ui.open()
/obj/machinery/smartfridge/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["contents"] = null
data["electrified"] = seconds_electrified > 0
data["shoot_inventory"] = shoot_inventory
@@ -334,11 +341,7 @@
if(items.len > 0)
data["contents"] = items
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "smartfridge.tmpl", name, 400, 500)
ui.set_initial_data(data)
ui.open()
return data
/obj/machinery/smartfridge/Topic(href, href_list)
if(..()) return 0
@@ -410,4 +413,4 @@
to_chat(usr, "<span class='warning'>Access denied.</span>")
nanomanager.update_uis(src)
return 0
return ..()
return ..()
@@ -31,7 +31,7 @@
/datum/crafting_recipe/cherrysandwich
name = "Cherry Jelly Sandwich"
reqs = list(
/datum/reagent/cherryjelly = 5,
/datum/reagent/consumable/cherryjelly = 5,
/obj/item/weapon/reagent_containers/food/snacks/breadslice = 2,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry
@@ -49,7 +49,7 @@
/datum/crafting_recipe/jellyburger
name = "Cherry Jelly Burger"
reqs = list(
/datum/reagent/cherryjelly = 5,
/datum/reagent/consumable/cherryjelly = 5,
/obj/item/weapon/reagent_containers/food/snacks/bun = 1,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry
+1 -3
View File
@@ -13,9 +13,7 @@
..()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R
R.my_atom = src
create_reagents(50)
//Handle some post-spawn var stuff.
if(planttype)
+18 -16
View File
@@ -157,11 +157,17 @@
degrade_upper = 70 - (tier * 10) //Tier 1: 60, Tier 4: 30
/obj/machinery/botany/extractor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!user)
return
var/list/data = list()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450)
ui.open()
ui.set_auto_update(1)
/obj/machinery/botany/extractor/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
var/list/geneMasks[0]
for(var/gene_tag in plant_controller.gene_tag_list)
@@ -190,12 +196,7 @@
data["hasGenetics"] = 0
data["sourceName"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/botany/Topic(href, href_list)
@@ -308,11 +309,17 @@
degrade_upper = 11 - tier //Tier 1: 10, Tier 4: 6
/obj/machinery/botany/editor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!user)
return
var/list/data = list()
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450)
ui.open()
ui.set_auto_update(1)
/obj/machinery/botany/editor/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["activity"] = active
@@ -340,12 +347,7 @@
else
data["loaded"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/botany/editor/Topic(href, href_list)
+6 -1
View File
@@ -380,10 +380,12 @@
//--FalseIncarnate
/obj/machinery/portable_atmospherics/hydroponics/verb/remove_label()
set name = "Remove Label"
set category = "Object"
set src in view(1)
if(usr.incapacitated())
return
if(labelled)
to_chat(usr, "You remove the label.")
@@ -397,6 +399,9 @@
set name = "Set Light"
set category = "Object"
set src in view(1)
if(usr.incapacitated())
return
var/new_light = input("Specify a light level.") as null|anything in list(0,1,2,3,4,5,6,7,8,9,10)
if(new_light)
+3 -3
View File
@@ -84,7 +84,7 @@ var/list/karma_spenders = list()
/mob/verb/spend_karma_list()
set name = "Award Karma"
set desc = "Let the gods know whether someone's been nice. Can only be used once per round."
set category = "Special Verbs"
set category = "OOC"
if(!can_give_karma())
return
@@ -113,7 +113,7 @@ var/list/karma_spenders = list()
/mob/verb/spend_karma(var/mob/M)
set name = "Award Karma to Player"
set desc = "Let the gods know whether someone's been nice. Can only be used once per round."
set category = "Special Verbs"
set category = "OOC"
if(!M)
to_chat(usr, "Please right click a mob to award karma directly, or use the 'Award Karma' verb to select a player from the player listing.")
@@ -144,8 +144,8 @@ var/list/karma_spenders = list()
/client/verb/check_karma()
set name = "Check Karma"
set category = "Special Verbs"
set desc = "Reports how much karma you have accrued."
set category = "OOC"
var/currentkarma=verify_karma()
to_chat(usr, {"<br>You have <b>[currentkarma]</b> available."})
+30 -28
View File
@@ -105,34 +105,30 @@
i++
/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params)
if(!powered())
return
if(istype(W,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I) && !istype(inserted_id))
if(!user.drop_item())
return
I.loc = src
inserted_id = I
interact(user)
return
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
updateUsrDialog()
return
if(exchange_parts(user, W))
return
if(panel_open)
if(istype(W, /obj/item/weapon/crowbar))
empty_content()
default_deconstruction_crowbar(W)
return
if(default_unfasten_wrench(user, W))
return
if(istype(W,/obj/item/weapon/card/id))
if(!powered())
return
else
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I) && !istype(inserted_id))
if(!user.drop_item())
return
I.forceMove(src)
inserted_id = I
interact(user)
return
..()
/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O)
@@ -437,18 +433,6 @@
return
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/mining_voucher))
RedeemVoucher(I, user)
return
if(istype(I,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = usr.get_active_hand()
if(istype(C) && !istype(inserted_id))
if(!usr.drop_item())
return
C.loc = src
inserted_id = C
interact(user)
return
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
updateUsrDialog()
return
@@ -456,6 +440,24 @@
if(istype(I, /obj/item/weapon/crowbar))
default_deconstruction_crowbar(I)
return 1
if(istype(I, /obj/item/weapon/mining_voucher))
if(!powered())
return
else
RedeemVoucher(I, user)
return
if(istype(I,/obj/item/weapon/card/id))
if(!powered())
return
else
var/obj/item/weapon/card/id/C = usr.get_active_hand()
if(istype(C) && !istype(inserted_id))
if(!usr.drop_item())
return
C.forceMove(src)
inserted_id = C
interact(user)
return
..()
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer)
+1 -4
View File
@@ -251,9 +251,6 @@
/obj/item/device/mobcapsule/proc/dump_contents(mob/user)
if(captured)
captured.forceMove(get_turf(src))
if(captured.client)
captured.client.eye = captured.client.mob
captured.client.perspective = MOB_PERSPECTIVE
captured = null
/obj/item/device/mobcapsule/attack_self(mob/user)
@@ -530,4 +527,4 @@
if(do_after(user, 20, target = src))
new /obj/item/stack/rods(loc)
qdel(src)
return ..()
return ..()
+2 -2
View File
@@ -28,7 +28,7 @@
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
if(language && (language.flags & NONVERBAL))
if(!can_see()) //blind people can't see dumbass
if(!has_vision()) //blind people can't see dumbass
message = stars(message)
if(!speaker || !(speaker in view(src)))
@@ -95,7 +95,7 @@
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
if(language && (language.flags & NONVERBAL))
if(!can_see()) //blind people can't see dumbass
if(!has_vision()) //blind people can't see dumbass
message = stars(message)
if(!speaker || !(speaker in view(src)))
+1 -1
View File
@@ -22,7 +22,7 @@
var/atom/movable/mob_container
mob_container = M
mob_container.forceMove(get_turf(src))
M.reset_view()
M.reset_perspective()
qdel(src)
@@ -27,7 +27,7 @@
var/heat_protection = 0.5
var/leaping = 0
ventcrawler = 2
var/list/alien_organs = list()
/mob/living/carbon/alien/New()
@@ -163,8 +163,8 @@
show_stat_emergency_shuttle_eta()
/mob/living/carbon/alien/SetStunned(amount)
..(amount)
/mob/living/carbon/alien/SetStunned(amount, updating = 1, force = 0)
..()
if(!(status_flags & CANSTUN) && amount)
// add some movement delay
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
@@ -125,6 +125,7 @@ Doesn't work on other aliens/AI.*/
A.xo = U.x - T.x
A.fire()
A.newtonian_move(get_dir(U, T))
newtonian_move(get_dir(U, T))
return
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
@@ -6,9 +6,7 @@
icon_state = "aliend_s"
/mob/living/carbon/alien/humanoid/drone/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
create_reagents(100)
if(src.name == "alien drone")
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
@@ -6,9 +6,7 @@
icon_state = "alienh_s"
/mob/living/carbon/alien/humanoid/hunter/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
create_reagents(100)
if(name == "alien hunter")
name = text("alien hunter ([rand(1, 1000)])")
real_name = name
@@ -108,7 +106,7 @@
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
else
weakened = 2
Weaken(2, 1, 1)
toggle_leap(0)
pounce_cooldown = !pounce_cooldown
@@ -116,7 +114,7 @@
pounce_cooldown = !pounce_cooldown
else if(A.density && !A.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
weakened = 2
Weaken(2, 1, 1)
if(leaping)
leaping = 0
@@ -35,9 +35,7 @@
overlays += I
/mob/living/carbon/alien/humanoid/sentinel/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
create_reagents(100)
if(name == "alien sentinel")
name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
@@ -31,9 +31,7 @@
overlays += I
/mob/living/carbon/alien/humanoid/empress/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
create_reagents(100)
//there should only be one queen
for(var/mob/living/carbon/alien/humanoid/empress/E in living_mob_list)
@@ -16,9 +16,7 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/humanoid/New()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
create_reagents(1000)
if(name == "alien")
name = text("alien ([rand(1, 1000)])")
real_name = name
@@ -66,8 +66,8 @@
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
if( health <= 20 && prob(1) )
if((getOxyLoss() > 50) || (config.health_threshold_crit >= health))
if(health <= 20 && prob(1))
spawn(0)
emote("gasp")
if(!reagents.has_reagent("epinephrine"))
@@ -75,14 +75,12 @@
Paralyse(3)
if(paralysis)
AdjustParalysis(-1)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
AdjustSleeping(-1)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
if(prob(10) && health)
spawn(0)
emote("hiss")
//CONSCIOUS
@@ -110,17 +108,6 @@
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
AdjustEarDamage(-0.05)
//Other
if(stunned)
AdjustStunned(-1)
if(!stunned)
update_icons()
if(weakened)
weakened = max(weakened-1,0)
if(!weakened)
update_icons()
if(stuttering)
AdjustStuttering(-1)
@@ -1,6 +0,0 @@
/mob/living/carbon/alien/humanoid/Login()
..()
if(!isturf(loc))
client.eye = loc
client.perspective = EYE_PERSPECTIVE
return
@@ -10,9 +10,7 @@
ventcrawler = 0
/mob/living/carbon/alien/humanoid/queen/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
create_reagents(100)
//there should only be one queen
for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
@@ -15,9 +15,7 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/larva/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
create_reagents(100)
if(name == "alien larva")
name = "alien larva ([rand(1, 1000)])"
real_name = name
@@ -35,11 +35,9 @@
Paralyse(3)
if(paralysis)
AdjustParalysis(-2)
blinded = 1
stat = UNCONSCIOUS
else if(sleeping)
AdjustSleeping(-1)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
@@ -70,13 +68,6 @@
else if(ear_damage < 25) //ear damage heals slowly under this threshold.
AdjustEarDamage(-0.05)
//Other
if(stunned)
AdjustStunned(-1)
if(weakened)
AdjustWeakened(-1)
if(stuttering)
AdjustStuttering(-1)
+26 -16
View File
@@ -31,21 +31,31 @@
return 1
/mob/living/carbon/alien/update_sight()
if(stat == DEAD || (XRAY in mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
if(!client)
return
if(stat == DEAD)
grant_death_vision()
return
sight = SEE_MOBS
if(nightvision)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
else
see_in_dark = 4
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if(stat != DEAD)
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(client.eye != src)
var/atom/A = client.eye
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
return
for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs)
sight |= E.vision_flags
if(E.dark_view)
see_in_dark = max(see_in_dark, E.dark_view)
if(E.see_invisible)
see_invisible = min(see_invisible, E.see_invisible)
if(see_override)
see_invisible = see_override
+33 -35
View File
@@ -8,45 +8,43 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "brain1"
New()
var/datum/reagents/R = new/datum/reagents(330)
reagents = R
R.my_atom = src
..()
/mob/living/carbon/brain/New()
create_reagents(330)
..()
Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
if(stat!=DEAD) //If not dead.
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize() //Ghostize checks for key so nothing else is necessary.
return ..()
/mob/living/carbon/brain/Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
if(stat!=DEAD) //If not dead.
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize() //Ghostize checks for key so nothing else is necessary.
return ..()
say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
if(istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/silicon/pai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/carbon/human))
/mob/living/carbon/brain/say_understands(other)//Goddamn is this hackish, but this say code is so odd
if(istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/carbon/slime))
if(istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
return ..()
if(istype(other, /mob/living/silicon/pai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/carbon/human))
return 1
if(istype(other, /mob/living/carbon/slime))
return 1
return ..()
/mob/living/carbon/brain/update_canmove(delay_action_updates = 0)
@@ -62,22 +62,5 @@
. = 1
/mob/living/carbon/brain/handle_vision()
..()
if(stat == 2 || (XRAY in src.mutations))
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
handle_hud_icons_health()
/mob/living/carbon/brain/breathe()
return
+48 -1
View File
@@ -537,6 +537,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
thrown_thing = throwable_mob
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
throwable_mob.forceMove(start_T)
if(start_T && end_T)
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
@@ -742,7 +743,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
/mob/living/carbon/resist_fire()
fire_stacks -= 5
weakened = max(weakened, 3)//We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy.
Weaken(3, 1, 1) //We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy.
update_canmove()
spin(32,2)
visible_message("<span class='danger'>[src] rolls on the floor, trying to put themselves out!</span>", \
@@ -1038,3 +1039,49 @@ so that different stomachs can handle things in different ways VB*/
/mob/living/carbon/proc/update_internals_hud_icon(internal_state = 0)
if(hud_used && hud_used.internals)
hud_used.internals.icon_state = "internal[internal_state]"
//to recalculate and update the mob's total tint from tinted equipment it's wearing.
/mob/living/carbon/proc/update_tint()
if(!tinted_weldhelh)
return
var/tinttotal = get_total_tint()
if(tinttotal >= TINT_BLIND)
overlay_fullscreen("tint", /obj/screen/fullscreen/blind)
else if(tinttotal >= TINT_IMPAIR)
overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
else
clear_fullscreen("tint", 0)
/mob/living/carbon/proc/get_total_tint()
. = 0
if(istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/HT = head
. += HT.tint
if(wear_mask)
. += wear_mask.tint
/mob/living/carbon/human/get_total_tint()
. = ..()
if(glasses)
var/obj/item/clothing/glasses/G = glasses
. += G.tint
//handle stuff to update when a mob equips/unequips a mask.
/mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
update_inv_wear_mask()
/mob/living/carbon/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
if(C.tint || initial(C.tint))
update_tint()
update_inv_wear_mask()
//handle stuff to update when a mob equips/unequips a headgear.
/mob/living/carbon/proc/head_update(obj/item/I, forced)
if(istype(I, /obj/item/clothing))
var/obj/item/clothing/C = I
if(C.tint || initial(C.tint))
update_tint()
if(I.flags_inv & HIDEMASK || forced)
update_inv_wear_mask()
update_inv_head()
@@ -43,6 +43,7 @@
H.h_style = hair_style
update_hair()
update_inv_glasses()
return 1
/mob/living/carbon/human/proc/change_facial_hair(var/facial_hair_style)
@@ -378,7 +378,7 @@
message = "<B>[src]</B> faints."
if(src.sleeping)
return //Can't faint while asleep
AdjustSleeping(1)
AdjustSleeping(2)
m_type = 1
if("cough", "coughs")
+16 -9
View File
@@ -31,9 +31,7 @@
if(mind)
mind.name = real_name
var/datum/reagents/R = new/datum/reagents(330)
reagents = R
R.my_atom = src
create_reagents(330)
prev_gender = gender // Debug for plural genders
make_blood()
@@ -51,9 +49,6 @@
dna.real_name = real_name
sync_organ_dna(1)
if(species)
species.handle_dna(src)
UpdateAppearance()
/mob/living/carbon/human/OpenCraftingMenu()
@@ -716,16 +711,27 @@
var/obj/item/device/pda/pda = wear_id
if(istype(pda) && pda.id)
id = pda.id
if(check_hands)
if(istype(get_active_hand(), /obj/item/weapon/card/id))
id = get_active_hand()
else if(istype(get_inactive_hand(), /obj/item/weapon/card/id))
id = get_inactive_hand()
id = get_inactive_hand()
if(istype(id))
return id
/mob/living/carbon/human/update_sight()
if(!client)
return
if(stat == DEAD)
grant_death_vision()
return
species.update_sight(src)
//Removed the horrible safety parameter. It was only being used by ninja code anyways.
//Now checks siemens_coefficient of the affected area by default
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0)
@@ -1596,6 +1602,7 @@
dna.real_name = real_name
species.handle_post_spawn(src)
species.handle_dna(src) //Give them whatever special dna business they got.
spawn(0)
overlays.Cut()
@@ -1994,7 +2001,7 @@
if(istype(pda))
var/obj/item/weapon/card/id/id = pda.id
if(istype(id) && id.is_untrackable())
return 0
return 0
if(istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = head
if(hat.blockTracking)
@@ -201,3 +201,12 @@ I use this to standardize shadowling dethrall code
return null
var/obj/item/organ/internal/O = get_int_organ(organ_name)
return O.parent_organ
/mob/living/carbon/human/has_organic_damage()
var/odmg = 0
for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_ROBOT)
odmg += O.brute_dam
odmg += O.burn_dam
return (health < (100 - odmg))
@@ -111,6 +111,13 @@
update_inv_gloves()
else if(I == glasses)
glasses = null
var/obj/item/clothing/glasses/G = I
if(G.tint)
update_tint()
if(G.prescription)
clear_fullscreen("nearsighted")
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
update_sight()
update_inv_glasses()
else if(I == head)
head = null
@@ -118,6 +125,7 @@
update_hair() //rebuild hair
update_fhair()
update_head_accessory()
head_update(I)
update_inv_head()
else if(I == r_ear)
r_ear = null
@@ -140,6 +148,7 @@
if(internal)
internal = null
update_internals_hud_icon(0)
wear_mask_update(I, toggle_off = FALSE)
sec_hud_set_ID()
update_inv_wear_mask()
else if(I == wear_id)
@@ -203,6 +212,7 @@
update_head_accessory(redraw_mob)
if(hud_list.len)
sec_hud_set_ID()
wear_mask_update(W, toggle_off = TRUE)
update_inv_wear_mask(redraw_mob)
if(slot_handcuffed)
handcuffed = W
@@ -247,6 +257,14 @@
update_inv_ears(redraw_mob)
if(slot_glasses)
glasses = W
var/obj/item/clothing/glasses/G = W
if(G.tint)
update_tint()
if(G.prescription)
if(disabilities & NEARSIGHTED)
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
update_sight()
update_inv_glasses(redraw_mob)
if(slot_gloves)
gloves = W
@@ -257,6 +275,7 @@
update_hair(redraw_mob) //rebuild hair
update_fhair(redraw_mob)
update_head_accessory(redraw_mob)
head_update(W)
update_inv_head(redraw_mob)
if(slot_shoes)
shoes = W
+6 -11
View File
@@ -1,8 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
#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
/mob/living/carbon/human
var/pressure_alert = 0
@@ -12,11 +9,9 @@
var/exposedtimenow = 0
var/firstexposed = 0
var/heartbeat = 0
var/tinttotal = 0 // Total level of visually impairing items
/mob/living/carbon/human/Life()
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
life_tick++
in_stasis = 0
@@ -787,7 +782,7 @@
/mob/living/carbon/human/proc/has_booze() //checks if the human has ethanol or its subtypes inside
for(var/A in reagents.reagent_list)
var/datum/reagent/R = A
if(istype(R, /datum/reagent/ethanol))
if(istype(R, /datum/reagent/consumable/ethanol))
return 1
return 0
@@ -840,9 +835,9 @@
SetEyeBlurry(0)
else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
EyeBlind(1)
EyeBlind(2)
blinded = 1
EyeBlurry(1)
EyeBlurry(2)
else
//blindness
@@ -859,7 +854,7 @@
//blurry sight
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
EyeBlurry(1)
EyeBlurry(2)
if(eye_blurry) // Blurry eyes heal slowly
AdjustEyeBlurry(-1)
@@ -899,7 +894,7 @@
/mob/living/carbon/human/handle_vision()
if(machine)
if(!machine.check_eye(src)) reset_view(null)
if(!machine.check_eye(src)) reset_perspective(null)
else
var/isRemoteObserve = 0
if((REMOTE_VIEW in mutations) && remoteview_target)
@@ -924,7 +919,7 @@
if(!isRemoteObserve && client && !client.adminobs)
remoteview_target = null
reset_view(null)
reset_perspective(null)
species.handle_vision(src)
@@ -189,7 +189,7 @@
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
H.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
H.AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0)
@@ -46,6 +46,7 @@
var/siemens_coeff = 1 //base electrocution coefficient
var/invis_sight = SEE_INVISIBLE_LIVING
var/darksight = 2
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
@@ -305,7 +306,7 @@
if(!H.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.
H.co2overloadtime = world.time
else if(world.time - H.co2overloadtime > 120)
H.Paralyse(3)
H.Paralyse(5)
H.adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business
if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
H.adjustOxyLoss(8)
@@ -314,6 +315,7 @@
H.emote("cough")
else
H.clear_alert("co2")
H.co2overloadtime = 0
if(atmos_requirements["min_co2"]) //species breathes this gas, so they got their air
H.failed_last_breath = 0
H.adjustOxyLoss(-5)
@@ -332,7 +334,8 @@
if(SA_pp > atmos_requirements["sa_para"]) // Enough to make us paralysed for a bit
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > atmos_requirements["sa_sleep"]) // Enough to make us sleep as well
H.AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
// This value is large because breaths are taken only once every 4 life ticks.
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 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)
@@ -468,118 +471,7 @@
return 0
/datum/species/proc/handle_vision(mob/living/carbon/human/H)
if(H.stat == DEAD)
H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
H.see_in_dark = 8
if(!H.druggy)
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
return
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
H.see_in_dark = darksight //set their variables to default, modify them later
H.see_invisible = SEE_INVISIBLE_LIVING
if(H.mind && H.mind.vampire)
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_MINIMUM
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
H.sight |= SEE_MOBS
if(XRAY in H.mutations)
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(H.seer == 1)
var/obj/effect/rune/R = locate() in H.loc
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
H.see_invisible = SEE_INVISIBLE_OBSERVER
else
H.see_invisible = SEE_INVISIBLE_LIVING
H.seer = 0
//This checks how much the mob's eyewear impairs their vision
if(H.tinttotal >= TINT_IMPAIR)
if(tinted_weldhelh)
H.overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
if(H.tinttotal >= TINT_BLIND)
H.EyeBlind(1)
else
H.clear_fullscreen("tint")
var/minimum_darkness_view = INFINITY
if(H.glasses)
if(istype(H.glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = H.glasses
H.sight |= G.vision_flags
if(G.darkness_view)
H.see_in_dark = G.darkness_view
minimum_darkness_view = G.darkness_view
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(H.head)
if(istype(H.head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = H.head
H.sight |= hat.vision_flags
if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
H.see_in_dark = hat.darkness_view
if(!hat.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
//switch(hat.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
var/obj/item/weapon/rig/rig = H.back
if(rig.visor)
if(!rig.helmet || (H.head && rig.helmet == H.head))
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
if(istype(G))
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
if(G.vision_flags) // MESONS
H.sight |= G.vision_flags
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
//switch(G.HUDType)
// if(SECHUD)
// process_sec_hud(H,1)
// if(MEDHUD)
// process_med_hud(H,1)
// if(ANTAGHUD)
// process_antag_hud(H)
if(H.vision_type)
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
H.see_invisible = H.vision_type.see_invisible
if(H.vision_type.light_sensitive)
H.weakeyes = 1
H.sight |= H.vision_type.sight_flags
if(H.see_override) //Override all
H.see_invisible = H.see_override
if(!H.client)
return 1
// Right now this just handles blind, blurry, and similar states
if(H.blinded || H.eye_blind)
H.overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
H.throw_alert("blind", /obj/screen/alert/blind)
@@ -682,3 +574,92 @@ It'll return null if the organ doesn't correspond, so include null checks when u
if(!(organ_slot in has_organ))
return null
return has_organ[organ_slot]
/datum/species/proc/update_sight(mob/living/carbon/human/H)
H.sight = initial(H.sight)
H.see_in_dark = darksight
H.see_invisible = invis_sight
if(H.client.eye != H)
var/atom/A = H.client.eye
if(A.update_remote_sight(H)) //returns 1 if we override all other sight updates.
return
if(H.mind && H.mind.vampire)
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
H.see_invisible = SEE_INVISIBLE_MINIMUM
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
H.sight |= SEE_MOBS
for(var/obj/item/organ/internal/cyberimp/eyes/E in H.internal_organs)
H.sight |= E.vision_flags
if(E.dark_view)
H.see_in_dark = E.dark_view
if(E.see_invisible)
H.see_invisible = min(H.see_invisible, E.see_invisible)
if(H.seer == 1)
var/obj/effect/rune/R = locate() in H.loc
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
H.see_invisible = SEE_INVISIBLE_OBSERVER
else
H.see_invisible = SEE_INVISIBLE_LIVING
H.seer = 0
var/lesser_darkview_bonus = INFINITY
// my glasses, I can't see without my glasses
if(H.glasses)
var/obj/item/clothing/glasses/G = H.glasses
H.sight |= G.vision_flags
lesser_darkview_bonus = G.darkness_view
if(G.invis_override)
H.see_invisible = G.invis_override
else
H.see_invisible = min(G.invis_view, H.see_invisible)
// better living through hat trading
if(H.head)
if(istype(H.head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = H.head
H.sight |= hat.vision_flags
if(hat.darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
lesser_darkview_bonus = min(hat.darkness_view,lesser_darkview_bonus)
if(!hat.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
var/obj/item/weapon/rig/rig = H.back
if(rig.visor)
if(!rig.helmet || (H.head && rig.helmet == H.head))
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
if(istype(G))
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
if(G.vision_flags) // MESONS
H.sight |= G.vision_flags
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(lesser_darkview_bonus != INFINITY)
H.see_in_dark = max(lesser_darkview_bonus, H.see_in_dark)
if(H.vision_type)
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
H.see_invisible = H.vision_type.see_invisible
if(H.vision_type.light_sensitive)
H.weakeyes = 1
H.sight |= H.vision_type.sight_flags
if(XRAY in H.mutations)
H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
H.see_in_dark = max(H.see_in_dark, 8)
if(H.see_override) //Override all
H.see_invisible = H.see_override
@@ -395,6 +395,7 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/update_head_accessory(var/update_icons=1)
//Reset our head accessory
overlays_standing[HEAD_ACCESSORY_LAYER] = null
overlays_standing[HEAD_ACC_OVER_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
@@ -408,9 +409,8 @@ var/global/list/damage_icon_parts = list()
//base icons
var/icon/head_accessory_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(head_organ.ha_style && (head_organ.species.bodyflags & HAS_HEAD_ACCESSORY))
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style]
var/datum/sprite_accessory/head_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
if(head_organ.species.name in head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
@@ -418,11 +418,14 @@ var/global/list/damage_icon_parts = list()
head_accessory_s.Blend(rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc), ICON_ADD)
head_accessory_standing = head_accessory_s //head_accessory_standing.Blend(head_accessory_s, ICON_OVERLAY)
//Having it this way preserves animations. Useful for animated antennae.
if(head_accessory_style.over_hair) //Select which layer to use based on the properties of the head accessory style.
overlays_standing[HEAD_ACC_OVER_LAYER] = image(head_accessory_standing)
else
overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing)
else
//warning("Invalid ha_style for [species.name]: [ha_style]")
overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing)
if(update_icons) update_icons()
@@ -446,7 +449,7 @@ var/global/list/damage_icon_parts = list()
//var/icon/debrained_s = new /icon("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained_s")
if(head_organ.h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic())))
var/datum/sprite_accessory/hair_style = hair_styles_list[head_organ.h_style]
var/datum/sprite_accessory/hair/hair_style = hair_styles_list[head_organ.h_style]
//if(!src.get_int_organ(/obj/item/organ/internal/brain) && src.get_species() != "Machine" )//make it obvious we have NO BRAIN
// hair_standing.Blend(debrained_s, ICON_OVERLAY)
if(hair_style && hair_style.species_allowed)
@@ -477,7 +480,8 @@ var/global/list/damage_icon_parts = list()
//FACIAL HAIR OVERLAY
/mob/living/carbon/human/proc/update_fhair(var/update_icons=1)
//Reset our facial hair
overlays_standing[FHAIR_LAYER] = null
overlays_standing[FHAIR_LAYER] = null
overlays_standing[FHAIR_OVER_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED))
@@ -493,7 +497,7 @@ var/global/list/damage_icon_parts = list()
var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
if(head_organ.f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
var/datum/sprite_accessory/facial_hair/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
if(facial_hair_style && facial_hair_style.species_allowed)
if((head_organ.species.name in facial_hair_style.species_allowed) || (head_organ.species.flags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
@@ -509,11 +513,14 @@ var/global/list/damage_icon_parts = list()
facial_s.Blend(facial_secondary_s, ICON_OVERLAY)
face_standing.Blend(facial_s, ICON_OVERLAY)
if(facial_hair_style.over_hair) //Select which layer to use based on the properties of the facial hair style.
overlays_standing[FHAIR_OVER_LAYER] = image(face_standing)
else
overlays_standing[FHAIR_LAYER] = image(face_standing)
else
//warning("Invalid f_style for [species.name]: [f_style]")
overlays_standing[FHAIR_LAYER] = image(face_standing)
if(update_icons) update_icons()
/mob/living/carbon/human/update_mutations(var/update_icons=1)
@@ -736,6 +743,8 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
overlays_standing[GLASSES_LAYER] = null
overlays_standing[GLASSES_OVER_LAYER] = null
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_glasses]
@@ -743,20 +752,26 @@ var/global/list/damage_icon_parts = list()
inv.update_icon()
if(glasses)
var/image/new_glasses
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown) //if the inventory is open ...
glasses.screen_loc = ui_glasses //...draw the item in the inventory screen
client.screen += glasses //Either way, add the item to the HUD
if(glasses.icon_override)
overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
else if(glasses.sprite_sheets && glasses.sprite_sheets[species.name])
overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.name], "icon_state" = "[glasses.icon_state]")
new_glasses = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
else if(glasses.sprite_sheets && glasses.sprite_sheets[head_organ.species.name])
new_glasses = image("icon" = glasses.sprite_sheets[head_organ.species.name], "icon_state" = "[glasses.icon_state]")
else
overlays_standing[GLASSES_LAYER]= image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
new_glasses = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
var/datum/sprite_accessory/hair/hair_style = hair_styles_list[head_organ.h_style]
if(hair_style && hair_style.glasses_over) //Select which layer to use based on the properties of the hair style. Hair styles with hair that don't overhang the arms of the glasses should have glasses_over set to a positive value.
overlays_standing[GLASSES_OVER_LAYER] = new_glasses
else
overlays_standing[GLASSES_LAYER] = new_glasses
else
overlays_standing[GLASSES_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
+24 -18
View File
@@ -409,27 +409,33 @@
return 1
/mob/living/carbon/update_sight()
if(!client)
return
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|SEE_MOBS|SEE_OBJS)
if(XRAY in mutations)
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
grant_death_vision()
return
else
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(see_override)
see_invisible = see_override
if(XRAY in mutations)
grant_xray_vision()
if(client.eye != src)
var/atom/A = client.eye
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
return
for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs)
sight |= E.vision_flags
if(E.dark_view)
see_in_dark = max(see_in_dark,E.dark_view)
if(E.see_invisible)
see_invisible = min(see_invisible, E.see_invisible)
if(see_override)
see_invisible = see_override
/mob/living/carbon/handle_hud_icons()
+1 -1
View File
@@ -3,4 +3,4 @@
clear_fullscreens()
update_action_buttons_icon()
..(gibbed)
..(gibbed)
+23 -5
View File
@@ -117,14 +117,14 @@
/mob/living/proc/handle_stunned()
if(stunned)
AdjustStunned(-1)
AdjustStunned(-1, updating = 1, force = 1)
if(!stunned)
update_icons()
return stunned
/mob/living/proc/handle_weakened()
if(weakened)
AdjustWeakened(-1)
AdjustWeakened(-1, updating = 1, force = 1)
if(!weakened)
update_icons()
return weakened
@@ -151,7 +151,7 @@
/mob/living/proc/handle_paralysed()
if(paralysis)
AdjustParalysis(-1)
AdjustParalysis(-1, updating = 1, force = 1)
return paralysis
/mob/living/proc/handle_sleeping()
@@ -230,14 +230,32 @@
if(machine)
if(!machine.check_eye(src))
reset_view(null)
reset_perspective(null)
else
if(!remote_view && !client.adminobs)
reset_view(null)
reset_perspective(null)
/mob/living/proc/update_sight()
return
// Gives a mob the vision of being dead
/mob/living/proc/grant_death_vision()
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_OBSERVER
// See through walls, dark, etc.
// basically the same as death vision except you can't
// see ghosts
/mob/living/proc/grant_xray_vision()
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
/mob/living/proc/handle_hud_icons()
handle_hud_icons_health()
return
+7 -3
View File
@@ -287,6 +287,10 @@
adjustFireLoss(burn)
src.updatehealth()
/mob/living/proc/has_organic_damage()
return (maxHealth - health)
/mob/living/proc/restore_all_organs()
return
@@ -320,9 +324,9 @@
setBrainLoss(0)
setStaminaLoss(0)
SetSleeping(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
SetParalysis(0, 1, 1)
SetStunned(0, 1, 1)
SetWeakened(0, 1, 1)
SetSlowed(0)
SetLoseBreath(0)
SetDizzy(0)
+15 -10
View File
@@ -42,6 +42,8 @@ var/list/ai_verbs_default = list(
density = 1
status_flags = CANSTUN|CANPARALYSE|CANPUSH
mob_size = MOB_SIZE_LARGE
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
see_in_dark = 8
can_strip = 0
var/list/network = list("SS13","Telecomms","Research Outpost","Mining Outpost")
var/obj/machinery/camera/current = null
@@ -427,7 +429,7 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
if(!current)
return null
user.reset_view(current)
user.reset_perspective(current)
return 1
/mob/living/silicon/ai/blob_act()
@@ -606,15 +608,18 @@ var/list/ai_verbs_default = list(
adjustBruteLoss(damage)
updatehealth()
/mob/living/silicon/ai/reset_view(atom/A)
if(current)
current.set_light(0)
if(istype(A,/obj/machinery/camera))
/mob/living/silicon/ai/reset_perspective(atom/A)
if(camera_light_on)
light_cameras()
if(istype(A, /obj/machinery/camera))
current = A
..()
if(istype(A,/obj/machinery/camera))
if(camera_light_on) A.set_light(AI_CAMERA_LUMINOSITY)
else A.set_light(0)
. = ..()
if(.)
if(!A && isturf(loc) && eyeobj)
client.eye = eyeobj
client.perspective = MOB_PERSPECTIVE
eyeobj.get_remote_view_fullscreens(src)
/mob/living/silicon/ai/proc/botcall()
set category = "AI Commands"
@@ -1163,4 +1168,4 @@ var/list/ai_verbs_default = list(
to_chat(src, "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds.")
view_core() //A BYOND bug requires you to be viewing your core before your verbs update
verbs += /mob/living/silicon/ai/proc/choose_modules
malf_picker = new /datum/module_picker
malf_picker = new /datum/module_picker
@@ -114,7 +114,7 @@
var/turf/t = turf
if(obscuredTurfs[t])
if(!t.obscured)
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
t.obscured = image('icons/effects/cameravis.dmi', t, null, 15)
obscured += t.obscured
for(var/eye in seenby)
+39 -36
View File
@@ -1,3 +1,8 @@
#define POWER_RESTORATION_OFF 0
#define POWER_RESTORATION_START 1
#define POWER_RESTORATION_SEARCH_APC 2
#define POWER_RESTORATION_APC_FOUND 3
/mob/living/silicon/ai/Life()
//doesn't call parent because it's a horrible mess
if(stat == DEAD)
@@ -6,7 +11,7 @@
var/turf/T = get_turf(src)
if(stat != CONSCIOUS) //ai's fucked
cameraFollow = null
reset_view(null)
reset_perspective(null)
unset_machine()
updatehealth()
@@ -16,11 +21,16 @@
death()
return 0
if(malfhack)
if(malfhack.aidisabled)
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
malfhacking = 0
malfhack = null
if(!eyeobj || qdeleted(eyeobj) || !eyeobj.loc)
view_core()
if(machine)
machine.check_eye(src)
if(malfhack && malfhack.aidisabled)
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
malfhacking = 0
malfhack = null
if(aiRestorePowerRoutine)
adjustOxyLoss(1)
@@ -29,22 +39,9 @@
handle_stunned()
var/is_blind = 0 //THIS WAS JUST FUCKING 'blind' WHICH CONFLICTED WITH A NORMAL VARIABLE
var/area/my_area = get_area(src)
if(istype(my_area))
if(!my_area.power_equip && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
is_blind = 1 //HOW THE FUCK DID THAT EVEN COMPILE JESUS CHRIST
if(!is_blind)
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
if(!lacks_power())
if(aiRestorePowerRoutine == 2)
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
@@ -57,18 +54,12 @@
else
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
see_in_dark = 0
see_invisible = SEE_INVISIBLE_LIVING
if(((!my_area.power_equip) || istype(T, /turf/space)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
if(lacks_power())
if(!aiRestorePowerRoutine)
aiRestorePowerRoutine = 1
update_sight()
to_chat(src, "<span class='danger'>You have lost power!</span>")
if(!is_special_character(src))
set_zeroth_law("")
@@ -78,7 +69,7 @@
sleep(50)
my_area = get_area(src)
T = get_turf(src)
if(my_area && my_area.power_equip && !istype(T, /turf/space))
if(!lacks_power())
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
aiRestorePowerRoutine = 0
return
@@ -115,12 +106,11 @@
aiRestorePowerRoutine = 2
return
if(my_area.power_equip)
if(!istype(T, /turf/space))
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
aiRestorePowerRoutine = 0
clear_fullscreen("blind")
return
if(!lacks_power())
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
aiRestorePowerRoutine = 0
clear_fullscreen("blind")
return
switch(PRP)
if(1)
@@ -170,4 +160,17 @@
if(client)
var/client/C = client
for(var/mob/living/carbon/human/H in view(eyeobj, 14))
C.images += H.hud_list[NATIONS_HUD]
C.images += H.hud_list[NATIONS_HUD]
/mob/living/silicon/ai/update_sight()
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(aiRestorePowerRoutine)
sight = sight&~SEE_TURFS
sight = sight&~SEE_MOBS
sight = sight&~SEE_OBJS
see_in_dark = 0
if(see_override)
see_invisible = see_override
+1 -5
View File
@@ -2,9 +2,5 @@
..()
for(var/obj/machinery/ai_status_display/O in world) //change status
O.mode = 0
if(!isturf(loc))
if(client)
client.eye = loc
client.perspective = EYE_PERSPECTIVE
src.view_core()
return
return
+6 -11
View File
@@ -137,7 +137,7 @@
/mob/living/silicon/pai/check_eye(var/mob/user as mob)
if(!src.current)
return null
user.reset_view(src.current)
user.reset_perspective(src.current)
return 1
/mob/living/silicon/pai/blob_act()
@@ -261,7 +261,7 @@
usr:cameraFollow = null
if(!C)
src.unset_machine()
src.reset_view(null)
src.reset_perspective(null)
return 0
if(stat == 2 || !C.status || !(src.network in C.network)) return 0
@@ -269,7 +269,7 @@
src.set_machine(src)
src:current = C
src.reset_view(C)
src.reset_perspective(C)
return 1
/mob/living/silicon/pai/verb/reset_record_view()
@@ -288,7 +288,7 @@
/mob/living/silicon/pai/cancel_camera()
set category = "pAI Commands"
set name = "Cancel Camera View"
src.reset_view(null)
src.reset_perspective(null)
src.unset_machine()
src:cameraFollow = null
@@ -297,7 +297,7 @@
/mob/living/silicon/pai/proc/pai_network_change()
set category = "pAI Commands"
set name = "Change Camera Network"
src.reset_view(null)
src.reset_perspective(null)
src.unset_machine()
src:cameraFollow = null
var/cameralist[0]
@@ -363,9 +363,6 @@
var/obj/item/device/pda/holder = card.loc
holder.pai = null
if(client)
client.perspective = EYE_PERSPECTIVE
client.eye = src
forceMove(get_turf(card))
card.forceMove(src)
@@ -487,9 +484,7 @@
visible_message("<span class=notice>[src] neatly folds inwards, compacting down to a rectangular card.</span>", "<span class=notice>You neatly fold inwards, compacting down to a rectangular card.</span>")
stop_pulling()
if(client)
client.perspective = EYE_PERSPECTIVE
client.eye = card
reset_perspective(card)
// If we are being held, handle removing our holder from their inv.
var/obj/item/weapon/holder/H = loc
+12 -13
View File
@@ -37,19 +37,23 @@ var/global/list/default_pai_software = list()
ui_interact(src)
/mob/living/silicon/pai/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
if(user != src)
if(ui) ui.set_status(STATUS_CLOSE, 0)
return
/mob/living/silicon/pai/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, datum/topic_state/state = self_state)
if(ui_key != "main")
var/datum/pai_software/S = software[ui_key]
if(S && !S.toggle)
S.on_ui_interact(src, ui, force_open)
else
if(ui) ui.set_status(STATUS_CLOSE, 0)
if(ui)
ui.set_status(STATUS_CLOSE, 0)
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600, state = state)
ui.open()
ui.set_auto_update(1)
/mob/living/silicon/pai/ui_data(mob/user, datum/topic_state/state = self_state)
var/data[0]
// Software we have bought
@@ -84,12 +88,7 @@ var/global/list/default_pai_software = list()
data["emotions"] = emotions
data["current_emotion"] = card.current_emotion
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/mob/living/silicon/pai/Topic(href, href_list)
if(..())
@@ -122,4 +121,4 @@ var/global/list/default_pai_software = list()
var/img = text2num(href_list["image"])
if(1 <= img && img <= 9)
card.setEmotion(img)
return 1
return 1
@@ -17,6 +17,7 @@
if(istype(O,/obj/item/borg/sight))
var/obj/item/borg/sight/S = O
sight_mode &= ~S.sight_mode
update_sight()
if(client)
client.screen -= O
@@ -52,6 +53,7 @@
if((cell.charge * 100 / cell.maxcharge) < B.powerneeded)
to_chat(src, "Not enough power to activate [B.name]!")
return
var/activated_thingy = null
if(!module_state_1)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_1 = O
@@ -59,8 +61,7 @@
O.plane = HUD_PLANE
O.screen_loc = inv1.screen_loc
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
activated_thingy = O
else if(!module_state_2)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_2 = O
@@ -68,8 +69,7 @@
O.plane = HUD_PLANE
O.screen_loc = inv2.screen_loc
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
activated_thingy = O
else if(!module_state_3)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_3 = O
@@ -77,11 +77,12 @@
O.plane = HUD_PLANE
O.screen_loc = inv3.screen_loc
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode
activated_thingy = O
else
to_chat(src, "You need to disable a module first!")
src.update_icons()
if(istype(activated_thingy,/obj/item/borg/sight))
update_sight()
update_icons()
/mob/living/silicon/robot/proc/uneq_active()
uneq_module(module_active)
+29 -23
View File
@@ -120,32 +120,38 @@
return 1
/mob/living/silicon/robot/update_sight()
if(stat == DEAD || sight_mode & BORGXRAY)
if(!client)
return
if(stat == DEAD)
grant_death_vision()
return
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(client.eye != src)
var/atom/A = client.eye
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
return
if(sight_mode & BORGMESON)
sight |= SEE_TURFS
see_invisible = min(see_invisible, SEE_INVISIBLE_MINIMUM)
see_in_dark = 1
if(sight_mode & BORGXRAY)
sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
see_invisible = SEE_INVISIBLE_LIVING
see_in_dark = 8
if(sight_mode & BORGTHERM)
sight |= SEE_MOBS
sight |= SEE_OBJS
see_invisible = min(see_invisible, SEE_INVISIBLE_LIVING)
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else
see_in_dark = 8
if(sight_mode & BORGMESON && sight_mode & BORGTHERM)
sight |= SEE_TURFS
sight |= SEE_MOBS
see_invisible = SEE_INVISIBLE_MINIMUM
else if(sight_mode & BORGMESON)
sight |= SEE_TURFS
see_invisible = SEE_INVISIBLE_MINIMUM
see_in_dark = 1
else if(sight_mode & BORGTHERM)
sight |= SEE_MOBS
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if(stat != DEAD)
sight &= ~SEE_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
if(see_override)
see_invisible = see_override
/mob/living/silicon/robot/handle_hud_icons()
update_items()
+15 -3
View File
@@ -84,7 +84,7 @@ var/list/robot_verbs_default = list(
var/ionpulse = 0 // Jetpack-like effect.
var/ionpulse_on = 0 // Jetpack-like effect.
var/datum/effect/system/ion_trail_follow/ion_trail // Ionpulse effect.
var/datum/action/item_action/toggle_research_scanner/scanner = null
/mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0, var/alien = 0)
@@ -960,11 +960,11 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/proc/allowed(obj/item/I)
var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob
dummy.req_access = req_access
if(dummy.check_access(I))
qdel(dummy)
return 1
qdel(dummy)
return 0
@@ -1456,3 +1456,15 @@ var/list/robot_verbs_default = list(
disable_component("comms", 160)
if(2)
disable_component("comms", 60)
/mob/living/silicon/robot/rejuvenate()
..()
var/brute = 1000
var/burn = 1000
var/list/datum/robot_component/borked_parts = get_damaged_components(brute,burn,1)
for(var/datum/robot_component/borked_part in borked_parts)
brute = borked_part.brute_damage
burn = borked_part.electronics_damage
borked_part.installed = 1
borked_part.wrapped = new borked_part.external_type
borked_part.heal_damage(brute,burn)
borked_part.install()
@@ -26,6 +26,7 @@
var/mob/living/carbon/oldpatient = null
var/oldloc = null
var/last_found = 0
var/last_warning = 0
var/last_newpatient_speak = 0 //Don't spam the "HEY I'M COMING" messages
var/injection_amount = 15 //How much reagent do we inject at a time?
var/heal_threshold = 10 //Start healing when they have this much damage in a category
@@ -253,6 +254,12 @@
oldpatient = user
/mob/living/simple_animal/bot/medbot/process_scan(mob/living/carbon/human/H)
if(buckled)
if((last_warning + 300) < world.time)
speak("<span class='danger'>Movement restrained! Unit on standby!</span>")
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
last_warning = world.time
return
if(H.stat == 2)
return
@@ -368,6 +375,9 @@
if(declare_crit && C.health <= 0) //Critical condition! Call for help!
declare(C)
if(!C.has_organic_damage())
return 0
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
if((reagent_glass) && (use_beaker) && ((C.getBruteLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getOxyLoss() >= (heal_threshold + 15))))
for(var/datum/reagent/R in reagent_glass.reagents.reagent_list)
@@ -393,9 +393,8 @@
passenger = M
load = M
can_buckle = FALSE
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
// Not sure why this is done
reset_perspective(src)
return TRUE
return FALSE
@@ -423,9 +422,7 @@
if(ismob(load))
var/mob/M = load
if(M.client)
M.client.perspective = MOB_PERSPECTIVE
M.client.eye = M
M.reset_perspective(null)
unbuckle_mob()
if(load)
@@ -452,9 +449,7 @@
AM.pixel_y = initial(AM.pixel_y)
if(ismob(AM))
var/mob/M = AM
if(M.client)
M.client.perspective = MOB_PERSPECTIVE
M.client.eye = M
M.reset_perspective(null)
/mob/living/simple_animal/bot/mulebot/call_bot()
..()
@@ -95,11 +95,6 @@
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
force_threshold = 11
/mob/living/simple_animal/construct/armoured/Life()
weakened = 0
return ..()
/mob/living/simple_animal/construct/armoured/bullet_act(var/obj/item/projectile/P)
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
var/reflectchance = 80 - round(P.damage/3)
@@ -118,11 +118,11 @@
for(var/atom/check in check_list)
for(var/mob/living/M in viewers(world.view + 1, check) - src)
if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege)
if(M.can_see())
if(M.has_vision())
return M
for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
if(M.occupant && M.occupant.client)
if(M.occupant.can_see())
if(M.occupant.has_vision())
return M.occupant
return null
@@ -706,6 +706,22 @@
/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion
return
/mob/living/simple_animal/update_sight()
if(!client)
return
if(stat == DEAD)
grant_death_vision()
return
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(client.eye != src)
var/atom/A = client.eye
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
return
/mob/living/simple_animal/SetEarDamage()
return
@@ -212,9 +212,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
//||Fur and Fur Products ||
/obj
var/f_amt = 0 // registers fur amount as an object variable
/obj/item/stack/sheet/fur //basic fur sheets (very lumpy furry piles of sheets)
name = "pile of fur"
@@ -223,38 +220,40 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
icon = 'icons/mob/tribbles.dmi'
icon_state = "sheet-fur"
origin_tech = "materials=2"
f_amt = 1000
max_amount = 50
/obj/item/clothing/ears/earmuffs/tribblemuffs //earmuffs but with tribbles
name = "earmuffs"
desc = "Protects your hearing from loud noises, and quiet ones as well."
icon = 'icons/mob/tribbles.dmi'
icon_state = "tribblemuffs"
item_state = "tribblemuffs"
f_amt = 2000
/* The advanced cold protection of the non-coat items has been removed, so as not
to give patreon donors an unfair advantage - the winter coat provides equivalent
cold protection
*/
/obj/item/clothing/gloves/furgloves
desc = "These gloves are warm and furry."
name = "fur gloves"
icon = 'icons/mob/tribbles.dmi'
icon_state = "furglovesico"
item_state = "furgloves"
f_amt = 3000
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
transfer_prints = TRUE
transfer_blood = TRUE
siemens_coefficient = 0
// Equivalent to a winter coat's hood
/obj/item/clothing/head/furcap
name = "fur cap"
desc = "A warm furry cap."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furcap"
item_state = "furcap"
f_amt = 5000
cold_protection = HEAD
min_cold_protection_temperature = HELMET_MIN_TEMP_PROTECT
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
/obj/item/clothing/shoes/furboots
name = "fur boots"
@@ -262,11 +261,8 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
icon = 'icons/mob/tribbles.dmi'
icon_state = "furboots"
item_state = "furboots"
f_amt = 4000
cold_protection = FEET
min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT
// As a donator piece of clothing, this is now in line with the winter coat
/obj/item/clothing/suit/furcoat
name = "fur coat"
desc = "A trenchcoat made from fur. You could put an oxygen tank in one of the pockets."
@@ -274,11 +270,10 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
icon_state = "furcoat"
item_state = "furcoat"
blood_overlay_type = "armor"
f_amt = 15000
body_parts_covered = UPPER_TORSO|LEGS|ARMS|LOWER_TORSO
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO
allowed = list (/obj/item/weapon/tank/emergency_oxygen)
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
cold_protection = UPPER_TORSO | LOWER_TORSO | ARMS
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
/obj/item/clothing/suit/furcape
name = "fur cape"
@@ -287,7 +282,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
icon_state = "furcape"
item_state = "furcape"
blood_overlay_type = "armor"
f_amt = 10000
body_parts_covered = UPPER_TORSO|LEGS|ARMS
cold_protection = UPPER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
body_parts_covered = UPPER_TORSO|ARMS
cold_protection = UPPER_TORSO | ARMS
min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
+3 -2
View File
@@ -35,7 +35,7 @@
// death() is used to make a mob die
// handles revival through other means than cloning or adminbus (defib, IPC repair)
/mob/living/proc/update_revive()
/mob/living/proc/update_revive(updating = TRUE)
if(stat != DEAD)
return
if(!can_be_revived())
@@ -45,6 +45,7 @@
dead_mob_list -= src
living_mob_list += src
timeofdeath = null
update_canmove()
if(updating)
update_canmove()
// update_blind_effects()
updatehealth()
+1 -1
View File
@@ -411,7 +411,7 @@
/mob/living/SetStuttering(amount, force = 0)
//From mob/living/apply_effect: "Stuttering is often associated with Stun"
if(status_flags & CANSTUN || force)
stuttering = max(stuttering, 0)
stuttering = max(amount, 0)
/mob/living/AdjustStuttering(amount, bound_lower = 0, bound_upper = INFINITY, force = 0)
var/new_value = directional_bounded_sum(stuttering, amount, bound_lower, bound_upper)
+2 -2
View File
@@ -1,5 +1,5 @@
/mob/living/update_blind_effects()
if(!can_see())
if(!has_vision())
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
throw_alert("blind", /obj/screen/alert/blind)
return 1
@@ -43,7 +43,7 @@
return !(ear_deaf || (disabilities & DEAF))
// Whether the mob is able to see
/mob/living/can_see()
/mob/living/has_vision()
return !(eye_blind || (disabilities & BLIND) || stat)
// Whether the mob is capable of talking
+1 -6
View File
@@ -43,12 +43,7 @@
sight |= SEE_SELF
..()
if(loc && !isturf(loc))
client.eye = loc
client.perspective = EYE_PERSPECTIVE
else
client.eye = src
client.perspective = MOB_PERSPECTIVE
reset_perspective(loc)
if(ckey in deadmins)
+14 -10
View File
@@ -3,15 +3,19 @@
unset_machine()
player_list -= src
log_access("Logout: [key_name(src)]")
if(admin_datums[src.ckey])
if(ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
var/admins_number = admins.len
// `holder` is nil'd out by now, so we check the `admin_datums` array directly
//Only report this stuff if we are currently playing.
if(admin_datums[ckey] && ticker && ticker.current_state == GAME_STATE_PLAYING)
var/datum/admins/temp_admin = admin_datums[ckey]
// Triggers on people with banhammer power only - no mentors tripping the alarm
if(temp_admin.rights & R_BAN)
message_admins("Admin logout: [key_name_admin(src)]")
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
send2adminirc("[key_name(src)] logged out - no more admins online.")
var/list/admincounter = staff_countup(R_BAN)
if(admincounter[1] == 0) // No active admins
send2irc(config.admin_notify_irc, "[key_name(src)] logged out - No active admins, [admincounter[2]] non-admin staff, [admincounter[3]] inactive staff.")
..()
callHook("mob_logout", list("client" = client, "mob" = src))
return 1
callHook("mob_logout", list("client" = client, "mob" = src))
return 1
+31 -5
View File
@@ -62,7 +62,7 @@
if(!client) return
if(type)
if(type & 1 && !can_see())//Vision related
if(type & 1 && !has_vision())//Vision related
if(!( alt ))
return
else
@@ -74,7 +74,7 @@
else
msg = alt
type = alt_type
if(type & 1 && !can_see())
if(type & 1 && !has_vision())
return
// Added voice muffling for Issue 41.
if(stat == UNCONSCIOUS || (sleeping > 0 && stat != DEAD))
@@ -487,7 +487,8 @@ var/list/slot_equipment_priority = list( \
return 0 //Unsupported slot
//END HUMAN
/mob/proc/reset_view(atom/A)
// If you're looking for `reset_perspective`, that's a synonym for this proc.
/mob/proc/reset_perspective(atom/A)
if(client)
if(istype(A, /atom/movable))
client.perspective = EYE_PERSPECTIVE
@@ -499,8 +500,33 @@ var/list/slot_equipment_priority = list( \
else
client.perspective = EYE_PERSPECTIVE
client.eye = loc
return
return 1
/mob/living/reset_perspective(atom/A)
. = ..()
if(.)
// Above check means the mob has a client
update_sight()
if(client.eye != src)
var/atom/AT = client.eye
AT.get_remote_view_fullscreens(src)
else
clear_fullscreen("remote_view", 0)
update_pipe_vision()
/mob/dead/reset_perspective(atom/A)
if(client)
if(ismob(client.eye) && (client.eye != src))
// Note to self: Use `client.eye` for ghost following in place
// of periodic ghost updates
var/mob/target = client.eye
target.following_mobs -= src
. = ..()
if(.)
// Allows sharing HUDs with ghosts
if(hud_used)
client.screen = list()
hud_used.show_hud(hud_used.hud_version)
/mob/proc/show_inv(mob/user)
user.set_machine(src)
@@ -793,7 +819,7 @@ var/list/slot_equipment_priority = list( \
/mob/verb/cancel_camera()
set name = "Cancel Camera View"
set category = "OOC"
reset_view(null)
reset_perspective(null)
unset_machine()
if(istype(src, /mob/living))
if(src:cameraFollow)
+1 -6
View File
@@ -148,7 +148,7 @@
view = world.view //Reset the view
winset(src, "mapwindow.map", "icon-size=[src.reset_stretch]")
viewingCanvas = 0
mob.reset_view()
mob.reset_perspective()
if(mob.hud_used)
mob.hud_used.show_hud(HUD_STYLE_STANDARD)
@@ -162,11 +162,6 @@
if(!mob) return
if(locate(/obj/effect/stop/, mob.loc))
for(var/obj/effect/stop/S in mob.loc)
if(S.victim == mob)
return
if(mob.stat==DEAD) return
// handle possible spirit movement
@@ -291,11 +291,20 @@
if(current_species && (current_species.bodyflags & HAS_TAIL))
var/tail_icon
var/tail_icon_state
var/tail_shift_x
var/tail_shift_y
var/blend_mode = ICON_ADD
if(body_accessory)
var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory]
tail_icon = accessory.icon
tail_icon_state = accessory.icon_state
if(accessory.blend_mode)
blend_mode = accessory.blend_mode
if(accessory.pixel_x_offset)
tail_shift_x = accessory.pixel_x_offset
if(accessory.pixel_y_offset)
tail_shift_y = accessory.pixel_y_offset
else
tail_icon = "icons/effects/species.dmi"
if(coloured_tail)
@@ -303,10 +312,14 @@
else
tail_icon_state = "[current_species.tail]_s"
var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state)
var/icon/temp = new/icon("icon" = tail_icon, "icon_state" = tail_icon_state)
if(tail_shift_x)
temp.Shift(EAST, tail_shift_x)
if(tail_shift_y)
temp.Shift(NORTH, tail_shift_y)
if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
temp.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
temp.Blend(rgb(r_skin, g_skin, b_skin), blend_mode)
if(current_species && (current_species.bodyflags & HAS_TAIL_MARKINGS))
var/tail_marking = m_styles["tail"]
@@ -65,19 +65,23 @@
/datum/sprite_accessory/hair
icon = 'icons/mob/human_face.dmi' // default icon for all hairs
var/glasses_over //Hair styles with hair that don't overhang the arms of glasses should have glasses_over set to a positive value.
/datum/sprite_accessory/hair/bald
name = "Bald"
icon_state = "bald"
species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton", "Vulpkanin", "Tajaran")
glasses_over = 1
/datum/sprite_accessory/hair/short
name = "Short Hair" // try to capatilize the names please~
icon_state = "hair_a" // you do not need to define _s or _l sub-states, game automatically does this for you
glasses_over = 1
/datum/sprite_accessory/hair/cut
name = "Cut Hair"
icon_state = "hair_c"
glasses_over = 1
/datum/sprite_accessory/hair/long
name = "Shoulder-length Hair"
@@ -123,6 +127,7 @@
name = "Ponytail male"
icon_state = "hair_ponytailm"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/ponytail2
name = "Ponytail female"
@@ -132,16 +137,19 @@
/datum/sprite_accessory/hair/ponytail3
name = "Ponytail alt"
icon_state = "hair_ponytail3"
glasses_over = 1
/datum/sprite_accessory/hair/sideponytail
name = "Side Ponytail"
icon_state = "hair_stail"
gender = FEMALE
glasses_over = 1
/datum/sprite_accessory/hair/highponytail
name = "High Ponytail"
icon_state = "hair_highponytail"
gender = FEMALE
glasses_over = 1
/datum/sprite_accessory/hair/wisp
name = "Wisp"
@@ -157,11 +165,13 @@
icon_state = "hair_pompadour"
gender = MALE
species_allowed = list("Human", "Slime People", "Unathi")
glasses_over = 1
/datum/sprite_accessory/hair/quiff
name = "Quiff"
icon_state = "hair_quiff"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/bedhead
name = "Bedhead"
@@ -197,6 +207,7 @@
name = "Bowl"
icon_state = "hair_bowlcut"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/braid2
name = "Long Braid"
@@ -219,20 +230,24 @@
icon_state = "hair_buzzcut"
gender = MALE
species_allowed = list("Human", "Slime People", "Unathi")
glasses_over = 1
/datum/sprite_accessory/hair/crew
name = "Crewcut"
icon_state = "hair_crewcut"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/combover
name = "Combover"
icon_state = "hair_combover"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/devillock
name = "Devil Lock"
icon_state = "hair_devilock"
glasses_over = 1
/datum/sprite_accessory/hair/dreadlocks
name = "Dreadlocks"
@@ -249,6 +264,7 @@
/datum/sprite_accessory/hair/afro2
name = "Afro 2"
icon_state = "hair_afro2"
glasses_over = 1
/datum/sprite_accessory/hair/afro_large
name = "Big Afro"
@@ -259,6 +275,7 @@
name = "Flat Top"
icon_state = "hair_sergeant"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/emo
name = "Emo"
@@ -276,31 +293,37 @@
name = "Hitop"
icon_state = "hair_hitop"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/mohawk
name = "Mohawk"
icon_state = "hair_d"
species_allowed = list("Human", "Slime People", "Unathi")
glasses_over = 1
/datum/sprite_accessory/hair/jensen
name = "Adam Jensen Hair"
icon_state = "hair_jensen"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/cia
name = "CIA"
icon_state = "hair_cia"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/mulder
name = "Mulder"
icon_state = "hair_mulder"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/gelled
name = "Gelled Back"
icon_state = "hair_gelled"
gender = FEMALE
glasses_over = 1
/datum/sprite_accessory/hair/gentle
name = "Gentle"
@@ -311,6 +334,7 @@
name = "Spiky"
icon_state = "hair_spikey"
species_allowed = list("Human", "Slime People", "Unathi")
glasses_over = 1
/datum/sprite_accessory/hair/kusanagi
name = "Kusanagi Hair"
@@ -320,6 +344,7 @@
name = "Pigtails"
icon_state = "hair_kagami"
gender = FEMALE
glasses_over = 1
/datum/sprite_accessory/hair/himecut
name = "Hime Cut"
@@ -335,6 +360,7 @@
name = "Odango"
icon_state = "hair_odango"
gender = FEMALE
glasses_over = 1
/datum/sprite_accessory/hair/ombre
name = "Ombre"
@@ -349,11 +375,13 @@
/datum/sprite_accessory/hair/skinhead
name = "Skinhead"
icon_state = "hair_skinhead"
glasses_over = 1
/datum/sprite_accessory/hair/balding
name = "Balding Hair"
icon_state = "hair_e"
gender = MALE // turnoff!
glasses_over = 1
/datum/sprite_accessory/hair/longemo
name = "Long Emo"
@@ -385,6 +413,7 @@
name = "Unshaven Mohawk"
icon_state = "hair_unshavenmohawk"
gender = MALE
glasses_over = 1
/datum/sprite_accessory/hair/drills
name = "Twincurls"
@@ -401,6 +430,7 @@
/datum/sprite_accessory/hair/ipc
species_allowed = list("Machine")
glasses_over = 1
/datum/sprite_accessory/hair/ipc/ipc_screen_pink
name = "Pink IPC Screen"
@@ -547,6 +577,7 @@
/datum/sprite_accessory/hair/unathi
species_allowed = list("Unathi")
glasses_over = 1
/datum/sprite_accessory/hair/unathi/una_horns
name = "Unathi Horns"
@@ -593,6 +624,7 @@
/datum/sprite_accessory/hair/tajara
species_allowed = list("Tajaran")
glasses_over = 1
/datum/sprite_accessory/hair/tajara/taj_hair_clean
name = "Tajara Clean"
@@ -601,11 +633,13 @@
/datum/sprite_accessory/hair/tajara/taj_hair_bangs
name = "Tajara Bangs"
icon_state = "hair_bangs"
glasses_over = null
/datum/sprite_accessory/hair/tajara/taj_hair_braid
name = "Tajara Braid"
icon_state = "hair_tbraid"
secondary_theme = "beads"
glasses_over = null
/datum/sprite_accessory/hair/tajara/taj_hair_shaggy
name = "Tajara Shaggy"
@@ -642,22 +676,27 @@
/datum/sprite_accessory/hair/tajara/taj_hair_curls
name = "Tajara Curly"
icon_state = "hair_curly"
glasses_over = null
/datum/sprite_accessory/hair/tajara/taj_hair_retro
name = "Tajaran Ladies' Retro"
icon_state = "hair_ladies_retro"
glasses_over = null
/datum/sprite_accessory/hair/tajara/taj_hair_victory
name = "Tajara Victory Curls"
icon_state = "hair_victory"
glasses_over = null
/datum/sprite_accessory/hair/tajara/taj_hair_bob
name = "Tajara Bob"
icon_state = "hair_tbob"
glasses_over = null
/datum/sprite_accessory/hair/tajara/taj_hair_fingercurl
name = "Tajara Finger Curls"
icon_state = "hair_fingerwave"
glasses_over = null
/datum/sprite_accessory/hair/vulpkanin
species_allowed = list("Vulpkanin")
@@ -694,6 +733,7 @@
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_bun
name = "Bun"
icon_state = "bun"
glasses_over = 1
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_jagged
name = "Jagged"
@@ -706,6 +746,7 @@
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_hawk
name = "Hawk"
icon_state = "hawk"
glasses_over = 1
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_anita
name = "Anita"
@@ -718,6 +759,7 @@
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_spike
name = "Spike"
icon_state = "spike"
glasses_over = 1
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_braided
name = "Braided"
@@ -726,6 +768,7 @@
/datum/sprite_accessory/hair/vox
species_allowed = list("Vox")
glasses_over = 1
/datum/sprite_accessory/hair/vox/vox_quills_short
name = "Short Vox Quills"
@@ -787,6 +830,7 @@
/datum/sprite_accessory/hair/wryn
species_allowed = list("Wryn")
glasses_over = 1
/datum/sprite_accessory/hair/wryn/wry_antennae_default
name = "Antennae"
@@ -794,6 +838,7 @@
/datum/sprite_accessory/hair/nucleation
species_allowed = list("Nucleation")
glasses_over = 1
/datum/sprite_accessory/hair/nucleation/nuc_crystals
name = "Nucleation Crystals"
@@ -835,6 +880,7 @@
/datum/sprite_accessory/facial_hair
icon = 'icons/mob/human_face.dmi'
gender = MALE // barf (unless you're a dorf, dorfs dig chix /w beards :P)
var/over_hair
/datum/sprite_accessory/facial_hair/shaved
name = "Shaved"
@@ -1024,6 +1070,7 @@
/datum/sprite_accessory/facial_hair/unathi
species_allowed = list("Unathi")
gender = NEUTER
over_hair = 1
/datum/sprite_accessory/facial_hair/unathi/una_spines_long
name = "Long Spines"
@@ -1594,6 +1641,7 @@
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi", "Vulpkanin", "Tajaran", "Machine")
icon_state = "accessory_none"
var/over_hair
/datum/sprite_accessory/head_accessory/none
name = "None"
@@ -1602,6 +1650,7 @@
/datum/sprite_accessory/head_accessory/unathi
species_allowed = list("Unathi")
over_hair = 1
/datum/sprite_accessory/head_accessory/unathi/simple
name = "Simple"
@@ -1701,6 +1750,7 @@
/datum/sprite_accessory/head_accessory/ipc
species_allowed = list("Machine")
over_hair = 1
/datum/sprite_accessory/head_accessory/ipc/ipc_antennae
name = "Antennae"
+1 -1
View File
@@ -37,7 +37,7 @@
/mob/proc/can_hear()
return 1
/mob/proc/can_see()
/mob/proc/has_vision()
return 1
/mob/proc/can_speak()

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