mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
@@ -601,7 +601,6 @@
|
||||
#include "code\game\objects\items\stacks\nanopaste.dm"
|
||||
#include "code\game\objects\items\stacks\rods.dm"
|
||||
#include "code\game\objects\items\stacks\stack.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\glass.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\leather.dm"
|
||||
#include "code\game\objects\items\stacks\sheets\light.dm"
|
||||
#include "code\game\objects\items\stacks\tiles\light.dm"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
*/
|
||||
|
||||
datum/mind
|
||||
/datum/mind
|
||||
var/key
|
||||
var/name //replaces mob/var/original_name
|
||||
var/mob/living/current
|
||||
@@ -58,13 +58,14 @@ datum/mind
|
||||
// the world.time since the mob has been brigged, or -1 if not at all
|
||||
var/brigged_since = -1
|
||||
|
||||
New(var/key)
|
||||
src.key = key
|
||||
|
||||
//put this here for easier tracking ingame
|
||||
var/datum/money_account/initial_account
|
||||
|
||||
proc/transfer_to(mob/living/new_character)
|
||||
/datum/mind/New(var/key)
|
||||
src.key = key
|
||||
|
||||
|
||||
/datum/mind/proc/transfer_to(mob/living/new_character)
|
||||
if(!istype(new_character))
|
||||
world.log << "## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn"
|
||||
if(current) //remove ourself from our old body's mind variable
|
||||
@@ -86,10 +87,10 @@ datum/mind
|
||||
if(active)
|
||||
new_character.key = key //now transfer the key to link the client to our new body
|
||||
|
||||
proc/store_memory(new_text)
|
||||
/datum/mind/proc/store_memory(new_text)
|
||||
memory += "[new_text]<BR>"
|
||||
|
||||
proc/show_memory(mob/recipient)
|
||||
/datum/mind/proc/show_memory(mob/recipient)
|
||||
var/output = "<B>[current.real_name]'s Memory</B><HR>"
|
||||
output += memory
|
||||
|
||||
@@ -103,7 +104,7 @@ datum/mind
|
||||
|
||||
recipient << browse(output,"window=memory")
|
||||
|
||||
proc/edit_memory()
|
||||
/datum/mind/proc/edit_memory()
|
||||
if(!ticker || !ticker.mode)
|
||||
alert("Not before round-start!", "Alert")
|
||||
return
|
||||
@@ -137,7 +138,7 @@ datum/mind
|
||||
out += "<br><a href='?src=\ref[src];obj_add=1'>\[add\]</a>"
|
||||
usr << browse(out, "window=edit_memory[src]")
|
||||
|
||||
Topic(href, href_list)
|
||||
/datum/mind/Topic(href, href_list)
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if(href_list["add_antagonist"])
|
||||
@@ -320,57 +321,6 @@ datum/mind
|
||||
H.implant_loyalty(H, override = TRUE)
|
||||
log_admin("[key_name_admin(usr)] has loyalty implanted [current].")
|
||||
else
|
||||
/*
|
||||
else if (href_list["monkey"])
|
||||
var/mob/living/L = current
|
||||
if (L.monkeyizing)
|
||||
return
|
||||
switch(href_list["monkey"])
|
||||
if("healthy")
|
||||
if (usr.client.holder.rights & R_ADMIN)
|
||||
var/mob/living/carbon/human/H = current
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(H))
|
||||
log_admin("[key_name(usr)] attempting to monkeyize [key_name(current)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(current)]")
|
||||
src = null
|
||||
M = H.monkeyize()
|
||||
src = M.mind
|
||||
//world << "DEBUG: \"healthy\": M=[M], M.mind=[M.mind], src=[src]!"
|
||||
else if (istype(M) && length(M.viruses))
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
D.cure(0)
|
||||
sleep(0) //because deleting of virus is done through spawn(0)
|
||||
if("infected")
|
||||
if (usr.client.holder.rights & R_ADMIN)
|
||||
var/mob/living/carbon/human/H = current
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(H))
|
||||
log_admin("[key_name(usr)] attempting to monkeyize and infect [key_name(current)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize and infect [key_name_admin(current)]", 1)
|
||||
src = null
|
||||
M = H.monkeyize()
|
||||
src = M.mind
|
||||
current.contract_disease(new /datum/disease/jungle_fever,1,0)
|
||||
else if (istype(M))
|
||||
current.contract_disease(new /datum/disease/jungle_fever,1,0)
|
||||
if("human")
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(M))
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if (istype(D,/datum/disease/jungle_fever))
|
||||
D.cure(0)
|
||||
sleep(0) //because deleting of virus is doing throught spawn(0)
|
||||
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]")
|
||||
var/obj/item/weapon/dnainjector/m2h/m2h = new
|
||||
var/obj/item/weapon/implant/mobfinder = new(M) //hack because humanizing deletes mind --rastaf0
|
||||
src = null
|
||||
m2h.inject(M)
|
||||
src = mobfinder.loc:mind
|
||||
qdel(mobfinder)
|
||||
current.radiation -= 50
|
||||
*/
|
||||
else if (href_list["silicon"])
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
switch(href_list["silicon"])
|
||||
@@ -437,46 +387,15 @@ datum/mind
|
||||
current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
edit_memory()
|
||||
/*
|
||||
proc/clear_memory(var/silent = 1)
|
||||
var/datum/game_mode/current_mode = ticker.mode
|
||||
|
||||
// remove traitor uplinks
|
||||
var/list/L = current.get_contents()
|
||||
for (var/t in L)
|
||||
if (istype(t, /obj/item/device/pda))
|
||||
if (t:uplink) qdel(t:uplink)
|
||||
t:uplink = null
|
||||
else if (istype(t, /obj/item/device/radio))
|
||||
if (t:traitorradio) qdel(t:traitorradio)
|
||||
t:traitorradio = null
|
||||
t:traitor_frequency = 0.0
|
||||
else if (istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/weapon/syndicate_uplink))
|
||||
if (t:origradio)
|
||||
var/obj/item/device/radio/R = t:origradio
|
||||
R.loc = current.loc
|
||||
R.traitorradio = null
|
||||
R.traitor_frequency = 0.0
|
||||
qdel(t)
|
||||
|
||||
// remove wizards spells
|
||||
//If there are more special powers that need removal, they can be procced into here./N
|
||||
current.spellremove(current)
|
||||
|
||||
// clear memory
|
||||
memory = ""
|
||||
special_role = null
|
||||
|
||||
*/
|
||||
|
||||
proc/find_syndicate_uplink()
|
||||
/datum/mind/proc/find_syndicate_uplink()
|
||||
var/list/L = current.get_contents()
|
||||
for (var/obj/item/I in L)
|
||||
if (I.hidden_uplink)
|
||||
return I.hidden_uplink
|
||||
return null
|
||||
|
||||
proc/take_uplink()
|
||||
/datum/mind/proc/take_uplink()
|
||||
var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
|
||||
if(H)
|
||||
qdel(H)
|
||||
@@ -484,14 +403,12 @@ datum/mind
|
||||
|
||||
// check whether this mind's mob has been brigged for the given duration
|
||||
// have to call this periodically for the duration to work properly
|
||||
proc/is_brigged(duration)
|
||||
/datum/mind/proc/is_brigged(duration)
|
||||
var/turf/T = current.loc
|
||||
if(!istype(T))
|
||||
brigged_since = -1
|
||||
return 0
|
||||
|
||||
var/is_currently_brigged = 0
|
||||
|
||||
if(istype(T.loc,/area/security/brig))
|
||||
is_currently_brigged = 1
|
||||
for(var/obj/item/weapon/card/id/card in current)
|
||||
@@ -511,6 +428,19 @@ datum/mind
|
||||
|
||||
return (duration <= world.time - brigged_since)
|
||||
|
||||
/datum/mind/proc/reset()
|
||||
assigned_role = null
|
||||
special_role = null
|
||||
role_alt_title = null
|
||||
assigned_job = null
|
||||
//faction = null //Uncommenting this causes a compile error due to 'undefined type', fucked if I know.
|
||||
changeling = null
|
||||
initial_account = null
|
||||
objectives = list()
|
||||
special_verbs = list()
|
||||
has_been_rev = 0
|
||||
rev_cooldown = 0
|
||||
brigged_since = -1
|
||||
|
||||
//Antagonist role check
|
||||
/mob/living/proc/check_special_role(role)
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/* Glass stack types
|
||||
* Contains:
|
||||
* Glass sheets
|
||||
* Reinforced glass sheets
|
||||
* Phoron Glass Sheets
|
||||
* Reinforced Phoron Glass Sheets (AKA Holy fuck strong windows)
|
||||
* Glass shards - TODO: Move this into code/game/object/item/weapons
|
||||
*/
|
||||
|
||||
/*
|
||||
* Glass sheets
|
||||
*/
|
||||
/obj/item/stack/material/glass
|
||||
name = "glass"
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
var/created_window = /obj/structure/window/basic
|
||||
var/is_reinforced = 0
|
||||
var/list/construction_options = list("One Direction", "Full Window")
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/material/glass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
|
||||
/obj/item/stack/material/glass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if(!is_reinforced)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if (get_amount() < 1 || CC.get_amount() < 5)
|
||||
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass.</span>"
|
||||
return
|
||||
|
||||
CC.use(5)
|
||||
use(1)
|
||||
user << "<span class='notice'>You attach wire to the [name].</span>"
|
||||
new /obj/item/stack/light_w(user.loc)
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
if (V.get_amount() < 1 || get_amount() < 1)
|
||||
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/stack/material/glass/reinforced/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
var/obj/item/stack/material/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
V.use(1)
|
||||
G.use(1)
|
||||
if (!G && replace)
|
||||
user.put_in_hands(RG)
|
||||
|
||||
/obj/item/stack/material/glass/proc/construct_window(mob/user as mob)
|
||||
if(!user || !src) return 0
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
var/title = "Sheet-[name]"
|
||||
title += " ([src.get_amount()] sheet\s left)"
|
||||
switch(input(title, "What would you like to construct?") as null|anything in construction_options)
|
||||
if("One Direction")
|
||||
if(!src) return 1
|
||||
if(src.loc != user) return 1
|
||||
|
||||
var/list/directions = new/list(cardinal)
|
||||
var/i = 0
|
||||
for (var/obj/structure/window/win in user.loc)
|
||||
i++
|
||||
if(i >= 4)
|
||||
user << "\red There are too many windows in this location."
|
||||
return 1
|
||||
directions-=win.dir
|
||||
if(!(win.dir in cardinal))
|
||||
user << "\red Can't let you do that."
|
||||
return 1
|
||||
|
||||
//Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
|
||||
var/dir_to_set = 2
|
||||
for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
|
||||
var/found = 0
|
||||
for(var/obj/structure/window/WT in user.loc)
|
||||
if(WT.dir == direction)
|
||||
found = 1
|
||||
if(!found)
|
||||
dir_to_set = direction
|
||||
break
|
||||
new created_window( user.loc, dir_to_set, 1 )
|
||||
src.use(1)
|
||||
if("Full Window")
|
||||
if(!src) return 1
|
||||
if(src.loc != user) return 1
|
||||
if(src.get_amount() < 4)
|
||||
user << "\red You need more glass to do that."
|
||||
return 1
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
user << "\red There is a window in the way."
|
||||
return 1
|
||||
new created_window( user.loc, SOUTHWEST, 1 )
|
||||
src.use(4)
|
||||
if("Windoor")
|
||||
if(!is_reinforced) return 1
|
||||
|
||||
|
||||
if(!src || src.loc != user) return 1
|
||||
|
||||
if(isturf(user.loc) && locate(/obj/structure/windoor_assembly/, user.loc))
|
||||
user << "\red There is already a windoor assembly in that location."
|
||||
return 1
|
||||
|
||||
if(isturf(user.loc) && locate(/obj/machinery/door/window/, user.loc))
|
||||
user << "\red There is already a windoor in that location."
|
||||
return 1
|
||||
|
||||
if(src.get_amount() < 5)
|
||||
user << "\red You need more glass to do that."
|
||||
return 1
|
||||
|
||||
new /obj/structure/windoor_assembly(user.loc, user.dir, 1)
|
||||
src.use(5)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/*
|
||||
* Reinforced glass sheets
|
||||
*/
|
||||
/obj/item/stack/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
default_type = "reinforced glass"
|
||||
created_window = /obj/structure/window/reinforced
|
||||
is_reinforced = 1
|
||||
construction_options = list("One Direction", "Full Window", "Windoor")
|
||||
|
||||
/*
|
||||
* Phoron Glass sheets
|
||||
*/
|
||||
/obj/item/stack/material/glass/phoronglass
|
||||
name = "phoron glass"
|
||||
singular_name = "phoron glass sheet"
|
||||
icon_state = "sheet-phoronglass"
|
||||
created_window = /obj/structure/window/phoronbasic
|
||||
default_type = "phoron glass"
|
||||
|
||||
/obj/item/stack/material/glass/phoronglass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if( istype(W, /obj/item/stack/rods) )
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/material/glass/phoronrglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
V.use(1)
|
||||
var/obj/item/stack/material/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
G.use(1)
|
||||
if (!G && !RG && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Reinforced phoron glass sheets
|
||||
*/
|
||||
/obj/item/stack/material/glass/phoronrglass
|
||||
name = "reinforced phoron glass"
|
||||
singular_name = "reinforced phoron glass sheet"
|
||||
icon_state = "sheet-phoronrglass"
|
||||
default_type = "reinforced phoron glass"
|
||||
created_window = /obj/structure/window/phoronreinforced
|
||||
is_reinforced = 1
|
||||
@@ -114,9 +114,12 @@
|
||||
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if(istype(W,/obj/item/stack/material/glass))
|
||||
var/obj/item/stack/material/glass/ST = W
|
||||
//window placing begin //TODO CONVERT PROPERLY TO MATERIAL DATUM
|
||||
else if(istype(W,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/ST = W
|
||||
if(!ST.material.created_window)
|
||||
return 0
|
||||
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
@@ -146,7 +149,7 @@
|
||||
user << "<span class='notice'>There is already a window facing this way there.</span>"
|
||||
return
|
||||
|
||||
var/wtype = ST.created_window
|
||||
var/wtype = ST.material.created_window
|
||||
if (ST.use(1))
|
||||
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
|
||||
user << "<span class='notice'>You place the [WD] on [src].</span>"
|
||||
|
||||
@@ -56,3 +56,4 @@
|
||||
#define TRAIT_BIOLUM 36
|
||||
#define TRAIT_BIOLUM_COLOUR 37
|
||||
#define TRAIT_IMMUTABLE 38
|
||||
#define TRAIT_FLESH_COLOUR 39
|
||||
@@ -194,9 +194,11 @@
|
||||
else if(seed.chems)
|
||||
if(istype(W,/obj/item/weapon/material/hatchet) && !isnull(seed.chems["woodpulp"]))
|
||||
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
|
||||
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/material/wood/NG = new (user.loc)
|
||||
NG.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
if(flesh_colour) NG.color = flesh_colour
|
||||
for (var/obj/item/stack/material/wood/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
@@ -221,6 +223,15 @@
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/soydope(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
else if(seed.get_trait(TRAIT_FLESH_COLOUR))
|
||||
user << "You slice up \the [src]."
|
||||
var/slices = rand(3,5)
|
||||
var/reagents_to_transfer = round(reagents.total_volume/slices)
|
||||
for(var/i=i;i<=slices;i++)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/F = new(get_turf(src),seed)
|
||||
if(reagents_to_transfer) reagents.trans_to_obj(F,reagents_to_transfer)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/attack(var/mob/living/carbon/M, var/mob/user, var/def_zone)
|
||||
@@ -301,9 +312,11 @@
|
||||
|
||||
if(seed.kitchen_tag == "grass")
|
||||
user.show_message("<span class='notice'>You make a grass tile out of \the [src]!</span>", 1)
|
||||
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for(var/i=0,i<2,i++)
|
||||
var/obj/item/stack/tile/grass/G = new (user.loc)
|
||||
G.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
if(flesh_colour) G.color = flesh_colour
|
||||
for (var/obj/item/stack/tile/grass/NG in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
@@ -358,3 +371,35 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
|
||||
plantname = "ambrosia"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fruit_slice
|
||||
name = "fruit slice"
|
||||
desc = "A slice of some tasty fruit."
|
||||
icon = 'icons/obj/hydroponics_misc.dmi'
|
||||
icon_state = ""
|
||||
|
||||
var/list/fruit_icon_cache = list()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fruit_slice/New(var/newloc, var/datum/seed/S)
|
||||
..(newloc)
|
||||
// Need to go through and make a general image caching controller. Todo.
|
||||
if(!istype(S))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
name = "[S.seed_name] slice"
|
||||
desc = "A slice of \a [S.seed_name]. Tasty, probably."
|
||||
|
||||
var/rind_colour = S.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
var/flesh_colour = S.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = rind_colour
|
||||
if(!fruit_icon_cache["rind-[rind_colour]"])
|
||||
var/image/I = image(icon,"fruit_rind")
|
||||
I.color = rind_colour
|
||||
fruit_icon_cache["rind-[rind_colour]"] = I
|
||||
overlays |= fruit_icon_cache["rind-[rind_colour]"]
|
||||
if(!fruit_icon_cache["slice-[rind_colour]"])
|
||||
var/image/I = image(icon,"fruit_slice")
|
||||
I.color = flesh_colour
|
||||
fruit_icon_cache["slice-[rind_colour]"] = I
|
||||
overlays |= fruit_icon_cache["slice-[rind_colour]"]
|
||||
@@ -169,8 +169,9 @@
|
||||
if(get_trait(TRAIT_BIOLUM_COLOUR))
|
||||
clr = get_trait(TRAIT_BIOLUM_COLOUR)
|
||||
splat.set_light(get_trait(TRAIT_BIOLUM), l_color = clr)
|
||||
if(get_trait(TRAIT_PRODUCT_COLOUR))
|
||||
splat.color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
var/flesh_colour = get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
if(flesh_colour) splat.color = get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
|
||||
if(chems)
|
||||
for(var/mob/living/M in T.contents)
|
||||
@@ -635,7 +636,7 @@
|
||||
if(GENE_STRUCTURE)
|
||||
traits_to_copy = list(TRAIT_PLANT_ICON,TRAIT_PRODUCT_ICON,TRAIT_HARVEST_REPEAT)
|
||||
if(GENE_FRUIT)
|
||||
traits_to_copy = list(TRAIT_STINGS,TRAIT_EXPLOSIVE,TRAIT_JUICY)
|
||||
traits_to_copy = list(TRAIT_STINGS,TRAIT_EXPLOSIVE,TRAIT_FLESH_COLOUR,TRAIT_JUICY)
|
||||
if(GENE_SPECIAL)
|
||||
traits_to_copy = list(TRAIT_TELEPORTING)
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@
|
||||
set_trait(TRAIT_PRODUCT_ICON,"apple")
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#FF540A")
|
||||
set_trait(TRAIT_PLANT_ICON,"tree2")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#E8E39B")
|
||||
|
||||
/datum/seed/apple/poison
|
||||
name = "poisonapple"
|
||||
@@ -804,6 +805,7 @@
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#326B30")
|
||||
set_trait(TRAIT_PLANT_COLOUR,"#257522")
|
||||
set_trait(TRAIT_PLANT_ICON,"vine2")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#F22C2C")
|
||||
|
||||
/datum/seed/pumpkin
|
||||
name = "pumpkin"
|
||||
@@ -842,6 +844,7 @@
|
||||
set_trait(TRAIT_PRODUCT_ICON,"treefruit")
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#3AF026")
|
||||
set_trait(TRAIT_PLANT_ICON,"tree")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#3AF026")
|
||||
|
||||
/datum/seed/citrus/lemon
|
||||
name = "lemon"
|
||||
@@ -854,6 +857,7 @@
|
||||
..()
|
||||
set_trait(TRAIT_PRODUCES_POWER,1)
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#F0E226")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#F0E226")
|
||||
|
||||
/datum/seed/citrus/orange
|
||||
name = "orange"
|
||||
@@ -865,6 +869,7 @@
|
||||
/datum/seed/citrus/orange/New()
|
||||
..()
|
||||
set_trait(TRAIT_PRODUCT_COLOUR,"#FFC20A")
|
||||
set_trait(TRAIT_FLESH_COLOUR,"#FFC20A")
|
||||
|
||||
/datum/seed/grass
|
||||
name = "grass"
|
||||
|
||||
@@ -196,16 +196,19 @@
|
||||
layer = 3
|
||||
density = 0
|
||||
|
||||
/obj/effect/plant/proc/calc_dir(turf/location = loc)
|
||||
/obj/effect/plant/proc/calc_dir()
|
||||
set background = 1
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T)) return
|
||||
|
||||
var/direction = 16
|
||||
|
||||
for(var/wallDir in cardinal)
|
||||
var/turf/newTurf = get_step(location,wallDir)
|
||||
var/turf/newTurf = get_step(T,wallDir)
|
||||
if(newTurf.density)
|
||||
direction |= wallDir
|
||||
|
||||
for(var/obj/effect/plant/shroom in location)
|
||||
for(var/obj/effect/plant/shroom in T.contents)
|
||||
if(shroom == src)
|
||||
continue
|
||||
if(shroom.floor) //special
|
||||
|
||||
@@ -47,6 +47,19 @@
|
||||
return 0
|
||||
..(S,tamount,1)
|
||||
|
||||
/obj/item/stack/material/attack_self(var/mob/user)
|
||||
if(!material.build_windows(user, src))
|
||||
..()
|
||||
|
||||
/obj/item/stack/material/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
material.build_wired_product(user, W, src)
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
material.build_rod_product(user, W, src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/material/iron
|
||||
name = "iron"
|
||||
icon_state = "sheet-silver"
|
||||
@@ -75,7 +88,7 @@
|
||||
default_type = "phoron"
|
||||
|
||||
/obj/item/stack/material/plastic
|
||||
name = "Plastic"
|
||||
name = "plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
default_type = "plastic"
|
||||
|
||||
@@ -151,3 +164,27 @@
|
||||
singular_name = "leather piece"
|
||||
icon_state = "sheet-leather"
|
||||
default_type = "leather"
|
||||
|
||||
/obj/item/stack/material/glass
|
||||
name = "glass"
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
default_type = "reinforced glass"
|
||||
|
||||
/obj/item/stack/material/glass/phoronglass
|
||||
name = "phoron glass"
|
||||
singular_name = "phoron glass sheet"
|
||||
icon_state = "sheet-phoronglass"
|
||||
default_type = "phoron glass"
|
||||
|
||||
/obj/item/stack/material/glass/phoronrglass
|
||||
name = "reinforced phoron glass"
|
||||
singular_name = "reinforced phoron glass sheet"
|
||||
icon_state = "sheet-phoronrglass"
|
||||
default_type = "reinforced phoron glass"
|
||||
|
||||
@@ -13,20 +13,26 @@
|
||||
matter = null
|
||||
|
||||
/obj/item/stack/material/cyborg/plastic
|
||||
icon_state = "sheet-plastic"
|
||||
default_type = "plastic"
|
||||
|
||||
/obj/item/stack/material/cyborg/steel
|
||||
icon_state = "sheet-metal"
|
||||
default_type = "steel"
|
||||
|
||||
/obj/item/stack/material/cyborg/plasteel
|
||||
icon_state = "sheet-plasteel"
|
||||
default_type = "plasteel"
|
||||
|
||||
/obj/item/stack/material/cyborg/wood
|
||||
icon_state = "sheet-wood"
|
||||
default_type = "wood"
|
||||
|
||||
/obj/item/stack/material/cyborg/glass
|
||||
icon_state = "sheet-glass"
|
||||
default_type = "glass"
|
||||
|
||||
/obj/item/stack/material/cyborg/glass/reinforced
|
||||
icon_state = "sheet-rglass"
|
||||
default_type = "reinforced glass"
|
||||
charge_costs = list(500, 1000)
|
||||
@@ -77,6 +77,12 @@ var/list/name_to_material
|
||||
var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn.
|
||||
var/list/composite_material // If set, object matter var will be a list containing these values.
|
||||
|
||||
// Placeholder vars for the time being, todo properly integrate windows/light tiles/rods.
|
||||
var/created_window
|
||||
var/rod_product
|
||||
var/wire_product
|
||||
var/list/window_options = list()
|
||||
|
||||
// Damage values.
|
||||
var/hardness = 60 // Prob of wall destruction by hulk, used for edge damage in weapons.
|
||||
var/weight = 20 // Determines blunt damage/throwforce for weapons.
|
||||
@@ -90,6 +96,37 @@ var/list/name_to_material
|
||||
// Wallrot crumble message.
|
||||
var/rotting_touch_message = "crumbles under your touch"
|
||||
|
||||
// Placeholders for light tiles and rglass.
|
||||
/material/proc/build_rod_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
|
||||
if(!rod_product)
|
||||
user << "<span class='warning'>You cannot make anything out of \the [target_stack]</span>"
|
||||
return
|
||||
if(used_stack.get_amount() < 1 || target_stack.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one rod and one sheet of [display_name] to make anything useful.</span>"
|
||||
return
|
||||
used_stack.use(1)
|
||||
target_stack.use(1)
|
||||
var/obj/item/stack/S = new rod_product(get_turf(user))
|
||||
S.add_fingerprint(user)
|
||||
S.add_to_stacks(user)
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(S)
|
||||
|
||||
/material/proc/build_wired_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
|
||||
if(!wire_product)
|
||||
user << "<span class='warning'>You cannot make anything out of \the [target_stack]</span>"
|
||||
return
|
||||
if(used_stack.get_amount() < 5 || target_stack.get_amount() < 1)
|
||||
user << "<span class='warning'>You need five wires and one sheet of [display_name] to make anything useful.</span>"
|
||||
return
|
||||
|
||||
used_stack.use(5)
|
||||
target_stack.use(1)
|
||||
user << "<span class='notice'>You attach wire to the [name].</span>"
|
||||
var/obj/item/product = new wire_product(get_turf(user))
|
||||
if(!(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(product)
|
||||
|
||||
// Make sure we have a display name and shard icon even if they aren't explicitly set.
|
||||
/material/New()
|
||||
..()
|
||||
@@ -100,6 +137,10 @@ var/list/name_to_material
|
||||
if(!shard_icon)
|
||||
shard_icon = shard_type
|
||||
|
||||
// This is a placeholder for proper integration of windows/windoors into the system.
|
||||
/material/proc/build_windows(var/mob/living/user, var/obj/item/stack/used_stack)
|
||||
return 0
|
||||
|
||||
// Weapons handle applying a divisor for this value locally.
|
||||
/material/proc/get_blunt_damage()
|
||||
return weight //todo
|
||||
@@ -273,7 +314,7 @@ var/list/name_to_material
|
||||
hardness = 80
|
||||
weight = 23
|
||||
stack_origin_tech = "materials=2"
|
||||
composite_material = list() //todo
|
||||
composite_material = list(DEFAULT_WALL_MATERIAL = 3750, "platinum" = 3750) //todo
|
||||
|
||||
/material/glass
|
||||
name = "glass"
|
||||
@@ -288,21 +329,82 @@ var/list/name_to_material
|
||||
weight = 15
|
||||
door_icon_base = "stone"
|
||||
destruction_desc = "shatters"
|
||||
window_options = list("One Direction", "Full Window")
|
||||
created_window = /obj/structure/window/basic
|
||||
wire_product = /obj/item/stack/light_w
|
||||
rod_product = /obj/item/stack/material/glass/reinforced
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = 300
|
||||
integrity = 200 // idk why but phoron windows are strong, so.
|
||||
icon_colour = "#FC2BC5"
|
||||
stack_origin_tech = "materials=3;phorontech=2"
|
||||
/material/glass/build_windows(var/mob/living/user, var/obj/item/stack/used_stack)
|
||||
|
||||
/material/glass/phoron/reinforced
|
||||
name = "reinforced phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronrglass
|
||||
stack_origin_tech = "materials=4;phorontech=2"
|
||||
composite_material = list() //todo
|
||||
if(!user || !used_stack || !created_window || !window_options.len)
|
||||
return 0
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>This task is too complex for your clumsy hands.</span>"
|
||||
return 1
|
||||
|
||||
var/turf/T = user.loc
|
||||
if(!istype(T))
|
||||
user << "<span class='warning'>You must be standing on open flooring to build a window.</span>"
|
||||
return 1
|
||||
|
||||
var/title = "Sheet-[used_stack.name] ([used_stack.get_amount()] sheet\s left)"
|
||||
var/choice = input(title, "What would you like to construct?") as null|anything in window_options
|
||||
|
||||
if(!choice || !used_stack || !user || used_stack.loc != user || user.stat || user.loc != T)
|
||||
return 1
|
||||
|
||||
// Get data for building windows here.
|
||||
var/list/possible_directions = cardinal.Copy()
|
||||
var/window_count = 0
|
||||
for (var/obj/structure/window/check_window in user.loc)
|
||||
window_count++
|
||||
possible_directions -= check_window.dir
|
||||
|
||||
// Get the closest available dir to the user's current facing.
|
||||
var/build_dir = SOUTHWEST //Default to southwest for fulltile windows.
|
||||
var/failed_to_build
|
||||
|
||||
if(window_count >= 4)
|
||||
failed_to_build = 1
|
||||
else
|
||||
if(choice in list("One Direction","Windoor"))
|
||||
if(possible_directions.len)
|
||||
for(var/direction in list(user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
|
||||
if(direction in possible_directions)
|
||||
build_dir = direction
|
||||
break
|
||||
else
|
||||
failed_to_build = 1
|
||||
if(!failed_to_build && choice == "Windoor")
|
||||
if(!is_reinforced())
|
||||
user << "<span class='warning'>This material is not reinforced enough to use for a door.</span>"
|
||||
return
|
||||
if((locate(/obj/structure/windoor_assembly) in T.contents) || (locate(/obj/machinery/door/window) in T.contents))
|
||||
failed_to_build = 1
|
||||
if(failed_to_build)
|
||||
user << "<span class='warning'>There is no room in this location.</span>"
|
||||
return 1
|
||||
|
||||
var/build_path = /obj/structure/windoor_assembly
|
||||
var/sheets_needed = 4
|
||||
if(choice == "Windoor")
|
||||
sheets_needed = 5
|
||||
build_dir = user.dir
|
||||
else
|
||||
build_path = created_window
|
||||
|
||||
if(used_stack.get_amount() < sheets_needed)
|
||||
user << "<span class='warning'>You need at least [sheets_needed] sheets to build this.</span>"
|
||||
return 1
|
||||
|
||||
// Build the structure and update sheet count etc.
|
||||
used_stack.use(sheets_needed)
|
||||
new build_path(T, build_dir, 1)
|
||||
return 1
|
||||
|
||||
/material/glass/proc/is_reinforced()
|
||||
return (hardness > 35) //todo
|
||||
|
||||
/material/glass/reinforced
|
||||
name = "reinforced glass"
|
||||
@@ -316,7 +418,32 @@ var/list/name_to_material
|
||||
hardness = 40
|
||||
weight = 30
|
||||
stack_origin_tech = "materials=2"
|
||||
composite_material = list(DEFAULT_WALL_MATERIAL = 1875,"glass" = 3750)
|
||||
window_options = list("One Direction", "Full Window", "Windoor")
|
||||
created_window = /obj/structure/window/reinforced
|
||||
wire_product = null
|
||||
rod_product = null
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = 300
|
||||
integrity = 200 // idk why but phoron windows are strong, so.
|
||||
icon_colour = "#FC2BC5"
|
||||
stack_origin_tech = "materials=3;phorontech=2"
|
||||
created_window = /obj/structure/window/phoronbasic
|
||||
wire_product = null
|
||||
rod_product = /obj/item/stack/material/glass/phoronrglass
|
||||
|
||||
/material/glass/phoron/reinforced
|
||||
name = "reinforced phoron glass"
|
||||
stack_type = /obj/item/stack/material/glass/phoronrglass
|
||||
stack_origin_tech = "materials=4;phorontech=2"
|
||||
composite_material = list() //todo
|
||||
created_window = /obj/structure/window/phoronreinforced
|
||||
hardness = 40
|
||||
rod_product = null
|
||||
|
||||
/material/plastic
|
||||
name = "plastic"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
cultnet.updateVisibility(src, 0)
|
||||
|
||||
/mob/living/death(gibbed, deathmessage="seizes up and falls limp...")
|
||||
if(..())
|
||||
if(..(gibbed, deathmessage))
|
||||
// If true, the mob went from living to dead (assuming everyone has been overriding as they should...)
|
||||
cultnet.updateVisibility(src)
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
src.searching = 0
|
||||
src.brainmob.mind = candidate.mind
|
||||
src.brainmob.ckey = candidate.ckey
|
||||
src.brainmob.mind.reset()
|
||||
src.name = "positronic brain ([src.brainmob.name])"
|
||||
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
|
||||
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
else
|
||||
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
|
||||
|
||||
visible_message("<span class='danger>[src] has been attacked with the [O] by [user].</span>")
|
||||
visible_message("<span class='danger'>\The [src] has been attacked with the [O] by [user].</span>")
|
||||
user.do_attack_animation(src)
|
||||
|
||||
/mob/living/simple_animal/movement_delay()
|
||||
@@ -327,10 +327,10 @@
|
||||
if(statpanel("Status") && show_stat_health)
|
||||
stat(null, "Health: [round((health / maxHealth) * 100)]%")
|
||||
|
||||
/mob/living/simple_animal/death(gibbed, deathmessage="")
|
||||
/mob/living/simple_animal/death(gibbed, deathmessage = "dies!")
|
||||
icon_state = icon_dead
|
||||
density = 0
|
||||
return ..()
|
||||
return ..(gibbed,deathmessage)
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity)
|
||||
if(!blinded)
|
||||
|
||||
@@ -362,7 +362,8 @@
|
||||
return
|
||||
|
||||
M.key = key
|
||||
// M.Login() //wat
|
||||
if(M.mind)
|
||||
M.mind.reset()
|
||||
return
|
||||
|
||||
/client/verb/changes()
|
||||
|
||||
BIN
icons/obj/hydroponics_misc.dmi
Normal file
BIN
icons/obj/hydroponics_misc.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 337 B |
Reference in New Issue
Block a user