mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Merge remote-tracking branch 'refs/remotes/ParadiseSS13/master' into DWI
This commit is contained in:
@@ -539,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
|
||||
|
||||
@@ -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."
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2235,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")
|
||||
|
||||
@@ -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,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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
command_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
|
||||
|
||||
@@ -213,15 +213,14 @@ 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
|
||||
|
||||
max_gear_slots = config.max_loadout_points
|
||||
if(C.donator_level >= DONATOR_LEVEL_ONE)
|
||||
max_gear_slots += 5
|
||||
if(C.donator_level >= DONATOR_LEVEL_ONE)
|
||||
max_gear_slots += 5
|
||||
|
||||
var/loaded_preferences_successfully = load_preferences(C)
|
||||
if(loaded_preferences_successfully)
|
||||
@@ -2099,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")
|
||||
@@ -2170,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()
|
||||
|
||||
@@ -148,11 +148,15 @@
|
||||
flags = GLASSESCOVERSEYES
|
||||
slot_flags = SLOT_EYES
|
||||
materials = list(MAT_GLASS = 250)
|
||||
var/emagged = 0
|
||||
var/vision_flags = 0
|
||||
var/darkness_view = 0//Base human is 2
|
||||
var/invisa_view = 0
|
||||
var/darkness_view = 0 //Base human is 2
|
||||
var/invis_view = SEE_INVISIBLE_LIVING
|
||||
var/invis_override = 0
|
||||
|
||||
var/emagged = 0
|
||||
var/color_view = null//overrides client.color while worn
|
||||
var/prescription = 0
|
||||
var/prescription_upgradable = 0
|
||||
strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets
|
||||
put_on_delay = 25
|
||||
burn_state = FIRE_PROOF
|
||||
@@ -275,8 +279,8 @@ BLIND // can't see anything
|
||||
var/blockTracking // Do we block AI tracking?
|
||||
var/HUDType = null
|
||||
var/darkness_view = 0
|
||||
var/helmet_goggles_invis_view = 0
|
||||
var/vision_flags = 0
|
||||
var/see_darkness = 1
|
||||
var/can_toggle = null
|
||||
|
||||
//Mask
|
||||
@@ -343,6 +347,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 +712,3 @@ BLIND // can't see anything
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
A.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
/obj/item/clothing/glasses
|
||||
name = "glasses"
|
||||
icon = 'icons/obj/clothing/glasses.dmi'
|
||||
//w_class = 2
|
||||
//flags = GLASSESCOVERSEYES
|
||||
//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
|
||||
|
||||
/obj/item/clothing/glasses/New()
|
||||
. = ..()
|
||||
if(prescription_upgradable && prescription)
|
||||
@@ -50,8 +37,8 @@
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2;engineering=2"
|
||||
vision_flags = SEE_TURFS
|
||||
invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
prescription_upgradable = 1
|
||||
see_darkness = 0 //don't render darkness while wearing mesons
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
@@ -113,7 +100,7 @@
|
||||
icon_state = "nvpurple"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
|
||||
/obj/item/clothing/glasses/janitor
|
||||
name = "Janitorial Goggles"
|
||||
@@ -132,7 +119,7 @@
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
@@ -360,7 +347,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
|
||||
@@ -399,7 +388,6 @@
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=3"
|
||||
vision_flags = SEE_MOBS
|
||||
invisa_view = 2
|
||||
flash_protect = -1
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
icon_state = "healthhudnight"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
prescription_upgradable = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/diagnostic
|
||||
@@ -66,7 +66,7 @@
|
||||
icon_state = "diagnostichudnight"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
prescription_upgradable = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/security
|
||||
@@ -95,14 +95,13 @@
|
||||
icon_state = "jensenshades"
|
||||
item_state = "jensenshades"
|
||||
vision_flags = SEE_MOBS
|
||||
invisa_view = 2
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/night
|
||||
name = "\improper Night Vision Security HUD"
|
||||
desc = "An advanced heads-up display which provides id data and vision in complete darkness."
|
||||
icon_state = "securityhudnight"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
prescription_upgradable = 0
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/sunglasses
|
||||
@@ -133,5 +132,5 @@
|
||||
icon_state = "hydroponichudnight"
|
||||
item_state = "glasses"
|
||||
darkness_view = 8
|
||||
see_darkness = 0
|
||||
invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
prescription_upgradable = 0
|
||||
@@ -63,7 +63,7 @@
|
||||
name = "night-vision helmet"
|
||||
desc = "A helmet with a built-in pair of night vision goggles."
|
||||
icon_state = "helmetNVG"
|
||||
see_darkness = 0
|
||||
helmet_goggles_invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
|
||||
/obj/item/clothing/head/helmet/alt
|
||||
name = "bulletproof helmet"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
unacidable = 1
|
||||
vision_flags = SEE_MOBS
|
||||
see_darkness = 0
|
||||
helmet_goggles_invis_view = SEE_INVISIBLE_MINIMUM //don't render darkness while wearing these
|
||||
HUDType = MEDHUD
|
||||
strip_delay = 130
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
user.unset_machine()
|
||||
return null
|
||||
|
||||
user.reset_view(S.current)
|
||||
user.reset_perspective(S.current)
|
||||
return 1
|
||||
|
||||
/*
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
if(!computer.cardslot)
|
||||
computer.Crash(MISSING_PERIPHERAL)
|
||||
return
|
||||
usr.set_machine(src)
|
||||
scan = computer.cardslot.reader
|
||||
if(!interactable())
|
||||
return
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
if(!computer.cardslot)
|
||||
computer.Crash(MISSING_PERIPHERAL)
|
||||
return
|
||||
usr.set_machine(src)
|
||||
scan = computer.cardslot.reader
|
||||
|
||||
if(computer.cardslot.dualslot)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
|
||||
|
||||
interact(mob/user)
|
||||
usr.set_machine(src)
|
||||
if(!interactable())
|
||||
return
|
||||
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(..())
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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."})
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/Login()
|
||||
..()
|
||||
if(!isturf(loc))
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
return
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>"
|
||||
@@ -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)
|
||||
|
||||
@@ -49,9 +49,6 @@
|
||||
dna.real_name = real_name
|
||||
sync_organ_dna(1)
|
||||
|
||||
if(species)
|
||||
species.handle_dna(src)
|
||||
|
||||
UpdateAppearance()
|
||||
|
||||
/mob/living/carbon/human/OpenCraftingMenu()
|
||||
@@ -724,6 +721,17 @@
|
||||
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)
|
||||
@@ -1594,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()
|
||||
|
||||
@@ -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,12 @@
|
||||
update_hair() //rebuild hair
|
||||
update_fhair()
|
||||
update_head_accessory()
|
||||
// Bandanas and paper hats go on the head but are not head clothing
|
||||
if(istype(I,/obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = I
|
||||
if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view)
|
||||
update_sight()
|
||||
head_update(I)
|
||||
update_inv_head()
|
||||
else if(I == r_ear)
|
||||
r_ear = null
|
||||
@@ -140,6 +153,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 +217,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 +262,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 +280,12 @@
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
update_fhair(redraw_mob)
|
||||
update_head_accessory(redraw_mob)
|
||||
// paper + bandanas
|
||||
if(istype(W, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = W
|
||||
if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view)
|
||||
update_sight()
|
||||
head_update(W)
|
||||
update_inv_head(redraw_mob)
|
||||
if(slot_shoes)
|
||||
shoes = W
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -470,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)
|
||||
@@ -684,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.helmet_goggles_invis_view)
|
||||
H.see_invisible = min(hat.helmet_goggles_invis_view, H.see_invisible)
|
||||
|
||||
if(istype(H.back, /obj/item/weapon/rig)) ///aghhh 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
|
||||
|
||||
H.see_invisible = min(G.invis_view, H.see_invisible)
|
||||
|
||||
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)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -287,6 +287,10 @@
|
||||
adjustFireLoss(burn)
|
||||
src.updatehealth()
|
||||
|
||||
/mob/living/proc/has_organic_damage()
|
||||
return (maxHealth - health)
|
||||
|
||||
|
||||
/mob/living/proc/restore_all_organs()
|
||||
return
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
+29
-3
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -56,6 +56,13 @@
|
||||
return 1
|
||||
|
||||
/datum/nano_module/alarm_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/alarm_monitor/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
var/categories[0]
|
||||
@@ -80,9 +87,4 @@
|
||||
"lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : ""))
|
||||
data["categories"] = categories
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
@@ -29,20 +29,21 @@
|
||||
alarm.ui_interact(usr, master_ui = ui_ref, state = TS)
|
||||
|
||||
/datum/nano_module/atmos_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["alarms"] = air_alarm_repository.air_alarm_data(monitored_alarms)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 900, 800, state = state)
|
||||
ui.add_template("mapContent", "atmos_control_map_content.tmpl")
|
||||
ui.add_template("mapHeader", "atmos_control_map_header.tmpl")
|
||||
ui.set_show_map(1)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
ui_ref = ui
|
||||
|
||||
/datum/nano_module/atmos_control/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["alarms"] = air_alarm_repository.air_alarm_data(monitored_alarms)
|
||||
return data
|
||||
|
||||
/datum/nano_module/atmos_control/proc/generate_state(air_alarm)
|
||||
var/datum/topic_state/air_alarm/state = new()
|
||||
state.atmos_control = src
|
||||
|
||||
@@ -17,14 +17,7 @@
|
||||
return 1
|
||||
|
||||
/datum/nano_module/crew_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
|
||||
var/data[0]
|
||||
var/turf/T = get_turf(nano_host())
|
||||
|
||||
data["isAI"] = isAI(user)
|
||||
data["crewmembers"] = crew_repository.health_data(T)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800)
|
||||
|
||||
@@ -33,8 +26,16 @@
|
||||
// adding a template with the key "mapHeader" replaces the map header content
|
||||
ui.add_template("mapHeader", "crew_monitor_map_header.tmpl")
|
||||
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
// should make the UI auto-update; doesn't seem to?
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/crew_monitor/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
var/turf/T = get_turf(nano_host())
|
||||
|
||||
data["isAI"] = isAI(user)
|
||||
data["crewmembers"] = crew_repository.health_data(T)
|
||||
|
||||
return data
|
||||
|
||||
@@ -211,6 +211,13 @@
|
||||
return 0
|
||||
|
||||
/datum/nano_module/appearance_changer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/appearance_changer/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
generate_data(check_whitelist, whitelist, blacklist)
|
||||
var/data[0]
|
||||
|
||||
@@ -302,12 +309,8 @@
|
||||
data["change_head_marking_color"] = can_change_markings("head")
|
||||
data["change_body_marking_color"] = can_change_markings("body")
|
||||
data["change_tail_marking_color"] = can_change_markings("tail")
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
return data
|
||||
|
||||
/datum/nano_module/appearance_changer/proc/update_dna()
|
||||
if(owner && (flags & APPEARANCE_UPDATE_DNA))
|
||||
|
||||
@@ -148,6 +148,13 @@
|
||||
return 0
|
||||
|
||||
/datum/nano_module/law_manager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner.name]"), 800, is_malf(user) ? 600 : 400, state = state)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/law_manager/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
owner.lawsync()
|
||||
|
||||
@@ -176,12 +183,7 @@
|
||||
data["channels"] = channels
|
||||
data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner.name]"), 800, is_malf(user) ? 600 : 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/datum/nano_module/law_manager/proc/package_laws(var/list/data, var/field, var/list/datum/ai_law/laws)
|
||||
var/packaged_laws[0]
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
powermonitor = nano_host()
|
||||
|
||||
/datum/nano_module/power_monitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 700, state = state)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/power_monitor/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["powermonitor"] = powermonitor
|
||||
@@ -28,12 +35,7 @@
|
||||
data["powerdemand"] = powermonitor.powernet.load
|
||||
data["apcs"] = apc_repository.apc_data(powermonitor)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 700, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/datum/nano_module/power_monitor/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/**
|
||||
* The ui_interact proc is used to open and update Nano UIs
|
||||
* If ui_interact is not used then the UI will not update correctly
|
||||
* ui_interact is currently defined for /atom/movable
|
||||
* ui_interact is currently defined for /datum
|
||||
*
|
||||
* @param user /mob The mob who is interacting with this ui
|
||||
* @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main")
|
||||
@@ -40,5 +40,16 @@
|
||||
/datum/proc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nano_ui/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
return
|
||||
|
||||
/**
|
||||
* The ui_data proc is used to get data for the interface
|
||||
*
|
||||
* @param user /mob The mob who is viewing this ui
|
||||
* @param state /datum/topic_state Current topic state of the UI
|
||||
*
|
||||
* @return list()
|
||||
*/
|
||||
/datum/proc/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
return list()
|
||||
|
||||
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob
|
||||
/mob/var/list/open_uis = list()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data
|
||||
*
|
||||
* @param user /mob The mob who opened/owns the ui
|
||||
* @param src_object /obj|/mob The obj or mob which the ui belongs to
|
||||
* @param src_object /datum The datum which the ui belongs to
|
||||
* @param ui_key string A string key used for the ui
|
||||
* @param ui /datum/nanoui An existing instance of the ui (can be null)
|
||||
* @param data list The data to be passed to the ui, if it exists
|
||||
@@ -18,19 +18,17 @@
|
||||
*
|
||||
* @return /nanoui Returns the found ui, for null if none exists
|
||||
*/
|
||||
/datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data, var/force_open = 0)
|
||||
/datum/nanomanager/proc/try_update_ui(var/mob/user, var/datum/src_object, ui_key, var/datum/nanoui/ui, var/force_open = 0)
|
||||
if(isnull(ui)) // no ui has been passed, so we'll search for one
|
||||
{
|
||||
ui = get_open_ui(user, src_object, ui_key)
|
||||
}
|
||||
|
||||
if(!isnull(ui))
|
||||
// The UI is already open
|
||||
var/data = src_object.ui_data(user, ui.state) // Get data from src_object.
|
||||
if(!force_open)
|
||||
ui.push_data(data)
|
||||
return ui
|
||||
else
|
||||
//testing("nanomanager/try_update_ui mob [user.name] [src_object:name] [ui_key] [force_open] - forcing opening of ui")
|
||||
ui.close()
|
||||
ui.reinitialize(null, data)
|
||||
return ui
|
||||
return null
|
||||
|
||||
/**
|
||||
@@ -227,4 +225,4 @@
|
||||
|
||||
oldMob.open_uis.Cut()
|
||||
|
||||
return 1 // success
|
||||
return 1 // success
|
||||
|
||||
@@ -46,7 +46,7 @@ nanoui is used to open and update nano browser uis
|
||||
// the map z level to display
|
||||
var/map_z_level = 1
|
||||
// initial data, containing the full data structure, must be sent to the ui (the data structure cannot be extended later on)
|
||||
var/list/initial_data[0]
|
||||
var/list/initial_data = null // Initialize as null for proper ! usage in initial set up
|
||||
// set to 1 to update the ui automatically every master_controller tick
|
||||
var/is_auto_updating = 0
|
||||
// the current status/visibility of the ui
|
||||
@@ -405,19 +405,34 @@ nanoui is used to open and update nano browser uis
|
||||
/datum/nanoui/proc/open()
|
||||
if(!user.client)
|
||||
return
|
||||
|
||||
var/window_size = ""
|
||||
if(width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
|
||||
update_status(0)
|
||||
if(status == STATUS_CLOSE)
|
||||
return
|
||||
|
||||
if(!initial_data)
|
||||
set_initial_data(src_object.ui_data(user, state)) // Get the UI data.
|
||||
|
||||
user << browse(get_html(), "window=[window_id];[window_size][window_options]")
|
||||
winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map
|
||||
on_close_winset()
|
||||
//onclose(user, window_id)
|
||||
nanomanager.ui_opened(src)
|
||||
|
||||
/**
|
||||
* Reinitialize the UI with
|
||||
*/
|
||||
/datum/nanoui/proc/reinitialize(template, list/data)
|
||||
if(template)
|
||||
add_template("main", template)
|
||||
if(data)
|
||||
set_initial_data(data)
|
||||
open()
|
||||
|
||||
/**
|
||||
* Close this UI
|
||||
*
|
||||
|
||||
@@ -57,7 +57,14 @@ var/list/alldepartments = list()
|
||||
to_chat(user, "<span class='warning'>You swipe the card through [src], but nothing happens.</span>")
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/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, "faxmachine.tmpl", "Fax Machine UI", 540, 450)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
if(scan)
|
||||
data["scan_name"] = scan.name
|
||||
else
|
||||
@@ -82,11 +89,7 @@ var/list/alldepartments = list()
|
||||
else
|
||||
data["respectcooldown"] = 0
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "faxmachine.tmpl", "Fax Machine UI", 540, 450)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
return data
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -128,7 +131,7 @@ var/list/alldepartments = list()
|
||||
var/list/combineddepartments = alldepartments
|
||||
if(long_range_enabled)
|
||||
combineddepartments += admin_departments
|
||||
|
||||
|
||||
if(emagged)
|
||||
combineddepartments += hidden_admin_departments
|
||||
|
||||
|
||||
+17
-17
@@ -99,7 +99,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if((!istype(over_object, /obj/screen)) && can_use())
|
||||
return attack_self(M)
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
|
||||
ui_tick++
|
||||
var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main")
|
||||
var/auto_update = 1
|
||||
@@ -115,8 +115,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
var/title = "Personal Data Assistant"
|
||||
|
||||
var/data[0] // This is the data that will be sent to the PDA
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600, state = state)
|
||||
ui.set_state_key("pda")
|
||||
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(auto_update)
|
||||
|
||||
/obj/item/device/pda/ui_data(mob/user, datum/topic_state/state = inventory_state)
|
||||
var/data[0]
|
||||
|
||||
data["owner"] = owner // Who is your daddy...
|
||||
data["ownjob"] = ownjob // ...and what does he do?
|
||||
@@ -164,21 +178,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
"template" = current_app.template,
|
||||
"has_back" = current_app.has_back)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "pda.tmpl", title, 630, 600, state = inventory_state)
|
||||
ui.set_state_key("pda")
|
||||
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(auto_update)
|
||||
return data
|
||||
|
||||
/obj/item/device/pda/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
+51
-50
@@ -778,63 +778,64 @@
|
||||
if(!user)
|
||||
return
|
||||
|
||||
var/list/data = list(
|
||||
"locked" = is_locked(user),
|
||||
"isOperating" = operating,
|
||||
"externalPower" = main_status,
|
||||
"powerCellStatus" = cell ? cell.percent() : null,
|
||||
"chargeMode" = chargemode,
|
||||
"chargingStatus" = charging,
|
||||
"totalLoad" = round(lastused_equip + lastused_light + lastused_environ),
|
||||
"coverLocked" = coverlocked,
|
||||
"siliconUser" = istype(user, /mob/living/silicon),
|
||||
"malfStatus" = get_malf_status(user),
|
||||
|
||||
"powerChannels" = list(
|
||||
list(
|
||||
"title" = "Equipment",
|
||||
"powerLoad" = round(lastused_equip),
|
||||
"status" = equipment,
|
||||
"topicParams" = list(
|
||||
"auto" = list("eqp" = 3),
|
||||
"on" = list("eqp" = 2),
|
||||
"off" = list("eqp" = 1)
|
||||
)
|
||||
),
|
||||
list(
|
||||
"title" = "Lighting",
|
||||
"powerLoad" = round(lastused_light),
|
||||
"status" = lighting,
|
||||
"topicParams" = list(
|
||||
"auto" = list("lgt" = 3),
|
||||
"on" = list("lgt" = 2),
|
||||
"off" = list("lgt" = 1)
|
||||
)
|
||||
),
|
||||
list(
|
||||
"title" = "Environment",
|
||||
"powerLoad" = round(lastused_environ),
|
||||
"status" = environ,
|
||||
"topicParams" = list(
|
||||
"auto" = list("env" = 3),
|
||||
"on" = list("env" = 2),
|
||||
"off" = list("env" = 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, data["siliconUser"] ? 535 : 460)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, issilicon(user) ? 535 : 460)
|
||||
ui.open()
|
||||
// Auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/power/apc/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["locked"] = is_locked(user)
|
||||
data["isOperating"] = operating
|
||||
data["externalPower"] = main_status
|
||||
data["powerCellStatus"] = cell ? cell.percent() : null
|
||||
data["chargeMode"] = chargemode
|
||||
data["chargingStatus"] = charging
|
||||
data["totalLoad"] = round(lastused_equip + lastused_light + lastused_environ)
|
||||
data["coverLocked"] = coverlocked
|
||||
data["siliconUser"] = istype(user, /mob/living/silicon)
|
||||
data["malfStatus"] = get_malf_status(user)
|
||||
|
||||
var/powerChannels[0]
|
||||
powerChannels[++powerChannels.len] = list(
|
||||
"title" = "Equipment",
|
||||
"powerLoad" = round(lastused_equip),
|
||||
"status" = equipment,
|
||||
"topicParams" = list(
|
||||
"auto" = list("eqp" = 3),
|
||||
"on" = list("eqp" = 2),
|
||||
"off" = list("eqp" = 1)
|
||||
)
|
||||
)
|
||||
powerChannels[++powerChannels.len] = list(
|
||||
"title" = "Lighting",
|
||||
"powerLoad" = round(lastused_light),
|
||||
"status" = lighting,
|
||||
"topicParams" = list(
|
||||
"auto" = list("lgt" = 3),
|
||||
"on" = list("lgt" = 2),
|
||||
"off" = list("lgt" = 1)
|
||||
)
|
||||
)
|
||||
powerChannels[++powerChannels.len] = list(
|
||||
"title" = "Environment",
|
||||
"powerLoad" = round(lastused_environ),
|
||||
"status" = environ,
|
||||
"topicParams" = list(
|
||||
"auto" = list("env" = 3),
|
||||
"on" = list("env" = 2),
|
||||
"off" = list("env" = 1)
|
||||
)
|
||||
)
|
||||
|
||||
data["powerChannels"] = powerChannels
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/power/apc/proc/report()
|
||||
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
|
||||
|
||||
|
||||
@@ -321,7 +321,15 @@
|
||||
if(IsBroken())
|
||||
return
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["active"] = active
|
||||
if(istype(user, /mob/living/silicon/ai))
|
||||
data["is_ai"] = 1
|
||||
@@ -329,6 +337,7 @@
|
||||
data["is_ai"] = 1
|
||||
else
|
||||
data["is_ai"] = 0
|
||||
|
||||
data["output_set"] = power_output
|
||||
data["output_max"] = max_power_output
|
||||
data["output_safe"] = max_safe_output
|
||||
@@ -342,12 +351,7 @@
|
||||
data["fuel_usage"] = active ? round((power_output / time_per_sheet) * 1000) : 0
|
||||
data["fuel_type"] = sheet_name
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
+15
-13
@@ -363,8 +363,21 @@
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/power/smes/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["nameTag"] = name_tag
|
||||
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
|
||||
data["charging"] = inputting
|
||||
@@ -383,18 +396,7 @@
|
||||
else
|
||||
data["outputting"] = 0 // smes is not outputting
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/obj/machinery/power/smes/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
@@ -389,8 +389,14 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/power/solar_control/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, "solar_control.tmpl", name, 490, 420)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
var/data = list()
|
||||
/obj/machinery/power/solar_control/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["generated"] = round(lastgen)
|
||||
data["angle"] = cdir
|
||||
@@ -403,12 +409,7 @@
|
||||
data["connected_panels"] = connected_panels.len
|
||||
data["connected_tracker"] = (connected_tracker ? 1 : 0)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/obj/machinery/power/solar_control/attackby(I as obj, user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
@@ -535,4 +536,4 @@
|
||||
|
||||
/obj/item/weapon/paper/solar
|
||||
name = "paper- 'Going green! Setup your own solar array instructions.'"
|
||||
info = "<h1>Welcome</h1><p>At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.</p><p>You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!</p><p>Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.</p><p>Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.</p><p>That's all to it, be safe, be green!</p>"
|
||||
info = "<h1>Welcome</h1><p>At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.</p><p>You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!</p><p>Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.</p><p>Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.</p><p>That's all to it, be safe, be green!</p>"
|
||||
|
||||
@@ -259,6 +259,13 @@
|
||||
|
||||
// This is purely informational UI that may be accessed by AIs or robots
|
||||
/obj/machinery/power/supermatter_shard/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, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/power/supermatter_shard/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["integrity_percentage"] = round(get_integrity())
|
||||
@@ -277,12 +284,7 @@
|
||||
else
|
||||
data["detonating"] = 0
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/obj/machinery/power/supermatter_shard/proc/transfer_energy()
|
||||
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
|
||||
|
||||
@@ -107,22 +107,30 @@
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
if(broken_requirements.len)
|
||||
to_chat(user, "<span class='warning'>[src] is broken. [broken_requirements[broken_requirements[1]]]</span>")
|
||||
return
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
/obj/machinery/chem_dispenser/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["amount"] = amount
|
||||
data["energy"] = round(energy)
|
||||
data["maxEnergy"] = round(max_energy)
|
||||
data["isBeakerLoaded"] = beaker ? 1 : 0
|
||||
|
||||
var beakerContents[0]
|
||||
var beakerCurrentVolume = 0
|
||||
var/beakerContents[0]
|
||||
var/beakerCurrentVolume = 0
|
||||
if(beaker && beaker.reagents && beaker.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "id"=R.id, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
@@ -136,23 +144,14 @@
|
||||
data["beakerCurrentVolume"] = null
|
||||
data["beakerMaxVolume"] = null
|
||||
|
||||
var chemicals[0]
|
||||
var/chemicals[0]
|
||||
for(var/re in dispensable_reagents)
|
||||
var/datum/reagent/temp = chemical_reagents_list[re]
|
||||
if(temp)
|
||||
chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list...
|
||||
data["chemicals"] = chemicals
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_dispenser/Topic(href, href_list)
|
||||
if(..())
|
||||
|
||||
@@ -130,7 +130,15 @@
|
||||
if(user.stat || user.restrained())
|
||||
return
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_heater.tmpl", "ChemHeater", 350, 270)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_heater/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["targetTemp"] = desired_temp
|
||||
data["isActive"] = on
|
||||
data["isBeakerLoaded"] = beaker ? 1 : 0
|
||||
@@ -140,15 +148,10 @@
|
||||
data["beakerMaxVolume"] = beaker ? beaker.volume : null
|
||||
|
||||
//copy-pasted from chem dispenser
|
||||
var beakerContents[0]
|
||||
var/beakerContents[0]
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
data["beakerContents"] = beakerContents
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_heater.tmpl", "ChemHeater", 350, 270)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
return data
|
||||
@@ -319,12 +319,17 @@
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/ui_interact(mob/user, ui_key="main", datum/nanoui/ui = null, force_open = 1)
|
||||
|
||||
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
var/datum/asset/chem_master/assets = get_asset_datum(/datum/asset/chem_master)
|
||||
assets.send(user)
|
||||
|
||||
var/data = list()
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_master/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["condi"] = condi
|
||||
data["loaded_pill_bottle"] = (loaded_pill_bottle ? 1 : 0)
|
||||
@@ -347,11 +352,7 @@
|
||||
data["bottlesprite"] = bottlesprite
|
||||
data["mode"] = mode
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_master/proc/isgoodnumber(num)
|
||||
if(isnum(num))
|
||||
|
||||
@@ -913,11 +913,9 @@
|
||||
|
||||
/datum/reagent/atrazine/reaction_turf(turf/simulated/wall/W, volume) // Clear off wallrot fungi
|
||||
if(istype(W) && W.rotting)
|
||||
for(var/obj/effect/overlay/wall_rot/WR in W)
|
||||
qdel(WR)
|
||||
W.rotting = 0
|
||||
for(var/obj/effect/overlay/O in W)
|
||||
if(O.name == "Wallrot") // This is so awful
|
||||
qdel(O)
|
||||
|
||||
W.visible_message("<span class='warning'>The fungi are completely dissolved by the solution!</span>")
|
||||
|
||||
/datum/reagent/atrazine/reaction_obj(obj/O, volume)
|
||||
|
||||
@@ -128,10 +128,7 @@
|
||||
for(var/mob/V in viewers(usr))
|
||||
V.show_message("[usr] starts putting [GM.name] into the disposal.", 3)
|
||||
if(do_after(usr, 20, target = GM))
|
||||
if(GM.client)
|
||||
GM.client.perspective = EYE_PERSPECTIVE
|
||||
GM.client.eye = src
|
||||
GM.loc = src
|
||||
GM.forceMove(src)
|
||||
for(var/mob/C in viewers(src))
|
||||
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
||||
qdel(G)
|
||||
@@ -189,10 +186,7 @@
|
||||
msg_admin_attack("[key_name_admin(user)] placed [key_name_admin(target)] in a disposals unit")
|
||||
else
|
||||
return
|
||||
if(target.client)
|
||||
target.client.perspective = EYE_PERSPECTIVE
|
||||
target.client.eye = src
|
||||
target.loc = src
|
||||
target.forceMove(src)
|
||||
|
||||
for(var/mob/C in viewers(src))
|
||||
if(C == user)
|
||||
@@ -215,14 +209,8 @@
|
||||
|
||||
// leave the disposal
|
||||
/obj/machinery/disposal/proc/go_out(mob/user)
|
||||
|
||||
if(user.client)
|
||||
user.client.eye = user.client.mob
|
||||
user.client.perspective = MOB_PERSPECTIVE
|
||||
user.loc = src.loc
|
||||
user.forceMove(loc)
|
||||
update()
|
||||
return
|
||||
|
||||
|
||||
// ai as human but can't flush
|
||||
/obj/machinery/disposal/attack_ai(mob/user as mob)
|
||||
@@ -253,6 +241,13 @@
|
||||
return
|
||||
|
||||
/obj/machinery/disposal/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, "disposal_bin.tmpl", "Waste Disposal Unit", 395, 250)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/disposal/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
var/pressure = Clamp(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 100)
|
||||
@@ -271,13 +266,7 @@
|
||||
data["pumpstatus"] = "Idle"
|
||||
data["pressure"] = pressure_round
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "disposal_bin.tmpl", "Waste Disposal Unit", 395, 250)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/obj/machinery/disposal/Topic(href, href_list)
|
||||
if(usr.loc == src)
|
||||
@@ -488,6 +477,10 @@
|
||||
if(current_size >= STAGE_FIVE)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/disposal/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
// virtual disposal object
|
||||
// travels through pipes in lieu of actual items
|
||||
// contents will be items flushed by the disposal
|
||||
@@ -1355,11 +1348,7 @@
|
||||
|
||||
// check if mob has client, if so restore client view on eject
|
||||
/mob/pipe_eject(var/direction)
|
||||
if(src.client)
|
||||
src.client.perspective = MOB_PERSPECTIVE
|
||||
src.client.eye = src
|
||||
|
||||
return
|
||||
reset_perspective(null)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/pipe_eject(var/direction)
|
||||
var/list/dirs
|
||||
|
||||
@@ -647,7 +647,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
|
||||
/obj/machinery/computer/rdconsole/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
var/data = list()
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "r_n_d.tmpl", src.name, 800, 550)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/rdconsole/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
files.RefreshResearch()
|
||||
|
||||
@@ -857,11 +863,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
loaded_chemical["volume"] = R.volume
|
||||
loaded_chemical["id"] = R.id
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "r_n_d.tmpl", src.name, 800, 550)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
return data
|
||||
|
||||
//helper proc that guarantees the wait message will not freeze the UI
|
||||
/obj/machinery/computer/rdconsole/proc/add_wait_message(message, delay)
|
||||
|
||||
@@ -112,11 +112,21 @@
|
||||
coolant_purity = total_purity / fresh_coolant
|
||||
|
||||
/obj/machinery/radiocarbon_spectrometer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "geoscanner.tmpl", "High Res Radiocarbon Spectrometer", 900, 825)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/radiocarbon_spectrometer/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["scanned_item"] = (scanned_item ? scanned_item.name : "")
|
||||
data["scanned_item_desc"] = (scanned_item ? (scanned_item.desc ? scanned_item.desc : "No information on record.") : "")
|
||||
@@ -141,19 +151,7 @@
|
||||
data["radiation"] = round(radiation)
|
||||
data["t_left_radspike"] = round(t_left_radspike)
|
||||
data["rad_shield_on"] = rad_shield
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "geoscanner.tmpl", "High Res Radiocarbon Spectrometer", 900, 825)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/obj/machinery/radiocarbon_spectrometer/process()
|
||||
if(scanning)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
origin.feed_slime_action.Remove(C)
|
||||
origin.monkey_recycle_action.Remove(C)
|
||||
//All of this stuff below could probably be a proc for all advanced cameras, only the action removal needs to be camera specific
|
||||
remote_eye.user = null
|
||||
remote_eye.eye_user = null
|
||||
if(C.client)
|
||||
C.client.perspective = MOB_PERSPECTIVE
|
||||
C.client.eye = src
|
||||
@@ -164,4 +164,4 @@
|
||||
if(issmall(M) && M.stat)
|
||||
M.visible_message("[M] vanishes as they are reclaimed for recycling!")
|
||||
X.monkeys += 0.2
|
||||
qdel(M)
|
||||
qdel(M)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "This device is used to trigger station functions, which require more than one ID card to authenticate."
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "auth_off"
|
||||
|
||||
|
||||
var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made.
|
||||
var/event = ""
|
||||
var/screen = 1
|
||||
@@ -15,13 +15,13 @@
|
||||
var/mob/event_triggered_by
|
||||
var/mob/event_confirmed_by
|
||||
var/ert_reason = "Reason for ERT"
|
||||
|
||||
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
power_channel = ENVIRON
|
||||
|
||||
|
||||
req_access = list(access_keycard_auth)
|
||||
|
||||
/obj/machinery/keycard_auth/attack_ai(mob/user as mob)
|
||||
@@ -54,7 +54,7 @@
|
||||
icon_state = "auth_off"
|
||||
else
|
||||
stat |= NOPOWER
|
||||
|
||||
|
||||
/obj/machinery/keycard_auth/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
@@ -70,25 +70,26 @@
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 540, 320)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/keycard_auth/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["screen"] = screen
|
||||
data["event"] = event
|
||||
data["ertreason"] = ert_reason
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 540, 320)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
return data
|
||||
|
||||
/obj/machinery/keycard_auth/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
|
||||
if(busy)
|
||||
to_chat(usr, "This device is busy.")
|
||||
return
|
||||
|
||||
|
||||
if(href_list["triggerevent"])
|
||||
event = href_list["triggerevent"]
|
||||
screen = 2
|
||||
|
||||
@@ -425,6 +425,12 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/ordercomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "order_console.tmpl", name, ORDER_SCREEN_WIDTH, ORDER_SCREEN_HEIGHT)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/ordercomp/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["last_viewed_group"] = last_viewed_group
|
||||
|
||||
@@ -474,11 +480,7 @@
|
||||
data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = shuttle_master.supply.timeLeft(600)
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "order_console.tmpl", name, ORDER_SCREEN_WIDTH, ORDER_SCREEN_HEIGHT)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/ordercomp/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -572,7 +574,12 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/supplycomp/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
// data to send to ui
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "supply_console.tmpl", name, SUPPLY_SCREEN_WIDTH, SUPPLY_SCREEN_HEIGHT)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/supplycomp/ui_data(mob/user, datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
data["last_viewed_group"] = last_viewed_group
|
||||
|
||||
@@ -622,12 +629,7 @@
|
||||
data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = shuttle_master.supply.timeLeft(600)
|
||||
data["can_launch"] = !shuttle_master.supply.canMove()
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "supply_console.tmpl", name, SUPPLY_SCREEN_WIDTH, SUPPLY_SCREEN_HEIGHT)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/supplycomp/proc/is_authorized(user)
|
||||
if(allowed(user))
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
to_chat(usr, "<span class='warning'>Missing equipment or weapons.</span>")
|
||||
my_atom.verbs -= text2path("[type]/proc/fire_weapons")
|
||||
return
|
||||
my_atom.battery.use(shot_cost)
|
||||
if(!my_atom.battery.use(shot_cost))
|
||||
to_chat(usr, "<span class='warning'>Insufficient charge to fire the weapons</span>")
|
||||
return
|
||||
var/olddir
|
||||
for(var/i = 0; i < shots_per; i++)
|
||||
if(olddir != my_atom.dir)
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
w_class = 1
|
||||
|
||||
var/vision_flags = 0
|
||||
var/dark_view = 0
|
||||
var/see_invisible = 0
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
var/list/old_eye_colour = list(0,0,0)
|
||||
var/flash_protect = 0
|
||||
@@ -18,15 +20,11 @@
|
||||
..()
|
||||
if(aug_message && !special)
|
||||
to_chat(owner, "<span class='notice'>[aug_message]</span>")
|
||||
M.sight |= vision_flags
|
||||
M.update_sight()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/remove(var/mob/living/carbon/M, var/special = 0)
|
||||
. = ..()
|
||||
M.sight ^= vision_flags
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/on_life()
|
||||
..()
|
||||
owner.sight |= vision_flags
|
||||
M.update_sight()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/emp_act(severity)
|
||||
if(!owner)
|
||||
@@ -46,6 +44,8 @@
|
||||
implant_color = "#000000"
|
||||
origin_tech = "materials=6;programming=4;biotech=6;magnets=5"
|
||||
vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
dark_view = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/thermals
|
||||
name = "Thermals implant"
|
||||
|
||||
@@ -62,18 +62,6 @@
|
||||
can_infect = 1
|
||||
blood_level = 1
|
||||
|
||||
/datum/surgery_step/internal/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
if(!hasorgans(target))
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
if(affected)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/datum/surgery_step/internal/manipulate_organs
|
||||
name = "manipulate organs"
|
||||
@@ -92,15 +80,13 @@
|
||||
allowed_tools = allowed_tools + implements_extract + implements_mend + implements_finsh
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/surgery_step/internal/manipulate_organs/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
|
||||
/datum/surgery_step/internal/manipulate_organs/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
I = null
|
||||
var/mob/living/carbon/human/H
|
||||
if(istype(target,/mob/living/carbon/human))
|
||||
if(ishuman(target))
|
||||
H = target
|
||||
affected = H.get_organ(target_zone)
|
||||
|
||||
if(is_int_organ(tool))
|
||||
current_type = "insert"
|
||||
I = tool
|
||||
@@ -115,6 +101,7 @@
|
||||
if(target.get_int_organ(I))
|
||||
to_chat(user, "<span class='warning'> \The [target] already has [I].</span>")
|
||||
return -1
|
||||
|
||||
if(affected)
|
||||
user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \
|
||||
"You start transplanting \the [tool] into [target]'s [affected.name].")
|
||||
@@ -135,30 +122,33 @@
|
||||
var/msg = "[user] starts pulling [target]'s skin back into place with \the [tool]."
|
||||
var/self_msg = "You start pulling [target]'s skin back into place with \the [tool]."
|
||||
user.visible_message(msg, self_msg)
|
||||
if(affected)
|
||||
|
||||
if(H && affected)
|
||||
H.custom_pain("Something hurts horribly in your [affected.name]!",1)
|
||||
|
||||
else if(implement_type in implements_extract)
|
||||
current_type = "extract"
|
||||
var/list/organs = target.get_organs_zone(target_zone)
|
||||
if(!organs.len)
|
||||
to_chat(user, "<span class='notice'>There are no removeable organs in [target]'s [parse_zone(target_zone)]!</span>")
|
||||
return -1
|
||||
else
|
||||
for(var/obj/item/organ/internal/O in organs)
|
||||
O.on_find(user)
|
||||
organs -= O
|
||||
organs[O.name] = O
|
||||
|
||||
I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
|
||||
if(I && user && target && user.Adjacent(target) && user.get_active_hand() == tool)
|
||||
I = organs[I]
|
||||
if(!I) return -1
|
||||
user.visible_message("[user] starts to separate [target]'s [I] with \the [tool].", \
|
||||
"You start to separate [target]'s [I] with \the [tool] for removal." )
|
||||
if(affected)
|
||||
H.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
else
|
||||
for(var/obj/item/organ/internal/O in organs)
|
||||
O.on_find(user)
|
||||
organs -= O
|
||||
organs[O.name] = O
|
||||
|
||||
I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
|
||||
if(I && user && target && user.Adjacent(target) && user.get_active_hand() == tool)
|
||||
I = organs[I]
|
||||
if(!I)
|
||||
return -1
|
||||
user.visible_message("[user] starts to separate [target]'s [I] with \the [tool].", \
|
||||
"You start to separate [target]'s [I] with \the [tool] for removal." )
|
||||
if(H && affected)
|
||||
H.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
else
|
||||
return -1
|
||||
|
||||
else if(implement_type in implements_mend)
|
||||
current_type = "mend"
|
||||
@@ -173,6 +163,7 @@
|
||||
if(!hasorgans(target))
|
||||
to_chat(user, "They do not have organs to mend!")
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I && I.damage > 0)
|
||||
if(I.robotic < 2 && !istype (tool, /obj/item/stack/nanopaste))
|
||||
@@ -186,14 +177,17 @@
|
||||
|
||||
else
|
||||
to_chat(user, "[I] does not appear to be damaged.")
|
||||
H.custom_pain("The pain in your [affected.name] is living hell!",1)
|
||||
|
||||
if(affected)
|
||||
H.custom_pain("The pain in your [affected.name] is living hell!", 1)
|
||||
|
||||
else if(istype(tool, /obj/item/weapon/reagent_containers/food/snacks/organ))
|
||||
to_chat(user, "<span class='warning'>[tool] was biten by someone! It's too damaged to use!</span>")
|
||||
return -1
|
||||
|
||||
..()
|
||||
|
||||
/datum/surgery_step/internal/manipulate_organs/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
/datum/surgery_step/internal/manipulate_organs/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(current_type == "mend")
|
||||
var/tool_name = "\the [tool]"
|
||||
if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced))
|
||||
@@ -205,6 +199,7 @@
|
||||
|
||||
if(!hasorgans(target))
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/internal/I in affected.internal_organs)
|
||||
if(I)
|
||||
I.surgeryize()
|
||||
@@ -217,7 +212,7 @@
|
||||
user.visible_message("<span class='notice'> [user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
|
||||
"<span class='notice'> You treat damage to [target]'s [I.name] with [tool_name].</span>" )
|
||||
I.damage = 0
|
||||
//return 1
|
||||
|
||||
else if(current_type == "insert")
|
||||
I = tool
|
||||
user.drop_item()
|
||||
@@ -228,16 +223,17 @@
|
||||
return 0
|
||||
|
||||
if(affected)
|
||||
user.visible_message("<span class='notice'> [user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
|
||||
user.visible_message("<span class='notice'> [user] has transplanted \the [tool] into [target]'s [affected.name].</span>",
|
||||
"<span class='notice'> You have transplanted \the [tool] into [target]'s [affected.name].</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'> [user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
|
||||
user.visible_message("<span class='notice'> [user] has transplanted \the [tool] into [target]'s [parse_zone(target_zone)].</span>",
|
||||
"<span class='notice'> You have transplanted \the [tool] into [target]'s [parse_zone(target_zone)].</span>")
|
||||
|
||||
I.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
else if(current_type == "extract")
|
||||
if(I && I.owner == target)
|
||||
user.visible_message("<span class='notice'> [user] has separated and extracts [target]'s [I] with \the [tool].</span>" , \
|
||||
user.visible_message("<span class='notice'> [user] has separated and extracts [target]'s [I] with \the [tool].</span>",
|
||||
"<span class='notice'> You have separated and extracted [target]'s [I] with \the [tool].</span>")
|
||||
|
||||
add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
|
||||
@@ -251,9 +247,9 @@
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!</span>",
|
||||
"<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>")
|
||||
else if(current_type == "finish")
|
||||
|
||||
if(affected.encased)
|
||||
else if(current_type == "finish")
|
||||
if(affected && affected.encased)
|
||||
var/msg = "<span class='notice'> [user] bends [target]'s [affected.encased] back into place with \the [tool].</span>"
|
||||
var/self_msg = "<span class='notice'> You bend [target]'s [affected.encased] back into place with \the [tool].</span>"
|
||||
user.visible_message(msg, self_msg)
|
||||
@@ -268,13 +264,14 @@
|
||||
|
||||
return 0
|
||||
|
||||
/datum/surgery_step/internal/manipulate_organs/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
/datum/surgery_step/internal/manipulate_organs/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery)
|
||||
if(current_type == "mend")
|
||||
if(!hasorgans(target))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!</span>")
|
||||
|
||||
var/dam_amt = 2
|
||||
|
||||
if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced))
|
||||
@@ -290,27 +287,33 @@
|
||||
I.take_damage(dam_amt,0)
|
||||
|
||||
return 0
|
||||
else if(current_type == "insert")
|
||||
|
||||
else if(current_type == "insert")
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, damaging \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging \the [tool]!</span>")
|
||||
var/obj/item/organ/internal/I = tool
|
||||
if(istype(I) &&!(I.tough))
|
||||
if(istype(I) && !I.tough)
|
||||
I.take_damage(rand(3,5),0)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
else if(current_type == "extract")
|
||||
if(I && I.owner == target)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(BRUISE, 20)
|
||||
if(affected)
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging [target]'s [affected.name] with \the [tool]!</span>")
|
||||
affected.createwound(BRUISE, 20)
|
||||
else
|
||||
user.visible_message("<span class='warning'> [user]'s hand slips, damaging [target]'s [parse_zone(target_zone)] with \the [tool]!</span>", \
|
||||
"<span class='warning'> Your hand slips, damaging [target]'s [parse_zone(target_zone)] with \the [tool]!</span>")
|
||||
else
|
||||
user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
|
||||
"<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>")
|
||||
return 0
|
||||
|
||||
else if(current_type == "finish")
|
||||
if(affected.encased)
|
||||
if(affected && affected.encased)
|
||||
var/msg = "<span class='warning'> [user]'s hand slips, bending [target]'s [affected.encased] the wrong way!</span>"
|
||||
var/self_msg = "<span class='warning'> Your hand slips, bending [target]'s [affected.encased] the wrong way!</span>"
|
||||
user.visible_message(msg, self_msg)
|
||||
@@ -319,7 +322,8 @@
|
||||
var/msg = "<span class='warning'> [user]'s hand slips, tearing the skin!</span>"
|
||||
var/self_msg = "<span class='warning'> Your hand slips, tearing skin!</span>"
|
||||
user.visible_message(msg, self_msg)
|
||||
affected.createwound(BRUISE, 20)
|
||||
if(affected)
|
||||
affected.createwound(BRUISE, 20)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user