Merge branch 'master' of github.com:Baystation12/Baystation12 into TGUpdates

Conflicts:
	code/defines/obj/supplypacks.dm
	icons/mob/items_lefthand.dmi
	icons/mob/items_righthand.dmi
This commit is contained in:
Erthilo
2012-05-15 00:51:50 +01:00
66 changed files with 8538 additions and 8393 deletions
+49 -79
View File
@@ -1,87 +1,57 @@
/obj/structure/closet/extinguisher
name = "extinguisher closet"
name = "extinguisher cabinet"
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
icon_state = "extinguisher10"
icon_opened = "extinguisher11"
icon_closed = "extinguisher10"
opened = 1
icon = 'closet.dmi'
icon_state = "extinguisher_closed"
anchored = 1
density = 0
var/obj/item/weapon/extinguisher/EXTINGUISHER = new/obj/item/weapon/extinguisher
var/localopened = 1
var/obj/item/weapon/extinguisher/has_extinguisher = new/obj/item/weapon/extinguisher
open()
/obj/structure/closet/extinguisher/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (isrobot(usr))
return
close()
return
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (isrobot(usr))
return
if (istype(O, /obj/item/weapon/extinguisher))
if(!EXTINGUISHER)
user.drop_item(O)
src.contents += O
EXTINGUISHER = O
user << "\blue You place the extinguisher in the [src.name]."
else
localopened = !localopened
if (istype(O, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened)
user.drop_item(O)
src.contents += O
has_extinguisher = O
user << "\blue You place the extinguisher in the [src.name]."
else
localopened = !localopened
update_icon()
attack_hand(mob/user as mob)
if(localopened)
if(EXTINGUISHER)
user.put_in_hand(EXTINGUISHER)
EXTINGUISHER = null
user << "\blue You take the extinguisher from the [name]."
else
localopened = !localopened
else
localopened = !localopened
update_icon()
verb/toggle_openness() //nice name, huh? HUH?!
set name = "Open/Close"
set category = "Object"
if (isrobot(usr))
return
localopened = !localopened
update_icon()
verb/remove_extinguisher()
set name = "Remove Extinguisher"
set category = "Object"
if (isrobot(usr))
return
if (localopened)
if(EXTINGUISHER)
usr.put_in_hand(EXTINGUISHER)
EXTINGUISHER = null
usr << "\blue You take the extinguisher from the [name]."
else
usr << "\blue The [name] is empty."
else
usr << "\blue The [name] is closed."
update_icon()
attack_paw(mob/user as mob)
attack_hand(user)
return
attack_ai(mob/user as mob)
return
opened = !opened
else
opened = !opened
update_icon()
var/hasextinguisher = 0
if(EXTINGUISHER)
hasextinguisher = 1
icon_state = text("extinguisher[][]",hasextinguisher,src.localopened)
/obj/structure/closet/extinguisher/attack_hand(mob/user as mob)
if(has_extinguisher)
user.put_in_hand(has_extinguisher)
has_extinguisher = null
user << "\blue You take the extinguisher from the [name]."
opened = 1
else
opened = !opened
update_icon()
/obj/structure/closet/extinguisher/attack_paw(mob/user as mob)
attack_hand(user)
return
/obj/structure/closet/extinguisher/update_icon()
if(!opened)
icon_state = "extinguisher_closed"
return
if(has_extinguisher)
if(istype(has_extinguisher, /obj/item/weapon/extinguisher/mini))
icon_state = "extinguisher_mini"
else
icon_state = "extinguisher_full"
else
icon_state = "extinguisher_empty"
+8 -4
View File
@@ -508,11 +508,15 @@
U << browse(null, "window=pda")
return
if("Message")
var/t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
var/t
if(!href_list["pAI_mess"])
t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
else
t = href_list["pAI_mess"]
if (!t)
return
if (!in_range(src, U) && loc != U)
if (!in_range(src, U) && loc != U && !href_list["pAI_mess"])
return
var/obj/item/device/pda/P = locate(href_list["target"])
@@ -705,7 +709,7 @@
honkamt--
playsound(loc, 'bikehorn.ogg', 30, 1)
if(U.machine == src)//Final safety.
if(U.machine == src && !href_list["pAI_mess"])//Final safety.
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
else
U.machine = null
+8 -7
View File
@@ -411,15 +411,16 @@ steam.start() -- spawns the effect
var/obj/R = new /obj()
R.reagents = new/datum/reagents(500)
R.reagents.my_atom = R
reagents.trans_to(R, reagents.total_volume/divisor)
for(var/atom/A in view(1, src))
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
if(prob(5))
if(reagents)
reagents.trans_to(R, reagents.total_volume/divisor)
for(var/atom/A in view(1, src))
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
if(prob(5))
R.reagents.reaction(A)
del(R)
else if(R && R.reagents)
R.reagents.reaction(A)
del(R)
else
R.reagents.reaction(A)
del(R)
return
/obj/effect/effect/chem_smoke/HasEntered(mob/living/carbon/M as mob )
+12 -14
View File
@@ -27,18 +27,17 @@ MEDICAL
return 1
var/stoppedblood = 0
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ("chest")
if(hasorgans(M))
var/datum/organ/external/affecting = M:get_organ("chest")
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/user2 = user
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
affecting = M:get_organ(check_zone(user2.zone_sel.selecting))
else
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = H.get_organ("head")
affecting = M:get_organ("head")
if(affecting.destroyed && !affecting.gauzed)
user.visible_message("\red You do your best to stop the bleeding from [H]'s stump.", "\red [user] does [user.gender == MALE? "his" : "her"] best to stem [H]'s bleeding from [H.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
user.visible_message("\red You do your best to stop the bleeding from [M]'s stump.", "\red [user] does [user.gender == MALE? "his" : "her"] best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
affecting.gauzed = 1
use(1)
return
@@ -69,7 +68,7 @@ MEDICAL
if (user && stoppedblood)
if (M != user)
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else if(user)
@@ -146,18 +145,17 @@ MEDICAL
return 1
var/stoppedblood = 0
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/datum/organ/external/affecting = H.get_organ("chest")
if(hasorgans(M))
var/datum/organ/external/affecting = M:get_organ("chest")
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/user2 = user
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
affecting = M:get_organ(check_zone(user2.zone_sel.selecting))
else
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
affecting = H.get_organ("head")
affecting = M:get_organ("head")
if(affecting.destroyed && !affecting.gauzed)
H.visible_message("\red You do your best to stop the bleeding from [H]'s stump.", "\red [user] does their best to stem [H]'s bleeding from [H.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
M.visible_message("\red You do your best to stop the bleeding from [M]'s stump.", "\red [user] does their best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
affecting.gauzed = 1
use(1)
return
@@ -179,7 +177,7 @@ MEDICAL
if (user && stoppedblood)
if (M != user)
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [H]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else
user.visible_message("\red [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.gender == MALE? "his" : "her"] own cuts with [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
else if(user)
+3
View File
@@ -263,6 +263,9 @@ WELDINGTOOOL
attack(mob/M as mob, mob/user as mob)
if(hasorgans(M))
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
if(S)
message_admins("It appears [M] has \"null\" where there should be a [user.zone_sel.selecting]. Check into this, and tell SkyMarshal: \"[M.type]\"")
return ..()
if(!S.robot || user.a_intent != "help")
return ..()
if(S.brute_dam)
+1 -1
View File
@@ -9,7 +9,7 @@
src.attack_ai(usr)
// check for TK users
AutoUpdateTK(src)
//AutoUpdateTK(src)
if (istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
if(!(usr in nearby))
+6
View File
@@ -83,6 +83,9 @@ SHARDS
if("full (2 sheets)")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
user << "\red You need more glass to do that."
return 1
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1
@@ -142,6 +145,9 @@ SHARDS
if("full (2 sheets)")
if(!src) return 1
if(src.loc != user) return 1
if(src.amount < 2)
user << "\red You need more glass to do that."
return 1
if(locate(/obj/structure/window) in user.loc)
user << "\red There is a window in the way."
return 1