Merge pull request #1 from ZomgPonies/master

Update to latest official Paradise files
This commit is contained in:
Regory
2014-08-04 09:24:06 -04:00
71 changed files with 24364 additions and 23925 deletions
+1
View File
@@ -298,6 +298,7 @@
#include "code\game\machinery\Beacon.dm"
#include "code\game\machinery\bees_apiary.dm"
#include "code\game\machinery\bees_items.dm"
#include "code\game\machinery\biogenerator.dm"
#include "code\game\machinery\buttons.dm"
#include "code\game\machinery\cell_charger.dm"
#include "code\game\machinery\cloning.dm"
+3
View File
@@ -210,6 +210,9 @@
if("viewperipheral" in href_list) // open drive, show status of peripheral
var/obj/item/part/computer/C = locate(href_list["viewperipheral"])
if(!istype(C) || (C.loc != src.computer))
return
if(istype(C,/obj/item/part/computer/storage))
current = C
interact()
@@ -258,10 +258,11 @@
if("show" in href_list)
var/obj/machinery/camera/C = locate(href_list["show"])
current = C
usr.reset_view(C)
interact()
return
if(istype(C) && C.status)
current = C
usr.reset_view(C)
interact()
return
if("keyselect" in href_list)
current = null
@@ -73,25 +73,29 @@
if(href_list["inject1"])
var/obj/item/weapon/implant/I = locate(href_list["inject1"])
if(I) I.activate(1)
if(istype(I))
I.activate(1)
else if(href_list["inject5"])
var/obj/item/weapon/implant/I = locate(href_list["inject5"])
if(I) I.activate(5)
if(istype(I))
I.activate(5)
else if(href_list["inject10"])
var/obj/item/weapon/implant/I = locate(href_list["inject10"])
if(I) I.activate(10)
if(istype(I))
I.activate(10)
else if(href_list["lock"])
screen = !screen
else if(href_list["warn"])
var/warning = copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN)
var/warning = trim(copytext(sanitize(input(usr,"Message:","Enter your message here!","")),1,MAX_MESSAGE_LEN))
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))
if( istype(I) && I.imp_in)
var/mob/living/carbon/R = I.imp_in
log_say("PrisonComputer3 message: [key_name(usr)]->[key_name(R)] : [warning]")
R << "\green You hear a voice in your head saying: '[warning]'"
interact()
+1 -1
View File
@@ -239,7 +239,7 @@ Programs are a file that can be executed
//
if("runfile" in href_list)
var/datum/file/F = locate(href_list["runfile"])
if(F && F.computer == computer)
if(istype(F) && F.computer == computer)
F.execute(src)
return 1
+1
View File
@@ -195,6 +195,7 @@ datum/hud/New(mob/owner)
blob_hud()
else if(mymob.mind && mymob.mind.vampire)
vampire_hud()
human_hud('icons/mob/screen1_Vampire.dmi')
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12(var/full = 0 as null)
+3 -4
View File
@@ -24,13 +24,12 @@
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (!istype(M)) // not sure if this is the right thing...
return
return 0
var/messagesource = M
if (can_operate(M)) //Checks if mob is lying down on table for surgery
if (do_surgery(M,user,src))
return
return 0
if (istype(M,/mob/living/carbon/brain))
messagesource = M:container
if (hitsound && force > 0)
@@ -145,7 +144,7 @@
if(istype(M, /mob/living/carbon/human))
return M:attacked_by(src, user, def_zone)
return M:attacked_by(src, user, def_zone) //make sure to return whether we have hit or miss
else
switch(damtype)
if("brute")
+5 -1
View File
@@ -320,7 +320,11 @@
icon_power_button = "genetic_incendiary"
/obj/effect/proc_holder/spell/wizard/targeted/immolate/cast(list/targets)
var/mob/living/L = usr
if(!targets.len)
usr << "<span class='notice'>No target found in range.</span>"
return
var/mob/living/carbon/L = targets[1]
L.adjust_fire_stacks(0.5) // Same as walking into fire. Was 100 (goon fire)
L.visible_message("\red <b>[L.name]</b> suddenly bursts into flames!")
+5 -1
View File
@@ -108,7 +108,10 @@
var/mob/living/carbon/human/O
if(Mo.greaterform)
O = new(src, Mo.greaterform)
var/greatform = lowertext(Mo.greaterform)
var/typepath = "/mob/living/carbon/human/"
typepath += greatform
O = new typepath(src, greatform)
else
O = new(src)
@@ -152,6 +155,7 @@
continue
else
O.real_name = randomname
O.dna.real_name = randomname
i++
O.UpdateAppearance()
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
+6 -1
View File
@@ -114,7 +114,8 @@ Obviously, requires DNA2.
clothes_req = 0
stat_allowed = 0
invocation_type = "none"
range = 1
range = -1
include_user = 1
selection_type = "range"
icon_power_button = "genetic_morph"
@@ -222,6 +223,8 @@ Obviously, requires DNA2.
var/list/targets
targets += input("Choose the target to talk to.", "Targeting") as mob in living_mob_list
perform(targets)
/obj/effect/proc_holder/spell/wizard/targeted/remotetalk/cast(list/targets)
if(!ishuman(usr)) return
@@ -267,6 +270,8 @@ Obviously, requires DNA2.
var/list/targets
targets += input("Choose the target to spy on.", "Targeting") as mob in living_mob_list
perform(targets)
/obj/effect/proc_holder/spell/wizard/targeted/remoteview/cast(list/targets)
var/mob/living/carbon/human/user
if(ishuman(usr))
@@ -553,8 +553,11 @@ ________________________________________________________________________________
var/damage = min(cell.charge, rand(50,150))//Uses either the current energy left over or between 50 and 150.
if(damage>1)//So they don't spam it when energy is a factor.
spark_system.start()//SPARKS THERE SHALL BE SPARKS
U.electrocute_act(damage, src,0.1,1)//The last argument is a safety for the human proc that checks for gloves.
cell.charge -= damage
U.electrocute_act(damage, src, 0.1)
if(cell.charge < damage)
cell.use(cell.charge)
else
cell.use(damage)
else
A << "\red <b>ERROR</b>: \black Not enough energy remaining."
+2 -2
View File
@@ -1,9 +1,9 @@
/datum/hud/proc/vampire_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
/datum/hud/proc/vampire_hud(ui_style = 'icons/mob/screen1_Vampire.dmi')
vampire_blood_display = new /obj/screen()
vampire_blood_display.name = "Vampire Blood"
vampire_blood_display.icon_state = "dark128"
vampire_blood_display.screen_loc = "14:28,9:15"
vampire_blood_display.screen_loc = "16:28,9:15"
vampire_blood_display.layer = 20
mymob.client.screen += list(vampire_blood_display)
+1 -1
View File
@@ -486,7 +486,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
if(hud_used)
if(!hud_used.vampire_blood_display)
hud_used.vampire_hud()
//hud_used.human_hud(hud_used.ui_style)
hud_used.human_hud('icons/mob/screen1_Vampire.dmi')
hud_used.vampire_blood_display.maptext_width = 64
hud_used.vampire_blood_display.maptext_height = 26
hud_used.vampire_blood_display.maptext = "<div align='left' valign='top' style='position:relative; top:0px; left:6px'> U:<font color='#33FF33' size='1'>[mind.vampire.bloodusable]</font><br> T:<font color='#FFFF00' size='1'>[mind.vampire.bloodtotal]</font></div>"
+17 -8
View File
@@ -197,18 +197,24 @@
minimal_access = list(access_medical, access_psychiatrist, access_maint_tunnels)
alt_titles = list("Psychologist","Therapist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_or_collect(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if (H.mind.role_alt_title)
switch(H.mind.role_alt_title)
if("Psychiatrist")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych(H), slot_w_uniform)
if("Psychologist")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
@@ -247,3 +253,6 @@
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/device/healthanalyzer(H.back), slot_in_backpack)
return 1
+225 -230
View File
@@ -1,231 +1,226 @@
/obj/machinery/biogenerator
name = "Biogenerator"
desc = ""
icon = 'icons/obj/biogenerator.dmi'
icon_state = "biogen-stand"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 40
var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0
var/menustat = "menu"
New()
..()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
l_color = "#7BF9FF"
power_change()
..()
if(!(stat & (BROKEN|NOPOWER)))
SetLuminosity(2)
else
SetLuminosity(0)
on_reagent_change() //When the reagents change, change the icon as well.
update_icon()
update_icon()
if(!src.beaker)
icon_state = "biogen-empty"
else if(!src.processing)
icon_state = "biogen-stand"
else
icon_state = "biogen-work"
return
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "\red The biogenerator is already loaded."
else
user.before_take_item(O)
O.loc = src
beaker = O
updateUsrDialog()
else if(processing)
user << "\red The biogenerator is currently processing."
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
user << "\red The biogenerator is already full! Activate it."
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
G.loc = src
i++
if(i >= 10)
user << "\blue You fill the biogenerator to its capacity."
break
if(i<10)
user << "\blue You empty the plant bag into the biogenerator."
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
user << "\red You cannot put this in [src.name]"
else
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
user << "\red The biogenerator is full! Activate it."
else
user.before_take_item(O)
O.loc = src
user << "\blue You put [O.name] in [src.name]"
update_icon()
return
/obj/machinery/biogenerator/interact(mob/user as mob)
if(stat & BROKEN)
return
user.set_machine(src)
var/dat = "<TITLE>Biogenerator</TITLE>Biogenerator:<BR>"
if (processing)
dat += "<FONT COLOR=red>Biogenerator is processing! Please wait...</FONT>"
else
dat += "Biomass: [points] points.<HR>"
switch(menustat)
if("menu")
if (beaker)
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
dat += "Food<BR>"
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>(20)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>(50)</FONT><BR>"
dat += "Nutrient<BR>"
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
dat += "Leather<BR>"
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>(100)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>(250)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>(300)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>(400)</FONT><BR>"
//dat += "Other<BR>"
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
else
dat += "<BR><FONT COLOR=red>No beaker inside. Please insert a beaker.</FONT><BR>"
if("nopoints")
dat += "You do not have biomass to create products.<BR>Please, put growns into reactor and activate it.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
if("complete")
dat += "Operation complete.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
if("void")
dat += "<FONT COLOR=red>Error: No growns inside.</FONT><BR>Please, put growns into reactor.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
user << browse(dat, "window=biogenerator")
onclose(user, "biogenerator")
return
/obj/machinery/biogenerator/attack_hand(mob/user as mob)
interact(user)
/obj/machinery/biogenerator/proc/activate()
if (usr.stat != 0)
return
if (src.stat != 0) //NOPOWER etc
return
if(src.processing)
usr << "\red The biogenerator is in the process of working."
return
var/S = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
S += 5
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
points += 1
else points += I.reagents.get_reagent_amount("nutriment")*10
del(I)
if(S)
processing = 1
update_icon()
updateUsrDialog()
playsound(get_turf(src), 'sound/machines/blender.ogg', 50, 1)
use_power(S*30)
sleep(S+15)
processing = 0
update_icon()
else
menustat = "void"
return
/obj/machinery/biogenerator/proc/create_product(var/item,var/cost)
if(cost > points)
menustat = "nopoints"
return 0
processing = 1
update_icon()
updateUsrDialog()
points -= cost
sleep(30)
switch(item)
if("milk")
beaker.reagents.add_reagent("milk",10)
if("meat")
new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc)
if("ez")
new/obj/item/nutrient/ez(src.loc)
if("l4z")
new/obj/item/nutrient/l4z(src.loc)
if("rh")
new/obj/item/nutrient/rh(src.loc)
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
if("l4z5")
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
if("rh5")
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
if("wallet")
new/obj/item/weapon/storage/wallet(src.loc)
if("gloves")
new/obj/item/clothing/gloves/botanic_leather(src.loc)
if("tbelt")
new/obj/item/weapon/storage/belt/utility(src.loc)
if("satchel")
new/obj/item/weapon/storage/backpack/satchel(src.loc)
if("monkey")
new/mob/living/carbon/monkey(src.loc)
processing = 0
menustat = "complete"
update_icon()
return 1
/obj/machinery/biogenerator/Topic(href, href_list)
if(stat & BROKEN) return
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
usr.set_machine(src)
switch(href_list["action"])
if("activate")
activate()
if("detach")
if(beaker)
beaker.loc = src.loc
beaker = null
update_icon()
if("create")
create_product(href_list["item"],text2num(href_list["cost"]))
if("menu")
menustat = "menu"
/obj/machinery/biogenerator
name = "Biogenerator"
desc = ""
icon = 'icons/obj/biogenerator.dmi'
icon_state = "biogen-stand"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 40
var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0
var/menustat = "menu"
New()
..()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
on_reagent_change() //When the reagents change, change the icon as well.
update_icon()
update_icon()
if(!src.beaker)
icon_state = "biogen-empty"
else if(!src.processing)
icon_state = "biogen-stand"
else
icon_state = "biogen-work"
return
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "\red The biogenerator is already loaded."
else
user.before_take_item(O)
O.loc = src
beaker = O
updateUsrDialog()
else if(processing)
user << "\red The biogenerator is currently processing."
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
user << "\red The biogenerator is already full! Activate it."
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
G.loc = src
i++
if(i >= 10)
user << "\blue You fill the biogenerator to its capacity."
break
if(i<10)
user << "\blue You empty the plant bag into the biogenerator."
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
user << "\red You cannot put this in [src.name]"
else
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= 10)
user << "\red The biogenerator is full! Activate it."
else
user.before_take_item(O)
O.loc = src
user << "\blue You put [O.name] in [src.name]"
update_icon()
return
/obj/machinery/biogenerator/interact(mob/user as mob)
if(stat & BROKEN)
return
user.set_machine(src)
var/dat = "<TITLE>Biogenerator</TITLE>Biogenerator:<BR>"
if (processing)
dat += "<FONT COLOR=red>Biogenerator is processing! Please wait...</FONT>"
else
dat += "Biomass: [points] points.<HR>"
switch(menustat)
if("menu")
if (beaker)
dat += "<A href='?src=\ref[src];action=activate'>Activate Biogenerator!</A><BR>"
dat += "<A href='?src=\ref[src];action=detach'>Detach Container</A><BR><BR>"
dat += "Food<BR>"
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>(20)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>(50)</FONT><BR>"
dat += "Nutrient<BR>"
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
dat += "Leather<BR>"
dat += "<A href='?src=\ref[src];action=create;item=wallet;cost=100'>Wallet</A> <FONT COLOR=blue>(100)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=250'>Botanical gloves</A> <FONT COLOR=blue>(250)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=300'>Utility belt</A> <FONT COLOR=blue>(300)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=satchel;cost=400'>Leather Satchel</A> <FONT COLOR=blue>(400)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=cashbag;cost=400'>Cash Bag</A> <FONT COLOR=blue>(400)</FONT><BR>"
//dat += "Other<BR>"
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
else
dat += "<BR><FONT COLOR=red>No beaker inside. Please insert a beaker.</FONT><BR>"
if("nopoints")
dat += "You do not have biomass to create products.<BR>Please, put growns into reactor and activate it.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
if("complete")
dat += "Operation complete.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
if("void")
dat += "<FONT COLOR=red>Error: No growns inside.</FONT><BR>Please, put growns into reactor.<BR>"
dat += "<A href='?src=\ref[src];action=menu'>Return to menu</A>"
user << browse(dat, "window=biogenerator")
onclose(user, "biogenerator")
return
/obj/machinery/biogenerator/attack_hand(mob/user as mob)
interact(user)
/obj/machinery/biogenerator/proc/activate()
if (usr.stat != 0)
return
if (src.stat != 0) //NOPOWER etc
return
if(src.processing)
usr << "\red The biogenerator is in the process of working."
return
var/S = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents)
S += 5
if(I.reagents.get_reagent_amount("nutriment") < 0.1)
points += 1
else points += I.reagents.get_reagent_amount("nutriment")*10
del(I)
if(S)
processing = 1
update_icon()
updateUsrDialog()
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
use_power(S*30)
sleep(S+15)
processing = 0
update_icon()
else
menustat = "void"
return
/obj/machinery/biogenerator/proc/create_product(var/item,var/cost)
if(cost > points)
menustat = "nopoints"
return 0
processing = 1
update_icon()
updateUsrDialog()
points -= cost
sleep(30)
switch(item)
if("milk")
beaker.reagents.add_reagent("milk",10)
if("meat")
new/obj/item/weapon/reagent_containers/food/snacks/meat(src.loc)
if("ez")
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
if("l4z")
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
if("rh")
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/ez(src.loc)
if("l4z5")
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/l4z(src.loc)
if("rh5")
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
new/obj/item/weapon/reagent_containers/glass/fertilizer/rh(src.loc)
if("wallet")
new/obj/item/weapon/storage/wallet(src.loc)
if("gloves")
new/obj/item/clothing/gloves/botanic_leather(src.loc)
if("tbelt")
new/obj/item/weapon/storage/belt/utility(src.loc)
if("satchel")
new/obj/item/weapon/storage/backpack/satchel(src.loc)
if("cashbag")
new/obj/item/weapon/storage/bag/cash(src.loc)
if("monkey")
new/mob/living/carbon/monkey(src.loc)
processing = 0
menustat = "complete"
update_icon()
return 1
/obj/machinery/biogenerator/Topic(href, href_list)
if(stat & BROKEN) return
if(usr.stat || usr.restrained()) return
if(!in_range(src, usr)) return
usr.set_machine(src)
switch(href_list["action"])
if("activate")
activate()
if("detach")
if(beaker)
beaker.loc = src.loc
beaker = null
update_icon()
if("create")
create_product(href_list["item"],text2num(href_list["cost"]))
if("menu")
menustat = "menu"
updateUsrDialog()
+5 -2
View File
@@ -199,7 +199,10 @@
else if (href_list["magbot"])
if(src.allowed(usr))
var/mob/living/silicon/robot/R = locate(href_list["magbot"])
if(R)
// whatever weirdness this is supposed to be, but that is how the href gets added, so here it is again
if(istype(R) && istype(usr, /mob/living/silicon) && usr.mind.special_role && (usr.mind.original == usr) && !R.emagged)
var/choice = input("Are you certain you wish to hack [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm")
if(R && istype(R))
@@ -229,4 +232,4 @@
if(!R.scrambledcodes && !istype(R, /mob/living/silicon/robot/drone))
R.self_destruct()
return
return
+203 -207
View File
@@ -6,6 +6,8 @@
icon_state = "hydrotray3"
density = 1
anchored = 1
flags = OPENCONTAINER
var/draw_warnings = 1 //Set to 0 to stop it from drawing the alert lights.
// Plant maintenance vars.
@@ -30,96 +32,104 @@
var/lastcycle = 0 // Cycle timing/tracking var.
var/cycledelay = 150 // Delay per cycle.
var/closed_system // If set, the tray will attempt to take atmos from a pipe.
var/force_update
var/force_update // Set this to bypass the cycle time check.
// Seed details/line data.
var/datum/seed/seed = null // The currently planted seed
// Reagent information for attackby(), consider moving this to a controller along
// Reagent information for process(), consider moving this to a controller along
// with cycle information under 'mechanical concerns' at some point.
// For all following lists, when called in attackby() the relevant value will be increased
// by 1,val if val>0 or decreased by 1,val if val<0.
var/global/list/toxic_reagents = list(
"anti_toxin" = -2,
"toxin" = 2,
"fluorine" = 2.5,
"chlorine" = 1.5,
"sacid" = 1.5,
"pacid" = 3,
"plantbgone" = 3,
"cryoxadone" = -3,
"radium" = 2
"anti_toxin" = -2,
"toxin" = 2,
"fluorine" = 2.5,
"chlorine" = 1.5,
"sacid" = 1.5,
"pacid" = 3,
"plantbgone" = 3,
"cryoxadone" = -3,
"radium" = 2
)
var/global/list/nutrient_reagents = list(
"milk" = 0.1,
"beer" = 0.25,
"phosphorus" = 0.1,
"sugar" = 0.1,
"sodawater" = 0.1,
"ammonia" = 1,
"diethylamine" = 2,
"nutriment" = 1,
"adminordrazine" = 1
"milk" = 0.1,
"beer" = 0.25,
"phosphorus" = 0.1,
"sugar" = 0.1,
"sodawater" = 0.1,
"ammonia" = 1,
"diethylamine" = 2,
"nutriment" = 1,
"adminordrazine" = 1,
"eznutrient" = 1,
"robustharvest" = 1,
"left4zed" = 1
)
var/global/list/weedkiller_reagents = list(
"fluorine" = -4,
"chlorine" = -3,
"phosphorus" = -2,
"sugar" = 2,
"sacid" = -2,
"pacid" = -4,
"plantbgone" = -8,
"fluorine" = -4,
"chlorine" = -3,
"phosphorus" = -2,
"sugar" = 2,
"sacid" = -2,
"pacid" = -4,
"plantbgone" = -8,
"adminordrazine" = -5
)
var/global/list/pestkiller_reagents = list(
"sugar" = 2,
"diethylamine" = -2,
"sugar" = 2,
"diethylamine" = -2,
"adminordrazine" = -5
)
var/global/list/beneficial_reagents = list(
"beer" = -0.05,
"fluorine" = -2,
"chlorine" = -1,
"phosphorus" = -0.75,
"sodawater" = 0.1,
"sacid" = -1,
"pacid" = -2,
"plantbgone" = -2,
"cryoxadone" = 3,
"ammonia" = 0.5,
"diethylamine" = 1,
"nutriment" = 0.5,
"radium" = -1.5,
"adminordrazine" = 1
)
var/global/list/water_reagents = list(
"adminordrazine" = 1,
"milk" = 0.9,
"beer" = 0.7,
"flourine" = -0.5,
"chlorine" = -0.5,
"phosphorus" = -0.5,
"water" = 1,
"sodawater" = 1,
"water" = 1,
"adminordrazine" = 1,
"milk" = 0.9,
"beer" = 0.7,
"flourine" = -0.5,
"chlorine" = -0.5,
"phosphorus" = -0.5,
"water" = 1,
"sodawater" = 1,
)
// Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order).
var/global/list/beneficial_reagents = list(
"beer" = list( -0.05, 0, 0 ),
"fluorine" = list( -2, 0, 0 ),
"chlorine" = list( -1, 0, 0 ),
"phosphorus" = list( -0.75, 0, 0 ),
"sodawater" = list( 0.1, 0, 0 ),
"sacid" = list( -1, 0, 0 ),
"pacid" = list( -2, 0, 0 ),
"plantbgone" = list( -2, 0, 0.2 ),
"cryoxadone" = list( 3, 0, 0 ),
"ammonia" = list( 0.5, 0, 0 ),
"diethylamine" = list( 1, 0, 0 ),
"nutriment" = list( 0.5, 1, 0 ),
"radium" = list( -1.5, 0, 0.2 ),
"adminordrazine" = list( 1, 1, 1 ),
"robustharvest" = list( 0, 0.2, 0 ),
"left4zed" = list( 0, 0, 0.2 )
)
// Mutagen list specifies minimum value for the mutation to take place, rather
// than a bound as the lists above specify.
var/global/list/mutagenic_reagents = list(
"radium" = 8,
"mutagen" = 3
"radium" = list(8,3),
"mutagen" = list(3,8)
)
/obj/machinery/portable_atmospherics/hydroponics/New()
..()
create_reagents(200)
connect()
update_icon()
if(closed_system)
flags &= ~OPENCONTAINER
/obj/machinery/portable_atmospherics/hydroponics/bullet_act(var/obj/item/projectile/Proj)
//Don't act on seeds like dionaea that shouldn't change.
if(seed && seed.immutable)
if(seed && seed.immutable > 0)
return
//Override for somatoray projectiles.
@@ -142,12 +152,14 @@
/obj/machinery/portable_atmospherics/hydroponics/process()
//Do this even if we're not ready for a plant cycle.
process_reagents()
// Update values every cycle rather than every process() tick.
if(force_update)
force_update = 0
else if(world.time < (lastcycle + cycledelay))
return
lastcycle = world.time
// Weeds like water and nutrients, there's a chance the weed population will increase.
@@ -169,6 +181,11 @@
// Advance plant age.
if(prob(25)) age += 1 * HYDRO_SPEED_MULTIPLIER
//Highly mutable plants have a chance of mutating every tick.
if(seed.immutable == -1)
var/mut_prob = rand(1,100)
if(mut_prob <= 5) mutate(mut_prob == 1 ? 2 : 1)
// Maintain tray nutrient and water levels.
if(seed.nutrient_consumption > 0 && nutrilevel > 0 && prob(25))
nutrilevel -= max(0,seed.nutrient_consumption * HYDRO_SPEED_MULTIPLIER)
@@ -197,8 +214,22 @@
if(!environment)
if(istype(T))
environment = T.return_air()
if(!environment) //We're in a crate or nullspace, bail out.
return
if(!environment) return
/*
// Handle gas consumption.
if(seed.consume_gasses && seed.consume_gasses.len)
var/missing_gas = 0
for(var/gas in seed.consume_gasses)
if(environment && environment.gas && environment.gas[gas] && \
environment.gas[gas] >= seed.consume_gasses[gas])
environment.adjust_gas(gas,-seed.consume_gasses[gas],1)
else
missing_gas++
if(missing_gas > 0)
health -= missing_gas * HYDRO_SPEED_MULTIPLIER
// Process it.
var/pressure = environment.return_pressure()
@@ -208,6 +239,13 @@
if(abs(environment.temperature - seed.ideal_heat) > seed.heat_tolerance)
health -= healthmod
// Handle gas production.
if(seed.exude_gasses && seed.exude_gasses.len)
for(var/gas in seed.exude_gasses)
environment.adjust_gas(gas, max(1,round((seed.exude_gasses[gas]*seed.potency)/seed.exude_gasses.len)))
*/
// Handle light requirements.
var/area/A = T.loc
if(A)
@@ -257,17 +295,73 @@
pestlevel = 0
// If enough time (in cycles, not ticks) has passed since the plant was harvested, we're ready to harvest again.
else if(age > seed.production && (age - lastproduce) > seed.production && (!harvest && !dead))
else if(seed.products && seed.products.len && age > seed.production && \
(age - lastproduce) > seed.production && (!harvest && !dead))
harvest = 1
lastproduce = age
if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase
if(prob(3)) // On each tick, there's a chance the pest population will increase
pestlevel += 1 * HYDRO_SPEED_MULTIPLIER
check_level_sanity()
update_icon()
return
//Process reagents being input into the tray.
/obj/machinery/portable_atmospherics/hydroponics/proc/process_reagents()
if(!reagents) return
if(reagents.total_volume <= 0)
return
for(var/datum/reagent/R in reagents.reagent_list)
var/reagent_total = reagents.get_reagent_amount(R.id)
if(seed && !dead)
//Handle some general level adjustments.
if(toxic_reagents[R.id])
toxins += toxic_reagents[R.id] * reagent_total
if(weedkiller_reagents[R.id])
weedlevel += weedkiller_reagents[R.id] * reagent_total
if(pestkiller_reagents[R.id])
pestlevel += pestkiller_reagents[R.id] * reagent_total
// Beneficial reagents have a few impacts along with health buffs.
if(beneficial_reagents[R.id])
health += beneficial_reagents[R.id][1] * reagent_total
yield_mod += beneficial_reagents[R.id][2] * reagent_total
mutation_mod += beneficial_reagents[R.id][3] * reagent_total
// Mutagen is distinct from the previous types and mostly has a chance of proccing a mutation.
if(mutagenic_reagents[R.id])
var/reagent_min_value = mutagenic_reagents[R.id][1]
var/reagent_value = mutagenic_reagents[R.id][2]+mutation_mod
if(reagent_total >= reagent_min_value)
if(prob(min(reagent_total*reagent_value,100)))
mutate(reagent_total > 10 ? 2 : 1)
// Handle nutrient refilling.
if(nutrient_reagents[R.id])
nutrilevel += nutrient_reagents[R.id] * reagent_total
// Handle water and water refilling.
var/water_added = 0
if(water_reagents[R.id])
var/water_input = water_reagents[R.id] * reagent_total
water_added += water_input
waterlevel += water_input
if(water_added > 0)
toxins -= round(water_added/4)
reagents.clear_reagents()
check_level_sanity()
update_icon()
//Harvests the product of a plant.
/obj/machinery/portable_atmospherics/hydroponics/proc/harvest(var/mob/user)
@@ -420,7 +514,6 @@
weedlevel = max(0,min(weedlevel,10))
toxins = max(0,min(toxins,10))
/obj/machinery/portable_atmospherics/hydroponics/proc/mutate_species()
var/previous_plant = seed.display_name
@@ -445,6 +538,9 @@
/obj/machinery/portable_atmospherics/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (O.is_open_container())
return 0
if(istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/weapon/scalpel))
if(!seed)
@@ -460,153 +556,23 @@
return
else if (istype(O, /obj/item/weapon/reagent_containers/glass))
var/b_amount = O.reagents.get_reagent_amount("water")
if(b_amount > 0 && waterlevel < 100)
if(b_amount + waterlevel > 100)
b_amount = 100 - waterlevel
O.reagents.remove_reagent("water", b_amount)
waterlevel += b_amount
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
user << "You fill \the [src] with [round(b_amount,0.1)] units of water."
// The more water you put in, the more diluted the toxins become.
toxins -= round(b_amount/4)
else if(waterlevel >= 100)
user << "\red \The [src] is already full."
else
user << "\red \The [O] is not filled with water."
check_level_sanity()
update_icon()
// Nutrient fluid replacement. TODO: Consider rolling this into a proper reagent-processing proc.
else if ( istype(O, /obj/item/nutrient) )
var/obj/item/nutrient/nutrient = O
user.u_equip(O)
nutrilevel = 10
yield_mod = nutrient.yieldmod
mutation_mod = nutrient.mutmod
user << "You replace the nutrient solution in the [src]."
del(O)
update_icon()
// Syringe stuff
else if(istype(O, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = O
if(seed)
// Injecting into the plant.
if (S.mode == 1)
if(!S.reagents.total_volume)
user << "\red [O] is empty."
return
user << "\red You inject the [seed.display_name] with a chemical solution."
// Uuuuuugh this whole chunk is going to be awful. TODO: condense it down somehow.
// Run through the various reagents in the lists and apply their effects as needed.
for(var/datum/reagent/R in S.reagents.reagent_list)
var/reagent_value = 0
if(toxic_reagents[R.id])
reagent_value = toxic_reagents[R.id]
if(reagent_value > 0)
if(reagent_value < 1)
toxins += reagent_value
else
toxins += round(S.reagents.get_reagent_amount(R.id)*rand(1,reagent_value))
else
if(reagent_value > -1)
toxins += reagent_value
else
toxins -= abs(round(S.reagents.get_reagent_amount(R.id)*rand(1,abs(reagent_value))))
if(nutrient_reagents[R.id])
reagent_value = nutrient_reagents[R.id]
if(reagent_value > 0)
if(reagent_value < 1)
nutrilevel += reagent_value
else
nutrilevel += round(S.reagents.get_reagent_amount(R.id)*rand(1,reagent_value))
else
if(reagent_value > -1)
nutrilevel += reagent_value
else
nutrilevel -= abs(round(S.reagents.get_reagent_amount(R.id)*rand(1,abs(reagent_value))))
if(weedkiller_reagents[R.id])
reagent_value = weedkiller_reagents[R.id]
if(reagent_value > 0)
if(reagent_value < 1)
weedlevel += reagent_value
else
weedlevel += round(S.reagents.get_reagent_amount(R.id)*rand(1,reagent_value))
else
if(reagent_value > -1)
weedlevel += reagent_value
else
weedlevel -= abs(round(S.reagents.get_reagent_amount(R.id)*rand(1,abs(reagent_value))))
if(pestkiller_reagents[R.id])
reagent_value = pestkiller_reagents[R.id]
if(reagent_value > 0)
if(reagent_value < 1)
pestlevel += reagent_value
else
pestlevel += round(S.reagents.get_reagent_amount(R.id)*rand(1,reagent_value))
else
if(reagent_value > -1)
pestlevel += reagent_value
else
pestlevel -= abs(round(S.reagents.get_reagent_amount(R.id)*rand(1,abs(reagent_value))))
if(beneficial_reagents[R.id])
reagent_value = beneficial_reagents[R.id]
if(reagent_value > 0)
if(reagent_value < 1)
health += reagent_value
else
health += round(S.reagents.get_reagent_amount(R.id)*rand(1,reagent_value))
else
if(reagent_value > -1)
health += reagent_value
else
health -= abs(round(S.reagents.get_reagent_amount(R.id)*rand(1,abs(reagent_value))))
if(water_reagents[R.id])
reagent_value = water_reagents[R.id]
if(reagent_value > 0)
if(reagent_value < 1)
waterlevel += reagent_value
else
waterlevel += round(S.reagents.get_reagent_amount(R.id)*rand(1,reagent_value))
else
if(reagent_value > -1)
waterlevel += reagent_value
else
waterlevel -= abs(round(S.reagents.get_reagent_amount(R.id)*rand(1,abs(reagent_value))))
// Mutagen is distinct from the previous types and mostly has a chance of proccing a mutation.
if(mutagenic_reagents[R.id])
var/reagent_total = S.reagents.get_reagent_amount(R.id)
reagent_value = mutagenic_reagents[R.id]+mutation_mod
if(reagent_total >= reagent_value)
if(prob(min(reagent_total*reagent_value,100)))
mutate(reagent_total > 10 ? 2 : 1)
S.reagents.clear_reagents()
if (S.mode == 1)
if(seed)
return ..()
else
user << "You can't get any extract out of this plant."
user << "There's no plant in the tray to inject."
return 1
else
user << "There's nothing to inject the solution into."
check_level_sanity()
update_icon()
if(seed)
//Leaving this in in case we want to extract from plants later.
user << "You can't get any extract out of this plant."
else
user << "There's nothing in the tray to draw something from."
return 1
else if (istype(O, /obj/item/seeds))
@@ -638,6 +604,7 @@
age = 1
//Snowflakey, maybe move this to the seed datum
health = (istype(S, /obj/item/seeds/cutting) ? round(seed.endurance/rand(2,5)) : seed.endurance)
lastcycle = world.time
del(O)
@@ -757,7 +724,31 @@
usr << "[src] is \red filled with weeds!"
if(pestlevel >= 5)
usr << "[src] is \red filled with tiny worms!"
usr << text ("")
if(!istype(src,/obj/machinery/portable_atmospherics/hydroponics/soil))
var/turf/T = loc
var/datum/gas_mixture/environment
if(closed_system && (connected_port || holding))
environment = air_contents
if(!environment)
if(istype(T))
environment = T.return_air()
if(!environment) //We're in a crate or nullspace, bail out.
return
var/area/A = T.loc
var/light_available
if(A)
if(A.lighting_use_dynamic)
light_available = max(0,min(10,T.lighting_lumcount)-5)
else
light_available = 5
usr << "The tray's sensor suite is reporting a light level of [light_available] lumens and a temperature of [environment.temperature]K."
/obj/machinery/portable_atmospherics/hydroponics/verb/close_lid()
set name = "Toggle Tray Lid"
@@ -769,6 +760,11 @@
closed_system = !closed_system
usr << "You [closed_system ? "close" : "open"] the tray's lid."
if(closed_system)
flags &= ~OPENCONTAINER
else
flags |= OPENCONTAINER
update_icon()
/obj/machinery/portable_atmospherics/hydroponics/soil
+1 -1
View File
@@ -801,7 +801,7 @@
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
icon_state = "nutri"
icon_deny = "nutri-deny"
products = list(/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/plantspray/pests = 20,
products = list(/obj/item/weapon/reagent_containers/glass/fertilizer/ez = 35,/obj/item/weapon/reagent_containers/glass/fertilizer/l4z = 25,/obj/item/weapon/reagent_containers/glass/fertilizer/rh = 15,/obj/item/weapon/plantspray/pests = 20,
/obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/storage/bag/plants = 5)
contraband = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5)
+68 -32
View File
@@ -14,43 +14,64 @@
origin_tech = "materials=1"
var/dispenser = 0
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
var/cuff_sound = 'sound/weapons/handcuffs.ogg'
/obj/item/weapon/handcuffs/attack(mob/living/carbon/C, mob/user)
if(M_CLUMSY in user.mutations && prob(50))
user << "<span class='warning'>Uh... how do those things work?!</span>"
if(!C.handcuffed)
user.drop_item()
loc = C
C.handcuffed = src
C.update_inv_handcuffed()
return
var/cable = 0
if(istype(src, /obj/item/weapon/handcuffs/cable))
cable = 1
/obj/item/weapon/handcuffs/attack(mob/living/carbon/C as mob, mob/user as mob)
if (!istype(user, /mob/living/carbon/human))
user << "\red You don't have the dexterity to do this!"
return
if ((M_CLUMSY in usr.mutations) && prob(50))
user << "\red Uh ... how do those things work?!"
place_handcuffs(user, user)
return
if(!C.handcuffed)
C.visible_message("<span class='danger'>[user] is trying to put handcuffs on [C]!</span>", \
"<span class='danger'>[user] is trying to put handcuffs on [C]!</span>")
if(cable)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
else
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
if(do_mob(user, C, 30))
if(C.handcuffed)
if (C == user)
place_handcuffs(user, user)
return
//check for an aggressive grab
for (var/obj/item/weapon/grab/G in C.grabbed_by)
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
place_handcuffs(C, user)
return
user.drop_item()
loc = C
C.handcuffed = src
C.update_inv_handcuffed()
if(cable)
feedback_add_details("handcuffs","C")
else
feedback_add_details("handcuffs","H")
user << "\red You need to have a firm grip on [C] before you can put \the [src] on!"
add_logs(user, C, "handcuffed")
/obj/item/weapon/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user)
playsound(src.loc, cuff_sound, 30, 1, -2)
if (ishuman(target))
var/mob/living/carbon/human/H = target
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = H
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = H.loc
O.place = "handcuff"
H.requests += O
spawn( 0 )
feedback_add_details("handcuffs","H")
O.process()
return
if (ismonkey(target))
var/mob/living/carbon/monkey/M = target
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = user
O.target = M
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
O.process()
return
var/last_chew = 0
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
@@ -84,6 +105,7 @@ var/last_chew = 0
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_red"
breakouttime = 300 //Deciseconds = 30s
cuff_sound = 'sound/weapons/cablecuff.ogg'
/obj/item/weapon/handcuffs/cable/red
icon_state = "cuff_red"
@@ -128,3 +150,17 @@ var/last_chew = 0
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
del(src)
/obj/item/weapon/handcuffs/cyborg
dispenser = 1
/obj/item/weapon/handcuffs/cyborg/attack(mob/living/carbon/C as mob, mob/user as mob)
if(!C.handcuffed)
var/turf/p_loc = user.loc
var/turf/p_loc_m = C.loc
playsound(src.loc, cuff_sound, 30, 1, -2)
user.visible_message("\red <B>[user] is trying to put handcuffs on [C]!</B>")
spawn(30)
if(!C) return
if(p_loc == user.loc && p_loc_m == C.loc)
C.handcuffed = new /obj/item/weapon/handcuffs(C)
C.update_inv_handcuffed()
@@ -124,7 +124,8 @@
"/obj/item/device/radio/headset",
"/obj/item/weapon/melee",
"/obj/item/taperoll/police",
"/obj/item/weapon/gun/energy/taser"
"/obj/item/weapon/gun/energy/taser",
"/obj/item/weapon/gun/energy/stunrevolver"
)
/obj/item/weapon/storage/belt/soulstone
+82 -57
View File
@@ -8,21 +8,23 @@
force = 10
throwforce = 7
w_class = 3
var/stunforce = 10
var/status = 0
var/mob/foundmob = "" //Used in throwing proc.
var/obj/item/weapon/cell/high/bcell = 0
var/hitcost = 1500
origin_tech = "combat=2"
attack_verb = list("beaten")
var/stunforce = 0
var/agonyforce = 60
var/status = 0 //whether the thing is on or not
var/obj/item/weapon/cell/high/bcell = null
var/mob/foundmob = "" //Used in throwing proc.
var/hitcost = 1500 //oh god why do power cells carry so much charge? We probably need to make a distinction between "industrial" sized power cells for APCs and power cells for everything else.
suicide_act(mob/user)
viewers(user) << "<span class='suicide'>[user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.</span>"
return (FIRELOSS)
/obj/item/weapon/melee/baton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.</span>")
return (FIRELOSS)
/obj/item/weapon/melee/baton/loaded/New()
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
..()
bcell = new(src)
bcell = new/obj/item/weapon/cell/high(src)
update_icon()
return
@@ -116,51 +118,54 @@
..()
return
var/mob/living/carbon/human/H = M
var/agony = agonyforce
var/stun = stunforce
var/mob/living/L = M
var/target_zone = check_zone(user.zone_sel.selecting)
if(user.a_intent == "hurt")
if(!..()) return
H.visible_message("<span class='danger'>[M] has been beaten with the [src] by [user]!</span>")
if (!..()) //item/attack() does it's own messaging and logs
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
stun *= 0.5
//we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to.
else
//copied from human_defense.dm - human defence code should really be refactored some time.
if (ishuman(L))
user.lastattacked = L //are these used at all, if we have logs?
L.lastattacker = user
user.attack_log += "\[[time_stamp()]\]<font color='red'> Beat [H.name] ([H.ckey]) with [src.name]</font>"
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Beaten by [user.name] ([user.ckey]) with [src.name]</font>"
msg_admin_attack("[user.name] ([user.ckey]) beat [H.name] ([H.ckey]) with [src.name] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if (user != L) // Attacking yourself can't miss
target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L)
playsound(src.loc, "swing_hit", 50, 1, -1)
if(!target_zone)
L.visible_message("\red <B>[user] misses [L] with \the [src]!")
return 0
else if(!status)
H.visible_message("<span class='warning'>[H] has been prodded with [src] by [user]. Luckily it was off.</span>")
return
var/stunroll = (rand(1,100))
if(status)
user.lastattacked = H
H.lastattacker = user
if(user == H) // Attacking yourself can't miss
stunroll = 100
if(stunroll < 40)
H.visible_message("\red <B>[user] misses [H] with \the [src]!")
msg_admin_attack("[key_name(user)] attempted to stun [key_name(H)] with the [src].")
return
H.Stun(stunforce)
H.Weaken(stunforce)
H.apply_effect(STUTTER, stunforce)
H.visible_message("<span class='danger'>[H] has been stunned with [src] by [user]!</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
msg_admin_attack("[key_name(user)] stunned [key_name(H)] with the [src].")
user.attack_log += "\[[time_stamp()]\]<font color='red'> Stunned [H.name] ([H.ckey]) with [src.name]</font>"
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Stunned by [user.name] ([user.ckey]) with [src.name]</font>"
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
if(R && R.cell)
R.cell.use(hitcost)
var/mob/living/carbon/human/H = L
var/datum/organ/external/affecting = H.get_organ(target_zone)
if (affecting)
if(!status)
L.visible_message("<span class='warning'>[L] has been prodded in the [affecting.display_name] with [src] by [user]. Luckily it was off.</span>")
return 1
else
H.visible_message("<span class='danger'>[L] has been prodded in the [affecting.display_name] with [src] by [user]!</span>")
else
deductcharge(hitcost)
if(!status)
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
return 1
else
L.visible_message("<span class='danger'>[L] has been prodded with [src] by [user]!</span>")
//stun effects
L.stun_effect_act(stun, agony, target_zone, src)
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src].")
deductcharge(hitcost)
return 1
/obj/item/weapon/melee/baton/throw_impact(atom/hit_atom)
@@ -169,9 +174,19 @@
if(istype(hit_atom, /mob/living))
var/mob/living/carbon/human/H = hit_atom
if(status)
H.Stun(stunforce)
H.Weaken(stunforce)
H.apply_effect(STUTTER, stunforce)
//stun effects
if (stunforce)
H.Stun(stunforce)
H.Weaken(stunforce)
H.apply_effect(STUTTER, stunforce)
if (agonyforce)
//Siemens coefficient?
//TODO: Merge this with taser effects
H.apply_effect(agonyforce,AGONY,0)
H.apply_effect(STUTTER, agonyforce/10)
H.apply_effect(EYE_BLUR, agonyforce/10)
H.flash_pain()
deductcharge(hitcost)
@@ -196,11 +211,19 @@
/obj/item/weapon/melee/baton/emp_act(severity)
if(bcell)
deductcharge(1000 / severity)
if(bcell.reliability != 100 && prob(50/severity))
bcell.reliability -= 10 / severity
bcell.emp_act(severity) //let's not duplicate code everywhere if we don't have to please.
..()
//secborg stun baton module
/obj/item/weapon/melee/baton/robot/attack_self(mob/user)
//try to find our power cell
var/mob/living/silicon/robot/R = loc
if (istype(R))
bcell = R.cell
return ..()
/obj/item/weapon/melee/baton/robot/attackby(obj/item/weapon/W, mob/user)
return
/obj/item/weapon/melee/baton/loaded/ntcane
name = "fancy cane"
@@ -216,8 +239,10 @@
item_state = "prod"
force = 3
throwforce = 5
stunforce = 5
stunforce = 0
agonyforce = 60 //same force as a stunbaton, but uses way more charge.
hitcost = 2500
attack_verb = list("poked")
slot_flags = null
/obj/item/weapon/melee/baton/cattleprod/update_icon()
+1
View File
@@ -173,6 +173,7 @@
/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return//I really wish I did not need this
if(W.flags & NOBLUDGEON) return
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
+17 -1
View File
@@ -582,4 +582,20 @@ turf/simulated/floor/proc/update_icon()
burnt = 0
broken = 0
else
user << "\blue You need more welding fuel to complete this task."
user << "\blue You need more welding fuel to complete this task."
if(istype(C,/obj/item/pipe))
var/obj/item/pipe/V = C
if(V.pipe_type != -1) // ANY PIPE
var/obj/item/pipe/P = C
user.visible_message( \
"[user] starts sliding a [P] along \the [src].", \
"\blue You slide a [P] along \the [src].", \
"You hear the scrape of metal against something.")
user.drop_item()
P.dir = user.dir
P.x = src.x
P.y = src.y
P.z = src.z
P.loc = src
+33
View File
@@ -480,6 +480,39 @@
place_poster(W,user)
return
//Bone White - Place pipes on walls
else if(istype(W,/obj/item/pipe))
var/obj/item/pipe/V = W
if(V.pipe_type != -1) // ANY PIPE
var/obj/item/pipe/P = W
playsound(get_turf(src), 'sound/weapons/circsawhit.ogg', 50, 1)
user.visible_message( \
"[user] starts drilling a hole in \the [src].", \
"\blue You start drilling a hole in \the [src].", \
"You hear ratchet.")
if (do_after(user, 80))
user.visible_message( \
"[user] drills a hole in \the [src] and pushes \a [P] into the void", \
"\blue You have finished drilling in \the [src] and push the [P] into the void.", \
"You hear ratchet.")
/*
new /obj/item/pipe(loc, make_from=src)
for (var/obj/machinery/meter/meter in T)
if (meter.target == src)
new /obj/item/pipe_meter(T)
del(meter)
qdel(src)
*/
user.drop_item()
P.dir = user.dir
P.x = src.x
P.y = src.y
P.z = src.z
P.loc = src
P.level = 2
return
else
return attack_hand(user)
return
@@ -311,6 +311,39 @@
place_poster(W,user)
return
//Bone White - Place pipes on walls
else if(istype(W,/obj/item/pipe))
var/obj/item/pipe/V = W
if(V.pipe_type != -1) // ANY PIPE
var/obj/item/pipe/P = W
playsound(get_turf(src), 'sound/weapons/circsawhit.ogg', 50, 1)
user.visible_message( \
"[user] starts drilling a hole in \the [src].", \
"\blue You start drilling a hole in \the [src]. This is going to take a while.", \
"You hear ratchet.")
if (do_after(user, 160))
user.visible_message( \
"[user] drills a hole in \the [src] and pushes \a [P] into the void", \
"\blue You have finished drilling in \the [src] and push the [P] into the void.", \
"You hear ratchet.")
/*
new /obj/item/pipe(loc, make_from=src)
for (var/obj/machinery/meter/meter in T)
if (meter.target == src)
new /obj/item/pipe_meter(T)
del(meter)
qdel(src)
*/
user.drop_item()
P.dir = user.dir
P.x = src.x
P.y = src.y
P.z = src.z
P.loc = src
P.level = 2
return
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
else if(!d_state)
return attack_hand(user)
@@ -24,6 +24,7 @@
possible_transfer_amounts = list(5)
volume = 5
can_be_placed_into = null
flags = FPRINT | TABLEPASS | OPENCONTAINER | NOBLUDGEON
/obj/item/weapon/reagent_containers/glass/rag/attack_self(mob/user as mob)
return
+7 -7
View File
@@ -124,7 +124,7 @@ var/global/nologevent = 0
body += "<A href='?src=\ref[src];makeanimal=\ref[M]'>Animalize</A> | "
// DNA2 - Admin Hax
if(iscarbon(M) && !isalien(M))
if(M.dna && iscarbon(M))
body += "<br><br>"
body += "<b>DNA Blocks:</b><br><table border='0'><tr><th>&nbsp;</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th>"
var/bname
@@ -374,21 +374,21 @@ var/global/nologevent = 0
if(6)
dat+="<B><FONT COLOR='maroon'>ERROR: Could not submit Feed story to Network.</B></FONT><HR><BR>"
if(src.admincaster_feed_channel.channel_name=="")
dat+="<FONT COLOR='maroon'>Invalid receiving channel name.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid receiving channel name.</FONT><BR>"
if(src.admincaster_feed_message.body == "" || src.admincaster_feed_message.body == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid message body.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid message body.</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[3]'>Return</A><BR>"
if(7)
dat+="<B><FONT COLOR='maroon'>ERROR: Could not submit Feed Channel to Network.</B></FONT><HR><BR>"
if(src.admincaster_feed_channel.channel_name =="" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid channel name.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid channel name.</FONT><BR>"
var/check = 0
for(var/datum/feed_channel/FC in news_network.network_channels)
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
check = 1
break
if(check)
dat+="<FONT COLOR='maroon'>Channel name already in use.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Channel name already in use.</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[2]'>Return</A><BR>"
if(9)
dat+="<B>[src.admincaster_feed_channel.channel_name]: </B><FONT SIZE=1>\[created by: <FONT COLOR='maroon'>[src.admincaster_feed_channel.author]</FONT>\]</FONT><HR>"
@@ -502,9 +502,9 @@ var/global/nologevent = 0
if(16)
dat+="<B><FONT COLOR='maroon'>ERROR: Wanted Issue rejected by Network.</B></FONT><HR><BR>"
if(src.admincaster_feed_message.author =="" || src.admincaster_feed_message.author == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid name for person wanted.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid name for person wanted.</FONT><BR>"
if(src.admincaster_feed_message.body == "" || src.admincaster_feed_message.body == "\[REDACTED\]")
dat+="<FONT COLOR='maroon'>Invalid description.</FONT><BR>"
dat+="<FONT COLOR='maroon'>•Invalid description.</FONT><BR>"
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Return</A><BR>"
if(17)
dat+={"
+1
View File
@@ -131,6 +131,7 @@ var/list/admin_verbs_server = list(
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_create_centcom_report,
/client/proc/cmd_admin_dress,
/client/proc/editappear,
/client/proc/response_team, // Response Teams admin verb
/client/proc/nanomapgen_DumpImage
)
+1 -1
View File
@@ -21,7 +21,7 @@
item_state = "apron"
blood_overlay_type = "armor"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/nutrient,/obj/item/weapon/minihoe)
allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/weapon/reagent_containers/glass/fertilizer,/obj/item/weapon/minihoe)
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/suit.dmi'
@@ -191,7 +191,21 @@
"Vox" = 'icons/mob/species/vox/uniform.dmi'
)
/obj/item/clothing/under/rank/psych
desc = "A basic white jumpsuit. It has turqouise markings that denote the wearer as a psychiatrist."
name = "psychiatrist's jumpsuit"
icon_state = "psych"
item_state = "w_suit"
_color = "psych"
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/psych/turtleneck
desc = "A turqouise turtleneck and a pair of dark blue slacks, belonging to a psychologist."
name = "psychologist's turtleneck"
icon_state = "psychturtle"
item_state = "b_suit"
_color = "psychturtle"
flags = FPRINT | TABLEPASS
/*
+1 -1
View File
@@ -302,7 +302,7 @@
attack_self(mob/user)
if(user.r_hand == src || user.l_hand == src)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] uses [] to comb their hair with incredible style and sophistication. What a guy.", user, src), 1)
O.show_message(text("\red [] uses [] to comb their hair with incredible style and sophistication. What a [].", user, src, user.gender == FEMALE ? "lady" : "guy"), 1)
return
/obj/item/weapon/fluff/hugo_cinderbacth_1 //thatoneguy: Hugo Cinderbatch
+29 -22
View File
@@ -71,7 +71,9 @@
if(grown_seed.harvest_repeat)
dat += "This plant can be harvested repeatedly.<br>"
if(grown_seed.immutable)
if(grown_seed.immutable == -1)
dat += "This plant is highly mutable.<br>"
else if(grown_seed.immutable > 0)
dat += "This plant does not possess genetics that are alterable.<br>"
if(grown_seed.products && grown_seed.products.len)
@@ -264,39 +266,44 @@
// Nutrient defines for hydroponics
// *************************************
/obj/item/nutrient
name = "bottle of nutrient"
/obj/item/weapon/reagent_containers/glass/fertilizer
name = "fertilizer bottle"
desc = "A small glass bottle. Can hold up to 10 units."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
flags = FPRINT | TABLEPASS | OPENCONTAINER
possible_transfer_amounts = null
w_class = 2.0
var/mutmod = 0
var/yieldmod = 0
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
/obj/item/nutrient/ez
var/fertilizer //Reagent contained, if any.
//Like a shot glass!
amount_per_transfer_from_this = 10
volume = 10
/obj/item/weapon/reagent_containers/glass/fertilizer/New()
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
if(fertilizer)
reagents.add_reagent(fertilizer,10)
/obj/item/weapon/reagent_containers/glass/fertilizer/ez
name = "bottle of E-Z-Nutrient"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
mutmod = 1
yieldmod = 1
fertilizer = "eznutrient"
/obj/item/nutrient/l4z
/obj/item/weapon/reagent_containers/glass/fertilizer/l4z
name = "bottle of Left 4 Zed"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
mutmod = 2
fertilizer = "left4zed"
/obj/item/nutrient/rh
/obj/item/weapon/reagent_containers/glass/fertilizer/rh
name = "bottle of Robust Harvest"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
yieldmod = 2
fertilizer = "robustharvest"
//Hatchets and things to kill kudzu
/obj/item/weapon/hatchet
+13 -13
View File
@@ -83,7 +83,7 @@ proc/populate_seed_list()
var/spread = 0 // 0 limits plant to tray, 1 = creepers, 2 = vines.
var/carnivorous = 0 // 0 = none, 1 = eat pests in tray, 2 = eat living things (when a vine).
var/parasite = 0 // 0 = no, 1 = gain health from weed level.
var/immutable // If set, plant will never mutate.
var/immutable = 0 // If set, plant will never mutate. If -1, plant is highly mutable.
var/alter_temp // If set, the plant will periodically alter local temp by this amount.
// Cosmetics.
@@ -99,13 +99,13 @@ proc/populate_seed_list()
//Returns a key corresponding to an entry in the global seed list.
/datum/seed/proc/get_mutant_variant()
if(!mutants || !mutants.len || immutable) return 0
if(!mutants || !mutants.len || immutable > 0) return 0
return pick(mutants)
//Mutates the plant overall (randomly).
/datum/seed/proc/mutate(var/degree,var/turf/source_turf)
if(!degree || immutable) return
if(!degree || immutable > 0) return
source_turf.visible_message("\blue \The [display_name] quivers!")
@@ -179,7 +179,7 @@ proc/populate_seed_list()
//Mutates a specific trait/set of traits.
/datum/seed/proc/apply_gene(var/datum/plantgene/gene)
if(!gene || !gene.values || immutable) return
if(!gene || !gene.values || immutable > 0) return
switch(gene.genetype)
@@ -209,11 +209,12 @@ proc/populate_seed_list()
else
chems[rid] = gene.values[2][rid]
//TODO.
//if(!exude_gasses) exude_gasses = list()
//exude_gasses |= gene.values[3]
//for(var/gas in exude_gasses)
// exude_gasses[gas] = max(1,round(exude_gasses[gas]/2))
var/list/new_gasses = gene.values[3]
if(istype(new_gasses))
if(!exude_gasses) exude_gasses = list()
exude_gasses |= new_gasses
for(var/gas in exude_gasses)
exude_gasses[gas] = max(1,round(exude_gasses[gas]*0.8))
alter_temp = gene.values[4]
potency = gene.values[5]
@@ -348,7 +349,6 @@ proc/populate_seed_list()
if(!user)
return
//TODO: check for failing to harvest.
var/got_product
if(!isnull(products) && products.len && yield > 0)
got_product = 1
@@ -389,7 +389,6 @@ proc/populate_seed_list()
handle_living_product(product)
// Make sure the product is inheriting the correct seed type reference.
// TODO: can this be collapsed into one type check since they share vars?
else if(istype(product,/obj/item/weapon/reagent_containers/food/snacks/grown))
var/obj/item/weapon/reagent_containers/food/snacks/grown/current_product = product
current_product.plantname = name
@@ -403,7 +402,7 @@ proc/populate_seed_list()
// be put into the global datum list until the product is harvested, though.
/datum/seed/proc/diverge(var/modified)
if(immutable) return
if(immutable > 0) return
//Set up some basic information.
var/datum/seed/new_seed = new
@@ -1170,6 +1169,7 @@ proc/populate_seed_list()
yield = -1
potency = -1
growth_stages = 4
immutable = -1
/datum/seed/whitebeets
name = "whitebeet"
@@ -1407,4 +1407,4 @@ proc/populate_seed_list()
maturation = 1
production = 1
yield = 1
potency = 1
potency = 1
+1 -1
View File
@@ -88,7 +88,7 @@
user << "There is already a seed loaded."
var/obj/item/seeds/S =W
if(S.seed && S.seed.immutable)
if(S.seed && S.seed.immutable > 0)
user << "That seed is not compatible with our genetics technology."
else
user.drop_item(W)
+21 -15
View File
@@ -77,27 +77,33 @@
return
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null)
if(status_flags & GODMODE) return 0 //godmode
shock_damage *= siemens_coeff
if (shock_damage<1)
return 0
src.take_overall_damage(0,shock_damage,used_weapon="Electrocution")
//src.burn_skin(shock_damage)
//src.adjustFireLoss(shock_damage) //burn_skin will do this for us
//src.updatehealth()
src.visible_message(
"\red [src] was shocked by the [source]!", \
"\red <B>You feel a powerful shock course through your body!</B>", \
"\red You hear a heavy electrical crack." \
)
// if(src.stunned < shock_damage) src.stunned = shock_damage
Stun(10)//This should work for now, more is really silly and makes you lay there forever
// if(src.weakened < 20*siemens_coeff) src.weakened = 20*siemens_coeff
Weaken(10)
src.apply_damage(shock_damage, BURN, def_zone, used_weapon="Electrocution")
playsound(loc, "sparks", 50, 1, -1)
if (shock_damage > 10)
src.visible_message(
"\red [src] was shocked by the [source]!", \
"\red <B>You feel a powerful shock course through your body!</B>", \
"\red You hear a heavy electrical crack." \
)
Stun(10)//This should work for now, more is really silly and makes you lay there forever
Weaken(10)
else
src.visible_message(
"\red [src] was mildly shocked by the [source].", \
"\red You feel a mild shock course through your body.", \
"\red You hear a light zapping." \
)
return shock_damage
/mob/living/carbon/proc/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
@@ -563,4 +569,4 @@
return
/mob/living/carbon/proc/canBeHandcuffed()
return 0
return 0
+12 -10
View File
@@ -557,16 +557,18 @@
if (istype(id))
return id
//Added a safety check in case you want to shock a human mob directly through electrocute_act.
/mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/safety = 0)
if(!safety)
if(gloves)
var/obj/item/clothing/gloves/G = gloves
siemens_coeff = G.siemens_coefficient
//If they have shock immunity mutation
if(M_NO_SHOCK in src.mutations)
siemens_coeff = 0
return ..(shock_damage,source,siemens_coeff)
//Removed the horrible safety parameter. It was only being used by ninja code anyways.
//Now checks siemens_coefficient of the affected area by default
/mob/living/carbon/human/electrocute_act(var/shock_damage, var/obj/source, var/base_siemens_coeff = 1.0, var/def_zone = null)
if(status_flags & GODMODE) return 0 //godmode
if (!def_zone)
def_zone = pick("l_hand", "r_hand")
var/datum/organ/external/affected_organ = get_organ(check_zone(def_zone))
var/siemens_coeff = base_siemens_coeff * get_siemens_coefficient_organ(affected_organ)
return ..(shock_damage, source, siemens_coeff, def_zone)
/mob/living/carbon/human/Topic(href, href_list)
@@ -104,11 +104,12 @@
/mob/living/carbon/human/adjustCloneLoss(var/amount)
..()
if(species.flags & IS_SYNTHETIC)
return
..()
var/heal_prob = max(0, 80 - getCloneLoss())
var/mut_prob = min(80, getCloneLoss()+10)
if (amount > 0)
@@ -259,13 +260,21 @@ This function restores all organs.
/mob/living/carbon/human/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/edge = 0, var/obj/used_weapon = null)
handle_suit_punctures(damagetype, damage)
//visible_message("Hit debug. [damage] | [damagetype] | [def_zone] | [blocked] | [sharp] | [used_weapon]")
//Handle other types of damage
if((damagetype != BRUTE) && (damagetype != BURN))
if(damagetype == HALLOSS)
if ((damage > 25 && prob(20)) || (damage > 50 && prob(60)))
emote("scream")
..(damage, damagetype, def_zone, blocked)
return 1
//Handle BRUTE and BURN damage
handle_suit_punctures(damagetype, damage)
if(blocked >= 2) return 0
var/datum/organ/external/organ = null
@@ -307,21 +316,6 @@ This function restores all organs.
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
//Embedded object code.
if(!organ) return
if(istype(used_weapon,/obj/item))
var/obj/item/W = used_weapon
if (!W.is_robot_module())
//blunt objects should really not be embedding in things unless a huge amount of force is involved
var/embed_chance = sharp? damage/W.w_class : damage/(W.w_class*3)
var/embed_threshold = sharp? 5*W.w_class : 15*W.w_class
//Sharp objects will always embed if they do enough damage.
//Thrown objects have some momentum already and have a small chance to embed even if the damage is below the threshold
if((sharp && damage > (10*W.w_class)) || (sharp && !ismob(W.loc) && prob(damage/(10*W.w_class)*100)) || (damage > embed_threshold && prob(embed_chance)))
organ.embed(W)
return 1
@@ -10,23 +10,14 @@ emp_act
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
// BEGIN TASER NERF
/* Commenting out new-old taser nerf.
if(C.siemens_coefficient == 0) //If so, is that clothing shock proof?
if(prob(deflectchance))
visible_message("\red <B>The [P.name] gets deflected by [src]'s [C.name]!</B>") //DEFLECT!
visible_message("\red <B> Taser hit for [P.damage] damage!</B>")
del P
*/
/* Commenting out old Taser nerf
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor))
if(istype(P, /obj/item/projectile/energy/electrode))
visible_message("\red <B>The [P.name] gets deflected by [src]'s [wear_suit.name]!</B>")
del P
return -1
*/
// END TASER NERF
var/datum/organ/external/organ = get_organ(check_zone(def_zone))
//Shields
if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2, def_zone)
return 2
//Laserproof armour
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof))
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
var/reflectchance = 40 - round(P.damage/3)
@@ -51,56 +42,45 @@ emp_act
return -1 // complete projectile permutation
//BEGIN BOOK'S TASER NERF.
if(istype(P, /obj/item/projectile/beam/stun))
var/datum/organ/external/select_area = get_organ(def_zone) // We're checking the outside, buddy!
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) // What all are we checking?
// var/deflectchance=90 //Is it a CRITICAL HIT with that taser?
for(var/bp in body_parts) //Make an unregulated var to pass around.
if(!bp)
continue //Does this thing we're shooting even exist?
if(bp && istype(bp ,/obj/item/clothing)) // If it exists, and it's clothed
var/obj/item/clothing/C = bp // Then call an argument C to be that clothing!
if(C.body_parts_covered & select_area.body_part) // Is that body part being targeted covered?
P.agony=P.agony*C.siemens_coefficient
apply_effect(P.agony,AGONY,0)
flash_pain()
src <<"\red You have been shot!"
del P
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
if(C && C.active)
C.attack_self(src)//Should shut it off
update_icons()
src << "\blue Your [C.name] was disrupted!"
Stun(2)
/*
if(istype(equipped(),/obj/item/device/assembly/signaler))
var/obj/item/device/assembly/signaler/signaler = equipped()
if(signaler.deadman && prob(80))
src.visible_message("\red [src] triggers their deadman's switch!")
signaler.signal()
*/
return
//END TASER NERF
if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2, def_zone)
return 2
var/datum/organ/external/organ = get_organ(check_zone(def_zone))
var/armor = getarmor_organ(organ, "bullet")
if((P.embed && prob(20 + max(P.damage - armor, -10))) && P.damage_type == BRUTE)
var/obj/item/weapon/shard/shrapnel/SP = new()
(SP.name) = "[P.name] shrapnel"
(SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
(SP.loc) = organ
organ.embed(SP)
//Shrapnel
if (P.damage_type == BRUTE)
var/armor = getarmor_organ(organ, "bullet")
if((P.embed && prob(20 + max(P.damage - armor, -10))))
var/obj/item/weapon/shard/shrapnel/SP = new()
(SP.name) = "[P.name] shrapnel"
(SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
(SP.loc) = organ
organ.embed(SP)
return (..(P , def_zone))
/mob/living/carbon/human/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone)
var/datum/organ/external/affected = get_organ(check_zone(def_zone))
var/siemens_coeff = get_siemens_coefficient_organ(affected)
stun_amount *= siemens_coeff
agony_amount *= siemens_coeff
switch (def_zone)
if("head")
agony_amount *= 1.50
if("l_hand", "r_hand")
var/c_hand
if (def_zone == "l_hand")
c_hand = l_hand
else
c_hand = r_hand
if(c_hand && (stun_amount || agony_amount > 10))
msg_admin_attack("[src.name] ([src.ckey]) was disarmed by a stun effect")
u_equip(c_hand)
if (affected.status & ORGAN_ROBOT)
emote("me", 1, "drops what they were holding, their [affected.display_name] malfunctioning!")
else
var/emote_scream = pick("screams in pain and", "lets out a sharp cry and", "cries out and")
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ] drops what they were holding in their [affected.display_name]!")
..(stun_amount, agony_amount, def_zone)
/mob/living/carbon/human/getarmor(var/def_zone, var/type)
var/armorval = 0
@@ -133,6 +113,20 @@ emp_act
protection += C.armor[type]
return protection
//this proc returns the Siemens coefficient of electrical resistivity for a particular external organ.
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/datum/organ/external/def_zone)
if (!def_zone)
return 1.0
var/siemens_coefficient = 1.0
var/list/clothing_items = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) // What all are we checking?
for(var/obj/item/clothing/C in clothing_items)
if(istype(C) && (C.body_parts_covered & def_zone.body_part)) // Is that body part being targeted covered?
siemens_coefficient *= C.siemens_coefficient
return siemens_coefficient
/mob/living/carbon/human/proc/check_head_coverage()
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
@@ -190,11 +184,12 @@ emp_act
..()
//Returns 1 if the attack hit, 0 if it missed.
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
if(!I || !user) return 0
var/target_zone = def_zone? def_zone : get_zone_with_miss_chance(user.zone_sel.selecting, src)
var/target_zone = def_zone? check_zone(def_zone) : get_zone_with_miss_chance(user.zone_sel.selecting, src)
if(user == src) // Attacking yourself can't miss
target_zone = user.zone_sel.selecting
if(!target_zone && !src.stat)
@@ -305,6 +300,20 @@ emp_act
if(bloody)
bloody_body(src)
//Melee weapon embedded object code.
if (I.damtype == BRUTE && !I.is_robot_module())
var/damage = I.force
if (armor)
damage /= armor+1
//blunt objects should really not be embedding in things unless a huge amount of force is involved
var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3)
var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class
//Sharp objects will always embed if they do enough damage.
if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance)))
affecting.embed(I)
return 1
//this proc handles being hit by a thrown atom
@@ -316,14 +325,14 @@ emp_act
var/obj/item/weapon/W = O
dtype = W.damtype
var/throw_damage = O.throwforce*(speed/5)
var/zone
if (istype(O.thrower, /mob/living))
var/mob/living/L = O.thrower
zone = check_zone(L.zone_sel.selecting)
else
zone = ran_zone("chest",75) //Hits a random part of the body, geared towards the chest
//check if we hit
if (O.throw_source)
var/distance = get_dist(O.throw_source, loc)
@@ -334,15 +343,15 @@ emp_act
if(!zone)
visible_message("\blue \The [O] misses [src] narrowly!")
return
O.throwing = 0 //it hit, so stop moving
if ((O.thrower != src) && check_shields(throw_damage, "[O]"))
return
var/datum/organ/external/affecting = get_organ(zone)
var/hit_area = affecting.display_name
src.visible_message("\red [src] has been hit in the [hit_area] by [O].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
@@ -358,6 +367,24 @@ emp_act
if(!istype(src,/mob/living/simple_animal/mouse))
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
//thrown weapon embedded object code.
if(dtype == BRUTE && istype(O,/obj/item))
var/obj/item/I = O
if (!I.is_robot_module())
var/sharp = is_sharp(I)
var/damage = throw_damage
if (armor)
damage /= armor+1
//blunt objects should really not be embedding in things unless a huge amount of force is involved
var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3)
var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class
//Sharp objects will always embed if they do enough damage.
//Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold
if((sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance)))
affecting.embed(I)
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
var/obj/item/weapon/W = O
@@ -378,6 +405,7 @@ emp_act
src.anchored = 1
src.pinned += O
/mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2)
if (gloves)
@@ -683,10 +683,20 @@ It can still be worn/put on as normal.
slot_to_process = slot_back
if (target.back)
strip_item = target.back
if("handcuff")
if("handcuff")
slot_to_process = slot_handcuffed
if (target.handcuffed)
strip_item = target.handcuffed
else if (source != target && ishuman(source))
//check that we are still grabbing them
var/grabbing = 0
for (var/obj/item/weapon/grab/G in target.grabbed_by)
if (G.loc == source && G.state >= GRAB_AGGRESSIVE)
grabbing = 1
if (!grabbing)
slot_to_process = null
source << "\red Your grasp was broken before you could restrain [target]!"
if("legcuff")
slot_to_process = slot_legcuffed
if (target.legcuffed)
+3 -3
View File
@@ -640,9 +640,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
var/obj/item/device/suit_cooling_unit/CU = s_store
CU.cool_mob(src)
if (species.flags & IS_SYNTHETIC)
bodytemperature += species.synth_temp_gain //that CPU/posibrain just keeps putting out heat.
return
// if (species.flags & IS_SYNTHETIC)
// bodytemperature += species.synth_temp_gain //that CPU/posibrain just keeps putting out heat. // commented out as making synthetics unplayable until cooling system sorted out
// return
var/body_temperature_difference = species.body_temperature - bodytemperature
@@ -131,11 +131,12 @@ Please contact me on #coderbus IRC. ~Carn x
#define FIRE_LAYER 24 //If you're on fire
#define TOTAL_LAYERS 24
/mob/living/carbon/human
var/list/overlays_standing[TOTAL_LAYERS]
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
var/icon/race_icon
var/icon/deform_icon
var/icon/skeleton
/mob/living/carbon/human/proc/apply_overlay(cache_index)
@@ -238,7 +239,6 @@ proc/get_damage_icon_part(damage_state, body_part)
var/husk = (M_HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (M_FAT in src.mutations)
var/hulk = (M_HULK in src.mutations)
var/skeleton = (SKELETON in src.mutations)
var/g = (gender == FEMALE ? "f" : "m")
var/has_head = 0
@@ -351,7 +351,7 @@ proc/get_damage_icon_part(damage_state, body_part)
//Handle husk overlay.
if(husk)
var/icon/mask = new(base_icon)
var/icon/husk_over = new(race_icon,"overlay_husk")
var/icon/husk_over = new(species.icobase,"overlay_husk")
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
husk_over.Blend(mask, ICON_ADD)
base_icon.Blend(husk_over, ICON_OVERLAY)
@@ -506,13 +506,11 @@ proc/get_damage_icon_part(damage_state, body_part)
// var/g = "m"
// if (gender == FEMALE) g = "f"
//BS12 EDIT
var/skeleton = (SKELETON in src.mutations)
if(skeleton)
race_icon = 'icons/mob/human_races/r_skeleton.dmi'
var/skel = (SKELETON in src.mutations)
if(skel)
skeleton = 'icons/mob/human_races/r_skeleton.dmi'
else
//Icon data is kept in species datums within the mob.
race_icon = species.icobase
deform_icon = species.deform
skeleton = null
if(dna)
switch(dna.mutantrace)
+10
View File
@@ -593,6 +593,16 @@
flesh_color = "#AAAAAA"
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
for(var/organ_name in H.organs_by_name)
if (organ_name == "head") // do the head last as that's when the user will be transfered to the posibrain
continue
var/datum/organ/external/O = H.organs_by_name[organ_name]
if((O.body_part != UPPER_TORSO) && (O.body_part != LOWER_TORSO)) // We're making them fall apart, not gibbing them!
O.droplimb(1)
var/datum/organ/external/O = H.organs_by_name["head"]
O.droplimb(1)
//Species unarmed attacks
/datum/unarmed_attack
+2 -8
View File
@@ -227,14 +227,8 @@
return 0
/mob/living/proc/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
return 0 //only carbon liveforms have this proc
/mob/living/emp_act(severity)
var/list/L = src.get_contents()
for(var/obj/O in L)
O.emp_act(severity)
..()
/mob/living/proc/can_inject()
return 1
/mob/living/proc/get_organ_target()
var/mob/shooter = src
+37 -1
View File
@@ -38,6 +38,9 @@
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
flash_weak_pain()
//Being hit while using a cloaking device
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
if(C && C.active)
C.attack_self(src)//Should shut it off
@@ -45,14 +48,23 @@
src << "\blue Your [C.name] was disrupted!"
Stun(2)
flash_weak_pain()
/*
//Being hit while using a deadman switch
if(istype(equipped(),/obj/item/device/assembly/signaler))
var/obj/item/device/assembly/signaler/signaler = equipped()
if(signaler.deadman && prob(80))
src.visible_message("\red [src] triggers their deadman's switch!")
signaler.signal()
*/
//Stun Beams
if(istype(P, /obj/item/projectile/beam/stun) || istype(P, /obj/item/projectile/bullet/stunshot))
stun_effect_act(0, P.agony, def_zone, P)
src <<"\red You have been hit by [P]!"
del P
return
//Armor
var/absorb = run_armor_check(def_zone, P.flag)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
@@ -68,6 +80,30 @@
src.dust()
return absorb
//Handles the effects of "stun" weapons
/mob/living/proc/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null)
flash_pain()
if (stun_amount)
Stun(stun_amount)
Weaken(stun_amount)
apply_effect(STUTTER, stun_amount)
apply_effect(EYE_BLUR, stun_amount)
if (agony_amount)
apply_damage(agony_amount, HALLOSS, def_zone, 0, used_weapon)
apply_effect(STUTTER, agony_amount/10)
apply_effect(EYE_BLUR, agony_amount/10)
/mob/living/proc/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
return 0 //only carbon liveforms have this proc
/mob/living/emp_act(severity)
var/list/L = src.get_contents()
for(var/obj/O in L)
O.emp_act(severity)
..()
//this proc handles being hit by a thrown atom
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve
if(istype(AM,/obj/))
+16 -4
View File
@@ -308,10 +308,13 @@
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
if(prefix)
modtype = prefix
if(istype(mmi, /obj/item/device/mmi/posibrain))
braintype = "Android"
if(mmi)
if(istype(mmi, /obj/item/device/mmi/posibrain))
braintype = "Android"
else
braintype = "Cyborg"
else
braintype = "Cyborg"
braintype = "Robot"
var/changed_name = ""
if(custom_name)
@@ -1179,23 +1182,32 @@
/mob/living/silicon/robot/Topic(href, href_list)
..()
if(usr != src)
return
if (href_list["mach_close"])
var/t1 = text("window=[href_list["mach_close"]]")
unset_machine()
src << browse(null, t1)
return
if (href_list["showalerts"])
robot_alerts()
return
if (href_list["mod"])
var/obj/item/O = locate(href_list["mod"])
if (O)
if (istype(O) && (O.loc == src))
O.attack_self(src)
if (href_list["act"])
var/obj/item/O = locate(href_list["act"])
if (!istype(O) || !(O.loc == src || O.loc == src.module))
return
activate_module(O)
installed_modules()
@@ -232,7 +232,7 @@
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/hud/sec(src)
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
src.modules += new /obj/item/weapon/melee/baton/robot(src)
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
src.modules += new /obj/item/taperoll/police(src)
src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
@@ -372,14 +372,14 @@
/obj/item/weapon/robot_module/drone
name = "drone module"
stacktypes = list(
/obj/item/stack/sheet/wood/cyborg = 1,
/obj/item/stack/sheet/mineral/plastic/cyborg = 1,
/obj/item/stack/sheet/rglass/cyborg = 5,
/obj/item/stack/sheet/wood = 1,
/obj/item/stack/sheet/mineral/plastic = 1,
/obj/item/stack/sheet/rglass = 5,
/obj/item/stack/tile/wood = 5,
/obj/item/stack/rods = 15,
/obj/item/stack/tile/plasteel = 15,
/obj/item/stack/sheet/metal/cyborg = 20,
/obj/item/stack/sheet/glass/cyborg = 20,
/obj/item/stack/sheet/metal = 20,
/obj/item/stack/sheet/glass = 20,
/obj/item/stack/cable_coil = 30
)
@@ -107,6 +107,9 @@
src << "\red Warning: Electromagnetic pulse detected."
..()
/mob/living/silicon/stun_effect_act(var/stun_amount, var/agony_amount)
return //immune
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
return
+12 -8
View File
@@ -914,17 +914,21 @@ var/list/slot_equipment_priority = list( \
if(buckled && istype(buckled))
is_movable = buckled.movable
if(buckled && !is_movable)
if(istype(buckled, /obj/vehicle))
var/obj/vehicle/V = buckled
if(stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
lying = 1
canmove = 0
pixel_y = V.mob_offset_y - 5
else
lying = 0
canmove = 1
pixel_y = V.mob_offset_y
else if(buckled && (!buckled.movable))
anchored = 1
canmove = 0
if( istype(buckled,/obj/structure/stool/bed/chair) )
lying = 0
else if(istype(buckled, /obj/vehicle))
var/obj/vehicle/V = buckled
if(V.standing_mob)
lying = 0
else
lying = 1
else
lying = 1
else if(buckled && is_movable)
@@ -1229,4 +1233,4 @@ mob/proc/yank_out_object()
if(host)
host.ckey = src.ckey
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
-11
View File
@@ -165,17 +165,6 @@ proc/hasorgans(A)
zone = "head"
if("mouth")
zone = "head"
/* if("l_hand")
zone = "l_arm"
if("r_hand")
zone = "r_arm"
if("l_foot")
zone = "l_leg"
if("r_foot")
zone = "r_leg"
if("groin")
zone = "chest"
*/
return zone
// Returns zone with a certain probability.
+12 -6
View File
@@ -138,7 +138,8 @@
//If there are still hurties to dispense
if (burn || brute)
if (status & ORGAN_ROBOT)
droplimb(1) //Robot limbs just kinda fail at full damage.
if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) // as below, getting hit on the chest shouldn't gib you even if you've got a robotic chest
droplimb(1) //Robot limbs just kinda fail at full damage.
else
//List organs we can pass it to
var/list/datum/organ/external/possible_points = list()
@@ -585,7 +586,8 @@ Note that amputating the affected organ does in fact remove the infection from t
if(status & ORGAN_DESTROYED)
if(body_part == UPPER_TORSO)
return
if(body_part == LOWER_TORSO)
return
src.status &= ~ORGAN_BROKEN
src.status &= ~ORGAN_BLEEDING
src.status &= ~ORGAN_SPLINTED
@@ -813,11 +815,13 @@ Note that amputating the affected organ does in fact remove the infection from t
/datum/organ/external/get_icon(gender="", fat="")
if (status & ORGAN_MUTATED)
return new /icon(owner.deform_icon, "[icon_name][gender ? "_[gender]" : ""][fat ? "_fat" : ""]")
return new /icon(owner.species.deform, "[icon_name][gender ? "_[gender]" : ""][fat ? "_fat" : ""]")
else if (status & ORGAN_ROBOT && !(owner.species && owner.species.flags & IS_SYNTHETIC))
return new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
else if (owner.skeleton)
return new /icon(owner.skeleton, "[icon_name][gender ? "_[gender]" : ""]")
else
return new /icon(owner.race_icon, "[icon_name][gender ? "_[gender]" : ""][fat ? "_fat" : ""]")
return new /icon(owner.species.icobase, "[icon_name][gender ? "_[gender]" : ""][fat ? "_fat" : ""]")
/datum/organ/external/proc/is_usable()
@@ -983,9 +987,11 @@ Note that amputating the affected organ does in fact remove the infection from t
var/g = "m"
if(owner.gender == FEMALE) g = "f"
if (status & ORGAN_MUTATED)
. = new /icon(owner.deform_icon, "[icon_name]_[g]")
. = new /icon(owner.species.deform, "[icon_name]_[g]")
else if (owner.skeleton)
. = new /icon(owner.skeleton, "[icon_name]_[g]")
else
. = new /icon(owner.race_icon, "[icon_name]_[g]")
. = new /icon(owner.species.icobase, "[icon_name]_[g]")
/datum/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
..(brute, burn, sharp, edge, used_weapon, forbidden_limbs)
+33 -21
View File
@@ -44,6 +44,7 @@
return
/obj/item/weapon/clipboard/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo))
user.drop_item()
W.loc = src
@@ -51,9 +52,11 @@
toppaper = W
user << "<span class='notice'>You clip the [W] onto \the [src].</span>"
update_icon()
else if(toppaper)
toppaper.attackby(usr.get_active_hand(), usr)
else if(istype(toppaper) && istype(W, /obj/item/weapon/pen))
toppaper.attackby(W, usr)
update_icon()
return
/obj/item/weapon/clipboard/attack_self(mob/user as mob)
@@ -85,32 +88,39 @@
if((usr.stat || usr.restrained()))
return
if(usr.contents.Find(src))
if(src.loc == usr)
if(href_list["pen"])
if(haspen)
if(istype(haspen) && (haspen.loc == src))
haspen.loc = usr.loc
usr.put_in_hands(haspen)
haspen = null
if(href_list["addpen"])
else if(href_list["addpen"])
if(!haspen)
if(istype(usr.get_active_hand(), /obj/item/weapon/pen))
var/obj/item/weapon/pen/W = usr.get_active_hand()
var/obj/item/weapon/pen/W = usr.get_active_hand()
if(istype(W, /obj/item/weapon/pen))
usr.drop_item()
W.loc = src
haspen = W
usr << "<span class='notice'>You slot the pen into \the [src].</span>"
if(href_list["write"])
var/obj/item/P = locate(href_list["write"])
if(P)
if(usr.get_active_hand())
P.attackby(usr.get_active_hand(), usr)
else if(href_list["write"])
var/obj/item/weapon/P = locate(href_list["write"])
if(P && (P.loc == src) && istype(P, /obj/item/weapon/paper) && (P == toppaper) )
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/weapon/pen))
P.attackby(I, usr)
if(href_list["remove"])
else if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if(P)
if(P && (P.loc == src) && (istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/photo)) )
P.loc = usr.loc
usr.put_in_hands(P)
if(P == toppaper)
@@ -121,9 +131,11 @@
else
toppaper = null
if(href_list["read"])
else if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if(P)
if(P && (P.loc == src) && istype(P, /obj/item/weapon/paper) )
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[stars(P.info)][P.stamps]</BODY></HTML>", "window=[P.name]")
onclose(usr, "[P.name]")
@@ -131,18 +143,18 @@
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[P.info][P.stamps]</BODY></HTML>", "window=[P.name]")
onclose(usr, "[P.name]")
if(href_list["look"])
else if(href_list["look"])
var/obj/item/weapon/photo/P = locate(href_list["look"])
if(P)
if(P && (P.loc == src) && istype(P, /obj/item/weapon/photo) )
P.show(usr)
if(href_list["top"])
else if(href_list["top"]) // currently unused
var/obj/item/P = locate(href_list["top"])
if(P)
if(P && (P.loc == src) && istype(P, /obj/item/weapon/paper) )
toppaper = P
usr << "<span class='notice'>You move [P.name] to the top.</span>"
//Update everything
attack_self(usr)
update_icon()
return
return
+6 -7
View File
@@ -57,9 +57,7 @@
user.set_machine(src)
var/dat = "<center><table>"
var/i
for(i=contents.len, i>=1, i--)
var/obj/item/P = contents[i]
for(var/obj/item/P in src)
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
dat += "</table></center>"
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=filingcabinet;size=350x300")
@@ -89,12 +87,13 @@
//var/retrieveindex = text2num(href_list["retrieve"])
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
if(P && in_range(src, usr))
if(istype(P) && (P.loc == src) && src.Adjacent(usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
spawn(0)
sleep(5)
icon_state = initial(icon_state)
/*
@@ -168,4 +167,4 @@
/obj/structure/filingcabinet/medical/attack_tk()
populate()
..()
..()
+12 -7
View File
@@ -59,29 +59,34 @@
if((usr.stat || usr.restrained()))
return
if(usr.contents.Find(src))
if(src.loc == usr)
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if(P)
if(P && (P.loc == src) && istype(P))
P.loc = usr.loc
usr.put_in_hands(P)
if(href_list["read"])
else if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if(P)
if(P && (P.loc == src) && istype(P))
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[stars(P.info)][P.stamps]</BODY></HTML>", "window=[P.name]")
onclose(usr, "[P.name]")
else
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[P.info][P.stamps]</BODY></HTML>", "window=[P.name]")
onclose(usr, "[P.name]")
if(href_list["look"])
else if(href_list["look"])
var/obj/item/weapon/photo/P = locate(href_list["look"])
if(P)
if(P && (P.loc == src) && istype(P))
P.show(usr)
else if(href_list["browse"])
var/obj/item/weapon/paper_bundle/P = locate(href_list["browse"])
if(P && (P.loc == src) && istype(P))
P.attack_self(usr)
onclose(usr, "[P.name]")
//Update everything
attack_self(usr)
update_icon()
return
return
+2 -1
View File
@@ -284,7 +284,8 @@
iscrayon = 1
if((!in_range(src, usr) && loc != usr && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != usr && usr.get_active_hand() != i)) // Some check to see if he's allowed to write
// if paper is not in usr, then it must be near them, or in a clipboard or folder, which must be in or near usr
if(src.loc != usr && !src.Adjacent(usr) && !((istype(src.loc, /obj/item/weapon/clipboard) || istype(src.loc, /obj/item/weapon/folder)) && (src.loc.loc == usr || src.loc.Adjacent(usr)) ) )
return
/*
t = checkhtml(t)
+3
View File
@@ -455,6 +455,9 @@
//No animations will be performed by this proc.
/proc/electrocute_mob(mob/living/carbon/M as mob, var/power_source, var/obj/source, var/siemens_coeff = 1.0)
if(istype(M.loc,/obj/mecha)) return 0 //feckin mechs are dumb
//This is for performance optimization only.
//DO NOT modify siemens_coeff here. That is checked in human/electrocute_act()
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.gloves)
@@ -51,7 +51,6 @@
icon_state = "stunrevolver"
fire_sound = 'sound/weapons/Taser.ogg'
origin_tech = "combat=3;materials=3;powerstorage=2"
charge_cost = 1250
projectile_type = "/obj/item/projectile/energy/electroderevolver"
cell_type = "/obj/item/weapon/cell"
@@ -25,10 +25,10 @@
name = "electrode"
icon_state = "spark"
nodamage = 1
stun = 2
/* stun = 2
weaken = 2
stutter = 10
agony = 35
stutter = 10 */
agony = 50
damage_type = HALLOSS
hitsound = 'sound/weapons/tase.ogg'
//Damage will be handled on the MOB side, to prevent window shattering.
@@ -2835,6 +2835,28 @@ datum
color = "#7F8400" // rgb: 127, 132, 0
//Reagents used for plant fertilizers.
toxin/fertilizer
name = "fertilizer"
id = "fertilizer"
description = "A chemical mix good for growing plants with."
reagent_state = LIQUID
// toxpwr = 0.2 //It's not THAT poisonous.
color = "#664330" // rgb: 102, 67, 48
toxin/fertilizer/eznutrient
name = "EZ Nutrient"
id = "eznutrient"
toxin/fertilizer/left4zed
name = "Left-4-Zed"
id = "left4zed"
toxin/fertilizer/robustharvest
name = "Robust Harvest"
id = "robustharvest"
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////// DRINKS BELOW, Beer is up there though, along with cola. Cap'n Pete's Cuban Spiced Rum////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -530,8 +530,9 @@
desc = "You can't really tell what this is."
else
icon_state = "glass_empty"
name = "Drinking glass"
desc = "Your standard drinking glass"
name = "glass"
desc = "Your standard drinking glass."
// center_of_mass = list("x"=16, "y"=10)
return
// for /obj/machinery/vending/sovietsoda
+14 -7
View File
@@ -139,11 +139,13 @@
if(damage > explosion_point)
for(var/mob/living/mob in living_mob_list)
if(istype(mob, /mob/living/carbon/human))
//Hilariously enough, running into a closet should make you get hit the hardest.
mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
mob.apply_effect(rads, IRRADIATE)
if(loc.z == mob.loc.z)
if(istype(mob, /mob/living/carbon/human))
//Hilariously enough, running into a closet should make you get hit the hardest.
var/mob/living/carbon/human/H = mob
H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
mob.apply_effect(rads, IRRADIATE)
explode()
else
@@ -329,10 +331,15 @@
if(is_type_in_list(X, uneatable)) continue
if(((X) && (!istype(X,/mob/living/carbon/human))))
step_towards(X,src)
if(!X:anchored) //unanchored objects pulled twice as fast
if(istype(X, /obj)) //unanchored objects pulled twice as fast
var/obj/O = X
if(!O.anchored)
step_towards(X,src)
else
step_towards(X,src)
if(istype(X, /obj/structure/window)) //shatter windows
X.ex_act(2.0)
var/obj/structure/window/W = X
W.ex_act(2.0)
else if(istype(X,/mob/living/carbon/human))
var/mob/living/carbon/human/H = X
if(istype(H.shoes,/obj/item/clothing/shoes/magboots))
-2
View File
@@ -7,7 +7,6 @@
powered = 1
locked = 0
layer = MOB_LAYER + 0.1
standing_mob = 1
load_item_visible = 1
load_offset_x = 0
load_offset_y = 7
@@ -31,7 +30,6 @@
passenger_allowed = 1
locked = 0
standing_mob = 0
load_item_visible = 1
load_offset_x = 1
load_offset_y = 7
+25 -14
View File
@@ -7,10 +7,9 @@
powered = 1
locked = 0
standing_mob = 1
load_item_visible = 1
load_offset_x = 0
load_offset_y = 7
mob_offset_y = 7
var/car_limit = 3 //how many cars an engine can pull before performance degrades
active_engines = 1
@@ -31,10 +30,10 @@
passenger_allowed = 0
locked = 0
standing_mob = 1
load_item_visible = 1
load_offset_x = 0
load_offset_y = 4
mob_offset_y = 8
//-------------------------------------------
// Standard procs
@@ -43,10 +42,10 @@
..()
cell = new /obj/item/weapon/cell/high
verbs -= /atom/movable/verb/pull
verbs -= /obj/vehicle/train/cargo/engine/verb/stop_engine
key = new()
var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "cargo_engine_overlay", layer = src.layer + 0.2) //over mobs
overlays += I
turn_off() //so engine verbs are correctly set
/obj/vehicle/train/cargo/engine/Move()
if(on && cell.charge < power_use)
@@ -117,6 +116,25 @@
..()
update_stats()
verbs -= /obj/vehicle/train/cargo/engine/verb/stop_engine
verbs -= /obj/vehicle/train/cargo/engine/verb/start_engine
if(on)
verbs += /obj/vehicle/train/cargo/engine/verb/stop_engine
else
verbs += /obj/vehicle/train/cargo/engine/verb/start_engine
/obj/vehicle/train/cargo/engine/turn_off()
..()
verbs -= /obj/vehicle/train/cargo/engine/verb/stop_engine
verbs -= /obj/vehicle/train/cargo/engine/verb/start_engine
if(!on)
verbs += /obj/vehicle/train/cargo/engine/verb/start_engine
else
verbs += /obj/vehicle/train/cargo/engine/verb/stop_engine
/obj/vehicle/train/cargo/RunOver(var/mob/living/carbon/human/H)
var/list/parts = list("head", "chest", "l_leg", "r_leg", "l_arm", "r_arm")
@@ -149,7 +167,7 @@
return 0
if(is_train_head())
if(direction == reverse_direction(dir))
if(direction == reverse_direction(dir) && tow)
return 0
if(Move(get_step(src, direction)))
return 1
@@ -195,8 +213,6 @@
turn_on()
if (on)
usr << "You start [src]'s engine."
verbs += /obj/vehicle/train/cargo/engine/verb/stop_engine
verbs -= /obj/vehicle/train/cargo/engine/verb/start_engine
else
if(cell.charge < power_use)
usr << "[src] is out of power."
@@ -218,8 +234,6 @@
turn_off()
if (!on)
usr << "You stop [src]'s engine."
verbs -= /obj/vehicle/train/cargo/engine/verb/stop_engine
verbs += /obj/vehicle/train/cargo/engine/verb/start_engine
/obj/vehicle/train/cargo/engine/verb/remove_key()
set name = "Remove key"
@@ -252,10 +266,7 @@
return 0
..()
if(istype(load, /mob/living/carbon/human))
load.pixel_y += 4
if(load)
return 1
@@ -302,4 +313,4 @@
move_delay = max(0, (-car_limit * active_engines) + train_length - active_engines) //limits base overweight so you cant overspeed trains
move_delay *= (1 / max(1, active_engines)) * 2 //overweight penalty (scaled by the number of engines)
move_delay += config.run_speed //base reference speed
move_delay *= 1.05
move_delay *= 1.1 //makes cargo trains 10% slower than running when not overweight
-2
View File
@@ -7,7 +7,6 @@
powered = 1
locked = 0
layer = MOB_LAYER + 0.1
standing_mob = 1
load_item_visible = 1
load_offset_x = 0
load_offset_y = 7
@@ -33,7 +32,6 @@
anchored = 0
passenger_allowed = 0
locked = 0
standing_mob = 0
load_item_visible = 1
load_offset_x = 1
load_offset_y = 7
+13 -3
View File
@@ -32,6 +32,8 @@
tow.Move(old_loc)
return 1
else
if(lead)
unattach()
return 0
/obj/vehicle/train/Bump(atom/Obstacle)
@@ -48,14 +50,22 @@
if(istype(A, /mob/living))
var/mob/living/M = A
visible_message("\red [src] knocks over [M]!")
M.apply_effects(5, 5) //knock people down if you hit them
M.apply_damages(5 * train_length / move_delay) // and do damage according to how fast the train is going and how heavy it is
M.apply_effects(5, 5) //knock people down if you hit them
M.apply_damages(22 / move_delay) // and do damage according to how fast the train is going
if(istype(load, /mob/living/carbon/human))
var/mob/living/D = load
D << "\red You hit [M]!"
msg_admin_attack("[D.name] ([D.ckey]) hit [M.name] ([M.ckey]) with [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
//-------------------------------------------
// Vehicle procs
//-------------------------------------------
/obj/vehicle/train/explode()
tow.unattach()
unattach()
..()
//-------------------------------------------
// Interaction procs
@@ -79,7 +89,7 @@
return 1
/obj/vehicle/train/MouseDrop_T(var/atom/movable/C, mob/user as mob)
if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C))
if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C) || !istype(C) || (user == C && !user.canmove))
return
if(istype(C,/obj/vehicle/train))
latch(C, user)
+17 -5
View File
@@ -24,11 +24,11 @@
var/obj/item/weapon/cell/cell
var/power_use = 5 //set this to adjust the amount of power the vehicle uses per move
var/standing_mob = 0 //if a mob loaded on the vehicle should be standing
var/atom/movable/load //all vehicles can take a load, since they should all be a least drivable
var/load_item_visible = 1 //set if the loaded item should be overlayed on the vehicle sprite
var/load_offset_x = 0 //pixel_x offset for item overlay
var/load_offset_y = 0 //pixel_y offset for item overlay
var/mob_offset_y = 0 //pixel_y offset for mob overlay
//-------------------------------------------
// Standard procs
@@ -44,11 +44,15 @@
var/init_anc = anchored
anchored = 0
if(..())
if(on && powered)
cell.use(power_use)
if(!..())
anchored = init_anc
return 0
anchored = init_anc
if(on && powered)
cell.use(power_use)
if(load)
load.forceMove(loc)// = loc
load.dir = dir
@@ -200,6 +204,11 @@
cell.update_icon()
cell = null
//stuns people who are thrown off a train that has been blown up
if(istype(load, /mob/living))
var/mob/living/M = load
M.apply_effects(5, 5)
unload()
new /obj/effect/gibspawner/robot(Tsec)
@@ -280,7 +289,10 @@
if(load_item_visible)
C.pixel_x += load_offset_x
C.pixel_y += load_offset_y
if(ismob(C))
C.pixel_y += mob_offset_y
else
C.pixel_y += load_offset_y
C.layer = layer + 0.1 //so it sits above the vehicle
if(ismob(C))
Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 59 KiB

+12570 -12522
View File
File diff suppressed because it is too large Load Diff
+10556 -10531
View File
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<h3>Shuttle Status</h3>
<div class="item" style="padding-top: 10px">
<div class="item">
{{:shuttle_status}}
{{:data.shuttle_status}}
</div>
</div>
<div class="item" style="padding-top: 10px">
@@ -10,11 +10,11 @@
Bluespace Drive:
</div>
<div class="itemContent">
{{if shuttle_state == "idle"}}
{{if data.shuttle_state == "idle"}}
<span class="idle">IDLE</span>
{{else shuttle_state == "warmup"}}
{{else data.shuttle_state == "warmup"}}
<span style="font-weight: bold;color: #336699">SPINNING UP</span>
{{else shuttle_state == "in_transit"}}
{{else data.shuttle_state == "in_transit"}}
<span style="font-weight: bold;color: #336699">ENGAGED</span>
{{else}}
<span class="bad">ERROR</span>
@@ -22,28 +22,28 @@
</div>
</div>
</div>
{{if has_docking}}
{{if data.has_docking}}
<div class="item" style="padding-top: 10px">
<div class="item">
<div class="itemLabel">
Docking Status:
</div>
<div class="itemContent">
{{if docking_status == "docked"}}
{{if data.docking_status == "docked"}}
<span class="good">DOCKED</span>
{{else docking_status == "docking"}}
{{if !docking_override}}
{{else data.docking_status == "docking"}}
{{if !data.docking_override}}
<span class="average">DOCKING</span>
{{else}}
<span class="average">DOCKING-MANUAL</span>
{{/if}}
{{else docking_status == "undocking"}}
{{if !docking_override}}
{{else data.docking_status == "undocking"}}
{{if !data.docking_override}}
<span class="average">UNDOCKING</span>
{{else}}
<span class="average">UNDOCKING-MANUAL</span>
{{/if}}
{{else docking_status == "undocked"}}
{{else data.docking_status == "undocked"}}
<span class="idle">UNDOCKED</span>
{{else}}
<span class="bad">ERROR</span>
@@ -55,7 +55,7 @@
<h3>Shuttle Authorization</h3>
<div class="item">
<div class="item">
{{if has_auth}}
{{if data.has_auth}}
Access Granted. Shuttle controls unlocked.
{{else}}
Additional authorization required.
@@ -63,11 +63,11 @@
</div>
</div>
<div class="item" style="padding-top: 10px">
{{for auth_list}}
{{if auth_hash}}
{{:~link(auth_name, 'eject', {'removeid' : auth_hash}, null, 'itemContentWide')}}
{{for data.auth_list}}
{{if value.auth_hash}}
{{:helper.link(value.auth_name, 'eject', {'removeid' : value.auth_hash}, null, 'itemContentWide')}}
{{else}}
{{:~link("", 'eject', {'scanid' : 1}, null, 'itemContentWide')}}
{{:helper.link("", 'eject', {'scanid' : 1}, null, 'itemContentWide')}}
{{/if}}
{{/for}}
</div>
@@ -76,9 +76,9 @@
<div class="item" style="padding-top: 10px">
<div class="item">
<div class="itemContent" style="padding-top: 2px; width: 100%">
{{:~link('Launch Shuttle', 'arrowthickstop-1-e', {'move' : '1'}, can_launch? null : 'disabled' , null)}}
{{:~link('Cancel Launch', 'cancel', {'cancel' : '1'}, can_cancel? null : 'disabled' , null)}}
{{:~link('Force Launch', 'alert', {'force' : '1'}, can_force? null : 'disabled' , can_force? 'redBackground' : null)}}
{{:helper.link('Launch Shuttle', 'arrowthickstop-1-e', {'move' : '1'}, data.can_launch ? null : 'disabled' , null)}}
{{:helper.link('Cancel Launch', 'cancel', {'cancel' : '1'}, data.can_cancel ? null : 'disabled' , null)}}
{{:helper.link('Force Launch', 'alert', {'force' : '1'}, data.can_force ? null : 'disabled' , data.can_force ? 'redBackground' : null)}}
</div>
</div>
</div>