mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-16 13:13:03 +00:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12 into dev-freeze
This commit is contained in:
@@ -109,10 +109,13 @@ var/list/alldepartments = list("Central Command")
|
|||||||
|
|
||||||
if(href_list["remove"])
|
if(href_list["remove"])
|
||||||
if(tofax)
|
if(tofax)
|
||||||
tofax.loc = usr.loc
|
if(!ishuman(usr))
|
||||||
usr.put_in_hands(tofax)
|
usr << "<span class='warning'>You can't do it.</span>"
|
||||||
usr << "<span class='notice'>You take the paper out of \the [src].</span>"
|
else
|
||||||
tofax = null
|
tofax.loc = usr.loc
|
||||||
|
usr.put_in_hands(tofax)
|
||||||
|
usr << "<span class='notice'>You take the paper out of \the [src].</span>"
|
||||||
|
tofax = null
|
||||||
|
|
||||||
if(href_list["scan"])
|
if(href_list["scan"])
|
||||||
if (scan)
|
if (scan)
|
||||||
|
|||||||
@@ -276,37 +276,79 @@
|
|||||||
C << "<span class='notice'>You are not wearing a mask.</span>"
|
C << "<span class='notice'>You are not wearing a mask.</span>"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
if(istype(C.l_hand, /obj/item/weapon/tank))
|
var/list/nicename = null
|
||||||
C << "<span class='notice'>You are now running on internals from the [C.l_hand] on your left hand.</span>"
|
var/list/tankcheck = null
|
||||||
C.internal = C.l_hand
|
var/breathes = "oxygen" //default, we'll check later
|
||||||
else if(istype(C.r_hand, /obj/item/weapon/tank))
|
var/list/contents = list()
|
||||||
C << "<span class='notice'>You are now running on internals from the [C.r_hand] on your right hand.</span>"
|
|
||||||
C.internal = C.r_hand
|
if(ishuman(C))
|
||||||
else if(ishuman(C))
|
var/mob/living/carbon/human/H = C
|
||||||
var/mob/living/carbon/human/H = C
|
breathes = H.species.breath_type
|
||||||
if(istype(H.s_store, /obj/item/weapon/tank))
|
nicename = list ("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket")
|
||||||
H << "<span class='notice'>You are now running on internals from the [H.s_store] on your [H.wear_suit].</span>"
|
tankcheck = list (H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store)
|
||||||
H.internal = H.s_store
|
|
||||||
else if(istype(H.belt, /obj/item/weapon/tank))
|
else
|
||||||
H << "<span class='notice'>You are now running on internals from the [H.belt] on your belt.</span>"
|
|
||||||
H.internal = H.belt
|
nicename = list("Right Hand", "Left Hand", "Back")
|
||||||
else if(istype(H.l_store, /obj/item/weapon/tank))
|
tankcheck = list(C.r_hand, C.l_hand, C.back)
|
||||||
H << "<span class='notice'>You are now running on internals from the [H.l_store] in your left pocket.</span>"
|
|
||||||
H.internal = H.l_store
|
for(var/i=1, i<tankcheck.len+1, ++i)
|
||||||
else if(istype(H.r_store, /obj/item/weapon/tank))
|
if(istype(tankcheck[i], /obj/item/weapon/tank))
|
||||||
H << "<span class='notice'>You are now running on internals from the [H.r_store] in your right pocket.</span>"
|
var/obj/item/weapon/tank/t = tankcheck[i]
|
||||||
H.internal = H.r_store
|
if (!isnull(t.manipulated_by) && t.manipulated_by != C.real_name && findtext(t.desc,breathes))
|
||||||
|
contents.Add(t.air_contents.total_moles) //Someone messed with the tank and put unknown gasses
|
||||||
|
continue //in it, so we're going to believe the tank is what it says it is
|
||||||
|
switch(breathes)
|
||||||
|
//These tanks we're sure of their contents
|
||||||
|
if("nitrogen") //So we're a bit more picky about them.
|
||||||
|
|
||||||
|
if(t.air_contents.nitrogen && !t.air_contents.oxygen)
|
||||||
|
contents.Add(t.air_contents.nitrogen)
|
||||||
|
else
|
||||||
|
contents.Add(0)
|
||||||
|
|
||||||
|
if ("oxygen")
|
||||||
|
if(t.air_contents.oxygen && !t.air_contents.toxins)
|
||||||
|
contents.Add(t.air_contents.oxygen)
|
||||||
|
else
|
||||||
|
contents.Add(0)
|
||||||
|
|
||||||
|
// No races breath this, but never know about downstream servers.
|
||||||
|
if ("carbon dioxide")
|
||||||
|
if(t.air_contents.carbon_dioxide && !t.air_contents.toxins)
|
||||||
|
contents.Add(t.air_contents.carbon_dioxide)
|
||||||
|
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)
|
||||||
|
C << "<span class='notice'>You are now running on internals from [tankcheck[best]] on your [nicename[best]].</span>"
|
||||||
|
C.internal = tankcheck[best]
|
||||||
|
|
||||||
//Seperate so CO2 jetpacks are a little less cumbersome.
|
|
||||||
if(!C.internal && istype(C.back, /obj/item/weapon/tank))
|
|
||||||
C << "<span class='notice'>You are now running on internals from the [C.back] on your back.</span>"
|
|
||||||
C.internal = C.back
|
|
||||||
|
|
||||||
if(C.internal)
|
if(C.internal)
|
||||||
if(C.internals)
|
if(C.internals)
|
||||||
C.internals.icon_state = "internal1"
|
C.internals.icon_state = "internal1"
|
||||||
else
|
else
|
||||||
C << "<span class='notice'>You don't have an oxygen tank.</span>"
|
C << "<span class='notice'>You don't have a[breathes=="oxygen" ? "n oxygen" : addtext(" ",breathes)] tank.</span>"
|
||||||
if("act_intent")
|
if("act_intent")
|
||||||
usr.a_intent_change("right")
|
usr.a_intent_change("right")
|
||||||
if("help")
|
if("help")
|
||||||
|
|||||||
@@ -255,6 +255,8 @@ Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?sr
|
|||||||
|
|
||||||
if (href_list["remove_tank"])
|
if (href_list["remove_tank"])
|
||||||
if(holding)
|
if(holding)
|
||||||
|
if(istype(holding, /obj/item/weapon/tank))
|
||||||
|
holding.manipulated_by = usr.real_name
|
||||||
holding.loc = loc
|
holding.loc = loc
|
||||||
holding = null
|
holding = null
|
||||||
|
|
||||||
|
|||||||
@@ -1042,6 +1042,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
|
|
||||||
if(5)
|
if(5)
|
||||||
if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics)))
|
if((istype(A, /obj/item/weapon/tank)) || (istype(A, /obj/machinery/portable_atmospherics)))
|
||||||
|
if(istype(A, /obj/item/weapon/tank))
|
||||||
|
var/obj/item/weapon/tank/t = A
|
||||||
|
t.manipulated_by = user.real_name
|
||||||
var/obj/icon = A
|
var/obj/icon = A
|
||||||
for (var/mob/O in viewers(user, null))
|
for (var/mob/O in viewers(user, null))
|
||||||
O << "\red [user] has used [src] on \icon[icon] [A]"
|
O << "\red [user] has used [src] on \icon[icon] [A]"
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
var/distribute_pressure = ONE_ATMOSPHERE
|
var/distribute_pressure = ONE_ATMOSPHERE
|
||||||
var/integrity = 3
|
var/integrity = 3
|
||||||
var/volume = 70
|
var/volume = 70
|
||||||
|
var/manipulated_by = null //Used by _onclick/hud/screen_objects.dm internals to determine if someone has messed with our tank or not.
|
||||||
|
//If they have and we haven't scanned it with the PDA or gas analyzer then we might just breath whatever they put in it.
|
||||||
/obj/item/weapon/tank/New()
|
/obj/item/weapon/tank/New()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@
|
|||||||
O << "\red [user] has used [W] on \icon[icon] [src]"
|
O << "\red [user] has used [W] on \icon[icon] [src]"
|
||||||
|
|
||||||
var/pressure = air_contents.return_pressure()
|
var/pressure = air_contents.return_pressure()
|
||||||
|
manipulated_by = user.real_name //This person is aware of the contents of the tank.
|
||||||
var/total_moles = air_contents.total_moles()
|
var/total_moles = air_contents.total_moles()
|
||||||
|
|
||||||
user << "\blue Results of analysis of \icon[icon]"
|
user << "\blue Results of analysis of \icon[icon]"
|
||||||
|
|||||||
@@ -423,6 +423,8 @@
|
|||||||
set desc = "Flips a non-reinforced table"
|
set desc = "Flips a non-reinforced table"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
|
if(ismouse(usr))
|
||||||
|
return
|
||||||
if (!can_touch(usr))
|
if (!can_touch(usr))
|
||||||
return
|
return
|
||||||
if(!flip(get_cardinal_dir(usr,src)))
|
if(!flip(get_cardinal_dir(usr,src)))
|
||||||
|
|||||||
@@ -26,12 +26,12 @@
|
|||||||
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||||
|
|
||||||
//ADMINVERBS
|
//ADMINVERBS
|
||||||
/client/proc/investigate_show( subject in list("hrefs","notes","singulo") )
|
/client/proc/investigate_show( subject in list("hrefs","notes","singulo","telesci") )
|
||||||
set name = "Investigate"
|
set name = "Investigate"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
if(!holder) return
|
if(!holder) return
|
||||||
switch(subject)
|
switch(subject)
|
||||||
if("singulo") //general one-round-only stuff
|
if("singulo", "telesci") //general one-round-only stuff
|
||||||
var/F = investigate_subject2file(subject)
|
var/F = investigate_subject2file(subject)
|
||||||
if(!F)
|
if(!F)
|
||||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||||
|
|||||||
@@ -875,8 +875,8 @@ obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H)
|
|||||||
|
|
||||||
H.regenerate_icons()
|
H.regenerate_icons()
|
||||||
|
|
||||||
H.stat = 2
|
brainmob.stat = 2
|
||||||
H.death()
|
brainmob.death()
|
||||||
|
|
||||||
obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
|
obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head
|
||||||
brainmob = new(src)
|
brainmob = new(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user