Cleaned up the sleeper code a bit.

Monkey boxes lowered to 2 monkeys per box and the crate now costs net 15 points for one box. They were also removed from vending machines.  I warned that they would be changed if people continued to spam them.
Windows and disposal pipes layers adjusted slightly.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2204 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-09-15 06:07:33 +00:00
parent 565ccf9bd5
commit 90bd0c9d68
7 changed files with 237 additions and 290 deletions

View File

@@ -577,7 +577,7 @@
var/dpdir = 0 // bitmask of pipe directions
dir = 0 // dir will contain dominant direction for junction pipes
var/health = 10 // health points 0-10
layer = 2.4 // slightly lower than wires
layer = 2.3 // slightly lower than wires and other pipes
var/base_icon_state // initial icon state on map
// new pipe, set the icon_state as on map

View File

@@ -35,9 +35,8 @@
/datum/supply_packs/monkey
name = "Monkey crate"
contains = list ("/obj/item/weapon/monkeycube_box",
"/obj/item/weapon/monkeycube_box")
cost = 10
contains = list ("/obj/item/weapon/monkeycube_box")
cost = 20
containertype = "/obj/crate/freezer"
containername = "Monkey crate"

View File

@@ -66,8 +66,8 @@
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/candy;/obj/item/weapon/reagent_containers/food/drinks/dry_ramen;/obj/item/weapon/reagent_containers/food/snacks/chips;/obj/item/weapon/reagent_containers/food/snacks/sosjerky;/obj/item/weapon/reagent_containers/food/snacks/no_raisin;/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie;/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers"
product_amounts = "10;10;10;10;10;10;10"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake;/obj/item/weapon/monkeycube_box"
product_hideamt = "10;1"
product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake"
product_hideamt = "10"
/obj/machinery/vending/cola

View File

@@ -3,6 +3,7 @@
icon = 'structures.dmi'
desc = "A window."
density = 1
layer = 3.2//Just above doors
var/health = 14.0
var/ini_dir = null
var/state = 0

View File

@@ -135,292 +135,259 @@
icon = 'Cryogenic2.dmi'
icon_state = "sleeper_0"
density = 1
var/occupied = 0 // So there won't be multiple persons trying to get into one sleeper
var/mob/occupant = null
anchored = 1
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
var/mob/occupant = null
/obj/machinery/sleeper/New()
..()
spawn( 5 )
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
New()
..()
spawn( 5 )
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
return
return
return
/obj/machinery/sleeper/dummy//For effects only.
icon_state = "sleeper_1"
/obj/machinery/sleeper/allow_drop()
return 0
allow_drop()
return 0
/obj/machinery/sleeper/process()
src.updateDialog()
return
/obj/machinery/sleeper/ex_act(severity)
switch(severity)
if(1.0)
process()
src.updateDialog()
return
blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
A.blob_act()
del(src)
return
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if((!( istype(G, /obj/item/weapon/grab)) || !( ismob(G.affecting))))
return
if(2.0)
if (prob(50))
if(src.occupant)
user << "\blue <B>The sleeper is already occupied!</B>"
return
for(var/mob/living/carbon/metroid/M in range(1,G.affecting))
if(M.Victim == G.affecting)
usr << "[G.affecting.name] will not fit into the sleeper because they have a Metroid latched onto their head."
return
for (var/mob/V in viewers(user))
V.show_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
if(do_after(user, 20))
if(src.occupant)
user << "\blue <B>The sleeper is already occupied!</B>"
return
if(!G || !G.affecting) return
var/mob/M = G.affecting
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
src.occupant = M
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
for(var/obj/O in src)
O.loc = src.loc
src.add_fingerprint(user)
del(G)
return
return
ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
return
/obj/machinery/sleeper/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.blob_act()
del(src)
return
/obj/machinery/sleeper/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
if(2.0)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
if(3.0)
if(prob(25))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
return
if (src.occupant)
user << "\blue <B>The sleeper is already occupied!</B>"
alter_health(mob/living/M as mob)
if (M.health > 0)
if (M.oxyloss >= 10)
var/amount = max(0.15, 1)
M.oxyloss -= amount
else
M.oxyloss = 0
M.updatehealth()
M.paralysis -= 4
M.weakened -= 4
M.stunned -= 4
if (M.paralysis < 1)
M.paralysis = 1
if (M.weakened < 1)
M.weakened = 1
if (M.stunned < 1)
M.stunned = 1
if (M:reagents.get_reagent_amount("inaprovaline") < 5)
M:reagents.add_reagent("inaprovaline", 5)
return
// Removing the requirement for subjects to be naked -- TLE
/* if (G.affecting.abiotic())
user << "Subject may not have abiotic items on."
return */
for(var/mob/living/carbon/metroid/M in range(1,G.affecting))
if(M.Victim == G.affecting)
usr << "[G.affecting.name] will not fit into the sleeper because they have a Metroid latched onto their head."
proc/go_out()
if(!src.occupant)
return
for (var/mob/V in viewers(user))
occupied = 1
V.show_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
if(do_after(user, 20))
if(!G || !G.affecting) return
var/mob/M = G.affecting
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.loc = src
src.occupant = M
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
for(var/obj/O in src)
O.loc = src.loc
src.add_fingerprint(user)
del(G)
return
else
occupied = 0
return
/obj/machinery/sleeper/dummy/attackby()
return
/obj/machinery/sleeper/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
ex_act(severity)
del(src)
return
else
return
/obj/machinery/sleeper/alter_health(mob/living/M as mob)
if (M.health > 0)
if (M.oxyloss >= 10)
var/amount = max(0.15, 1)
M.oxyloss -= amount
else
M.oxyloss = 0
M.updatehealth()
M.paralysis -= 4
M.weakened -= 4
M.stunned -= 4
if (M.paralysis <= 1)
M.paralysis = 3
if (M.weakened <= 1)
M.weakened = 3
if (M.stunned <= 1)
M.stunned = 3
if (M:reagents.get_reagent_amount("inaprovaline") < 5)
M:reagents.add_reagent("inaprovaline", 5)
return
/obj/machinery/sleeper/proc/go_out()
if (!src.occupant)
return
for(var/obj/O in src)
O.loc = src.loc
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
// src.occupant.metabslow = 0
src.occupant = null
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
return
/obj/machinery/sleeper/proc/inject_inap(mob/user as mob)
if (src.occupant)
if (src.occupant.reagents.get_reagent_amount("inaprovaline") + 30 <= 60)
src.occupant.reagents.add_reagent("inaprovaline", 30)
user << text("Occupant now has [] units of Inaprovaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("inaprovaline"))
else
user << "No occupant!"
return
/obj/machinery/sleeper/proc/inject_stox(mob/user as mob)
if (src.occupant)
if (src.occupant.reagents.get_reagent_amount("stoxin") + 20 <= 40)
src.occupant.reagents.add_reagent("stoxin", 20)
user << text("Occupant now has [] units of soporifics in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("stoxin"))
else
user << "No occupant!"
return
/obj/machinery/sleeper/proc/inject_dermaline(mob/user as mob)
if (src.occupant)
if (src.occupant.reagents.get_reagent_amount("dermaline") + 20 <= 40)
src.occupant.reagents.add_reagent("dermaline", 20)
user << text("Occupant now has [] units of Dermaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dermaline"))
else
user << "No occupant!"
return
/obj/machinery/sleeper/proc/inject_bicaridine(mob/user as mob) //GRAND AGOURI MARKER
if (src.occupant)
if (src.occupant.reagents.get_reagent_amount("bicaridine") + 10 <= 20)
src.occupant.reagents.add_reagent("bicaridine", 10)
user << text("Occupant now has [] units of Bicaridine in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("bicaridine"))
else
user << "No occupant!"
return
/obj/machinery/sleeper/proc/inject_dexalin(mob/user as mob) //GRAND AGOURI MARKER
if (src.occupant)
if (src.occupant.reagents.get_reagent_amount("dexalin") + 20 <= 40)
src.occupant.reagents.add_reagent("dexalin", 20)
user << text("Occupant now has [] units of Dexalin in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dexalin"))
else
user << "No occupant!"
return
/obj/machinery/sleeper/proc/check(mob/user as mob)
if (src.occupant)
user << text("\blue <B>Occupant ([]) Statistics:</B>", src.occupant)
var/t1
switch(src.occupant.stat)
if(0.0)
t1 = "Conscious"
if(1.0)
t1 = "Unconscious"
if(2.0)
t1 = "*dead*"
else
user << text("[]\t Health %: [] ([])", (src.occupant.health > 50 ? "\blue " : "\red "), src.occupant.health, t1)
user << text("[]\t -Core Temperature: []&deg;C ([]&deg;F)</FONT><BR>", (src.occupant.bodytemperature > 50 ? "<font color='blue'>" : "<font color='red'>"), src.occupant.bodytemperature-T0C, src.occupant.bodytemperature*1.8-459.67)
user << text("[]\t -Brute Damage %: []", (src.occupant.bruteloss < 60 ? "\blue " : "\red "), src.occupant.bruteloss)
user << text("[]\t -Respiratory Damage %: []", (src.occupant.oxyloss < 60 ? "\blue " : "\red "), src.occupant.oxyloss)
user << text("[]\t -Toxin Content %: []", (src.occupant.toxloss < 60 ? "\blue " : "\red "), src.occupant.toxloss)
user << text("[]\t -Burn Severity %: []", (src.occupant.fireloss < 60 ? "\blue " : "\red "), src.occupant.fireloss)
user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5)
else
user << "\blue There is no one inside!"
return
/obj/machinery/sleeper/verb/eject()
set name = "Eject Sleeper"
set category = "Object"
set src in oview(1)
if (usr.stat != 0)
return
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
src.icon_state = "sleeper_0"
src.go_out()
add_fingerprint(usr)
occupied = 0
return
/obj/machinery/sleeper/dummy/eject()
set category = null
set hidden = 1
return
/obj/machinery/sleeper/verb/move_inside()
set name = "Enter Sleeper"
set category = "Object"
set src in oview(1)
if (usr.stat != 0)
return
if (occupied)
usr << "\blue <B>The sleeper is already occupied!</B>"
return
/* if (usr.abiotic()) // Removing the requirement for user to be naked -- TLE
usr << "Subject may not have abiotic items on."
return*/
for(var/mob/living/carbon/metroid/M in range(1,usr))
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
for (var/mob/V in viewers(usr))
occupied = 1
V.show_message("[usr] starts climbing into the sleeper.", 3)
if(do_after(usr, 20))
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
// usr.metabslow = 1
src.occupant = usr
src.icon_state = "sleeper_1"
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
src.occupant = null
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
for(var/obj/O in src)
del(O)
src.add_fingerprint(usr)
icon_state = "sleeper_0-r"
return
else
occupied = 0
return
/obj/machinery/sleeper/dummy/move_inside()
set category = null
set hidden = 1
return
proc/inject_inap(mob/user as mob)
if(src.occupant)
if(src.occupant.reagents.get_reagent_amount("inaprovaline") + 30 <= 60)
src.occupant.reagents.add_reagent("inaprovaline", 30)
user << text("Occupant now has [] units of Inaprovaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("inaprovaline"))
else
user << "No occupant!"
return
proc/inject_stox(mob/user as mob)
if(src.occupant)
if(src.occupant.reagents.get_reagent_amount("stoxin") + 20 <= 40)
src.occupant.reagents.add_reagent("stoxin", 20)
user << text("Occupant now has [] units of soporifics in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("stoxin"))
else
user << "No occupant!"
return
proc/inject_dermaline(mob/user as mob)
if (src.occupant)
if(src.occupant.reagents.get_reagent_amount("dermaline") + 20 <= 40)
src.occupant.reagents.add_reagent("dermaline", 20)
user << text("Occupant now has [] units of Dermaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dermaline"))
else
user << "No occupant!"
return
proc/inject_bicaridine(mob/user as mob)
if(src.occupant)
if(src.occupant.reagents.get_reagent_amount("bicaridine") + 10 <= 20)
src.occupant.reagents.add_reagent("bicaridine", 10)
user << text("Occupant now has [] units of Bicaridine in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("bicaridine"))
else
user << "No occupant!"
return
proc/inject_dexalin(mob/user as mob)
if(src.occupant)
if(src.occupant.reagents.get_reagent_amount("dexalin") + 20 <= 40)
src.occupant.reagents.add_reagent("dexalin", 20)
user << text("Occupant now has [] units of Dexalin in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dexalin"))
else
user << "No occupant!"
return
proc/check(mob/user as mob)
if(src.occupant)
user << text("\blue <B>Occupant ([]) Statistics:</B>", src.occupant)
var/t1
switch(src.occupant.stat)
if(0.0)
t1 = "Conscious"
if(1.0)
t1 = "Unconscious"
if(2.0)
t1 = "*dead*"
else
user << text("[]\t Health %: [] ([])", (src.occupant.health > 50 ? "\blue " : "\red "), src.occupant.health, t1)
user << text("[]\t -Core Temperature: []&deg;C ([]&deg;F)</FONT><BR>", (src.occupant.bodytemperature > 50 ? "<font color='blue'>" : "<font color='red'>"), src.occupant.bodytemperature-T0C, src.occupant.bodytemperature*1.8-459.67)
user << text("[]\t -Brute Damage %: []", (src.occupant.bruteloss < 60 ? "\blue " : "\red "), src.occupant.bruteloss)
user << text("[]\t -Respiratory Damage %: []", (src.occupant.oxyloss < 60 ? "\blue " : "\red "), src.occupant.oxyloss)
user << text("[]\t -Toxin Content %: []", (src.occupant.toxloss < 60 ? "\blue " : "\red "), src.occupant.toxloss)
user << text("[]\t -Burn Severity %: []", (src.occupant.fireloss < 60 ? "\blue " : "\red "), src.occupant.fireloss)
user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5)
else
user << "\blue There is no one inside!"
return
verb/eject()
set name = "Eject Sleeper"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
src.icon_state = "sleeper_0"
src.go_out()
add_fingerprint(usr)
return
verb/move_inside()
set name = "Enter Sleeper"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"
return
for(var/mob/living/carbon/metroid/M in range(1,usr))
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
for(var/mob/V in viewers(usr))
V.show_message("[usr] starts climbing into the sleeper.", 3)
if(do_after(usr, 20))
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"
return
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.loc = src
src.occupant = usr
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
for(var/obj/O in src)
del(O)
src.add_fingerprint(usr)
return
return

View File

@@ -170,7 +170,7 @@ MONKEY CUBE BOX
desc = "Drymate brand monkey cubes. Just add water!"
icon = 'food.dmi'
icon_state = "monkeycubebox"
var/amount = 5
var/amount = 2
attack_hand(mob/user as mob, unused, flag)
add_fingerprint(user)

View File

@@ -959,27 +959,6 @@
baconbeacon.loc = usr
baconbeacon.digest_delay()
/*
/obj/item/weapon/reagent_containers/food/snacks/bananaphone
name = "Banana Phone"
desc = "Ring ring ring ring ring..."
icon = 'items.dmi'
icon_state = "banana" //needs a new icon.
bitesize = 5
var/obj/item/device/radio/banana/bananaphone
New()
..()
reagents.add_reagent("banana", 5)
bananaphone = new /obj/item/device/radio/banana(src)
bananaphone.listening = 1
bananaphone.broadcasting = 1
On_Consume()
if(!reagents.total_volume)
usr << sound('bananaphone.ogg',1)
hear_talk(mob/M as mob, msg)
if(bananaphone)
bananaphone.hear_talk(M, msg)*/
/obj/item/weapon/reagent_containers/food/snacks/monkeycube
name = "monkey cube"
@@ -1021,6 +1000,7 @@
icon_state = "monkeycubewrap"
wrapped = 1
/obj/item/weapon/reagent_containers/food/snacks/spellburger
name = "Spell Burger"
desc = "This is absolutely Ei Nath."