Merge branch 'master' of git://github.com/Abi79/tgstation13-git

Conflicts:
	baystation12.dme
	code/defines/obj/vending.dm
	code/game/machinery/vending.dm
	html/changelog.html
	maps/tgstation.2.0.8.dmm
This commit is contained in:
Miniature
2011-12-07 07:53:20 +10:30
72 changed files with 750 additions and 182 deletions
@@ -1687,6 +1687,37 @@ datum
..()
return
condensedcapsaicin
name = "Condensed Capsaicin"
id = "condensedcapsaicin"
description = "This shit goes in pepperspray."
reagent_state = LIQUID
color = "#B31008" // rgb: 179, 16, 8
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(!istype(M, /mob/living))
return
if(method == TOUCH)
if(istype(M, /mob/living/carbon/human))
if(M:wear_mask)
M << "\red Your mask protects you from the pepperspray!"
return
if(M:head)
M << "\red Your helmet protects you from the pepperspray!"
return
if(M:glasses)
M << "\red Your glasses protect you from most of the pepperspray!"
M:emote("scream")
M.eye_blurry = max(M.eye_blurry, 1)
return
M:emote("scream")
M << "\red You're sprayed directly in the eyes with pepperspray!"
M.eye_blurry = max(M.eye_blurry, 5)
M.eye_blind = max(M.eye_blind, 2)
M:paralysis = max(M:paralysis, 1)
M.drop_item()
frostoil
name = "Frost Oil"
id = "frostoil"
+112
View File
@@ -173,6 +173,7 @@
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..()
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if (!src.state && stage == 2 && !crit_fail)
user << "\red You prime the grenade! 3 seconds!"
message_admins("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
@@ -322,6 +323,105 @@
reagents = R
R.my_atom = src
/obj/item/weapon/gun/grenadelauncher
name = "grenade launcher"
icon = 'gun.dmi'
icon_state = "riotgun"
item_state = "riotgun"
w_class = 4.0
throw_speed = 2
throw_range = 10
force = 5.0
var/list/grenades = new/list()
var/max_grenades = 3
m_amt = 2000
examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\icon [src] Grenade launcher:"
usr << "\blue [grenades] / [max_grenades] Grenades."
attackby(obj/item/I as obj, mob/user as mob)
if((istype(I, /obj/item/weapon/chem_grenade)) || (istype(I, /obj/item/weapon/flashbang)) || (istype(I, /obj/item/weapon/smokebomb)) || (istype(I, /obj/item/weapon/mustardbomb)) || (istype(I, /obj/item/weapon/empgrenade)))
if(grenades.len < max_grenades)
user.drop_item()
I.loc = src
grenades += I
user << "\blue You put the grenade in the grenade launcher."
user << "\blue [grenades.len] / [max_grenades] Grenades."
else
usr << "\red The grenade launcher cannot hold more grenades."
afterattack(obj/target, mob/user , flag)
if(target == user) return
if(grenades.len)
spawn(0) fire_grenade(target,user)
else
usr << "\red The grenade launcher is empty."
proc
fire_grenade(atom/target, mob/user)
if (locate (/obj/structure/table, src.loc))
return
else
for(var/mob/O in viewers(world.view, user))
O.show_message(text("\red [] fired a grenade!", user), 1)
user << "\red You fire the grenade launcher!"
if (istype(grenades[1], /obj/item/weapon/chem_grenade))
var/obj/item/weapon/chem_grenade/F = grenades[1]
grenades -= F
F.loc = user.loc
F.throw_at(target, 30, 2)
message_admins("[key_name_admin(user)] fired a chemistry grenade from a grenade launcher ([src.name]).")
log_game("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
F.state = 1
F.icon_state = initial(icon_state)+"_armed"
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
spawn(15)
F.explode()
else if (istype(grenades[1], /obj/item/weapon/flashbang))
var/obj/item/weapon/flashbang/F = grenades[1]
grenades -= F
F.loc = user.loc
F.throw_at(target, 30, 2)
F.active = 1
F.icon_state = "flashbang1"
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
spawn(15)
F.prime()
else if (istype(grenades[1], /obj/item/weapon/smokebomb))
var/obj/item/weapon/smokebomb/F = grenades[1]
grenades -= F
F.loc = user.loc
F.throw_at(target, 30, 2)
F.icon_state = "flashbang1"
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
spawn(15)
F.prime()
else if (istype(grenades[1], /obj/item/weapon/mustardbomb))
var/obj/item/weapon/mustardbomb/F = grenades[1]
grenades -= F
F.loc = user.loc
F.throw_at(target, 30, 2)
F.icon_state = "flashbang1"
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
spawn(15)
F.prime()
else if (istype(grenades[1], /obj/item/weapon/empgrenade))
var/obj/item/weapon/empgrenade/F = grenades[1]
grenades -= F
F.loc = user.loc
F.throw_at(target, 30, 2)
F.active = 1
F.icon_state = "empar"
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
spawn(15)
F.prime()
/obj/item/weapon/gun/syringe
name = "syringe gun"
icon = 'gun.dmi'
@@ -2633,6 +2733,18 @@
..()
reagents.add_reagent("fuel",1000)
/obj/structure/reagent_dispensers/peppertank
name = "Pepper Spray Refiller"
desc = "Refill pepper spray canisters."
icon = 'objects.dmi'
icon_state = "peppertank"
anchored = 1
density = 0
amount_per_transfer_from_this = 45
New()
..()
reagents.add_reagent("condensedcapsaicin",1000)
/obj/structure/reagent_dispensers/fueltank/blob_act()
explosion(src.loc,0,1,5,7,10)
if(src)
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/pepperspray,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
body_parts_covered = UPPER_TORSO|LOWER_TORSO
flags = FPRINT | TABLEPASS
+9 -2
View File
@@ -254,6 +254,13 @@
else
on = 0
continue
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_adamantine == 0)
if (ore_glass > 0)
ore_glass--;
new /obj/item/stack/sheet/rglass(output.loc)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0 && selected_adamantine == 0)
if (ore_gold > 0)
ore_gold--;
@@ -296,10 +303,10 @@
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_adamantine == 0)
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0 && selected_adamantine == 0)
if (ore_iron > 0)
ore_iron--;
new /obj/item/stack/sheet/metal(output.loc)
new /obj/item/stack/sheet/r_metal(output.loc)
else
on = 0
continue
@@ -0,0 +1,18 @@
/mob/living/carbon/alien/adjustToxLoss(amount)
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
return
/mob/living/carbon/alien/proc/getPlasma()
return storedPlasma
/mob/living/carbon/alien/eyecheck()
return 2
/mob/living/carbon/alien/New()
..()
for(var/obj/item/clothing/mask/facehugger/facehugger in world)
if(facehugger.stat == CONSCIOUS)
var/image/activeIndicator = image('alien.dmi', loc = facehugger, icon_state = "facehugger_active")
activeIndicator.override = 1
client.images += activeIndicator
@@ -10,10 +10,10 @@ Doesn't work on other aliens/AI.*/
if(stat)
src << "\green You must be conscious to do this."
return 0
else if(X&&getToxLoss() < X)
else if(X && getPlasma() < X)
src << "\green Not enough plasma stored."
return 0
else if(Y&&(!isturf(src.loc) || istype(src.loc, /turf/space)))
else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space)))
src << "\green Bad place for a garden!"
return 0
else return 1
@@ -72,7 +72,7 @@
stat(null, "Move Mode: [m_intent]")
if (client.statpanel == "Status")
stat(null, "Plasma Stored: [getToxLoss()]")
stat(null, "Plasma Stored: [getPlasma()]")
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
@@ -63,7 +63,7 @@
if (client.statpanel == "Status")
stat(null, "Progress: [amount_grown]/200")
stat(null, "Plasma Stored: [getToxLoss()]")
stat(null, "Plasma Stored: [getPlasma()]")
///mob/living/carbon/alien/larva/bullet_act(var/obj/item/projectile/Proj) taken care of in living
@@ -1,6 +1,3 @@
/mob/living/carbon/alien/eyecheck()
return 2
/mob/living/carbon/alien/say_understands(var/other)
if (istype(other, /mob/living/carbon/alien))
return 1
+9 -9
View File
@@ -219,8 +219,8 @@
if ((stat & BROKEN) || malfhack)
user.visible_message(\
"\red [user.name] has broken the power control board inside [src.name]!",\
"You broke the charred power control board and remove remains.",
"You hear crack")
"You broke the charred power control board and remove the remains.",
"You hear a crack!")
//ticker.mode:apcs-- //XSI said no and I agreed. -rastaf0
else
user.visible_message(\
@@ -274,7 +274,7 @@
return
updateicon()
else if(emagged || malfhack)
user << "The interface is broken"
user << "The interface is broken."
else
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
@@ -315,7 +315,7 @@
user << "You fail to [ locked ? "unlock" : "lock"] the APC interface."
else if (istype(W, /obj/item/weapon/cable_coil) && !terminal && opened && has_electronics!=2)
if (src.loc:intact)
user << "\red You must remove the floor plating first."
user << "\red You must remove the floor plating in front of the APC first."
return
var/obj/item/weapon/cable_coil/C = W
if(C.amount < 10)
@@ -339,7 +339,7 @@
terminal.connect_to_network()
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2)
if (src.loc:intact)
user << "\red You must remove the floor plating first."
user << "\red You must remove the floor plating in front of the APC first."
return
user << "You begin to cut cables..."
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
@@ -378,7 +378,7 @@
new /obj/item/stack/sheet/metal(loc)
user.visible_message(\
"\red [src] has been cut apart by [user.name] with the weldingtool.",\
"You disassembled brocken APC frame.",\
"You disassembled the broken APC frame.",\
"\red You hear welding.")
else
new /obj/item/apc_frame(loc)
@@ -394,13 +394,13 @@
if (opened==2)
opened = 1
user.visible_message(\
"\red [user.name] has replaced the damaged APC frontal panel with new one.",\
"You replace the damaged APC frontal panel with new one.")
"\red [user.name] has replaced the damaged APC frontal panel with a new one.",\
"You replace the damaged APC frontal panel with a new one.")
del(W)
updateicon()
else if (istype(W, /obj/item/apc_frame) && opened && ((stat & BROKEN) || malfhack))
if (has_electronics)
user << "You cannot repair this heavy damaged APC until broken electronics stills inside."
user << "You cannot repair this APC until you remove the electronics still inside."
return
user << "You begin to replace the damaged APC frame..."
if(do_after(user, 50))
@@ -63,6 +63,7 @@
process()
charge_tick++
if(charge_tick < 4) return 0
charge_tick = 0
if(!power_supply) return 0
power_supply.give(100)
return 1
@@ -34,12 +34,6 @@
damage = 20
/obj/item/projectile/bullet/gyro
name ="gyro"
icon_state= "bolter"
damage = 50
/obj/item/projectile/bullet/stunshot
name = "stunshot"
damage = 5
@@ -12,6 +12,18 @@
return 1
/obj/item/projectile/bullet/gyro
name ="gyro"
icon_state= "bolter"
damage = 50
flag = "bullet"
on_hit(var/atom/target, var/blocked = 0)
explosion(target, -1, 0, 2)
return 1
/obj/item/projectile/temp
name = "freeze beam"
@@ -0,0 +1,113 @@
/var/security_level = 0
//0 = code green
//1 = code blue
//2 = code red
//3 = code delta
/proc/set_security_level(var/level)
switch(level)
if("green")
level = SEC_LEVEL_GREEN
if("blue")
level = SEC_LEVEL_BLUE
if("red")
level = SEC_LEVEL_RED
if("delta")
level = SEC_LEVEL_DELTA
//Will not be announced if you try to set to the same level as it already is
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
switch(level)
if(SEC_LEVEL_GREEN)
world << "<font size=4 color='red'>Attention! security level lowered to green</font>"
world << "<font color='red'>All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced.</font>"
security_level = SEC_LEVEL_GREEN
for(var/obj/machinery/firealarm/FA in world)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('monitors.dmi', "overlay_green")
if(SEC_LEVEL_BLUE)
if(security_level < SEC_LEVEL_BLUE)
world << "<font size=4 color='red'>Attention! security level elevated to blue</font>"
world << "<font color='red'>The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted.</font>"
else
world << "<font size=4 color='red'>Attention! security level lowered to blue</font>"
world << "<font color='red'>The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed.</font>"
security_level = SEC_LEVEL_BLUE
for(var/obj/machinery/firealarm/FA in world)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('monitors.dmi', "overlay_blue")
if(SEC_LEVEL_RED)
if(security_level < SEC_LEVEL_RED)
world << "<font size=4 color='red'>Attention! Code red!</font>"
world << "<font color='red'>There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised.</font>"
else
world << "<font size=4 color='red'>Attention! Code red!</font>"
world << "<font color='red'>The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised.</font>"
security_level = SEC_LEVEL_RED
/* - At the time of commit, setting status displays didn't work properly
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
if(CC)
CC.post_status("alert", "redalert")*/
for(var/obj/machinery/firealarm/FA in world)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('monitors.dmi', "overlay_red")
if(SEC_LEVEL_DELTA)
world << "<font size=4 color='red'>Attention! Delta security level reached!</font>"
world << "<font color='red'>The ship's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill.</font>"
security_level = SEC_LEVEL_DELTA
for(var/obj/machinery/firealarm/FA in world)
if(FA.z == 1)
FA.overlays = list()
FA.overlays += image('monitors.dmi', "overlay_delta")
else
return
/proc/get_security_level()
switch(security_level)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/num2seclevel(var/num)
switch(num)
if(SEC_LEVEL_GREEN)
return "green"
if(SEC_LEVEL_BLUE)
return "blue"
if(SEC_LEVEL_RED)
return "red"
if(SEC_LEVEL_DELTA)
return "delta"
/proc/seclevel2num(var/seclevel)
switch( lowertext(seclevel) )
if("green")
return SEC_LEVEL_GREEN
if("blue")
return SEC_LEVEL_BLUE
if("red")
return SEC_LEVEL_RED
if("delta")
return SEC_LEVEL_DELTA
/*DEBUG
/mob/verb/set_thing0()
set_security_level(0)
/mob/verb/set_thing1()
set_security_level(1)
/mob/verb/set_thing2()
set_security_level(2)
/mob/verb/set_thing3()
set_security_level(3)
*/