mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
remove that button!
This commit is contained in:
@@ -36,8 +36,6 @@
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
|
||||
var/obj/screen/internals
|
||||
|
||||
/mob/proc/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud(src)
|
||||
@@ -81,7 +79,6 @@
|
||||
alien_plasma_display = null
|
||||
vampire_blood_display = null
|
||||
nightvisionicon = null
|
||||
internals = null
|
||||
|
||||
mymob = null
|
||||
return ..()
|
||||
|
||||
@@ -319,9 +319,6 @@
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
hotkeybuttons += mymob.throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
mymob.healths = new /obj/screen/healths()
|
||||
infodisplay += mymob.healths
|
||||
|
||||
|
||||
@@ -102,9 +102,6 @@
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
hotkeybuttons += mymob.throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
mymob.healths = new /obj/screen/healths()
|
||||
infodisplay += mymob.healths
|
||||
|
||||
|
||||
@@ -90,107 +90,6 @@
|
||||
icon = 'icons/mob/screen_robot.dmi'
|
||||
screen_loc = ui_borg_intents
|
||||
|
||||
/obj/screen/internals
|
||||
name = "toggle internals"
|
||||
icon_state = "internal0"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/obj/screen/internals/Click()
|
||||
if(!iscarbon(usr))
|
||||
return
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.incapacitated())
|
||||
return
|
||||
|
||||
if(C.internal)
|
||||
C.internal = null
|
||||
to_chat(C, "<span class='notice'>No longer running on internals.</span>")
|
||||
icon_state = "internal0"
|
||||
else
|
||||
var/no_mask = FALSE
|
||||
if(!C.get_organ_slot("breathing_tube"))
|
||||
if(!C.wear_mask || !(C.wear_mask.flags & AIRTIGHT))
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!H.head || !(H.head.flags & AIRTIGHT))
|
||||
no_mask = TRUE
|
||||
|
||||
if(no_mask)
|
||||
to_chat(C, "<span class='notice'>You are not wearing a suitable mask or helmet.</span>")
|
||||
return
|
||||
|
||||
var/list/nicename = null
|
||||
var/list/tankcheck = null
|
||||
var/breathes = "oxygen"
|
||||
var/list/contents = list()
|
||||
var/from = "on"
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
breathes = H.species.breathid
|
||||
nicename = list("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket")
|
||||
tankcheck = list(H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store)
|
||||
else
|
||||
nicename = list("right hand", "left hand", "back")
|
||||
tankcheck = list(C.r_hand, C.l_hand, C.back)
|
||||
|
||||
// Rigs are a fucking pain since they keep an air tank in nullspace.
|
||||
if(istype(C.back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = C.back
|
||||
if(rig.air_supply)
|
||||
from = "in"
|
||||
nicename |= "hardsuit"
|
||||
tankcheck |= rig.air_supply
|
||||
|
||||
for(var/i = 1, i < tankcheck.len + 1, ++i)
|
||||
if(istype(tankcheck[i], /obj/item/weapon/tank))
|
||||
var/obj/item/weapon/tank/t = tankcheck[i]
|
||||
switch(breathes)
|
||||
if("n2")
|
||||
if(t.air_contents.nitrogen && !t.air_contents.oxygen)
|
||||
contents.Add(t.air_contents.nitrogen)
|
||||
else
|
||||
contents.Add(0)
|
||||
if("o2")
|
||||
if(t.air_contents.oxygen && !t.air_contents.toxins)
|
||||
contents.Add(t.air_contents.oxygen)
|
||||
else
|
||||
contents.Add(0)
|
||||
if("co2")
|
||||
if(t.air_contents.carbon_dioxide && !t.air_contents.toxins)
|
||||
contents.Add(t.air_contents.carbon_dioxide)
|
||||
else
|
||||
contents.Add(0)
|
||||
if("toxin")
|
||||
if(t.air_contents.toxins)
|
||||
contents.Add(t.air_contents.toxins)
|
||||
else
|
||||
contents.Add(0)
|
||||
else
|
||||
//no tank so we set contents to 0
|
||||
contents.Add(0)
|
||||
|
||||
//Alright now we know the contents of the tanks so we have to pick the best one.
|
||||
var/best = 0
|
||||
var/bestcontents = 0
|
||||
for(var/i=1, i < contents.len + 1 , ++i)
|
||||
if(!contents[i])
|
||||
continue
|
||||
if(contents[i] > bestcontents)
|
||||
best = i
|
||||
bestcontents = contents[i]
|
||||
//We've determined the best container now we set it as our internals
|
||||
if(best)
|
||||
to_chat(C, "<span class='notice'>You are now running on internals from [tankcheck[best]] [from] your [nicename[best]].</span>")
|
||||
C.internal = tankcheck[best]
|
||||
|
||||
if(C.internal)
|
||||
icon_state = "internal1"
|
||||
else
|
||||
to_chat(C, "<span class='notice'>You don't have a[breathes == "oxygen" ? "n oxygen" : addtext(" ",breathes)] tank.</span>")
|
||||
|
||||
C.update_action_buttons_icon()
|
||||
|
||||
/obj/screen/mov_intent
|
||||
name = "run/walk toggle"
|
||||
icon_state = "running"
|
||||
|
||||
@@ -271,7 +271,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(synd_mob), slot_wear_mask)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(synd_mob), slot_l_hand)
|
||||
synd_mob.internal = synd_mob.l_hand
|
||||
synd_mob.update_internals_hud_icon(1)
|
||||
synd_mob.update_action_buttons_icon()
|
||||
|
||||
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob)
|
||||
E.implant(synd_mob)
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
if(C.internal == src)
|
||||
to_chat(C, "<span class='notice'>You close \the [src] valve.</span>")
|
||||
C.internal = null
|
||||
C.update_internals_hud_icon(0)
|
||||
else
|
||||
var/can_open_valve = 0
|
||||
if(C.get_organ_slot("breathing_tube"))
|
||||
@@ -71,7 +70,6 @@
|
||||
if(!silent)
|
||||
to_chat(C, "<span class='notice'>You open \the [src] valve.</span>")
|
||||
C.internal = src
|
||||
C.update_internals_hud_icon(1)
|
||||
else
|
||||
if(!silent)
|
||||
to_chat(C, "<span class='notice'>You are not wearing a suitable mask or helmet.</span>")
|
||||
|
||||
@@ -59,7 +59,7 @@ var/global/sent_honksquad = 0
|
||||
new_honksquad.key = pick(commandos)
|
||||
commandos -= new_honksquad.key
|
||||
new_honksquad.internal = new_honksquad.s_store
|
||||
new_honksquad.update_internals_hud_icon(1)
|
||||
new_honksquad.update_action_buttons_icon()
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
new_honksquad.mind.store_memory("<B>Mission:</B> <span class='warning'>[input].</span>")
|
||||
|
||||
@@ -88,7 +88,7 @@ var/global/sent_syndicate_infiltration_team = 0
|
||||
if(!spawn_sit_mgmt || theguy.key != key)
|
||||
new_syndicate_infiltrator.key = theguy.key
|
||||
new_syndicate_infiltrator.internal = new_syndicate_infiltrator.s_store
|
||||
new_syndicate_infiltrator.update_internals_hud_icon(1)
|
||||
new_syndicate_infiltrator.update_action_buttons_icon()
|
||||
infiltrators -= theguy
|
||||
to_chat(new_syndicate_infiltrator, "<span class='danger'>You are a [!syndicate_leader_selected?"Infiltrator":"<B>Lead Infiltrator</B>"] in the service of the Syndicate. \nYour current mission is: <B>[input]</B></span>")
|
||||
to_chat(new_syndicate_infiltrator, "<span class='notice'>You are equipped with an uplink implant to help you achieve your objectives. ((activate it via button in top left of screen))</span>")
|
||||
@@ -119,7 +119,7 @@ var/global/sent_syndicate_infiltration_team = 0
|
||||
var/mob/living/carbon/human/syndimgmtmob = create_syndicate_infiltrator(L, 1, 100, 1)
|
||||
syndimgmtmob.key = key
|
||||
syndimgmtmob.internal = syndimgmtmob.s_store
|
||||
syndimgmtmob.update_internals_hud_icon(1)
|
||||
syndimgmtmob.update_action_buttons_icon()
|
||||
syndimgmtmob.faction += "syndicate"
|
||||
syndimgmtmob.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), slot_glasses)
|
||||
syndimgmtmob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/hardsuit/syndi/elite, slot_wear_suit)
|
||||
|
||||
@@ -361,7 +361,7 @@ client/proc/one_click_antag()
|
||||
|
||||
new_syndicate_commando.key = theghost.key
|
||||
new_syndicate_commando.internal = new_syndicate_commando.s_store
|
||||
new_syndicate_commando.update_internals_hud_icon(1)
|
||||
new_syndicate_commando.update_action_buttons_icon()
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if("Death Commando")//Leaves them at late-join spawn.
|
||||
new_character.equip_death_commando()
|
||||
new_character.internal = new_character.s_store
|
||||
new_character.update_internals_hud_icon(1)
|
||||
new_character.update_action_buttons_icon()
|
||||
else//They may also be a cyborg or AI.
|
||||
switch(new_character.mind.assigned_role)
|
||||
if("Cyborg")//More rigging to make em' work and check if they're traitor.
|
||||
|
||||
@@ -64,7 +64,7 @@ var/global/sent_strike_team = 0
|
||||
new_commando.key = pick(commandos)
|
||||
commandos -= new_commando.key
|
||||
new_commando.internal = new_commando.s_store
|
||||
new_commando.update_internals_hud_icon(1)
|
||||
new_commando.update_action_buttons_icon()
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
if(nuke_code)
|
||||
|
||||
@@ -71,7 +71,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
new_syndicate_commando.key = pick(commandos)
|
||||
commandos -= new_syndicate_commando.key
|
||||
new_syndicate_commando.internal = new_syndicate_commando.s_store
|
||||
new_syndicate_commando.update_internals_hud_icon(1)
|
||||
new_syndicate_commando.update_action_buttons_icon()
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
if(nuke_code)
|
||||
|
||||
@@ -333,9 +333,9 @@ BLIND // can't see anything
|
||||
if(adjusted_flags)
|
||||
slot_flags = adjusted_flags
|
||||
if(ishuman(user) && H.internal && !H.get_organ_slot("breathing_tube") && user.wear_mask == src) /*If the user was wearing the mask providing internals on their face at the time it was adjusted, turn off internals.
|
||||
Otherwise, they adjusted it while it was in their hands or some such so we won't be needing to turn off internals.*/
|
||||
H.update_internals_hud_icon(0)
|
||||
Otherwise, they adjusted it while it was in their hands or some such so we won't be needing to turn off internals.*/
|
||||
H.internal = null
|
||||
H.update_action_buttons_icon()
|
||||
if(flags_inv & HIDEFACE) //Means that only things like bandanas and balaclavas will be affected since they obscure the identity of the wearer.
|
||||
flags_inv &= ~HIDEFACE /*Done after the above to avoid having to do a check for initial(src.flags_inv == HIDEFACE).
|
||||
This reveals the user's face since the bandana will now be going on their head.*/
|
||||
|
||||
@@ -651,7 +651,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
if(do_mob(usr, src, POCKET_STRIP_DELAY))
|
||||
if(internal)
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
update_action_buttons_icon()
|
||||
else
|
||||
var/no_mask2
|
||||
if(!get_organ_slot("breathing_tube"))
|
||||
@@ -662,7 +662,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
to_chat(usr, "<span class='warning'>[src] is not wearing a suitable mask or helmet!</span>")
|
||||
return
|
||||
internal = ITEM
|
||||
update_internals_hud_icon(1)
|
||||
update_action_buttons_icon()
|
||||
|
||||
visible_message("<span class='danger'>[usr] [internal ? "opens" : "closes"] the valve on [src]'s [ITEM].</span>", \
|
||||
"<span class='userdanger'>[usr] [internal ? "opens" : "closes"] the valve on [src]'s [ITEM].</span>")
|
||||
@@ -1057,10 +1057,6 @@ so that different stomachs can handle things in different ways VB*/
|
||||
|
||||
return FALSE
|
||||
|
||||
/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)
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
update_head_accessory()
|
||||
if(internal && !get_organ_slot("breathing_tube"))
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
update_action_buttons_icon()
|
||||
wear_mask_update(I, toggle_off = FALSE)
|
||||
sec_hud_set_ID()
|
||||
update_inv_wear_mask()
|
||||
|
||||
@@ -308,13 +308,10 @@
|
||||
|
||||
if(null_internals) //something wants internals gone
|
||||
internal = null //so do it
|
||||
|
||||
update_action_buttons_icon()
|
||||
|
||||
if(internal) //check for hud updates every time this is called
|
||||
update_internals_hud_icon(1)
|
||||
return internal.remove_air_volume(volume_needed) //returns the valid air
|
||||
else
|
||||
update_internals_hud_icon(0)
|
||||
|
||||
return null
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/plasmensuit_cartridge(H), slot_in_backpack) //Two refill cartridges for their suit. Can fit in boxes.
|
||||
to_chat(H, "<span class='notice'>You are now running on plasma internals from the [H.s_store] in your [tank_slot_name]. You must breathe plasma in order to survive, and are extremely flammable.</span>")
|
||||
H.internal = H.get_item_by_slot(tank_slot)
|
||||
H.update_internals_hud_icon(1)
|
||||
H.update_action_buttons_icon()
|
||||
|
||||
/datum/species/plasmaman/handle_life(var/mob/living/carbon/human/H)
|
||||
if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman))
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
H.equip_or_collect(new /obj/item/weapon/tank/emergency_oxygen/vox(H), slot_l_hand)
|
||||
to_chat(H, "<span class='notice'>You are now running on nitrogen internals from the [H.l_hand] in your hand. Your species finds oxygen toxic, so you must breathe nitrogen only.</span>")
|
||||
H.internal = H.l_hand
|
||||
H.update_internals_hud_icon(1)
|
||||
H.update_action_buttons_icon()
|
||||
|
||||
/datum/species/vox/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
updatespeciescolor(H)
|
||||
|
||||
@@ -191,12 +191,9 @@
|
||||
internal = null //turn off internals
|
||||
|
||||
if(internal)
|
||||
update_internals_hud_icon(1)
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
update_internals_hud_icon(0)
|
||||
|
||||
return
|
||||
update_action_buttons_icon()
|
||||
|
||||
/mob/living/carbon/handle_diseases()
|
||||
for(var/thing in viruses)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 118 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 150 KiB |
Reference in New Issue
Block a user