mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -135,49 +135,30 @@
|
||||
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()
|
||||
New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/dummy//For effects only.
|
||||
icon_state = "sleeper_1"
|
||||
|
||||
/obj/machinery/sleeper/allow_drop()
|
||||
allow_drop()
|
||||
return 0
|
||||
|
||||
/obj/machinery/sleeper/process()
|
||||
|
||||
process()
|
||||
src.updateDialog()
|
||||
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
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/blob_act()
|
||||
blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
@@ -185,27 +166,29 @@
|
||||
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) )))
|
||||
|
||||
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if((!( istype(G, /obj/item/weapon/grab)) || !( ismob(G.affecting))))
|
||||
return
|
||||
if (src.occupant)
|
||||
if(src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
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."
|
||||
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(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)
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
@@ -219,14 +202,10 @@
|
||||
src.add_fingerprint(user)
|
||||
del(G)
|
||||
return
|
||||
else
|
||||
occupied = 0
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/dummy/attackby()
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/ex_act(severity)
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
@@ -235,23 +214,23 @@
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
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))
|
||||
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)
|
||||
|
||||
alter_health(mob/living/M as mob)
|
||||
if (M.health > 0)
|
||||
if (M.oxyloss >= 10)
|
||||
var/amount = max(0.15, 1)
|
||||
@@ -262,79 +241,84 @@
|
||||
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.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
|
||||
|
||||
/obj/machinery/sleeper/proc/go_out()
|
||||
if (!src.occupant)
|
||||
|
||||
proc/go_out()
|
||||
if(!src.occupant)
|
||||
return
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
if (src.occupant.client)
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
proc/inject_dermaline(mob/user as mob)
|
||||
if (src.occupant)
|
||||
if (src.occupant.reagents.get_reagent_amount("dermaline") + 20 <= 40)
|
||||
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)
|
||||
|
||||
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
|
||||
|
||||
/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)
|
||||
|
||||
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
|
||||
|
||||
/obj/machinery/sleeper/proc/check(mob/user as mob)
|
||||
if (src.occupant)
|
||||
|
||||
proc/check(mob/user as mob)
|
||||
if(src.occupant)
|
||||
user << text("\blue <B>Occupant ([]) Statistics:</B>", src.occupant)
|
||||
var/t1
|
||||
switch(src.occupant.stat)
|
||||
@@ -357,55 +341,46 @@
|
||||
user << "\blue There is no one inside!"
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/verb/eject()
|
||||
|
||||
verb/eject()
|
||||
set name = "Eject Sleeper"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (usr.stat != 0)
|
||||
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()
|
||||
verb/move_inside()
|
||||
set name = "Enter Sleeper"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (usr.stat != 0)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
if (occupied)
|
||||
if(src.occupant)
|
||||
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
|
||||
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
|
||||
// usr.metabslow = 1
|
||||
src.occupant = usr
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
@@ -415,12 +390,4 @@
|
||||
del(O)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
else
|
||||
occupied = 0
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/dummy/move_inside()
|
||||
set category = null
|
||||
set hidden = 1
|
||||
|
||||
return
|
||||
@@ -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)
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user