mirror of
https://github.com/goonstation/goonstation-2016.git
synced 2026-07-16 03:23:01 +01:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,460 @@
|
||||
/obj/item/clothing/head/wig
|
||||
name = "toupée"
|
||||
desc = "You can't tell the difference, Honest!"
|
||||
icon_state= "wig"
|
||||
|
||||
/obj/item/clothing/head/bald_cap
|
||||
name = "bald cap"
|
||||
desc = "You can't tell the difference, Honest!"
|
||||
icon_state= "baldcap"
|
||||
item_state= "baldcap"
|
||||
|
||||
/obj/item/scissors
|
||||
name = "Scissors"
|
||||
desc = "Used to cut hair. Make sure you aim at the head, where the hair is."
|
||||
icon = 'icons/obj/barber_shop.dmi'
|
||||
icon_state = "scissors"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
force = 10.0
|
||||
w_class = 1.0
|
||||
hit_type = DAMAGE_STAB
|
||||
hitsound = 'sound/effects/bloody_stab.ogg'
|
||||
throwforce = 5.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
m_amt = 10000
|
||||
g_amt = 5000
|
||||
|
||||
suicide(var/mob/user as mob)
|
||||
user.visible_message("<span style=\"color:red\"><b>[user] slashes \his own throat with [src]!</b></span>")
|
||||
blood_slash(user, 25)
|
||||
user.TakeDamage("head", 150, 0)
|
||||
user.updatehealth()
|
||||
spawn(100)
|
||||
if (user)
|
||||
user.suiciding = 0
|
||||
return 1
|
||||
|
||||
/obj/item/razor_blade
|
||||
name = "Razor Blade"
|
||||
desc = "Used to cut facial hair"
|
||||
icon = 'icons/obj/barber_shop.dmi'
|
||||
icon_state = "razorblade"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
force = 10.0
|
||||
w_class = 1.0
|
||||
hit_type = DAMAGE_CUT
|
||||
hitsound = 'sound/weapons/slashcut.ogg'
|
||||
throwforce = 5.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
m_amt = 10000
|
||||
g_amt = 5000
|
||||
|
||||
suicide(var/mob/user as mob)
|
||||
user.visible_message("<span style=\"color:red\"><b>[user] slashes \his own throat with [src]!</b></span>")
|
||||
blood_slash(user, 25)
|
||||
user.TakeDamage("head", 150, 0)
|
||||
user.updatehealth()
|
||||
spawn(100)
|
||||
if (user)
|
||||
user.suiciding = 0
|
||||
return 1
|
||||
|
||||
/obj/item/dye_bottle
|
||||
name = "Hair Dye Bottle"
|
||||
desc = "Used to dye hair a different color. Seems to be made of tough, unshatterable plastic."
|
||||
icon = 'icons/obj/barber_shop.dmi'
|
||||
icon_state = "dye-e"
|
||||
flags = FPRINT | TABLEPASS
|
||||
//Default Colors
|
||||
var/customization_first_color = "#FFFFFF"
|
||||
var/empty = 1
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/hairgrowth
|
||||
name = "EZ-Hairgrowth"
|
||||
desc = "The #1 hair growth product on the market! WARNING: Some side effects may occur."
|
||||
icon = 'icons/obj/barber_shop.dmi'
|
||||
icon_state = "tonic1"
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(50)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("hairgrownium", 40)
|
||||
|
||||
on_reagent_change()
|
||||
src.icon_state = "tonic[src.reagents.total_volume ? "1" : "0"]"
|
||||
|
||||
/obj/stool/barber_chair
|
||||
name = "Barber Chair"
|
||||
desc = "Chair where hair can be cut"
|
||||
icon = 'icons/obj/barber_shop.dmi'
|
||||
icon_state = "barberchair"
|
||||
anchored = 1
|
||||
|
||||
/obj/barber_pole
|
||||
name = "Barber Pole"
|
||||
icon = 'icons/obj/barber_shop.dmi'
|
||||
icon_state = "pole"
|
||||
density = 1
|
||||
anchored = 1
|
||||
desc = "Barber poles historically were signage used to convey that the barber would perform services such as blood letting and other medical procedures, with the red representing blood, and the white representing the bandaging. In America, long after the time when blood-letting was offered, a third colour was added to bring it in line with the colours of their national flag. This one is in space."
|
||||
|
||||
///////////////////////////////////////////
|
||||
///////////Barber Chair Code///////////////
|
||||
///////////////////////////////////////////
|
||||
/obj/stool/barber_chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
boutput(user, "You can't buckle anyone in before the game starts.")
|
||||
return
|
||||
if ((!( iscarbon(M) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat))
|
||||
return
|
||||
if (M == usr)
|
||||
user.visible_message("<span style=\"color:blue\">[M] buckles in!</span>", "<span style=\"color:blue\">You buckle yourself in.</span>")
|
||||
else
|
||||
user.visible_message("<span style=\"color:blue\">[M] is buckled in by [user].</span>", "<span style=\"color:blue\">You buckle in [M].</span>")
|
||||
M.anchored = 1
|
||||
M.buckled = src
|
||||
M.set_loc(src.loc)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/stool/barber_chair/attack_hand(mob/user as mob)
|
||||
for(var/mob/M in src.loc)
|
||||
if (M.buckled)
|
||||
if (M != user)
|
||||
user.visible_message("<span style=\"color:blue\">[M] is unbuckled by [user].</span>", "<span style=\"color:blue\">You unbuckle [M].</span>")
|
||||
else
|
||||
user.visible_message("<span style=\"color:blue\">[M] unbuckles.</span>", "<span style=\"color:blue\">You unbuckle.</span>")
|
||||
M.anchored = 0
|
||||
M.buckled = null
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/stool/barber_chair/ex_act(severity)
|
||||
for(var/mob/M in src.loc)
|
||||
if(M.buckled == src)
|
||||
M.buckled = null
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/stool/barber_chair/blob_act(var/power)
|
||||
if(prob(power * 2.5))
|
||||
for(var/mob/M in src.loc)
|
||||
if(M.buckled == src)
|
||||
M.buckled = null
|
||||
qdel(src)
|
||||
/*
|
||||
/obj/stool/barber_chair/verb/rotate()
|
||||
set src in oview(1)
|
||||
set category = "Local"
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
if (src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
else
|
||||
src.layer = OBJ_LAYER
|
||||
return
|
||||
*/
|
||||
///////////////////////////////////////////////////
|
||||
//////Hair Dye Bottle Code ///////
|
||||
///////////////////////////////////////////////////
|
||||
/obj/item/dye_bottle/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if(!istype(M,/mob/living/carbon/human)) return
|
||||
if(user.zone_sel.selecting != "head" || user.a_intent != "help")
|
||||
..()
|
||||
return
|
||||
if(src.empty)
|
||||
boutput(user, "<span style=\"color:red\">Bottle is empty!</span>")
|
||||
else //if(istype(M.buckled, /obj/stool/barber_chair))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.c_flags & COVERSEYES) || (H.wear_mask && H.wear_mask.c_flags & COVERSEYES)))
|
||||
// you can't stab someone in the eyes wearing a mask!
|
||||
boutput(user, "<span style=\"color:blue\">You're going to need to remove that mask/helmet first.</span>")
|
||||
return
|
||||
/*
|
||||
var/turf/T = M.loc
|
||||
var/turf/TM = user.loc
|
||||
boutput(user, "<span style=\"color:blue\">You begin dying [M]'s hair.</span>")
|
||||
boutput(M, "<span style=\"color:blue\">[user] begins dying your hair.</span>")
|
||||
sleep(30)
|
||||
if(M.loc == T && TM.loc == user.loc && (user.equipped() == src || istype(user, /mob/living/silicon)))
|
||||
return
|
||||
*/
|
||||
boutput(user, "<span style=\"color:blue\">You dye [M]'s hair.</span>")
|
||||
boutput(M, "<span style=\"color:blue\">[user] dyes your hair.</span>")
|
||||
M.bioHolder.mobAppearance.customization_first_color = src.customization_first_color
|
||||
M.bioHolder.mobAppearance.customization_second_color = src.customization_first_color
|
||||
M.set_face_icon_dirty()
|
||||
M.set_body_icon_dirty()
|
||||
M.update_clothing()
|
||||
src.empty = 1
|
||||
src.icon_state= "dye-e"
|
||||
//else
|
||||
// boutput(user, "<span style=\"color:red\">They need to be in a barber chair!</span>")
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//////Scissors Code /////
|
||||
////////////////////////////////////////////////////
|
||||
/obj/item/scissors/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if (src.remove_bandage(M, user))
|
||||
return
|
||||
|
||||
if(user.zone_sel.selecting != "head" || user.a_intent != "help")
|
||||
..()
|
||||
return
|
||||
|
||||
if (user == M)
|
||||
boutput(user, "<span style=\"color:red\">You can't cut your own hair!</span>")
|
||||
return
|
||||
|
||||
|
||||
if(istype(M.buckled, /obj/stool/barber_chair))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.c_flags & COVERSEYES) || (H.wear_mask && H.wear_mask.c_flags & COVERSEYES) || (H.glasses && H.glasses.c_flags & COVERSEYES)))
|
||||
// you can't stab someone in the eyes wearing a mask!
|
||||
boutput(user, "<span style=\"color:blue\">You're going to need to remove that mask/helmet/glasses first.</span>")
|
||||
return
|
||||
|
||||
if(M.bioHolder.mobAppearance.customization_first == "None")
|
||||
boutput(user, "<span style=\"color:red\">There is nothing to cut!</span>")
|
||||
return
|
||||
|
||||
var/new_style = input(user, "Please select style", "Style") as null|anything in customization_styles
|
||||
|
||||
if (new_style)
|
||||
if(M.bioHolder.mobAppearance.customization_first == "Balding" && new_style != "None")
|
||||
boutput(user, "<span style=\"color:red\">Not enough hair!</span>")
|
||||
return
|
||||
|
||||
if(!new_style)
|
||||
return
|
||||
|
||||
var/turf/T = M.loc
|
||||
var/turf/TM = user.loc
|
||||
boutput(user, "<span style=\"color:blue\">You begin cutting [M]'s hair.</span>")
|
||||
boutput(M, "<span style=\"color:blue\">[user] begins cutting your hair.</span>")
|
||||
playsound(src.loc, "sound/items/Scissor.ogg", 100, 1)
|
||||
sleep(70)
|
||||
if(M.loc == T && TM.loc == user.loc && (user.equipped() == src || istype(user, /mob/living/silicon)))
|
||||
return
|
||||
|
||||
if (new_style == "None")
|
||||
var/obj/item/I = M.create_wig()
|
||||
I.set_loc(user.loc)
|
||||
|
||||
M.bioHolder.mobAppearance.customization_first = new_style
|
||||
boutput(M, "<span style=\"color:blue\">[user] cuts your hair.</span>")
|
||||
boutput(user, "<span style=\"color:blue\">you cut [M]'s hair.</span>")
|
||||
|
||||
M.cust_one_state = customization_styles[new_style]
|
||||
M.set_clothing_icon_dirty() // why the fuck is hair updated in clothing
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
////Razor Blade /////
|
||||
/////////////////////////////////////////////////////////
|
||||
/obj/item/razor_blade/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if(scalpel_surgery(M,user)) return
|
||||
|
||||
if(user.zone_sel.selecting != "head" || user.a_intent != "help")
|
||||
..()
|
||||
return
|
||||
|
||||
if( istype(M, /mob/living/silicon))
|
||||
boutput(user, "<span style=\"color:red\">Shave a robot? Shave a robot!?? SHAVE A ROBOT?!?!??</span>")
|
||||
return
|
||||
|
||||
if(M.cust_two_state == "wiz")
|
||||
if (user == M)
|
||||
boutput(user, "<span style=\"color:red\">No!!! This is the worst idea you've ever had!</span>")
|
||||
return
|
||||
src.visible_message("<span style=\"color:red\"><b>[user]</b> quickly shaves off [M]'s beard!</span>")
|
||||
M.bioHolder.AddEffect("arcane_shame", timeleft = 120)
|
||||
M.bioHolder.mobAppearance.customization_second = "None"
|
||||
M.cust_two_state = "None"
|
||||
M.set_face_icon_dirty()
|
||||
M.emote("cry")
|
||||
return
|
||||
|
||||
if(istype(M.buckled, /obj/stool/barber_chair))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.c_flags & COVERSEYES) || (H.wear_mask && H.wear_mask.c_flags & COVERSEYES) || (H.glasses && H.glasses.c_flags & COVERSEYES)))
|
||||
// you can't stab someone in the eyes wearing a mask!
|
||||
boutput(user, "<span style=\"color:blue\">You're going to need to remove that mask/helmet/glasses first.</span>")
|
||||
return
|
||||
|
||||
|
||||
if(M.bioHolder.mobAppearance.customization_second == "None")
|
||||
boutput(user, "<span style=\"color:red\">There is nothing to shave!</span>")
|
||||
return
|
||||
|
||||
var/new_style = input(user, "Please select facial style", "Facial Style") as null|anything in customization_styles
|
||||
|
||||
if (new_style)
|
||||
var/list/mustaches =list("Watson", "Chaplin", "Selleck", "Van Dyke", "Hogan")
|
||||
var/list/beards = list("Neckbeard", "Elvis", "Abe", "Chinstrap", "Hipster", "Wizard")
|
||||
var/list/full = list("Goatee", "Full Beard", "Long Beard")
|
||||
|
||||
if((new_style in full) && (!(M.bioHolder.mobAppearance.customization_second in full)))
|
||||
boutput(user, "<span style=\"color:red\">[M] doesn't have enough facial hair!</span>")
|
||||
return
|
||||
|
||||
if((new_style in beards) && (M.bioHolder.mobAppearance.customization_second in mustaches))
|
||||
boutput(user, "<span style=\"color:red\">[M] doesn't have a beard!</span>")
|
||||
return
|
||||
|
||||
if((new_style in mustaches) && (M.bioHolder.mobAppearance.customization_second in beards))
|
||||
boutput(user, "<span style=\"color:red\">[M] doesn't have a mustache!</span>")
|
||||
return
|
||||
|
||||
var/turf/T = M.loc
|
||||
var/turf/TM = user.loc
|
||||
boutput(user, "<span style=\"color:blue\">You begin shaving [M].</span>")
|
||||
boutput(M, "<span style=\"color:blue\">[user] begins shaving you.</span>")
|
||||
//playsound(src.loc, "Scissor.ogg", 100, 1)
|
||||
sleep(70)
|
||||
if(M.loc == T && TM.loc == user.loc && (user.equipped() == src || istype(user, /mob/living/silicon)))
|
||||
return
|
||||
|
||||
|
||||
M.bioHolder.mobAppearance.customization_second = new_style
|
||||
boutput(M, "<span style=\"color:blue\">[user] shaves your face</span>")
|
||||
boutput(user, "<span style=\"color:blue\">You shave [M]'s face.</span>")
|
||||
|
||||
M.cust_two_state = customization_styles[new_style]
|
||||
M.set_face_icon_dirty()
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
/////Dye Bottle Dispenser /////
|
||||
/////////////////////////////////////////////////////////////////
|
||||
/obj/machinery/hair_dye_dispenser
|
||||
name = "Hair Dye Mixer 3000"
|
||||
desc = "Mixes hair dye for whatever color you want"
|
||||
icon = 'icons/obj/barber_shop.dmi'
|
||||
icon_state = "dyedispenser"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
mats = 15
|
||||
|
||||
var/obj/item/dye_bottle/bottle = null
|
||||
|
||||
New()
|
||||
..()
|
||||
UnsubscribeProcess()
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
blob_act(var/power)
|
||||
if (prob(power * 1.25))
|
||||
qdel(src)
|
||||
|
||||
meteorhit()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
process()
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
|
||||
var/dat = "<TT><B>Dye Bottle Dispenser Unit</B><BR><HR><BR>"
|
||||
|
||||
if(src.bottle)
|
||||
dat += {"Dye Bottle Loaded: <A href='?src=\ref[src];eject=1'>(Eject)</A><BR><BR><BR>Dye Color:<BR>"}
|
||||
|
||||
if(!src.bottle.empty)
|
||||
dat += "<A href='?src=\ref[src];emptyb=1'>Empty Dye Bottle</A><BR>"
|
||||
else
|
||||
dat += {"<A href='?src=\ref[src];fillb=1'>Fill Dye Bottle</A>"}
|
||||
else
|
||||
dat += "No Dye Bottle Loaded<BR>"
|
||||
|
||||
user << browse(dat, "window=dye_dispenser")
|
||||
onclose(user, "dye_dispenser")
|
||||
return
|
||||
|
||||
attackby(obj/item/W, mob/user as mob)
|
||||
if(istype(W, /obj/item/dye_bottle))
|
||||
if(src.bottle)
|
||||
boutput(user, "<span style=\"color:blue\">The dispenser already has a dye bottle in it.</span>")
|
||||
else
|
||||
boutput(user, "<span style=\"color:blue\">You insert the dye bottle into the dispenser.</span>")
|
||||
if(W)
|
||||
user.drop_item(W)
|
||||
W.set_loc(src)
|
||||
src.bottle = W
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if (istype(usr, /mob/living/silicon/ai))
|
||||
boutput(usr, "<span style=\"color:red\">You are unable to dispense anything, since the controls are physical levers which don't go through any other kind of input.</span>")
|
||||
return
|
||||
|
||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["eject"])
|
||||
if(src.bottle)
|
||||
src.bottle.set_loc(src.loc)
|
||||
src.bottle = null
|
||||
|
||||
if(href_list["fillb"])
|
||||
if(src.bottle)
|
||||
var/new_dye = input(usr, "Please select hair color.", "Dye Color") as color
|
||||
if(new_dye)
|
||||
bottle.customization_first_color = new_dye
|
||||
bottle.empty = 0
|
||||
bottle.icon_state = "dye-f"
|
||||
src.updateDialog()
|
||||
if(href_list["emptyb"])
|
||||
if(src.bottle)
|
||||
bottle.empty = 1
|
||||
bottle.icon_state = "dye-e"
|
||||
src.updateDialog()
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
else
|
||||
usr << browse(null, "window=dye_dispenser")
|
||||
return
|
||||
return
|
||||
@@ -0,0 +1,584 @@
|
||||
//Config stuff
|
||||
#define SUPPLY_DOCKZ 2 //Z-level of the Dock.
|
||||
#define SUPPLY_STATIONZ 1 //Z-level of the Station.
|
||||
#define SUPPLY_POINTSPER 1 //Points per tick.
|
||||
#define SUPPLY_POINTDELAY 450 //Delay between ticks in milliseconds.
|
||||
#define SUPPLY_MOVETIME 1800 //Time to station is milliseconds. 1800 default
|
||||
#define SUPPLY_POINTSPERCRATE 10 //Points per crate sent back.
|
||||
|
||||
var/list/supply_requestlist = new/list()
|
||||
var/list/supply_history = new/list()
|
||||
var/supply_shuttle_can_send = 1
|
||||
var/supply_shuttle_time = 0
|
||||
var/supply_shuttle_timeleft = 0
|
||||
var/supply_shuttle_moving = 0
|
||||
var/supply_shuttle_at_station = 0
|
||||
var/door_id = "qm_dock"
|
||||
|
||||
/area/supply/spawn_point //the area supplies are spawned at and fired from
|
||||
name = "supply spawn point"
|
||||
icon_state = "shuttle3"
|
||||
luminosity = 1
|
||||
RL_Lighting = 0
|
||||
requires_power = 0
|
||||
|
||||
/area/supply/delivery_point //the area supplies are fired at
|
||||
name = "supply target point"
|
||||
icon_state = "shuttle3"
|
||||
luminosity = 1
|
||||
RL_Lighting = 0
|
||||
requires_power = 0
|
||||
|
||||
/area/supply/sell_point //the area where supplies move from the station z level
|
||||
name = "supply sell region"
|
||||
icon_state = "shuttle3"
|
||||
luminosity = 1
|
||||
RL_Lighting = 0
|
||||
requires_power = 0
|
||||
|
||||
Entered(var/atom/movable/AM)
|
||||
..()
|
||||
if(istype(AM,/obj/storage/crate))
|
||||
if(can_sell(AM))
|
||||
for(var/datum/trader/T in shippingmarket.active_traders)
|
||||
if (T.crate_tag == AM.delivery_destination)
|
||||
sell_to_trader(AM,T)
|
||||
return
|
||||
sell_crate(AM)
|
||||
|
||||
/obj/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
|
||||
name = "Plastic flaps"
|
||||
desc = "I definitely cant get past those. no way."
|
||||
icon = 'icons/obj/stationobjs.dmi' //Change this.
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = EFFECTS_LAYER_UNDER_1
|
||||
|
||||
/obj/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if (istype(A, /mob/living)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(!M.lying) // unless you're lying down
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
if (3)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/marker/supplymarker
|
||||
icon_state = "X"
|
||||
icon = 'icons/misc/mark.dmi'
|
||||
name = "X"
|
||||
invisibility = 101
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
|
||||
/proc/supply_ticker()
|
||||
wagesystem.shipping_budget += SUPPLY_POINTSPER
|
||||
spawn(SUPPLY_POINTDELAY) supply_ticker()
|
||||
|
||||
/proc/can_sell(var/obj/storage/crate/sellcrate)
|
||||
/*var/filterdead = 0
|
||||
if (shippingmarket.trader)
|
||||
if (shippingmarket.trader:goodsname == "corpses") filterdead = 1
|
||||
for(var/mob/living/M in sellcrate)
|
||||
if(filterdead && M.stat == 2) continue
|
||||
return 0
|
||||
for(var/atom/ATM in sellcrate)
|
||||
for(var/mob/living/N in ATM:contents)
|
||||
if(filterdead && N.stat == 2) continue
|
||||
return 0*/
|
||||
// Is this even necessary anymore?
|
||||
|
||||
return 1
|
||||
|
||||
/proc/sell_crate(var/obj/storage/crate/sell_crate)
|
||||
if (istype(sell_crate, /obj/storage/crate/biohazard/cdc))
|
||||
for (var/R in sell_crate)
|
||||
if (istype(R, /obj/item/reagent_containers) || istype(R, /mob/living/carbon/human)) //heh
|
||||
var/obj/item/reagent_containers/RC = R
|
||||
var/list/patho = RC.reagents.aggregate_pathogens()
|
||||
for (var/uid in patho)
|
||||
if (!(uid in QM_CDC.analysis_by_uid))
|
||||
var/datum/pathogen/P = patho[uid]
|
||||
var/datum/cdc_contact_analysis/D = new
|
||||
D.uid = uid
|
||||
var/sym_count = max(min(length(P.effects), 7), 2)
|
||||
D.time_factor = sym_count * rand(200, 600)
|
||||
D.cure_cost = sym_count * rand(2100, 4300)
|
||||
D.name = P.name
|
||||
var/rating = max(P.advance_speed, P.mutation_speed, P.mutativeness, P.suppression_threshold, P.maliciousness)
|
||||
var/ds = "weak"
|
||||
switch (P.stages)
|
||||
if (4)
|
||||
ds = "potent"
|
||||
if (5)
|
||||
ds = "deadly"
|
||||
var/df = "a relatively one-sided"
|
||||
switch (sym_count)
|
||||
if (3 to 4)
|
||||
df = "a somewhat colorful"
|
||||
if (5 to 6)
|
||||
df = "a rather diverse"
|
||||
if (7)
|
||||
df = "an incredibly symptomatic"
|
||||
D.desc = "It is [df] pathogen with a hazard rating of [rating]. We identify it to be a [ds] organism made up of [P.body_type.plural]. [P.suppressant.desc]"
|
||||
var/datum/pathogen/copy = unpool(/datum/pathogen)
|
||||
copy.setup(0, P, 0, null)
|
||||
D.assoc_pathogen = copy
|
||||
QM_CDC.analysis_by_uid[uid] = D
|
||||
QM_CDC.ready_to_analyze += D
|
||||
if (ishuman(RC))
|
||||
var/mob/living/carbon/human/H = RC
|
||||
H.ghostize()
|
||||
qdel(RC)
|
||||
qdel(sell_crate)
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Notification: Pathogen sample crate delivered to the CDC.")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
if(transmit_connection != null)
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
return
|
||||
|
||||
var/amount = 1
|
||||
// log account information for QM sales
|
||||
var/obj/item/card/id/scan = sell_crate.scan
|
||||
var/datum/data/record/account = sell_crate.account
|
||||
var/list/to_sell = new/list()
|
||||
for(var/obj/M in sell_crate.contents)
|
||||
amount = hasvar(M, "amount") && M:amount > 1 ? M:amount : 1
|
||||
if (isnum(to_sell.Find(M.type)))
|
||||
to_sell[M.type] += amount
|
||||
//boutput(world, "<span style=\"color:red\"><b> HEY I SHOULD BE SELLING [M.type]</b></span>")
|
||||
else
|
||||
to_sell[M.type] = amount
|
||||
//boutput(world, "<span style=\"color:red\"><b> [M.type] in the house</b></span>")
|
||||
qdel(M)
|
||||
qdel(sell_crate)
|
||||
var/duckets = 0 // fuck yeah duckets
|
||||
duckets += SUPPLY_POINTSPERCRATE
|
||||
|
||||
for(var/item_type in to_sell)
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// cogwerks - child types weren't inheriting their parent value properly, here is an ugly patch for the problem
|
||||
//boutput(world, "<b>PRESANITIZED SWITCH FOR [item_type]</b>") ////////////////////////////////////////////////////////
|
||||
var/sanitizer = item_type
|
||||
if(ispath(item_type, /obj/item/reagent_containers/food/snacks/ingredient/meat))
|
||||
sanitizer = /obj/item/reagent_containers/food/snacks/ingredient/meat
|
||||
if(ispath(item_type, /obj/item/reagent_containers/food/snacks/plant))
|
||||
sanitizer = /obj/item/reagent_containers/food/snacks/plant
|
||||
if(ispath(item_type, /obj/item/plant/herb))
|
||||
sanitizer = /obj/item/plant/herb
|
||||
if(ispath(item_type, /obj/item/electronics))
|
||||
sanitizer = /obj/item/electronics
|
||||
if(ispath(item_type, /obj/item/parts/robot_parts))
|
||||
sanitizer = /obj/item/parts/robot_parts
|
||||
if(ispath(item_type, /obj/item/sheet/steel))
|
||||
sanitizer = /obj/item/sheet/steel
|
||||
if(ispath(item_type, /obj/item/sheet/glass))
|
||||
sanitizer = /obj/item/sheet/glass
|
||||
//boutput(world, "[sanitizer] is our intermediary")
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////// add more ispath checks as needed, or get someone more competent to write a better workaround /////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var/datum/commodity/C = shippingmarket.commodities["[sanitizer]"]
|
||||
//boutput(world, "<b> WE ARE LOOKING FOR [item_type]")
|
||||
amount = to_sell[item_type]
|
||||
|
||||
if (C)
|
||||
//boutput(world, "<b> [C] should fetch [C.price]")
|
||||
if (C.indemand)
|
||||
//wagesystem.shipping_budget += amount * C.price * shippingmarket.demand_multiplier
|
||||
duckets += amount * C.price * shippingmarket.demand_multiplier
|
||||
//boutput(world, "<b> IN DEMAND: SELLING [amount] of [C] for [C.price] times [shippingmarket.demand_multiplier]</b>")
|
||||
else
|
||||
//wagesystem.shipping_budget += amount * C.price
|
||||
duckets += amount * C.price
|
||||
//boutput(world, "<b> NOT IN DEMAND: SELLING [amount] of [C] for [C.price]</b>")
|
||||
else
|
||||
//wagesystem.shipping_budget += amount
|
||||
duckets += amount
|
||||
//boutput(world, "<b> [C] NEVER SOLD RIGHT, FUCKIN HELL</b>")
|
||||
score_stuffshipped += amount
|
||||
if(scan && account)
|
||||
wagesystem.shipping_budget += duckets / 2
|
||||
account.fields["current_money"] += duckets / 2
|
||||
//////PDA NOTIFY/////
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Notification: [duckets] credits earned from last outgoing shipment. Splitting half of profits with [scan.registered].")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
if(transmit_connection != null)
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
//////////
|
||||
else
|
||||
wagesystem.shipping_budget += duckets
|
||||
//////PDA NOTIFY/////
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Notification: [duckets] credits earned from last outgoing shipment.")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
if(transmit_connection != null)
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
//////////
|
||||
|
||||
|
||||
////transaction is over ///
|
||||
|
||||
|
||||
/proc/sell_to_trader(var/obj/storage/crate/sellcrate,var/datum/trader/the_trader)
|
||||
//return
|
||||
|
||||
var/sellcount = 0
|
||||
var/amount = 1
|
||||
//var/sellmax = shippingmarket.trader:limit
|
||||
// log account information for QM sales // for some stupid reason this was getting a bad var bug and i have no idea why - cogwerks
|
||||
var/obj/item/card/id/scan = null
|
||||
if(sellcrate.scan)
|
||||
scan = sellcrate.scan
|
||||
var/datum/data/record/account = null
|
||||
if(sellcrate.account)
|
||||
account = sellcrate.account
|
||||
var/duckets = 0
|
||||
var/itemchecklimit = 0
|
||||
for(var/obj/M in sellcrate:contents)
|
||||
itemchecklimit++
|
||||
if (itemchecklimit > 50)
|
||||
break
|
||||
if (!the_trader)
|
||||
break
|
||||
//if (sellmax && (sellcount >= sellmax)) break
|
||||
/*if(ispath(M, /obj/item/reagent_containers/food/snacks/ingredient/meat))
|
||||
M = /obj/item/reagent_containers/food/snacks/ingredient/meat
|
||||
if(ispath(M, /obj/item/reagent_containers/food/snacks/plant))
|
||||
M = /obj/item/reagent_containers/food/snacks/plant
|
||||
if(ispath(M, /obj/item/plant/herb))
|
||||
M = /obj/item/plant/herb
|
||||
if(ispath(M, /obj/item/electronics))
|
||||
M = /obj/item/electronics
|
||||
if(ispath(M, /obj/item/parts/robot_parts))
|
||||
M = /obj/item/parts/robot_parts
|
||||
if(ispath(M, /obj/item/sheet/steel))
|
||||
M = /obj/item/sheet/steel
|
||||
if(ispath(M, /obj/item/sheet/glass))
|
||||
M = /obj/item/sheet/glass
|
||||
if(istype(M,shippingmarket.trader:tradegoods))
|
||||
amount = hasvar(M, "amount") && M:amount > 1 ? M:amount : 1
|
||||
duckets += amount * shippingmarket.trader:price
|
||||
score_stufftraded += amount
|
||||
sellcount++
|
||||
qdel(M)*/
|
||||
for(var/datum/commodity/C in the_trader.goods_buy)
|
||||
//if (M.type == C.comtype)
|
||||
if (istype(M,C.comtype))
|
||||
amount = hasvar(M, "amount") && M:amount > 1 ? M:amount : 1
|
||||
duckets += amount * C.price
|
||||
score_stufftraded += amount
|
||||
sellcount++
|
||||
qdel(M)
|
||||
|
||||
qdel(sellcrate)
|
||||
|
||||
if (sellcount)
|
||||
if(scan && account)
|
||||
wagesystem.shipping_budget += duckets / 2
|
||||
account.fields["current_money"] += duckets / 2
|
||||
//////PDA NOTIFY/////
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Deal with \"[the_trader.name]\" concluded. Net Profit: [duckets] credits. Splitting half of profits with [scan.registered].")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
if(transmit_connection != null)
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
//////////
|
||||
else
|
||||
wagesystem.shipping_budget += duckets
|
||||
//////PDA NOTIFY/////
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Deal with \"[the_trader.name]\" concluded. Net Profit: [duckets] credits.")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
if(transmit_connection != null)
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
|
||||
|
||||
|
||||
/*/proc/sell_corpses(var/obj/storage/crate/sellcrate)
|
||||
// special case sell proc for Vurdalak
|
||||
// he doesnt do this anymore it was a phase he was going through ok
|
||||
set background = 1
|
||||
var/sellcount = 0
|
||||
|
||||
var/sellmax = shippingmarket.trader:limit
|
||||
for(var/mob/living/carbon/I in sellcrate)
|
||||
if (sellmax && (sellcount >= sellmax)) break
|
||||
if (I.stat != 2)
|
||||
shippingmarket.trader = null
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Alert: \"[shippingmarket.trader:name]\" has abruptly rescinded their trade offer and left")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
return
|
||||
wagesystem.shipping_budget += shippingmarket.trader:price
|
||||
score_stufftraded += 1
|
||||
sellcount++
|
||||
if (I.mind || I.client) // if the player is waiting in the corpse, ghost them so we dont get respawn exploits
|
||||
var/mob/dead/observer/newmob = new/mob/dead/observer(I)
|
||||
if(I.client) I:client:mob = newmob
|
||||
I.mind.transfer_to(newmob)
|
||||
|
||||
spawn(0)
|
||||
qdel(I)
|
||||
qdel(sellcrate)
|
||||
if (sellcount)
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Deal with \"[shippingmarket.trader:name]\" concluded. Net Profit: [sellcount * shippingmarket.trader:price] credits")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
|
||||
shippingmarket.trader = null*/
|
||||
|
||||
// fuck it doing this with more globals
|
||||
var/crate_firing = 0
|
||||
|
||||
/proc/buy_thing(var/atom/movable/O as obj|mob)
|
||||
var/turf/spawnpoint
|
||||
for(var/turf/T in get_area_turfs(/area/supply/spawn_point))
|
||||
spawnpoint = T
|
||||
break
|
||||
|
||||
var/turf/target
|
||||
for(var/turf/T in get_area_turfs(/area/supply/delivery_point))
|
||||
target = T
|
||||
break
|
||||
|
||||
spawn(0)
|
||||
while(crate_firing)
|
||||
sleep(20)
|
||||
|
||||
if (!spawnpoint)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> No spawn turfs found! Can't deliver crate")
|
||||
return
|
||||
|
||||
if (!target)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> No target turfs found! Can't deliver crate")
|
||||
return
|
||||
|
||||
crate_firing = 1
|
||||
spawn(80)
|
||||
crate_firing = 0
|
||||
|
||||
O.set_loc(spawnpoint)
|
||||
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Shipment arriving to Cargo Bay: [O.name].")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
|
||||
for(var/obj/machinery/door/poddoor/P)
|
||||
if (P.id == door_id)
|
||||
playsound(P.loc, "sound/machines/bellalert.ogg", 50, 0)
|
||||
spawn(10)
|
||||
if (P && P.density)
|
||||
P.open()
|
||||
spawn(130)
|
||||
if (P && !P.density)
|
||||
P.close()
|
||||
|
||||
spawn(20)
|
||||
O.throw_at(target, 100, 1)
|
||||
|
||||
/proc/buy_from_trader(var/datum/trader/the_trader)
|
||||
//could be multiple possible spawn turfs
|
||||
var/turf/spawnpoint
|
||||
for(var/turf/T in get_area_turfs(/area/supply/spawn_point))
|
||||
spawnpoint = T
|
||||
break
|
||||
|
||||
//shouldn't be multiple delivery spots but it's possible
|
||||
var/turf/target
|
||||
for(var/turf/T in get_area_turfs(/area/supply/delivery_point))
|
||||
target = T
|
||||
break
|
||||
|
||||
if (!the_trader)
|
||||
return
|
||||
|
||||
the_trader.currently_selling = 1
|
||||
spawn(0)
|
||||
var/sanity = 0
|
||||
while(crate_firing && sanity < 30) // give up after 1 minute, should only take 15 seconds at most
|
||||
sleep(20)
|
||||
sanity++
|
||||
|
||||
if (sanity == 30)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> Timed out waiting to fire crate, what a bummer!")
|
||||
the_trader.currently_selling = 0
|
||||
return
|
||||
|
||||
if (!spawnpoint)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> No spawn turfs found! Can't deliver crate")
|
||||
the_trader.currently_selling = 0
|
||||
return
|
||||
|
||||
if (!target)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> No target turfs found! Can't deliver crate")
|
||||
the_trader.currently_selling = 0
|
||||
return
|
||||
|
||||
crate_firing = 1
|
||||
spawn(80)
|
||||
crate_firing = 0
|
||||
|
||||
var/atom/movable/A = new /obj/storage/crate(spawnpoint)
|
||||
A.name = "Goods Crate ([the_trader.name])"
|
||||
|
||||
/*var/putincrate = purchaseamt
|
||||
if (putincrate < 1) putincrate = 1
|
||||
if(prob(shippingmarket.trader:bullshit * 10)) // oh no! you got ripped off!
|
||||
while(putincrate > 1)
|
||||
new ourTrader.scamgoods(A)
|
||||
putincrate--
|
||||
else // a good deal
|
||||
while(putincrate > 1)
|
||||
new ourTrader.tradegoods(A)
|
||||
putincrate--*/
|
||||
|
||||
var/obj/item/paper/invoice = new /obj/item/paper(A)
|
||||
invoice.name = "Sale Invoice ([the_trader.name])"
|
||||
invoice.info = "Invoice of Sale from [the_trader.name]<br><br>"
|
||||
|
||||
var/total_price = 0
|
||||
for (var/datum/commodity/trader/C in the_trader.shopping_cart)
|
||||
if (!C.comtype || C.amount < 1) continue
|
||||
|
||||
total_price += C.price * C.amount
|
||||
invoice.info += "* [C.amount] units of [C.comname], [C.price * C.amount] credits<br>"
|
||||
var/putamount = C.amount
|
||||
while(putamount > 0)
|
||||
putamount--
|
||||
new C.comtype(A)
|
||||
invoice.info += "<br>Final Cost of Goods: [total_price] credits."
|
||||
|
||||
wagesystem.shipping_budget -= total_price
|
||||
|
||||
the_trader.wipe_cart(1) //This tells wipe_cart to not increase the amount in stock when clearing it out.
|
||||
the_trader.currently_selling = 0 //At this point the shopping cart has been processed
|
||||
|
||||
var/datum/radio_frequency/transmit_connection = radio_controller.return_frequency("1149")
|
||||
var/datum/signal/pdaSignal = get_free_signal()
|
||||
pdaSignal.data = list("address_1"="00000000", "command"="text_message", "sender_name"="CARGO-MAILBOT", "group"="cargo", "sender"="00000000", "message"="Deal with \"[the_trader.name]\" concluded. Total Cost: [total_price] credits")
|
||||
pdaSignal.transmission_method = TRANSMISSION_RADIO
|
||||
transmit_connection.post_signal(src, pdaSignal)
|
||||
|
||||
for(var/obj/machinery/door/poddoor/P)
|
||||
if (P.id == door_id)
|
||||
playsound(P.loc, "sound/machines/bellalert.ogg", 50, 0)
|
||||
spawn(10)
|
||||
if (P && P.density)
|
||||
P.open()
|
||||
spawn(130)
|
||||
if (P && !P.density)
|
||||
P.close()
|
||||
|
||||
spawn(20)
|
||||
A.throw_at(target, 100, 1)
|
||||
|
||||
/proc/process_supply_order(var/datum/supply_order/SO)
|
||||
//could be multiple possible spawn turfs
|
||||
var/turf/spawnpoint
|
||||
for(var/turf/T in get_area_turfs(/area/supply/spawn_point))
|
||||
spawnpoint = T
|
||||
break
|
||||
|
||||
//shouldn't be multiple delivery spots but it's possible
|
||||
var/turf/target
|
||||
for(var/turf/T in get_area_turfs(/area/supply/delivery_point))
|
||||
target = T
|
||||
break
|
||||
|
||||
spawn(0)
|
||||
var/sanity = 0
|
||||
while(crate_firing && sanity < 30) // give up after 1 minute, should only take 15 seconds at most
|
||||
sleep(20)
|
||||
sanity++
|
||||
|
||||
if (sanity == 30)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> Timed out waiting to fire crate, what a bummer!")
|
||||
return
|
||||
|
||||
if (!spawnpoint)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> No spawn turfs found! Can't deliver crate")
|
||||
return
|
||||
|
||||
if (!target)
|
||||
logTheThing("debug", null, null, "<b>Shipping: </b> No target turfs found! Can't deliver crate")
|
||||
return
|
||||
|
||||
crate_firing = 1
|
||||
spawn(80)
|
||||
crate_firing = 0
|
||||
|
||||
var/atom/movable/A = SO.create(spawnpoint)
|
||||
|
||||
for(var/obj/machinery/door/poddoor/P)
|
||||
if (P.id == door_id)
|
||||
playsound(P.loc, "sound/machines/bellalert.ogg", 50, 0)
|
||||
spawn(10)
|
||||
if (P && P.density)
|
||||
P.open()
|
||||
spawn(130)
|
||||
if (P && !P.density)
|
||||
P.close()
|
||||
|
||||
spawn(20)
|
||||
if (A)
|
||||
A.throw_at(target, 100, 1)
|
||||
/*
|
||||
#ifdef HALLOWEEN
|
||||
else if (halloween)
|
||||
halloween.throw_at(target, 100, 1)
|
||||
#endif
|
||||
*/
|
||||
proc/prisontothestation()
|
||||
if(turd_location == 0)
|
||||
var/area/start_location = locate(/area/shuttle/prison/prison)
|
||||
var/area/end_location = locate(/area/shuttle/prison/station)
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
for(var/turf/T in dstturfs)
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
if(istype(AM, /mob/dead))
|
||||
continue
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
qdel(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
turd_location = 1
|
||||
else
|
||||
if(turd_location == 1)
|
||||
var/area/start_location = locate(/area/shuttle/prison/prison)
|
||||
var/area/end_location = locate(/area/shuttle/prison/station)
|
||||
end_location.move_contents_to(start_location)
|
||||
turd_location = 0
|
||||
return
|
||||
@@ -0,0 +1,319 @@
|
||||
//NOTE:
|
||||
//This file contains the worst code ive ever written.
|
||||
//I dont fucking care. It looks pretty awesome.
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
/obj/dummy/liquid
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "nothing"
|
||||
invisibility = 101
|
||||
var/canmove = 1
|
||||
density = 0
|
||||
anchored = 1
|
||||
//
|
||||
/obj/item/reagent_containers/glass/vial
|
||||
|
||||
name = "glass test tube"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
desc = "an incredibly fragile glass test tube"
|
||||
icon_state = "vial0"
|
||||
item_state = "vial"
|
||||
throwforce = 3.0
|
||||
throw_speed = 1
|
||||
throw_range = 8
|
||||
force = 3.0
|
||||
w_class = 1.0
|
||||
|
||||
amount_per_transfer_from_this = 5
|
||||
flags = FPRINT | TABLEPASS | OPENCONTAINER
|
||||
|
||||
var/contained = null
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(30)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
/obj/item/reagent_containers/glass/vial/green
|
||||
name = "glass test tube"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
desc = "a glass vial filled with a strange green liquid"
|
||||
icon_state = "vialgreen"
|
||||
item_state = "vialgreen"
|
||||
contained = /datum/ailment/disease/gbs
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/blue
|
||||
name = "glass test tube"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
desc = "a glass vial filled with a shimmering blue liquid"
|
||||
icon_state = "vialblue"
|
||||
item_state = "vialblue"
|
||||
//This isn't a disease! I should make it one
|
||||
// contained = new
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////***
|
||||
/obj/item/reagent_containers/glass/vial/throw_impact(atom/hit_atom)
|
||||
..(hit_atom)
|
||||
src.shatter()
|
||||
|
||||
////////////////////////////////////////////////////////////////Generic Vial Shatter
|
||||
|
||||
/obj/item/reagent_containers/glass/vial/proc/shatter()
|
||||
var/A = src
|
||||
|
||||
var/atom/sourceloc = get_turf(src.loc)
|
||||
src = null
|
||||
qdel(A)
|
||||
var/obj/overlay/O = new /obj/overlay( sourceloc )
|
||||
var/obj/overlay/O2 = new /obj/overlay( sourceloc )
|
||||
O.name = "green liquid"
|
||||
O.density = 0
|
||||
O.anchored = 1
|
||||
O.icon = 'icons/effects/effects.dmi'
|
||||
O.icon_state = "greenshatter"
|
||||
O2.name = "broken bits of glass"
|
||||
O2.density = 0
|
||||
O2.anchored = 1
|
||||
O2.icon = 'icons/obj/objects.dmi'
|
||||
O2.icon_state = "shards"
|
||||
|
||||
if(istype(src.contained,/datum/ailment/))
|
||||
for(var/mob/living/carbon/H in view(5, sourceloc))
|
||||
H.contract_disease(src.contained,null,null,0)
|
||||
var/i
|
||||
for(i=0, i<5, i++)
|
||||
for(var/mob/living/carbon/H in view(5, sourceloc))
|
||||
H.contract_disease(src.contained,null,null,0)
|
||||
sleep(20)
|
||||
|
||||
flick("greenshatter2",O)
|
||||
O.icon_state = "nothing"
|
||||
sleep(5)
|
||||
qdel(O)
|
||||
return
|
||||
|
||||
//Generic Vial Drink
|
||||
/obj/item/reagent_containers/glass/vial/proc/drink(user)
|
||||
var/A = src
|
||||
|
||||
src = null
|
||||
qdel(A)
|
||||
if(istype(src.contained,/datum/ailment/))
|
||||
var/mob/living/M = user
|
||||
switch(pick(1,2))
|
||||
if(1)
|
||||
M.weakened += 5
|
||||
M.contract_disease(src.contained,null,null,1)
|
||||
if(2)
|
||||
spawn(200)
|
||||
M.contract_disease(src.contained,null,null,1)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/glass/vial/blue/drink(user)
|
||||
var/A = src
|
||||
var/atom/sourceloc = get_turf(src.loc)
|
||||
src = null
|
||||
qdel(A)
|
||||
|
||||
var/obj/overlay/O = new /obj/overlay( sourceloc )
|
||||
var/obj/overlay/O2 = new /obj/overlay( sourceloc )
|
||||
|
||||
O.name = "green liquid"
|
||||
O.density = 0
|
||||
O.anchored = 1
|
||||
O.icon = 'icons/effects/effects.dmi'
|
||||
O.icon_state = "blueshatter"
|
||||
O2.name = "broken bits of glass"
|
||||
O2.density = 0
|
||||
O2.anchored = 1
|
||||
O2.icon = 'icons/obj/objects.dmi'
|
||||
O2.icon_state = "shards"
|
||||
|
||||
liquify(user)
|
||||
|
||||
sleep(20)
|
||||
flick("blueshatter2",O)
|
||||
O.icon_state = "nothing"
|
||||
sleep(5)
|
||||
qdel(O)
|
||||
|
||||
/obj/item/reagent_containers/glass/vial/blue/shatter()
|
||||
|
||||
var/A = src
|
||||
var/atom/sourceloc = get_turf(src.loc)
|
||||
src = null
|
||||
qdel(A)
|
||||
|
||||
var/obj/overlay/O = new /obj/overlay( sourceloc )
|
||||
var/obj/overlay/O2 = new /obj/overlay( sourceloc )
|
||||
|
||||
O.name = "green liquid"
|
||||
O.density = 0
|
||||
O.anchored = 1
|
||||
O.icon = 'icons/effects/effects.dmi'
|
||||
O.icon_state = "blueshatter"
|
||||
O2.name = "broken bits of glass"
|
||||
O2.density = 0
|
||||
O2.anchored = 1
|
||||
O2.icon = 'icons/obj/objects.dmi'
|
||||
O2.icon_state = "shards"
|
||||
|
||||
for(var/mob/living/carbon/human/H in view(1, sourceloc))
|
||||
liquify(H)
|
||||
|
||||
sleep(20)
|
||||
flick("blueshatter2",O)
|
||||
O.icon_state = "nothing"
|
||||
sleep(5)
|
||||
|
||||
qdel(O)
|
||||
|
||||
/mob/proc/drop_vial()
|
||||
var/obj/item/reagent_containers/glass/vial/W = src.equipped()
|
||||
if (W)
|
||||
u_equip(W)
|
||||
if (W)
|
||||
W.set_loc(src.loc)
|
||||
// W.dropped(src) Get rid of this as it would smash a vial
|
||||
if (W)
|
||||
W.layer = initial(W.layer)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
T.Entered(W)
|
||||
return
|
||||
|
||||
/proc/liquify(var/mob/H, time = 150)
|
||||
|
||||
if(H.stat) return
|
||||
spawn(0)
|
||||
var/mobloc = get_turf(H.loc)
|
||||
var/obj/dummy/liquid/holder = new /obj/dummy/liquid( mobloc )
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )
|
||||
animation.name = "water"
|
||||
animation.density = 0
|
||||
animation.anchored = 1
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.icon_state = "liquify"
|
||||
animation.layer = MOB_EFFECT_LAYER
|
||||
animation.master = holder
|
||||
flick("liquify",animation)
|
||||
H.canmove = 0
|
||||
sleep(4)
|
||||
H.set_loc(holder)
|
||||
H.canmove = 1
|
||||
spawn(0)
|
||||
var/i
|
||||
for(i=0, i<10, i++)
|
||||
spawn(0)
|
||||
var/obj/effects/water/water1 = new /obj/effects/water( mobloc )
|
||||
var/direction = pick(alldirs)
|
||||
water1.name = "water"
|
||||
water1.density = 0
|
||||
water1.icon = 'icons/effects/water.dmi'
|
||||
water1.icon_state = "extinguish"
|
||||
for(i=0, i<pick(1,2,3), i++)
|
||||
sleep(5)
|
||||
step(water1,direction)
|
||||
spawn(20)
|
||||
qdel(water1)
|
||||
|
||||
sleep(time)
|
||||
H.canmove = 0
|
||||
mobloc = get_turf(H.loc)
|
||||
animation.set_loc(mobloc)
|
||||
var/b
|
||||
for(b=0, b<10, b++)
|
||||
spawn(0)
|
||||
var/turf = mobloc
|
||||
var/direction = pick(alldirs)
|
||||
var/c
|
||||
for(c=0, c<pick(1,2,3), c++)
|
||||
turf = get_step(turf,direction)
|
||||
var/obj/effects/water/water2 = new /obj/effects/water( turf )
|
||||
water2.name = "water"
|
||||
water2.icon = 'icons/effects/water.dmi'
|
||||
water2.icon_state = "extinguish"
|
||||
walk_to(water2,mobloc,-1,5)
|
||||
sleep(20)
|
||||
qdel(water2)
|
||||
|
||||
sleep(20)
|
||||
flick("reappear",animation)
|
||||
sleep(5)
|
||||
H.set_loc(mobloc)
|
||||
H.canmove = 1
|
||||
qdel(animation)
|
||||
qdel(holder)
|
||||
|
||||
|
||||
/obj/dummy/liquid/relaymove(var/mob/user, direction)
|
||||
if (!src.canmove) return
|
||||
//writing my own movement because step is broken.
|
||||
switch(direction)
|
||||
if(NORTH)
|
||||
src.y++
|
||||
if(SOUTH)
|
||||
src.y--
|
||||
if(EAST)
|
||||
src.x++
|
||||
if(WEST)
|
||||
src.x--
|
||||
if(NORTHEAST)
|
||||
src.y++
|
||||
src.x++
|
||||
if(NORTHWEST)
|
||||
src.y++
|
||||
src.x--
|
||||
if(SOUTHEAST)
|
||||
src.y--
|
||||
src.x++
|
||||
if(SOUTHWEST)
|
||||
src.y--
|
||||
src.x--
|
||||
src.canmove = 0
|
||||
spawn(20) canmove = 1
|
||||
|
||||
/obj/dummy/liquid/ex_act(blah)
|
||||
return
|
||||
/obj/dummy/liquid/bullet_act(blah,blah)
|
||||
return
|
||||
|
||||
|
||||
///atom/relaymove - change to obj to restore
|
||||
|
||||
/obj/relaymove(var/mob/user, direction) //testing something
|
||||
//if(anchored) return
|
||||
//step(src, direction)
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////blue
|
||||
/*
|
||||
/obj/testtuberack
|
||||
name = "test tube rack"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "clipboard00"
|
||||
|
||||
attackby(obj/item/W, mob/user as mob)
|
||||
if (src.contents.len >= 7)
|
||||
boutput(user, "<span style=\"color:blue\">The test tube rack is full</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/reagent_containers/glass/vial))
|
||||
boutput(user, "<span style=\"color:blue\">You insert the test tube into the test tube rack</span>")
|
||||
user.drop_vial()
|
||||
W.set_loc(src)
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(src.contents.len > 0)
|
||||
boutput(user, "<span style=\"color:blue\">You slide a random test tube carefully out of the rack</span>")
|
||||
var/obj/item/reagent_containers/glass/vial/V = pick(src.contents)
|
||||
src.contents -= V
|
||||
V.set_loc(src.loc)
|
||||
else
|
||||
boutput(user, "<span style=\"color:blue\">There are no test tubes in the rack</span>")
|
||||
return
|
||||
*/
|
||||
Reference in New Issue
Block a user