Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into OrganRefactor

This commit is contained in:
Aurorablade
2015-12-24 00:17:26 -05:00
108 changed files with 1470 additions and 2232 deletions
+1 -1
View File
@@ -1095,7 +1095,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(E.anchored)
E.active = 1
for(var/obj/machinery/field_generator/F in world)
for(var/obj/machinery/field/generator/F in world)
if(F.anchored)
F.Varedit_start = 1
spawn(30)
+90 -14
View File
@@ -19,20 +19,20 @@
/obj/item/weapon/claymore/fluff/IsShield()
return 0
/obj/item/weapon/crowbar/fluff/zelda_creedy_1 // Zomgponies: Griffin Rowley
name = "Zelda's Crowbar"
desc = "A pink crow bar that has an engraving that reads, 'To Zelda. Love always, Dawn'"
icon = 'icons/obj/custom_items.dmi'
icon_state = "zeldacrowbar"
item_state = "crowbar"
/obj/item/clothing/glasses/meson/fluff/book_berner_1 // Adrkiller59: Adam Cooper
name = "bespectacled mesonic surveyors"
desc = "One of the older meson scanner models retrofitted to perform like its modern counterparts."
icon = 'icons/obj/custom_items.dmi'
icon_state = "book_berner_1"
/obj/item/weapon/lighter/zippo/fluff/purple // GodOfOreos: Jason Conrad
name = "purple engraved zippo"
desc = "All craftsspacemanship is of the highest quality. It is encrusted with refined plasma sheets. On the item is an image of a dwarf and the words 'Strike the Earth!' etched onto the side."
@@ -40,7 +40,7 @@
icon_state = "purple_zippo_off"
icon_on = "purple_zippo_on"
icon_off = "purple_zippo_off"
/obj/item/weapon/lighter/zippo/fluff/michael_guess_1 // mrbits: Callista Gold
name = "engraved lighter"
desc = "A golden lighter, engraved with some ornaments and a G."
@@ -48,7 +48,47 @@
icon_state = "guessip"
icon_on = "guessipon"
icon_off = "guessip"
/obj/item/weapon/fluff/dogwhistle //phantasmicdream: Zeke Varloss
name = "Sax's whistle"
desc = "This whistle seems to have a strange aura about it. Maybe you should blow on it?"
icon = 'icons/obj/custom_items.dmi'
icon_state = "dogwhistle"
item_state = "dogwhistle"
force = 2
/obj/item/weapon/fluff/dogwhistle/attack_self(mob/user)
user.visible_message("<span class='notice'>[user] blows on the whistle, but no sound comes out.</span>", "<span class='notice'>You blow on the whistle, but don't hear anything.</span>")
spawn(20)
var/mob/living/simple_animal/pet/corgi/C = new /mob/living/simple_animal/pet/corgi(get_turf(user))
var/obj/item/clothing/head/det_hat/D = new /obj/item/clothing/head/det_hat(C)
D.flags |= NODROP
C.inventory_head = D
C.regenerate_icons()
C.name = "Detective Sax"
C.visible_message("<span class='notice'>[C] suddenly winks into existence at [user]'s feet!</span>")
user << "<span class='danger'>[src] crumbles to dust in your hands!</span>"
qdel(src)
/obj/item/weapon/storage/toolbox/fluff/lunchbox //godoforeos: Jason Conrad
name = "lunchpail"
desc = "A simple black lunchpail."
icon = 'icons/obj/custom_items.dmi'
icon_state = "lunch_box"
item_state = "lunch_box"
force = 5
throwforce = 5
w_class = 3
max_combined_w_class = 9
storage_slots = 3
/obj/item/weapon/storage/toolbox/fluff/lunchbox/New()
..()
new /obj/item/weapon/reagent_containers/food/snacks/sandwich(src)
new /obj/item/weapon/reagent_containers/food/snacks/chips(src)
new /obj/item/weapon/reagent_containers/food/drinks/cans/cola(src)
//////////////////////////////////
//////////// Clothing ////////////
//////////////////////////////////
@@ -71,19 +111,25 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "polarbearpelt"
item_state = "polarbearpelt"
/obj/item/clothing/head/fluff/sparkyninja_beret // Sparkyninja: Neil Wilkinson
name = "royal marines commando beret"
desc = "Dark Green beret with an old insignia on it."
icon_state = "sparkyninja_beret"
/obj/item/clothing/head/beret/fluff/sigholt //sigholtstarsong: Sigholt Starsong
name = "Lieutenant Starsong's beret"
desc = "This beret bears insignia of the SOLGOV Marine Corps 417th Regiment, 2nd Battalion, Bravo Company. It looks meticulously maintained."
icon_state = "hosberet"
item_state = "hosberet"
//////////// Suits ////////////
/obj/item/clothing/suit/storage/labcoat/fluff/aeneas_rinil //Socialsystem: Lynn Fea
name = "Robotics labcoat"
desc = "A labcoat with a few markings denoting it as the labcoat of roboticist."
icon = 'icons/obj/custom_items.dmi'
icon_state = "aeneasrinil_open"
/obj/item/clothing/suit/jacket/fluff/kidosvest // Anxipal: Kido Qasteth
name = "Kido's Vest"
desc = "A rugged leather vest with a tag labelled \"Men of Mayhem.\""
@@ -121,13 +167,13 @@
usr << "You attempt to hit the button but can't."
return
usr.update_inv_wear_suit()
/obj/item/clothing/suit/storage/labcoat/fluff/red // Sweetjealousy: Sophie Faust-Noms
/obj/item/clothing/suit/storage/labcoat/fluff/red // Sweetjealousy: Sophie Faust-Noms
name = "red labcoat"
desc = "A suit that protects against minor chemical spills. Has a red stripe on the shoulders and rolled up sleeves."
icon = 'icons/obj/custom_items.dmi'
icon_state = "labcoat_red_open"
/obj/item/clothing/suit/fluff/stobarico_greatcoat // Stobarico: F.U.R.R.Y
name = "\improper F.U.R.R.Y's Nanotrasen Greatcoat"
desc = "A greatcoat with Nanotrasen colors."
@@ -154,7 +200,7 @@
icon_state = "castile_dress"
item_state = "castile_dress"
item_color = "castile_dress"
/obj/item/clothing/under/psysuit/fluff/isaca_sirius_1 // Xilia: Isaca Sirius
name = "Isaca's suit"
desc = "Black, comfortable and nicely fitting suit. Made not to hinder the wearer in any way. Made of some exotic fabric. And some strange glowing jewel at the waist. Name labels says; Property of Isaca Sirius; The Seeder."
@@ -200,8 +246,8 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "fox_jacket"
item_state = "fox_jacket"
/obj/item/clothing/under/fluff/fox
/obj/item/clothing/under/fluff/fox
name = "Aeronautics Jumpsuit"
desc = "A jumpsuit tailor made for spacefaring fighter pilots; this one seems very old."
icon = 'icons/obj/custom_items.dmi'
@@ -230,3 +276,33 @@
body_parts_covered = HEAD
flags = BLOCKHAIR
flags_inv = HIDEFACE
/obj/item/clothing/under/fluff/tactical_suit //chronx100: Hughe O'Splash
name = "Hughe O'Splash's tactical suit"
desc = "A very comfortable suit that covers your entire body; it makes you feel very stealthy."
icon = 'icons/obj/custom_items.dmi'
icon_state = "chronx_suit"
item_state = "chronx_suit"
item_color = "chronxsuit"
/obj/item/clothing/mask/fluff/tactical_balaclava //chronx100: Hughe O'Splash
name = "Hughe O'Splash's tactical balaclava"
desc = "Keeps your face warm and tactical during those cold space winter months, sadly it's not so effective against the cold void of space itself."
icon = 'icons/obj/custom_items.dmi'
icon_state = "chronx_balaclava"
item_state = "chronx_balaclava"
flags = BLOCKHAIR
w_class = 2
/obj/item/clothing/suit/armor/vest/fluff/tactical //m3hillus: Medusa Schlofield
name = "tactical armor vest"
desc = "A tactical vest with armored plate inserts."
icon = 'icons/obj/clothing/ties.dmi'
icon_state = "vest_black"
item_state = "vest_black"
/obj/item/clothing/under/pants/fluff/combat
name = "combat pants"
desc = "Medium style tactical pants, for the fashion aware combat units out there."
icon_state = "chaps"
item_color = "combat_pants"
+1 -1
View File
@@ -78,7 +78,7 @@
if(ismob(A))
A.ex_act(strength)//This should work for now I guess
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field/generator)) //Protect the singularity from getting released every round!
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
life--
-59
View File
@@ -1,59 +0,0 @@
//simplified copy of /obj/structure/falsewall
/obj/effect/landmark/falsewall_spawner
name = "falsewall spawner"
/obj/structure/temple_falsewall
name = "wall"
anchored = 1
icon = 'icons/turf/walls.dmi'
icon_state = "plasma0"
opacity = 1
var/closed_wall_dir = 0
var/opening = 0
var/mineral = "plasma"
var/is_metal = 0
/obj/structure/temple_falsewall/New()
..()
spawn(10)
if(prob(95))
desc = pick("Something seems slightly off about it.","")
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
for(var/turf/unsimulated/wall/W in orange(src,1))
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
junction |= get_dir(src,W)
closed_wall_dir = junction
density = 1
icon_state = "[mineral][closed_wall_dir]"
/obj/structure/temple_falsewall/attack_hand(mob/user as mob)
if(opening)
return
if(density)
opening = 1
if(is_metal)
icon_state = "metalfwall_open"
flick("metalfwall_opening", src)
else
icon_state = "[mineral]fwall_open"
flick("[mineral]fwall_opening", src)
sleep(15)
src.density = 0
set_opacity(0)
opening = 0
else
opening = 1
icon_state = "[mineral][closed_wall_dir]"
if(is_metal)
flick("metalfwall_closing", src)
else
flick("[mineral]fwall_closing", src)
density = 1
sleep(15)
set_opacity(1)
opening = 0
-345
View File
@@ -1,345 +0,0 @@
//some testin stuff
#define PATH_SPREAD_CHANCE_START 90
#define PATH_SPREAD_CHANCE_LOSS_UPPER 80
#define PATH_SPREAD_CHANCE_LOSS_LOWER 50
#define RIVER_SPREAD_CHANCE_START 100
#define RIVER_SPREAD_CHANCE_LOSS_UPPER 65
#define RIVER_SPREAD_CHANCE_LOSS_LOWER 50
#define RANDOM_UPPER_X 100
#define RANDOM_UPPER_Y 100
#define RANDOM_LOWER_X 18
#define RANDOM_LOWER_Y 18
/area/jungle
name = "jungle"
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "area"
lighting_use_dynamic = 0
luminosity = 1
//randomly spawns, will create paths around the map
/obj/effect/landmark/path_waypoint
name = "path waypoint"
icon_state = "x2"
var/connected = 0
/obj/effect/landmark/temple
name = "temple entrance"
icon_state = "x2"
var/obj/structure/ladder/my_ladder
New()
//pick a random temple to link to
var/list/waypoints = list()
for(var/obj/effect/landmark/temple/destination/T in landmarks_list)
waypoints.Add(T)
if(!T)
return
else continue
var/obj/effect/landmark/temple/destination/dest_temple = pick(waypoints)
dest_temple.init()
//connect this landmark to the other
my_ladder = new /obj/structure/ladder(src.loc)
my_ladder.id = dest_temple.my_ladder.id
dest_temple.my_ladder.up = my_ladder
//delete the landmarks now that we're finished
qdel(dest_temple)
qdel(src)
/obj/effect/landmark/temple/destination/New()
//nothing
/obj/effect/landmark/temple/destination/proc/init()
my_ladder = new /obj/structure/ladder(src.loc)
my_ladder.id = rand(999)
my_ladder.height = -1
//loop over the walls in the temple and make them a random pre-chosen mineral (null is a stand in for plasma, which the walls already are)
//treat plasma slightly differently because it's the default wall type
var/mineral = pick("uranium","sandstone","gold","iron","silver","diamond","clown","plasma")
//world << "init [mineral]"
var/area/my_area = get_area(src)
var/list/temple_turfs = get_area_turfs(my_area.type)
for(var/turf/simulated/floor/T in temple_turfs)
for(var/obj/effect/landmark/falsewall_spawner/F in T.contents)
var/obj/structure/temple_falsewall/fwall = new(F.loc)
fwall.mineral = mineral
if(mineral == "iron")
fwall.is_metal = 1
qdel(F)
for(var/obj/effect/landmark/door_spawner/D in T.contents)
var/spawn_type
if(mineral == "iron")
spawn_type = text2path("/obj/machinery/door/airlock/vault")
else
spawn_type = text2path("/obj/machinery/door/airlock/[mineral]")
new spawn_type(D.loc)
qdel(D)
for(var/turf/unsimulated/wall/T in temple_turfs)
if(mineral != "plasma")
T.icon_state = replacetext(T.icon_state, "plasma", mineral)
/*for(var/obj/effect/landmark/falsewall_spawner/F in T.contents)
//world << "falsewall_spawner found in wall"
var/obj/structure/temple_falsewall/fwall = new(F.loc)
fwall.mineral = mineral
qdel(F)
for(var/obj/effect/landmark/door_spawner/D in T.contents)
//world << "door_spawner found in wall"
T = new /turf/unsimulated/floor(T.loc)
T.icon_state = "dark"
var/spawn_type = text2path("/obj/machinery/door/airlock/[door_mineral]")
new spawn_type(T)
qdel(D)*/
//a shuttle has crashed somewhere on the map, it should have a power cell to let the adventurers get home
/area/jungle/crash_ship_source
icon_state = "crash"
/area/jungle/crash_ship_clean
icon_state = "crash"
/area/jungle/crash_ship_one
icon_state = "crash"
/area/jungle/crash_ship_two
icon_state = "crash"
/area/jungle/crash_ship_three
icon_state = "crash"
/area/jungle/crash_ship_four
icon_state = "crash"
//randomly spawns, will create rivers around the map
//uses the same logic as jungle paths
/obj/effect/landmark/river_waypoint
name = "river source waypoint"
var/connected = 0
/obj/machinery/jungle_controller
name = "jungle controller"
desc = "a mysterious and ancient piece of machinery"
var/list/animal_spawners = list()
/obj/machinery/jungle_controller/initialize()
world << "\red \b Setting up jungle, this may take a bleeding eternity..."
//crash dat shuttle
var/area/start_location = locate(/area/jungle/crash_ship_source)
var/area/clean_location = locate(/area/jungle/crash_ship_clean)
var/list/ship_locations = list(/area/jungle/crash_ship_one, /area/jungle/crash_ship_two, /area/jungle/crash_ship_three, /area/jungle/crash_ship_four)
var/area/end_location = locate( pick(ship_locations) )
ship_locations -= end_location.type
start_location.move_contents_to(end_location)
for(var/area_type in ship_locations)
var/area/cur_location = locate(area_type)
clean_location.copy_turfs_to(cur_location)
//drop some random river nodes
var/list/river_nodes = list()
var/max = rand(1,3)
var/num_spawned = 0
while(num_spawned < max)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!istype(J))
continue
if(!J.bushes_spawn)
continue
river_nodes.Add(new /obj/effect/landmark/river_waypoint(J))
num_spawned++
//make some randomly pathing rivers
for(var/obj/effect/landmark/river_waypoint/W in landmarks_list)
if (W.z != src.z || W.connected)
continue
W.connected = 1
var/turf/cur_turf = new /turf/unsimulated/jungle/water(get_turf(W))
var/turf/target_turf = get_turf(pick(river_nodes))
var/detouring = 0
var/cur_dir = get_dir(cur_turf, target_turf)
//
while(cur_turf != target_turf)
//randomly snake around a bit
if(detouring)
if(prob(20))
detouring = 0
cur_dir = get_dir(cur_turf, target_turf)
else if(prob(20))
detouring = 1
if(prob(50))
cur_dir = turn(cur_dir, 45)
else
cur_dir = turn(cur_dir, -45)
else
cur_dir = get_dir(cur_turf, target_turf)
cur_turf = get_step(cur_turf, cur_dir)
var/skip = 0
if(!istype(cur_turf, /turf/unsimulated/jungle) || istype(cur_turf, /turf/unsimulated/jungle/rock))
detouring = 0
cur_dir = get_dir(cur_turf, target_turf)
cur_turf = get_step(cur_turf, cur_dir)
continue
if(!skip)
var/turf/unsimulated/jungle/water/water_turf = new(cur_turf)
water_turf.Spread(75, rand(65, 25))
var/list/path_nodes = list()
//place some ladders leading down to pre-generated temples
max = rand(2,5)
num_spawned = 0
while(num_spawned < max)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!J || !J.bushes_spawn)
continue
new /obj/effect/landmark/temple(J)
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
num_spawned++
//put a native tribe somewhere
num_spawned = 0
while(num_spawned < 1)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!J || !J.bushes_spawn)
continue
new /obj/effect/jungle_tribe_spawn(J)
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
num_spawned++
//place some random path waypoints to confuse players
max = rand(1,3)
num_spawned = 0
while(num_spawned < max)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!J || !J.bushes_spawn)
continue
path_nodes.Add(new /obj/effect/landmark/path_waypoint(J))
num_spawned++
//get any path nodes placed on the map
for(var/obj/effect/landmark/path_waypoint/W in landmarks_list)
if (W.z == src.z)
path_nodes.Add(W)
//make random, connecting paths
for(var/obj/effect/landmark/path_waypoint/W in path_nodes)
if (W.connected)
continue
W.connected = 1
var/turf/cur_turf = get_turf(W)
path_nodes.Remove(W)
var/turf/target_turf = get_turf(pick(path_nodes))
path_nodes.Add(W)
//
cur_turf = new /turf/unsimulated/jungle/path(cur_turf)
var/detouring = 0
var/cur_dir = get_dir(cur_turf, target_turf)
//
while(cur_turf != target_turf)
//randomly snake around a bit
if(detouring)
if(prob(20) || get_dist(cur_turf, target_turf) < 5)
detouring = 0
cur_dir = get_dir(cur_turf, target_turf)
else if(prob(20) && get_dist(cur_turf, target_turf) > 5)
detouring = 1
if(prob(50))
cur_dir = turn(cur_dir, 45)
else
cur_dir = turn(cur_dir, -45)
else
cur_dir = get_dir(cur_turf, target_turf)
//move a step forward
cur_turf = get_step(cur_turf, cur_dir)
//if we're not a jungle turf, get back to what we were doing
if(!istype(cur_turf, /turf/unsimulated/jungle/))
cur_dir = get_dir(cur_turf, target_turf)
cur_turf = get_step(cur_turf, cur_dir)
continue
var/turf/unsimulated/jungle/J = cur_turf
if(istype(J, /turf/unsimulated/jungle/impenetrable) || istype(J, /turf/unsimulated/jungle/water/deep))
cur_dir = get_dir(cur_turf, target_turf)
cur_turf = get_step(cur_turf, cur_dir)
continue
if(!istype(J, /turf/unsimulated/jungle/water))
J = new /turf/unsimulated/jungle/path(cur_turf)
J.Spread(PATH_SPREAD_CHANCE_START, rand(PATH_SPREAD_CHANCE_LOSS_UPPER, PATH_SPREAD_CHANCE_LOSS_LOWER))
//create monkey spawners
num_spawned = 0
max = rand(3,6)
while(num_spawned < max)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!J || !J.bushes_spawn)
continue
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/monkey(J))
num_spawned++
//create panther spawners
num_spawned = 0
max = rand(6,12)
while(num_spawned < max)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!J || !istype(J) || !J.bushes_spawn)
continue
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/panther(J))
num_spawned++
//create snake spawners
num_spawned = 0
max = rand(6,12)
while(num_spawned < max)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!J || !istype(J) || !J.bushes_spawn)
continue
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/snake(J))
num_spawned++
//create parrot spawners
num_spawned = 0
max = rand(3,6)
while(num_spawned < max)
var/turf/unsimulated/jungle/J = locate(rand(RANDOM_LOWER_X, RANDOM_UPPER_X), rand(RANDOM_LOWER_Y, RANDOM_UPPER_Y), src.z)
if(!J || !istype(J) || !J.bushes_spawn)
continue
animal_spawners.Add(new /obj/effect/landmark/animal_spawner/parrot(J))
num_spawned++
#undef PATH_SPREAD_CHANCE_START
#undef PATH_SPREAD_CHANCE_LOSS_UPPER
#undef PATH_SPREAD_CHANCE_LOSS_LOWER
#undef RIVER_SPREAD_CHANCE_START
#undef RIVER_SPREAD_CHANCE_LOSS_UPPER
#undef RIVER_SPREAD_CHANCE_LOSS_LOWER
#undef RANDOM_UPPER_X
#undef RANDOM_UPPER_Y
#undef RANDOM_LOWER_X
#undef RANDOM_LOWER_Y
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

-121
View File
@@ -1,121 +0,0 @@
//*********************//
// Generic undergrowth //
//*********************//
/obj/structure/bush
name = "foliage"
desc = "Pretty thick scrub, it'll take something sharp and a lot of determination to clear away."
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "bush1"
density = 1
anchored = 1
layer = 3.2
var/indestructable = 0
var/stump = 0
/obj/structure/bush/New()
if(prob(20))
opacity = 1
/*
/obj/structure/bush/Bumped(M as mob)
if (istype(M, /mob/living/simple_animal))
var/mob/living/simple_animal/A = M
A.loc = get_turf(src)
else if (istype(M, /mob/living/carbon/monkey))
var/mob/living/carbon/monkey/A = M
A.loc = get_turf(src)
*/
/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob, params)
//hatchets can clear away undergrowth
if(istype(I, /obj/item/weapon/hatchet) && !stump)
if(indestructable)
//this bush marks the edge of the map, you can't destroy it
user << "\red You flail away at the undergrowth, but it's too thick here."
else
user.visible_message("\red <b>[user] begins clearing away [src].</b>","\red <b>You begin clearing away [src].</b>")
spawn(rand(15,30))
if(get_dist(user,src) < 2)
user << "\blue You clear away [src]."
var/obj/item/stack/sheet/wood/W = new(src.loc)
W.amount = rand(3,15)
if(prob(50))
icon_state = "stump[rand(1,2)]"
name = "cleared foliage"
desc = "There used to be dense undergrowth here."
density = 0
stump = 1
pixel_x = rand(-6,6)
pixel_y = rand(-6,6)
else
qdel(src)
else
return ..()
//*******************************//
// Strange, fruit-bearing plants //
//*******************************//
var/list/fruit_icon_states = list("badrecipe","kudzupod","reishi","lime","grapes","boiledrorocore","chocolateegg")
var/list/reagent_effects = list("toxin","charcoal","ether","space_drugs","lsd","haloperidol")
var/jungle_plants_init = 0
/proc/init_jungle_plants()
jungle_plants_init = 1
fruit_icon_states = shuffle(fruit_icon_states)
reagent_effects = shuffle(reagent_effects)
/obj/item/weapon/reagent_containers/food/snacks/grown/jungle_fruit
name = "jungle fruit"
desc = "It smells weird and looks off."
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "orange"
potency = 1
/obj/structure/jungle_plant
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "plant1"
desc = "Looks like some of that fruit might be edible."
var/fruits_left = 3
var/fruit_type = -1
var/icon/fruit_overlay
var/plant_strength = 1
var/fruit_r
var/fruit_g
var/fruit_b
/obj/structure/jungle_plant/New()
if(!jungle_plants_init)
init_jungle_plants()
fruit_type = rand(1,7)
icon_state = "plant[fruit_type]"
fruits_left = rand(1,5)
fruit_overlay = icon('code/modules/jungle/jungle.dmi',"fruit[fruits_left]")
fruit_r = 255 - fruit_type * 36
fruit_g = rand(1,255)
fruit_b = fruit_type * 36
fruit_overlay.Blend(rgb(fruit_r, fruit_g, fruit_b), ICON_ADD)
overlays += fruit_overlay
plant_strength = rand(20,200)
/obj/structure/jungle_plant/attack_hand(var/mob/user as mob)
if(fruits_left > 0)
fruits_left--
user << "\blue You pick a fruit off [src]."
var/obj/item/weapon/reagent_containers/food/snacks/grown/jungle_fruit/J = new (src.loc)
J.potency = plant_strength
J.icon_state = fruit_icon_states[fruit_type]
J.reagents.add_reagent(reagent_effects[fruit_type], 1+round((plant_strength / 20), 1))
J.bitesize = 1+round(J.reagents.total_volume / 2, 1)
J.attack_hand(user)
overlays -= fruit_overlay
fruit_overlay = icon('code/modules/jungle/jungle.dmi',"fruit[fruits_left]")
fruit_overlay.Blend(rgb(fruit_r, fruit_g, fruit_b), ICON_ADD)
overlays += fruit_overlay
else
user << "\red There are no fruit left on [src]."
-398
View File
@@ -1,398 +0,0 @@
//randomly generated temples, indiana jones style (minus the cultists, probably)
/area/jungle/temple_one
name = "temple"
lighting_use_dynamic = 1
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "temple1"
/area/jungle/temple_two
name = "temple"
lighting_use_dynamic = 1
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "temple2"
/area/jungle/temple_three
name = "temple"
lighting_use_dynamic = 1
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "temple3"
/area/jungle/temple_four
name = "temple"
lighting_use_dynamic = 1
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "temple4"
/area/jungle/temple_five
name = "temple"
lighting_use_dynamic = 1
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "temple5"
/area/jungle/temple_six
name = "temple"
lighting_use_dynamic = 1
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "temple6"
/obj/effect/landmark/door_spawner
name = "door spawner"
//******//
// Loot //
//******//
/obj/effect/landmark/glowshroom_spawn
icon_state = "x3"
invisibility = 101
New()
if(prob(10))
new /obj/effect/glowshroom(src.loc)
qdel(src)
/obj/effect/landmark/loot_spawn
name = "loot spawner"
icon_state = "grabbed1"
var/low_probability = 0
New()
switch(pick( \
low_probability * 1000;"nothing", \
200 - low_probability * 175;"treasure", \
25 + low_probability * 75;"remains", \
25 + low_probability * 75;"plants", \
5; "blob", \
50 + low_probability * 50;"clothes", \
"glasses", \
100 - low_probability * 50;"weapons", \
100 - low_probability * 50;"spacesuit", \
"health", \
25 + low_probability * 75;"snacks", \
25;"alien", \
"lights", \
25 - low_probability * 25;"engineering", \
25 - low_probability * 25;"coffin", \
25;"mimic", \
25;"viscerator", \
))
if("treasure")
var/obj/structure/closet/crate/C = new(src.loc)
if(prob(33))
//coins
var/amount = rand(2,6)
var/list/possible_spawns = list()
for(var/coin_type in typesof(/obj/item/weapon/coin))
possible_spawns += coin_type
var/coin_type = pick(possible_spawns)
for(var/i=0,i<amount,i++)
new coin_type(C)
else if(prob(50))
//bars
var/amount = rand(2,6)
var/quantity = rand(10,50)
var/list/possible_spawns = list()
for(var/bar_type in subtypesof(/obj/item/stack/sheet/mineral) - /obj/item/stack/sheet/mineral/enruranium)
possible_spawns += bar_type
var/bar_type = pick(possible_spawns)
for(var/i=0,i<amount,i++)
var/obj/item/stack/sheet/mineral/M = new bar_type(C)
M.amount = quantity
else
//credits
var/amount = rand(2,6)
var/list/possible_spawns = list()
for(var/cash_type in typesof(/obj/item/stack/sheet/mineral))
possible_spawns += cash_type
var/cash_type = pick(possible_spawns)
for(var/i=0,i<amount,i++)
new cash_type(C)
if("remains")
if(prob(50))
new /obj/effect/decal/remains/human(src.loc)
else
new /obj/effect/decal/remains/xeno(src.loc)
if("plants")
if(prob(25))
new /obj/effect/glowshroom(src.loc)
else if(prob(33))
new /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap(src.loc)
else if(prob(50))
new /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris(src.loc)
if("blob")
new /obj/effect/blob/core(src.loc)
if("clothes")
var/obj/structure/closet/C = new(src.loc)
C.icon_state = "blue"
C.icon_closed = "blue"
if(prob(33))
new /obj/item/clothing/under/rainbow(C)
new /obj/item/clothing/shoes/rainbow(C)
new /obj/item/clothing/head/soft/rainbow(C)
new /obj/item/clothing/gloves/color/rainbow(C)
else if(prob(50))
new /obj/item/clothing/under/psyche(C)
else
new /obj/item/clothing/under/syndicate/combat(C)
new /obj/item/clothing/shoes/combat(C)
new /obj/item/clothing/gloves/combat(C)
new /obj/item/clothing/mask/balaclava(C)
if("glasses")
var/obj/structure/closet/C = new(src.loc)
var/new_type = pick(
/obj/item/clothing/glasses/material, \
/obj/item/clothing/glasses/thermal, \
/obj/item/clothing/glasses/meson, \
/obj/item/clothing/glasses/night, \
/obj/item/clothing/glasses/hud/health, \
/obj/item/clothing/glasses/hud/health \
)
new new_type(C)
if("weapons")
var/obj/structure/closet/crate/secure/weapon/C = new(src.loc)
var/new_type = pick(
200; /obj/item/weapon/hatchet, \
/obj/item/weapon/gun/projectile/automatic/pistol, \
/obj/item/weapon/gun/projectile/automatic/pistol/deagle, \
/obj/item/weapon/gun/projectile/revolver/russian, \
)
new new_type(C)
if("spacesuit")
var/obj/structure/closet/syndicate/C = new(src.loc)
if(prob(25))
new /obj/item/clothing/suit/space/syndicate/black(C)
new /obj/item/clothing/head/helmet/space/syndicate/black(C)
new /obj/item/weapon/tank/oxygen/red(C)
new /obj/item/clothing/mask/breath(C)
else if(prob(33))
new /obj/item/clothing/suit/space/syndicate/blue(C)
new /obj/item/clothing/head/helmet/space/syndicate/blue(C)
new /obj/item/weapon/tank/oxygen/red(C)
new /obj/item/clothing/mask/breath(C)
else if(prob(50))
new /obj/item/clothing/suit/space/syndicate/green(C)
new /obj/item/clothing/head/helmet/space/syndicate/green(C)
new /obj/item/weapon/tank/oxygen/red(C)
new /obj/item/clothing/mask/breath(C)
else
new /obj/item/clothing/suit/space/syndicate/orange(C)
new /obj/item/clothing/head/helmet/space/syndicate/orange(C)
new /obj/item/weapon/tank/oxygen/red(C)
new /obj/item/clothing/mask/breath(C)
if("health")
//hopefully won't be necessary, but there were an awful lot of traps to get through...
var/obj/structure/closet/crate/medical/C = new(src.loc)
if(prob(50))
new /obj/item/weapon/storage/firstaid/regular(C)
if(prob(50))
new /obj/item/weapon/storage/firstaid/fire(C)
if(prob(50))
new /obj/item/weapon/storage/firstaid/o2(C)
if(prob(50))
new /obj/item/weapon/storage/firstaid/toxin(C)
if("snacks")
//you're come so far, you must be in need of refreshment
var/obj/structure/closet/crate/freezer/C = new(src.loc)
var/num = rand(2,6)
var/new_type = pick(
/obj/item/weapon/reagent_containers/food/drinks/cans/beer, \
/obj/item/weapon/reagent_containers/food/drinks/tea, \
/obj/item/weapon/reagent_containers/food/drinks/dry_ramen, \
/obj/item/weapon/reagent_containers/food/snacks/candiedapple, \
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar, \
/obj/item/weapon/reagent_containers/food/snacks/cookie, \
/obj/item/weapon/reagent_containers/food/snacks/meatball, \
/obj/item/weapon/reagent_containers/food/snacks/plump_pie, \
)
for(var/i=0,i<num,i++)
new new_type(C)
if("alien")
//ancient aliens
var/obj/structure/closet/acloset/C = new(src.loc)
if(prob(33))
//facehuggers
var/num = rand(1,3)
for(var/i=0,i<num,i++)
new /obj/item/clothing/mask/facehugger(C)
/*else if(prob(50))
//something else very much alive and angry
var/spawn_type = pick(/mob/living/simple_animal/hostile/alien, /mob/living/simple_animal/hostile/alien/drone, /mob/living/simple_animal/hostile/alien/sentinel)
new spawn_type(C)*/
//33% chance of nothing
if("lights")
//flares, candles, matches
var/obj/structure/closet/crate/secure/gear/C = new(src.loc)
var/num = rand(2,6)
for(var/i=0,i<num,i++)
var/spawn_type = pick(/obj/item/device/flashlight/flare, /obj/item/trash/candle, /obj/item/candle/, /obj/item/weapon/storage/box/matches)
new spawn_type(C)
if("engineering")
var/obj/structure/closet/crate/secure/gear/C = new(src.loc)
//chance to have any combination of up to two electrical/mechanical toolboxes and one cell
if(prob(33))
new /obj/item/weapon/storage/toolbox/electrical(C)
else if(prob(50))
new /obj/item/weapon/storage/toolbox/mechanical(C)
if(prob(33))
new /obj/item/weapon/storage/toolbox/mechanical(C)
else if(prob(50))
new /obj/item/weapon/storage/toolbox/electrical(C)
if(prob(25))
new /obj/item/weapon/stock_parts/cell(C)
if("coffin")
new /obj/structure/closet/coffin(src.loc)
if(prob(33))
new /obj/effect/decal/remains/human(src)
else if(prob(50))
new /obj/effect/decal/remains/xeno(src)
/*if("mimic")
//a guardian of the tomb!
new /mob/living/simple_animal/hostile/mimic/crate(src.loc)*/
if("viscerator")
//more tomb guardians!
var/num = rand(1,3)
var/obj/structure/closet/crate/secure/gear/C = new(src.loc)
for(var/i=0,i<num,i++)
new /mob/living/simple_animal/hostile/viscerator(C)
qdel(src)
/obj/effect/landmark/loot_spawn/low
name = "low prob loot spawner"
icon_state = "grabbed"
low_probability = 1
//********//
// Traps! //
//********//
/obj/effect/step_trigger/trap
name = "trap"
icon = 'code/modules/jungle/jungle.dmi'
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "trap"
var/trap_type
New()
trap_type = pick(50;"thrower","sawburst","poison_dart","flame_burst",10;"plasma_gas",5;"n2_gas")
if( (trap_type == "plasma_gas" || trap_type == "n2_gas") && prob(10))
new /obj/effect/glowshroom(src.loc)
//hint that this tile is dangerous
if(prob(90))
var/turf/T = get_turf(src)
T.desc = pick("There is a faint sheen of moisture over the top.","It looks a little unstable.","Something doesn't seem right.")
/obj/effect/step_trigger/trap/Trigger(var/atom/A)
var/mob/living/M = A
if(!istype(M))
return
switch(trap_type)
if("sawburst")
M << "\red <b>A sawblade shoots out of the ground and strikes you!</b>"
M.apply_damage(rand(5,10), BRUTE, sharp=1, edge=1)
var/atom/myloc = src.loc
var/image/flicker = image('code/modules/jungle/jungle.dmi',"sawblade")
myloc.overlays += flicker
spawn(8)
myloc.overlays -= flicker
qdel(flicker)
//flick("sawblade",src)
if("poison_dart")
M << "\red <b>You feel something small and sharp strike you!</b>"
M.apply_damage(rand(5,10), TOX)
var/atom/myloc = src.loc
var/image/flicker = image('code/modules/jungle/jungle.dmi',"dart[rand(1,3)]")
myloc.overlays += flicker
spawn(8)
myloc.overlays -= flicker
qdel(flicker)
//flick("dart[rand(1,3)]",src)
if("flame_burst")
M << "\red <b>A jet of fire comes out of nowhere!</b>"
M.apply_damage(rand(5,10), BURN)
var/atom/myloc = src.loc
var/image/flicker = image('code/modules/jungle/jungle.dmi',"flameburst")
myloc.overlays += flicker
spawn(8)
myloc.overlays -= flicker
qdel(flicker)
//flick("flameburst",src)
if("plasma_gas")
//spawn a bunch of plasma
if("n2_gas")
//spawn a bunch of sleeping gas
if("thrower")
//edited version of obj/effect/step_trigger/thrower
var/throw_dir = pick(1,2,4,8)
M.visible_message("\red <b>The floor under [M] suddenly tips upward!</b>","\red <b>The floor tips upward under you!</b>")
var/atom/myloc = src.loc
var/image/flicker = image('code/modules/jungle/jungle.dmi',"throw[throw_dir]")
myloc.overlays += flicker
var/turf/my_turf = get_turf(loc)
if(!my_turf.density)
my_turf.density = 1
spawn(8)
my_turf.density = 0
spawn(8)
myloc.overlays -= flicker
qdel(flicker)
var/dist = rand(1,5)
var/curtiles = 0
while(M)
if(curtiles >= dist)
break
if(M.z != src.z)
break
curtiles++
sleep(1)
var/predir = M.dir
step(M, throw_dir)
M.dir = predir
//gives turf a different description, to try and trick players
/obj/effect/step_trigger/trap/fake
icon_state = "faketrap"
name = "fake trap"
New()
if(prob(10))
new /obj/effect/glowshroom(src.loc)
if(prob(90))
var/turf/T = get_turf(src)
T.desc = pick("It looks a little dustier than the surrounding tiles.","It is somewhat ornate.","It looks a little darker than the surrounding tiles.")
qdel(src)
//50% chance of being a trap
/obj/effect/step_trigger/trap/fifty
icon_state = "trap"
name = "fifty fifty trap"
icon_state = "fiftytrap"
New()
if(prob(50))
..()
else
if(prob(10))
new /obj/effect/glowshroom(src.loc)
qdel(src)
-92
View File
@@ -1,92 +0,0 @@
/obj/item/projectile/jungle_spear
damage = 10
damage_type = TOX
icon_state = "bullet"
/obj/effect/jungle_tribe_spawn
name = "campfire"
desc = "Looks cosy, in an alien sort of way."
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "campfire"
anchored = 1
var/list/tribesmen = list()
var/list/enemy_players = list()
var/tribe_type = 1
/obj/effect/jungle_tribe_spawn/New()
processing_objects.Add(src)
tribe_type = rand(1,5)
var/num_tribesmen = rand(3,6)
for(var/i=0,i<num_tribesmen,i++)
var/mob/living/simple_animal/hostile/tribesman/T = new(src.loc)
T.my_type = tribe_type
T.x += rand(-6,6)
T.y += rand(-6,6)
tribesmen += T
/obj/effect/jungle_tribe_spawn/Destroy()
processing_objects.Remove(src)
return ..()
/obj/effect/jungle_tribe_spawn/process()
set background = 1
for(var/mob/living/simple_animal/hostile/tribesman/T in tribesmen)
if(T.stat == DEAD)
tribesmen.Remove(T)
spawn(rand(50,300))
var/mob/living/simple_animal/hostile/tribesman/B = new(src.loc)
B.my_type = tribe_type
B.x += rand(-4,4)
B.y += rand(-4,4)
tribesmen += B
/mob/living/simple_animal/hostile/tribesman
name = "tribesman"
desc = "A noble savage, doesn't seem to know what to make of you."
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "native1"
icon_living = "native1"
icon_dead = "native1_dead"
speak_chance = 25
speak = list("Rong a'hu dong'a sik?","Ahi set mep'a teth.","Ohen nek'ti ep esi.")
speak_emote = list("chatters")
emote_hear = list("chatters to themselves","chatters away at something","whistles")
emote_see = list("bends down to examine something")
melee_damage_lower = 5
melee_damage_upper = 15
turns_per_move = 1
stop_automated_movement_when_pulled = 0
var/my_type = 1
/mob/living/simple_animal/hostile/tribesman/New()
if(prob(33))
ranged = 1
spawn(8)
icon_state = "native[my_type]"
icon_living = "native[my_type]"
icon_dead = "native[my_type]_dead"
/mob/living/simple_animal/hostile/tribesman/ListTargets()
var/list/targets = list()
for(var/mob/living/simple_animal/hostile/H in view(src, 10))
if(istype(H, /mob/living/simple_animal/hostile/tribesman))
continue
targets += H
return targets
/mob/living/simple_animal/hostile/tribesman/FindTarget()
. = ..()
if(.)
emote("waves a spear at [.]")
/mob/living/simple_animal/hostile/tribesman/OpenFire(target_mob)
visible_message("\red <b>[src]</b> throws a spear at [target_mob]!", 1)
flick(src, "native[my_type]_act")
var/tturf = get_turf(target_mob)
Shoot(tturf, src.loc, src)
-178
View File
@@ -1,178 +0,0 @@
/turf/unsimulated/jungle
var/bushes_spawn = 1
var/plants_spawn = 1
name = "wet grass"
desc = "Thick, long wet grass"
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "grass1"
var/icon_spawn_state = "grass1"
luminosity = 3
New()
icon_state = icon_spawn_state
if(plants_spawn && prob(40))
if(prob(90))
var/image/I
if(prob(35))
I = image('code/modules/jungle/jungle.dmi',"plant[rand(1,7)]")
else
if(prob(30))
I = image('icons/obj/flora/ausflora.dmi',"reedbush_[rand(1,4)]")
else if(prob(33))
I = image('icons/obj/flora/ausflora.dmi',"leafybush_[rand(1,3)]")
else if(prob(50))
I = image('icons/obj/flora/ausflora.dmi',"fernybush_[rand(1,3)]")
else
I = image('icons/obj/flora/ausflora.dmi',"stalkybush_[rand(1,3)]")
I.pixel_x = rand(-6,6)
I.pixel_y = rand(-6,6)
overlays += I
else
var/obj/structure/jungle_plant/J = new(src)
J.pixel_x = rand(-6,6)
J.pixel_y = rand(-6,6)
if(bushes_spawn && prob(90))
new /obj/structure/bush(src)
/turf/unsimulated/jungle/clear
bushes_spawn = 0
plants_spawn = 0
icon_state = "grass_clear"
icon_spawn_state = "grass3"
/turf/unsimulated/jungle/path
bushes_spawn = 0
name = "wet grass"
desc = "thick, long wet grass"
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "grass_path"
icon_spawn_state = "grass2"
New()
..()
for(var/obj/structure/bush/B in src)
qdel(B)
/turf/unsimulated/jungle/proc/Spread(var/probability, var/prob_loss = 50)
if(probability <= 0)
return
//world << "\blue Spread([probability])"
for(var/turf/unsimulated/jungle/J in orange(1, src))
if(!J.bushes_spawn)
continue
var/turf/unsimulated/jungle/P = null
if(J.type == src.type)
P = J
else
P = new src.type(J)
if(P && prob(probability))
P.Spread(probability - prob_loss)
/turf/unsimulated/jungle/impenetrable
bushes_spawn = 0
icon_state = "grass_impenetrable"
icon_spawn_state = "grass1"
New()
..()
var/obj/structure/bush/B = new(src)
B.indestructable = 1
//copy paste from asteroid mineral turfs
/turf/unsimulated/jungle/rock
bushes_spawn = 0
plants_spawn = 0
density = 1
name = "rock wall"
icon = 'icons/turf/walls.dmi'
icon_state = "rock"
icon_spawn_state = "rock"
/turf/unsimulated/jungle/rock/New()
spawn(1)
var/turf/T
if(!istype(get_step(src, NORTH), /turf/unsimulated/jungle/rock) && !istype(get_step(src, NORTH), /turf/unsimulated/wall))
T = get_step(src, NORTH)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_s")
if(!istype(get_step(src, SOUTH), /turf/unsimulated/jungle/rock) && !istype(get_step(src, SOUTH), /turf/unsimulated/wall))
T = get_step(src, SOUTH)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_n", layer=6)
if(!istype(get_step(src, EAST), /turf/unsimulated/jungle/rock) && !istype(get_step(src, EAST), /turf/unsimulated/wall))
T = get_step(src, EAST)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6)
if(!istype(get_step(src, WEST), /turf/unsimulated/jungle/rock) && !istype(get_step(src, WEST), /turf/unsimulated/wall))
T = get_step(src, WEST)
if (T)
T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6)
/turf/unsimulated/jungle/water
bushes_spawn = 0
name = "murky water"
desc = "thick, murky water"
icon = 'icons/misc/beach.dmi'
icon_state = "water"
icon_spawn_state = "water"
/turf/unsimulated/jungle/water/New()
..()
for(var/obj/structure/bush/B in src)
qdel(B)
/turf/unsimulated/jungle/water/Entered(atom/movable/O)
..()
if(istype(O, /mob/living/))
var/mob/living/M = O
//slip in the murky water if we try to run through it
if(prob(10 + (M.m_intent == "run" ? 40 : 0)))
M << pick("\blue You slip on something slimy.","\blue You fall over into the murk.")
M.Stun(2)
M.Weaken(1)
//piranhas - 25% chance to be an omnipresent risk, although they do practically no damage
if(prob(25))
M << "\blue You feel something slithering around your legs."
if(prob(50))
spawn(rand(25,50))
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE, sharp=1)
if(prob(50))
spawn(rand(25,50))
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE, sharp=1)
if(prob(50))
spawn(rand(25,50))
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE, sharp=1)
if(prob(50))
spawn(rand(25,50))
var/turf/T = get_turf(M)
if(istype(T, /turf/unsimulated/jungle/water))
M << pick("\red Something sharp bites you!","\red Sharp teeth grab hold of you!","\red You feel something take a chunk out of your leg!")
M.apply_damage(rand(0,1), BRUTE, sharp=1)
/turf/unsimulated/jungle/water/deep
plants_spawn = 0
density = 1
icon_state = "water2"
icon_spawn_state = "water2"
/turf/unsimulated/jungle/temple_wall
name = "temple wall"
desc = ""
density = 1
icon = 'icons/turf/walls.dmi'
icon_state = "plasma0"
var/mineral = "plasma"
-123
View File
@@ -1,123 +0,0 @@
//put this here because i needed specific functionality, and i wanted to avoid the hassle of getting it onto svn
/area/proc/copy_turfs_to(var/area/A , var/platingRequired = 0 )
//Takes: Area. Optional: If it should copy to areas that don't have plating
//Returns: Nothing.
//Notes: Attempts to move the contents of one area to another area.
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
if(!A || !src) return 0
var/list/turfs_src = get_area_turfs(src.type)
var/list/turfs_trg = get_area_turfs(A.type)
var/src_min_x = 0
var/src_min_y = 0
for (var/turf/T in turfs_src)
if(T.x < src_min_x || !src_min_x) src_min_x = T.x
if(T.y < src_min_y || !src_min_y) src_min_y = T.y
var/trg_min_x = 0
var/trg_min_y = 0
for (var/turf/T in turfs_trg)
if(T.x < trg_min_x || !trg_min_x) trg_min_x = T.x
if(T.y < trg_min_y || !trg_min_y) trg_min_y = T.y
var/list/refined_src = new/list()
for(var/turf/T in turfs_src)
refined_src += T
refined_src[T] = new/datum/coords
var/datum/coords/C = refined_src[T]
C.x_pos = (T.x - src_min_x)
C.y_pos = (T.y - src_min_y)
var/list/refined_trg = new/list()
for(var/turf/T in turfs_trg)
refined_trg += T
refined_trg[T] = new/datum/coords
var/datum/coords/C = refined_trg[T]
C.x_pos = (T.x - trg_min_x)
C.y_pos = (T.y - trg_min_y)
var/list/toupdate = new/list()
var/copiedobjs = list()
moving:
for (var/turf/T in refined_src)
var/datum/coords/C_src = refined_src[T]
for (var/turf/B in refined_trg)
var/datum/coords/C_trg = refined_trg[B]
if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
var/old_dir1 = T.dir
var/old_icon_state1 = T.icon_state
var/old_icon1 = T.icon
if(platingRequired)
if(istype(B, /turf/space))
continue moving
var/turf/X = new T.type(B)
X.dir = old_dir1
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
var/list/mobs = new/list()
var/list/newmobs = new/list()
for(var/mob/M in T)
if(!M.move_on_shuttle)
continue // If we need to check for more mobs, I'll add a variable
mobs += M
for(var/mob/M in mobs)
newmobs += DuplicateObject(M , 1)
for(var/mob/M in newmobs)
M.loc = X
for(var/V in T.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
X.vars[V] = T.vars[V]
// var/area/AR = X.loc
// if(AR.lighting_use_dynamic)
// X.opacity = !X.opacity
// X.sd_set_opacity(!X.opacity) //TODO: rewrite this code so it's not messed by lighting ~Carn
toupdate += X
refined_src -= T
refined_trg -= B
continue moving
/*var/list/doors = new/list()
if(toupdate.len)
for(var/turf/simulated/T1 in toupdate)
for(var/obj/machinery/door/D2 in T1)
doors += D2
if(T1.parent)
air_master.groups_to_rebuild += T1.parent
else
air_master.tiles_to_update += T1
for(var/obj/O in doors)
O:update_nearby_tiles(1)*/
return copiedobjs
@@ -88,22 +88,6 @@
return screen
*/
/obj/machinery/light_switch/power_change()
if(powered(LIGHT))
stat &= ~NOPOWER
else
stat |= NOPOWER
updateicon()
/obj/machinery/light_switch/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
power_change()
..(severity)
/obj/machinery/media/transmitter/broadcast/update_icon()
overlays = 0
if(stat & (NOPOWER|BROKEN))
-1
View File
@@ -534,7 +534,6 @@
return
var/chosen_beacon = pick(L)
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon)
J.target = chosen_beacon
try_move_adjacent(J)
playsound(src,'sound/effects/sparks4.ogg',50,1)
qdel(src)
+37 -14
View File
@@ -28,7 +28,6 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
var/ghostvision = 1 //is the ghost able to see things humans can't?
var/seedarkness = 1
var/data_hud_seen = 0 //this should one of the defines in __DEFINES/hud.dm
var/medhud = 0
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -254,19 +253,34 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 1
/mob/dead/observer/proc/show_me_the_hud(hud_index)
var/datum/atom_hud/H = huds[hud_index]
H.add_hud_to(src)
data_hud_seen = hud_index
/mob/dead/observer/verb/toggle_medHUD()
set category = "Ghost"
set name = "Toggle MedicHUD"
set name = "Toggle Medic/Sec/DiagHUD"
set desc = "Toggles the medical HUD."
if(!client)
return
var/datum/atom_hud/H = huds[DATA_HUD_MEDICAL_BASIC]
H.remove_hud_from(src)//out with the old..
if(medhud==0)//TOGGLE!
medhud = 1
H.add_hud_to(src)
else
medhud = 0
if(data_hud_seen) //remove old huds
var/datum/atom_hud/H = huds[data_hud_seen]
H.remove_hud_from(src)
switch(data_hud_seen) //give new huds
if(0)
show_me_the_hud(DATA_HUD_SECURITY_BASIC)
src << "<span class='notice'>Security HUD set.</span>"
if(DATA_HUD_SECURITY_BASIC)
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
src << "<span class='notice'>Medical HUD set.</span>"
if(DATA_HUD_MEDICAL_ADVANCED)
show_me_the_hud(DATA_HUD_DIAGNOSTIC)
src << "<span class='notice'>Diagnostic HUD set.</span>"
if(DATA_HUD_DIAGNOSTIC)
data_hud_seen = 0
src << "<span class='notice'>HUDs disabled.</span>"
/mob/dead/observer/verb/toggle_antagHUD()
@@ -291,12 +305,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!M.has_enabled_antagHUD && !check_rights(R_ADMIN|R_MOD,0))
M.has_enabled_antagHUD = 1
var/datum/atom_hud/A = huds[DATA_HUD_SECURITY_ADVANCED]
var/adding_hud = (usr in A.hudusers) ? 0 : 1
//var/datum/atom_hud/A = huds[DATA_HUD_SECURITY_ADVANCED]
//var/adding_hud = (usr in A.hudusers) ? 0 : 1
for(var/datum/atom_hud/H in huds)
if(istype(H, /datum/atom_hud/antag) || istype(H, /datum/atom_hud/data/human/security/advanced))
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
if(istype(H, /datum/atom_hud/antag))// || istype(H, /datum/atom_hud/data/human/security/advanced))
if(!M.antagHUD)
//(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
H.add_hud_to(usr)
else
H.remove_hud_from(usr)
if(!M.antagHUD)
usr << "AntagHud Toggled ON"
M.antagHUD = 1
else
usr << "AntagHud Toggled OFF"
M.antagHUD = 0
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
set category = "Ghost"
+1 -1
View File
@@ -93,4 +93,4 @@
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
handle_hud_icons_health()
handle_hud_icons_health()
@@ -54,19 +54,24 @@
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PAI
// This should not ever happen, but let's be safe
/obj/item/device/mmi/posibrain/dropbrain(var/turf/dropspot)
log_to_dd("[src] at [loc] attempted to drop brain without a contained brain.")
return
/obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
name = "positronic brain ([H])"
brainmob.name = H.real_name
brainmob.real_name = H.real_name
brainmob.dna = H.dna
if(isnull(brainmob.dna))
brainmob.dna = H.dna.Clone()
brainmob.name = brainmob.dna.real_name
brainmob.real_name = brainmob.name
brainmob.timeofhostdeath = H.timeofdeath
brainmob.stat = 0
brainmob.stat = CONSCIOUS
if(brainmob.mind)
brainmob.mind.assigned_role = "Positronic Brain"
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
brainmob << "<span class='notice'>You feel slightly disoriented. That's normal when you're just a metal cube.</span>"
icon_state = "posibrain-occupied"
return
@@ -118,6 +118,7 @@
"l_foot" = list("path" = /obj/item/organ/external/foot),
"r_foot" = list("path" = /obj/item/organ/external/foot/right)
)
var/cyborg_type = "Cyborg"
/datum/species/New()
//If the species has eyes, they are the default vision organ
@@ -601,3 +602,12 @@
H.bodytemp.icon_state = "temp0"
return 1
/*
Returns the path corresponding to the corresponding organ
It'll return null if the organ doesn't correspond, so include null checks when using this!
*/
/datum/species/proc/return_organ(var/organ_slot)
if(!(organ_slot in has_organ))
return null
return has_organ[organ_slot]
@@ -579,6 +579,7 @@
if(isliving(held))
data["holder"] = held
data["health"] = "[held.stat > 1 ? "dead" : "[held.health]% healthy"]"
data["brute"] = "[held.getBruteLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][held.getBruteLoss()]</font>"
data["oxy"] = "[held.getOxyLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][held.getOxyLoss()]</font>"
data["tox"] = "[held.getToxLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][held.getToxLoss()]</font>"
data["burn"] = "[held.getFireLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][held.getFireLoss()]</font>"
@@ -54,20 +54,26 @@
set desc = "Release an item from your magnetic gripper."
set category = "Drone"
drop_item_p()
// The "p" stands for proc, since I was having annoying weird stuff happening with this in the verb
// when trying to have default values for arguments and stuff
/obj/item/weapon/gripper/proc/drop_item_p(var/silent = 0)
if(!wrapped)
//There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z
for(var/obj/item/thing in src.contents)
thing.loc = get_turf(src)
thing.forceMove(get_turf(src))
return
if(wrapped.loc != src)
wrapped = null
return
src.loc << "\red You drop \the [wrapped]."
wrapped.loc = get_turf(src)
if(!silent)
src.loc << "<span class='warning'>You drop \the [wrapped].</span>"
wrapped.forceMove(get_turf(src))
wrapped = null
//update_icon()
/obj/item/weapon/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
return
@@ -86,7 +92,7 @@
if(wrapped) //Already have an item.
//Temporary put wrapped into user so target's attackby() checks pass.
wrapped.loc = user
wrapped.forceMove(user)
//Pass the attack on to the target. This might delete/relocate wrapped.
if(!target.attackby(wrapped, user, params) && target && wrapped)
@@ -96,7 +102,7 @@
//If wrapped did neither get deleted nor put into target, put it back into the gripper.
if(wrapped && user && (wrapped.loc == user))
wrapped.loc = src
wrapped.forceMove(src)
else
wrapped = null
return
@@ -119,11 +125,11 @@
//We can grab the item, finally.
if(grab)
user << "You collect \the [I]."
I.loc = src
I.forceMove(src)
wrapped = I
return
else
user << "\red Your gripper cannot hold \the [target]."
user << "<span class='warning'>Your gripper cannot hold \the [target].</span>"
else if(istype(target,/obj/machinery/power/apc))
var/obj/machinery/power/apc/A = target
@@ -134,13 +140,13 @@
A.cell.add_fingerprint(user)
A.cell.updateicon()
A.cell.loc = src
A.cell.forceMove(src)
A.cell = null
A.charging = 0
A.update_icon()
user.visible_message("\red [user] removes the power cell from [A]!", "You remove the power cell.")
user.visible_message("<span class='warning'>[user] removes the power cell from [A]!</span>", "You remove the power cell.")
//TODO: Matter decompiler.
/obj/item/weapon/matter_decompiler
@@ -175,7 +181,7 @@
for(var/mob/M in T)
if(istype(M,/mob/living/simple_animal/lizard) || istype(M,/mob/living/simple_animal/mouse))
src.loc.visible_message("\red [src.loc] sucks [M] into its decompiler. There's a horrible crunching noise.","\red It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises.")
src.loc.visible_message("<span class='notice'>[src.loc] sucks [M] into its decompiler. There's a horrible crunching noise.</span>","<span class='warning'>It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises.</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
qdel(M)
stored_comms["wood"]++
@@ -191,15 +197,15 @@
if(!istype(D))
return
D << "\red You begin decompiling the other drone."
D << "<span class='warning'>You begin decompiling the other drone.</span>"
if(!do_after(D,50, target = target))
D << "\red You need to remain still while decompiling such a large object."
D << "<span class='warning'>You need to remain still while decompiling such a large object.</span>"
return
if(!M || !D) return
D << "\red You carefully and thoroughly decompile your downed fellow, storing as much of its resources as you can within yourself."
D << "<span class='warning'>You carefully and thoroughly decompile your downed fellow, storing as much of its resources as you can within yourself.</span>"
qdel(M)
new/obj/effect/decal/cleanable/blood/oil(get_turf(src))
@@ -272,16 +278,16 @@
grabbed_something = 1
if(grabbed_something)
user << "\blue You deploy your decompiler and clear out the contents of \the [T]."
user << "<span class='notice'>You deploy your decompiler and clear out the contents of \the [T].<span>"
else
user << "\red Nothing on \the [T] is useful to you."
user << "<span class='warning'>Nothing on \the [T] is useful to you.</span>"
return
//PRETTIER TOOL LIST.
/mob/living/silicon/robot/drone/installed_modules()
if(weapon_lock)
src << "\red Weapon lock active, unable to use modules! Count:[weaponlock_time]"
src << "<span class='warning'>Weapon lock active, unable to use modules! Count:[weaponlock_time]</span>"
return
if(!module)
@@ -109,6 +109,13 @@
else
return 0
/mob/living/silicon/robot/drop_item()
var/obj/item/I = get_active_hand()
if(istype(I, /obj/item/weapon/gripper))
var/obj/item/weapon/gripper/G = I
G.drop_item_p(silent = 1)
return
//Helper procs for cyborg modules on the UI.
//These are hackish but they help clean up code elsewhere.
@@ -8,4 +8,5 @@
if(mind) ticker.mode.remove_revolutionary(mind)
if(mind) ticker.mode.remove_thrall(mind,0)
if(mind) ticker.mode.remove_shadowling(mind)
if(mind) ticker.mode.remove_changeling(mind)
return
@@ -131,7 +131,7 @@
if("head")
if(inventory_head)
if(inventory_head.flags & NODROP)
usr << "<span = 'warning'>\The [inventory_head] is stuck too hard to [src] for you to remove!</span>"
usr << "<span class='warning'>\The [inventory_head] is stuck too hard to [src] for you to remove!</span>"
return
name = real_name
desc = initial(desc)
@@ -150,7 +150,7 @@
if("back")
if(inventory_back)
if(inventory_back.flags & NODROP)
usr << "<span = 'warning'>\The [inventory_back] is stuck too hard to [src] for you to remove!</span>"
usr << "<span class='warning'>\The [inventory_back] is stuck too hard to [src] for you to remove!</span>"
return
inventory_back.loc = src.loc
inventory_back = null
@@ -1,49 +1,3 @@
//spawns one of the specified animal type
/obj/effect/landmark/animal_spawner
icon_state = "x3"
var/spawn_type
var/mob/living/spawned_animal
invisibility = 101
/obj/effect/landmark/animal_spawner/New()
if(!spawn_type)
var/new_type = pick(subtypesof(/obj/effect/landmark/animal_spawner))
new new_type(get_turf(src))
qdel(src)
processing_objects.Add(src)
spawned_animal = new spawn_type(get_turf(src))
/obj/effect/landmark/animal_spawner/process()
//if any of our animals are killed, spawn new ones
if(!spawned_animal || spawned_animal.stat == DEAD)
spawned_animal = new spawn_type(src)
//after a random timeout, and in a random position (6-30 seconds)
spawn(rand(1200,2400))
spawned_animal.loc = locate(src.x + rand(-12,12), src.y + rand(-12,12), src.z)
/obj/effect/landmark/animal_spawner/Destroy()
processing_objects.Remove(src)
return ..()
/obj/effect/landmark/animal_spawner/panther
name = "panther spawner"
spawn_type = /mob/living/simple_animal/hostile/panther
/obj/effect/landmark/animal_spawner/parrot
name = "parrot spawner"
spawn_type = /mob/living/simple_animal/parrot
/obj/effect/landmark/animal_spawner/monkey
name = "monkey spawner"
spawn_type = /mob/living/carbon/human/monkey
/obj/effect/landmark/animal_spawner/snake
name = "snake spawner"
spawn_type = /mob/living/simple_animal/hostile/snake
//*********//
// Panther //
//*********//
@@ -112,7 +66,6 @@
/mob/living/simple_animal/hostile/snake
name = "snake"
desc = "A sinuously coiled, venomous looking reptile."
icon = 'code/modules/jungle/jungle.dmi'
icon_state = "snake"
icon_living = "snake"
icon_dead = "snake_dead"
@@ -368,81 +368,101 @@
//////END VG HAIRSTYLES///////
//////////////////////////////
icp_screen_pink
ipc_screen_pink
name = "pink IPC screen"
icon_state = "ipc_pink"
species_allowed = list("Machine")
icp_screen_red
ipc_screen_red
name = "red IPC screen"
icon_state = "ipc_red"
species_allowed = list("Machine")
icp_screen_green
ipc_screen_green
name = "green IPC screen"
icon_state = "ipc_green"
species_allowed = list("Machine")
icp_screen_blue
ipc_screen_blue
name = "blue IPC screen"
icon_state = "ipc_blue"
species_allowed = list("Machine")
icp_screen_breakout
ipc_screen_breakout
name = "breakout IPC screen"
icon_state = "ipc_breakout"
species_allowed = list("Machine")
icp_screen_eight
ipc_screen_eight
name = "eight IPC screen"
icon_state = "ipc_eight"
species_allowed = list("Machine")
icp_screen_goggles
ipc_screen_goggles
name = "goggles IPC screen"
icon_state = "ipc_goggles"
species_allowed = list("Machine")
icp_screen_heart
ipc_screen_heart
name = "heart IPC screen"
icon_state = "ipc_heart"
species_allowed = list("Machine")
icp_screen_monoeye
ipc_screen_monoeye
name = "monoeye IPC screen"
icon_state = "ipc_monoeye"
species_allowed = list("Machine")
icp_screen_nature
ipc_screen_nature
name = "nature IPC screen"
icon_state = "ipc_nature"
species_allowed = list("Machine")
icp_screen_orange
ipc_screen_orange
name = "orange IPC screen"
icon_state = "ipc_orange"
species_allowed = list("Machine")
icp_screen_purple
ipc_screen_purple
name = "purple IPC screen"
icon_state = "ipc_purple"
species_allowed = list("Machine")
icp_screen_shower
ipc_screen_shower
name = "shower IPC screen"
icon_state = "ipc_shower"
species_allowed = list("Machine")
icp_screen_static
ipc_screen_static
name = "static IPC screen"
icon_state = "ipc_static"
species_allowed = list("Machine")
icp_screen_yellow
ipc_screen_yellow
name = "yellow IPC screen"
icon_state = "ipc_yellow"
species_allowed = list("Machine")
ipc_screen_scrolling
name = "scanline IPC screen"
icon_state = "ipc_scroll"
species_allowed = list("Machine")
ipc_screen_console
name = "console IPC screen"
icon_state = "ipc_console"
species_allowed = list("Machine")
ipc_screen_rgb
name = "rgb IPC screen"
icon_state = "ipc_rgb"
species_allowed = list("Machine")
ipc_screen_glider
name = "glider IPC screen"
icon_state = "ipc_gol_glider"
species_allowed = list("Machine")
/*
///////////////////////////////////
/ =---------------------------= /
+1 -1
View File
@@ -161,7 +161,7 @@
O.job = "Cyborg"
O.notify_ai(1)
if(O.mind.assigned_role == "Cyborg")
if(O.mind && O.mind.assigned_role == "Cyborg")
if(O.mind.role_alt_title == "Android")
O.mmi = new /obj/item/device/mmi/posibrain(O)
else if(O.mind.role_alt_title == "Robot")
+18 -7
View File
@@ -19,6 +19,8 @@ and reset all of its vars to their default
You can override your object's destroy to return QDEL_HINT_PUTINPOOL
to ensure its always placed in this pool (this will only be acted on if qdel calls destroy, and destroy will not get called twice)
For almost all pooling purposes, it is better to use the QDEL hint than to pool it directly with PlaceInPool
*/
var/global/list/GlobalPool = list()
@@ -94,15 +96,24 @@ var/global/list/GlobalPool = list()
diver.ResetVars()
var/list/exclude = list("animate_movement", "contents", "loc", "locs", "parent_type", "vars", "verbs", "type")
var/list/pooledvariables = list()
//thanks to clusterfack @ /vg/station for these two procs
/datum/proc/createVariables()
pooledvariables[type] = new/list()
var/list/exclude = global.exclude + args
for(var/key in vars)
if(key in exclude)
continue
pooledvariables[type][key] = initial(vars[key])
/datum/proc/ResetVars()
var/list/excluded = list("animate_movement", "contents", "loc", "locs", "parent_type", "vars", "verbs", "type")
if(!pooledvariables[type])
createVariables(args)
for(var/V in vars)
if(V in excluded)
continue
vars[V] = initial(vars[V])
for(var/key in pooledvariables[type])
vars[key] = pooledvariables[type][key]
/atom/movable/ResetVars()
..()
@@ -111,4 +122,4 @@ var/global/list/GlobalPool = list()
/image/ResetVars()
..()
loc = null
loc = null
@@ -1,6 +1,6 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/obj/machinery/containment_field
/obj/machinery/field/containment
name = "Containment Field"
desc = "An energy field."
icon = 'icons/obj/singularity.dmi'
@@ -10,64 +10,111 @@
unacidable = 1
use_power = 0
light_range = 4
var/obj/machinery/field_generator/FG1 = null
var/obj/machinery/field_generator/FG2 = null
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
layer = OBJ_LAYER + 0.1
var/obj/machinery/field/generator/FG1 = null
var/obj/machinery/field/generator/FG2 = null
/obj/machinery/containment_field/Destroy()
/obj/machinery/field/containment/Destroy()
if(FG1 && !FG1.clean_up)
FG1.cleanup()
if(FG2 && !FG2.clean_up)
FG2.cleanup()
return ..()
/obj/machinery/containment_field/attack_hand(mob/user as mob)
/obj/machinery/field/containment/attack_hand(mob/user)
if(get_dist(src, user) > 1)
return 0
else
shock(user)
shock_field(user)
return 1
/obj/machinery/containment_field/blob_act()
/obj/machinery/field/containment/blob_act()
return 0
/obj/machinery/containment_field/ex_act(severity)
/obj/machinery/field/containment/ex_act(severity)
return 0
/obj/machinery/containment_field/HasProximity(atom/movable/AM as mob|obj)
if(istype(AM,/mob/living/silicon) && prob(40))
shock(AM)
return 1
if(istype(AM,/mob/living/carbon) && prob(50))
shock(AM)
return 1
return 0
/obj/machinery/field/containment/Crossed(mob/mover)
if(isliving(mover))
shock_field(mover)
/obj/machinery/containment_field/shock(mob/living/user as mob)
if(hasShocked)
return 0
if(!FG1 || !FG2)
qdel(src)
return 0
if(isliving(user))
hasShocked = 1
var/shock_damage = min(rand(30,40),rand(30,40))
user.electrocute_act(shock_damage, src)
/obj/machinery/field/containment/Crossed(obj/mover)
if(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha))
bump_field(mover)
var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src)))
user.throw_at(target, 200, 4)
sleep(20)
hasShocked = 0
return
/obj/machinery/containment_field/proc/set_master(var/master1,var/master2)
/obj/machinery/field/containment/proc/set_master(master1,master2)
if(!master1 || !master2)
return 0
FG1 = master1
FG2 = master2
return 1
/obj/machinery/field/containment/shock_field(mob/living/user)
if(!FG1 || !FG2)
qdel(src)
return 0
..()
/obj/machinery/field/containment/Move()
qdel(src)
// Abstract Field Class
// Used for overriding certain procs
/obj/machinery/field
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
/obj/machinery/field/CanPass(mob/mover, turf/target, height=0)
if(isliving(mover)) // Don't let mobs through
shock_field(mover)
return 0
return ..()
/obj/machinery/field/CanPass(obj/mover, turf/target, height=0)
if((istype(mover, /obj/machinery) && !istype(mover, /obj/singularity)) || \
istype(mover, /obj/structure) || \
istype(mover, /obj/mecha))
bump_field(mover)
return 0
return ..()
/obj/machinery/field/proc/shock_field(mob/living/user)
if(hasShocked)
return 0
if(isliving(user))
hasShocked = 1
var/shock_damage = min(rand(30,40),rand(30,40))
if(iscarbon(user))
var/stun = min(shock_damage, 15)
user.Stun(stun)
user.Weaken(10)
user.burn_skin(shock_damage)
user.visible_message("<span class='danger'>[user.name] was shocked by the [src.name]!</span>", \
"<span class='userdanger'>You feel a powerful shock course through your body, sending you flying!</span>", \
"<span class='italics'>You hear a heavy electrical crack.</span>")
else if(issilicon(user))
if(prob(20))
user.Stun(2)
user.take_overall_damage(0, shock_damage)
user.visible_message("<span class='danger'>[user.name] was shocked by the [src.name]!</span>", \
"<span class='userdanger'>Energy pulse detected, system damaged!</span>", \
"<span class='italics'>You hear an electrical crack.</span>")
user.updatehealth()
bump_field(user)
spawn(5)
hasShocked = 0
return
/obj/machinery/field/proc/bump_field(atom/movable/AM as mob|obj)
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(5, 1, AM.loc)
s.start()
var/atom/target = get_edge_target_turf(AM, get_dir(src, get_step_away(AM, src)))
AM.throw_at(target, 200, 4)
@@ -13,7 +13,7 @@ field_generator power level display
*/
#define field_generator_max_power 250
/obj/machinery/field_generator
/obj/machinery/field/generator
name = "Field Generator"
desc = "A large thermal battery that projects a high amount of energy when powered."
icon = 'icons/obj/machines/field_generator.dmi'
@@ -28,37 +28,36 @@ field_generator power level display
var/power = 20 // Current amount of power
var/state = 0
var/warming_up = 0
var/list/obj/machinery/containment_field/fields
var/list/obj/machinery/field_generator/connected_gens
var/list/obj/machinery/field/containment/fields
var/list/obj/machinery/field/generator/connected_gens
var/clean_up = 0
/obj/machinery/field_generator/update_icon()
/obj/machinery/field/generator/update_icon()
overlays.Cut()
if(!active)
if(warming_up)
overlays += "+a[warming_up]"
if(warming_up)
overlays += "+a[warming_up]"
if(fields.len)
overlays += "+on"
// Power level indicator
// Scale % power to % num_power_levels and truncate value
var/level = round(num_power_levels * power / field_generator_max_power)
// Clamp between 0 and num_power_levels for out of range power values
level = between(0, level, num_power_levels)
level = Clamp(level, 0, num_power_levels)
if(level)
overlays += "+p[level]"
return
/obj/machinery/field_generator/New()
/obj/machinery/field/generator/New()
..()
fields = list()
connected_gens = list()
return
/obj/machinery/field_generator/process()
/obj/machinery/field/generator/process()
if(Varedit_start == 1)
if(active == 0)
active = 1
@@ -76,116 +75,117 @@ field_generator power level display
return
/obj/machinery/field_generator/attack_hand(mob/user as mob)
/obj/machinery/field/generator/attack_hand(mob/user)
if(state == 2)
if(get_dist(src, user) <= 1)//Need to actually touch the thing to turn it on
if(src.active >= 1)
user << "You are unable to turn off the [src.name] once it is online."
user << "<span class='warning'>You are unable to turn off the [src.name] once it is online!</span>"
return 1
else
user.visible_message("[user.name] turns on the [src.name]", \
"You turn on the [src.name].", \
"You hear heavy droning")
user.visible_message("[user.name] turns on the [src.name].", \
"<span class='notice'>You turn on the [src.name].</span>", \
"<span class='italics'>You hear heavy droning.</span>")
turn_on()
investigate_log("<font color='green'>activated</font> by [user.key].","singulo")
src.add_fingerprint(user)
else
user << "The [src] needs to be firmly secured to the floor first."
user << "<span class='warning'>The [src] needs to be firmly secured to the floor first!</span>"
return
/obj/machinery/field_generator/attackby(obj/item/W, mob/user, params)
/obj/machinery/field/generator/attackby(obj/item/W, mob/user, params)
if(active)
user << "The [src] needs to be off."
user << "<span class='warning'>The [src] needs to be off!</span>"
return
else if(istype(W, /obj/item/weapon/wrench))
switch(state)
if(0)
if(isinspace()) return
state = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the external reinforcing bolts to the floor.", \
"You hear ratchet")
"<span class='notice'>You secure the external reinforcing bolts to the floor.</span>", \
"<span class='italics'>You hear ratchet.</span>")
src.anchored = 1
if(1)
state = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
"You undo the external reinforcing bolts.", \
"You hear ratchet")
"<span class='notice'>You undo the external reinforcing bolts.</span>", \
"<span class='italics'>You hear ratchet.</span>")
src.anchored = 0
if(2)
user << "\red The [src.name] needs to be unwelded from the floor."
user << "<span class='warning'>The [src.name] needs to be unwelded from the floor!</span>"
return
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
switch(state)
if(0)
user << "\red The [src.name] needs to be wrenched to the floor."
user << "<span class='warning'>The [src.name] needs to be wrenched to the floor!</span>"
return
if(1)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"You start to weld the [src] to the floor.", \
"You hear welding")
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if (do_after(user,20, target = src))
if(!src || !WT.isOn()) return
state = 2
user << "You weld the field generator to the floor."
user << "<span class='notice'>You weld the field generator to the floor.</span>"
else
return
if(2)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"You start to cut the [src] free from the floor.", \
"You hear welding")
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if (do_after(user,20, target = src))
if(!src || !WT.isOn()) return
state = 1
user << "You cut the [src] free from the floor."
user << "<span class='notice'>You cut \the [src] free from the floor.</span>"
else
return
else
..()
return
/obj/machinery/field_generator/emp_act()
/obj/machinery/field/generator/emp_act()
return 0
/obj/machinery/field_generator/blob_act()
/obj/machinery/field/generator/blob_act()
if(active)
return 0
else
..()
/obj/machinery/field_generator/bullet_act(var/obj/item/projectile/Proj)
/obj/machinery/field/generator/bullet_act(obj/item/projectile/Proj)
if(Proj.flag != "bullet")
power += Proj.damage
update_icon()
return 0
/obj/machinery/field_generator/Destroy()
/obj/machinery/field/generator/Destroy()
src.cleanup()
return ..()
/obj/machinery/field_generator/proc/turn_off()
/obj/machinery/field/generator/proc/turn_off()
active = 0
spawn(1)
src.cleanup()
update_icon()
while (warming_up>0 && !active)
sleep(50)
warming_up--
update_icon()
/obj/machinery/field_generator/proc/turn_on()
/obj/machinery/field/generator/proc/turn_on()
active = 1
warming_up = 1
spawn(1)
while (warming_up<3 && active)
sleep(50)
@@ -193,10 +193,9 @@ field_generator power level display
update_icon()
if(warming_up >= 3)
start_fields()
update_icon()
/obj/machinery/field_generator/proc/calc_power()
/obj/machinery/field/generator/proc/calc_power()
if(Varpower)
return 1
@@ -205,22 +204,21 @@ field_generator power level display
src.power = field_generator_max_power
var/power_draw = 2
for (var/obj/machinery/containment_field/F in fields)
for (var/obj/machinery/field/containment/F in fields)
if (isnull(F))
continue
power_draw++
if(draw_power(round(power_draw/2,1)))
return 1
else
for(var/mob/M in viewers(src))
M.show_message("\red The [src.name] shuts down!")
visible_message("<span class='danger'>The [src.name] shuts down!</span>", "<span class='italics'>You hear something shutting down.</span>")
turn_off()
investigate_log("ran out of power and <font color='red'>deactivated</font>","singulo")
src.power = 0
return 0
//This could likely be better, it tends to start loopin if you have a complex generator loop setup. Still works well enough to run the engine fields will likely recode the field gens and fields sometime -Mport
/obj/machinery/field_generator/proc/draw_power(var/draw = 0, var/failsafe = 0, var/obj/machinery/field_generator/G = null, var/obj/machinery/field_generator/last = null)
/obj/machinery/field/generator/proc/draw_power(draw = 0, failsafe = 0, obj/machinery/field/generator/G = null, obj/machinery/field/generator/last = null)
if(Varpower)
return 1
if((G && G == src) || (failsafe >= 8))//Loopin, set fail
@@ -233,7 +231,7 @@ field_generator power level display
else//Need more power
draw -= src.power
src.power = 0
for(var/obj/machinery/field_generator/FG in connected_gens)
for(var/obj/machinery/field/generator/FG in connected_gens)
if(isnull(FG))
continue
if(FG == last)//We just asked you
@@ -250,7 +248,7 @@ field_generator power level display
return 0
/obj/machinery/field_generator/proc/start_fields()
/obj/machinery/field/generator/proc/start_fields()
if(!src.state == 2 || !anchored)
turn_off()
return
@@ -265,9 +263,9 @@ field_generator power level display
src.active = 2
/obj/machinery/field_generator/proc/setup_field(var/NSEW)
/obj/machinery/field/generator/proc/setup_field(NSEW)
var/turf/T = src.loc
var/obj/machinery/field_generator/G
var/obj/machinery/field/generator/G
var/steps = 0
if(!NSEW)//Make sure its ran right
return
@@ -278,11 +276,11 @@ field_generator power level display
for(var/atom/A in T.contents)
if(ismob(A))
continue
if(!istype(A,/obj/machinery/field_generator))
if(!istype(A,/obj/machinery/field/generator))
if((istype(A,/obj/machinery/door)||istype(A,/obj/machinery/the_singularitygen))&&(A.density))
return 0
steps += 1
G = locate(/obj/machinery/field_generator) in T
G = locate(/obj/machinery/field/generator) in T
if(!isnull(G))
steps -= 1
if(!G.active)
@@ -294,15 +292,17 @@ field_generator power level display
for(var/dist = 0, dist < steps, dist += 1) // creates each field tile
var/field_dir = get_dir(T,get_step(G.loc, NSEW))
T = get_step(T, NSEW)
if(!locate(/obj/machinery/containment_field) in T)
var/obj/machinery/containment_field/CF = new/obj/machinery/containment_field()
if(!locate(/obj/machinery/field/containment) in T)
var/obj/machinery/field/containment/CF = new/obj/machinery/field/containment()
CF.set_master(src,G)
fields += CF
G.fields += CF
CF.loc = T
CF.dir = field_dir
for(var/mob/living/L in CF.loc)
CF.Crossed(L)
var/listcheck = 0
for(var/obj/machinery/field_generator/FG in connected_gens)
for(var/obj/machinery/field/generator/FG in connected_gens)
if (isnull(FG))
continue
if(FG == G)
@@ -311,7 +311,7 @@ field_generator power level display
if(!listcheck)
connected_gens.Add(G)
listcheck = 0
for(var/obj/machinery/field_generator/FG2 in G.connected_gens)
for(var/obj/machinery/field/generator/FG2 in G.connected_gens)
if (isnull(FG2))
continue
if(FG2 == src)
@@ -321,14 +321,14 @@ field_generator power level display
G.connected_gens.Add(src)
/obj/machinery/field_generator/proc/cleanup()
/obj/machinery/field/generator/proc/cleanup()
clean_up = 1
for (var/obj/machinery/containment_field/F in fields)
for (var/obj/machinery/field/containment/F in fields)
if (isnull(F))
continue
qdel(F)
fields = list()
for(var/obj/machinery/field_generator/FG in connected_gens)
for(var/obj/machinery/field/generator/FG in connected_gens)
if (isnull(FG))
continue
FG.connected_gens.Remove(src)
@@ -348,6 +348,14 @@ field_generator power level display
if(O.last_warning && temp)
if((world.time - O.last_warning) > 50) //to stop message-spam
temp = 0
msg_admin_attack("A singulo exists and a containment field has failed.",1)
message_admins("A singulo exists and a containment field has failed.",1)
investigate_log("has <font color='red'>failed</font> whilst a singulo exists.","singulo")
O.last_warning = world.time
O.last_warning = world.time
/obj/machinery/field/generator/shock_field(mob/living/user)
if(fields.len)
..()
/obj/machinery/field/generator/bump_field(atom/movable/AM as mob|obj)
if(fields.len)
..()
@@ -116,7 +116,7 @@
/obj/singularity/proc/admin_investigate_setup()
last_warning = world.time
var/count = locate(/obj/machinery/containment_field) in orange(30, src)
var/count = locate(/obj/machinery/field/containment) in orange(30, src)
if(!count) message_admins("A singularity has been created without containment fields active at [x], [y], [z] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
investigate_log("was created. [count?"":"<font color='red'>No containment fields were active</font>"]","singulo")
@@ -326,13 +326,13 @@
return 1
/obj/singularity/proc/can_move(var/turf/T)
/obj/singularity/proc/can_move(turf/T)
if(!T)
return 0
if((locate(/obj/machinery/containment_field) in T)||(locate(/obj/machinery/shieldwall) in T))
if((locate(/obj/machinery/field/containment) in T)||(locate(/obj/machinery/shieldwall) in T))
return 0
else if(locate(/obj/machinery/field_generator) in T)
var/obj/machinery/field_generator/G = locate(/obj/machinery/field_generator) in T
else if(locate(/obj/machinery/field/generator) in T)
var/obj/machinery/field/generator/G = locate(/obj/machinery/field/generator) in T
if(G && G.active)
return 0
else if(locate(/obj/machinery/shieldwallgen) in T)
@@ -341,7 +341,6 @@
return 0
return 1
/obj/singularity/proc/event()
var/numb = pick(1,2,3,4,5,6)
switch(numb)
@@ -142,7 +142,7 @@
emp_act(severity)
..()
reliability -= round(15/severity)
reliability = max(reliability - round(15/severity), 0) //Do not allow it to go negative!
update_icon()
@@ -355,4 +355,69 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
self_recharge = 1
use_external_power = 1
recharge_time = 5
recharge_time = 5
/obj/item/weapon/gun/energy/wormhole_projector
name = "bluespace wormhole projector"
desc = "A projector that emits high density quantum-coupled bluespace beams."
projectile_type = "/obj/item/projectile/beam/wormhole"
charge_cost = 0
fire_sound = "sound/weapons/pulse3.ogg"
item_state = null
icon_state = "wormhole_projector100"
modifystate = "wormhole_projector"
var/obj/effect/portal/blue
var/obj/effect/portal/orange
var/mode = 0 //0 = blue 1 = orange
/obj/item/weapon/gun/energy/wormhole_projector/attack_self(mob/living/user as mob)
switch_modes()
/obj/item/weapon/gun/energy/wormhole_projector/proc/switch_modes(mob/living/user as mob)
switch(mode)
if(0)
mode = 1
user << "<span class='warning'>[name] is now set to orange.</span>"
projectile_type = "/obj/item/projectile/beam/wormhole/orange"
modifystate = "wormhole_projector_orange"
if(1)
mode = 0
user << "<span class='warning'>[name] is now set to blue.</span>"
projectile_type = "/obj/item/projectile/beam/wormhole"
modifystate = "wormhole_projector"
update_icon()
if(user.hand)
user.update_inv_l_hand()
else
user.update_inv_r_hand()
/obj/item/weapon/gun/energy/wormhole_projector/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
..()
switch_modes(user)
/obj/item/weapon/gun/energy/wormhole_projector/proc/portal_destroyed(obj/effect/portal/P)
if(P.icon_state == "portal")
blue = null
if(orange)
orange.target = null
else
orange = null
if(blue)
blue.target = null
/obj/item/weapon/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W)
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(W), null, src)
P.precision = 0
P.failchance = 0
if(W.name == "bluespace beam")
qdel(blue)
blue = P
else
qdel(orange)
P.icon_state = "portal1"
orange = P
if(orange && blue)
blue.target = get_turf(orange)
orange.target = get_turf(blue)
@@ -9,6 +9,7 @@
/obj/item/projectile/energy/electrode
name = "electrode"
icon_state = "spark"
color = "#FFFF00"
nodamage = 1
stun = 5
weaken = 5
@@ -331,3 +331,27 @@ obj/item/projectile/kinetic/New()
/obj/item/projectile/plasma/adv/mech
damage = 10
range = 6
/obj/item/projectile/beam/wormhole
name = "bluespace beam"
icon_state = "spark"
hitsound = "sparks"
damage = 3
var/obj/item/weapon/gun/energy/wormhole_projector/gun = null
color = "#33CCFF"
/obj/item/projectile/beam/wormhole/orange
name = "orange bluespace beam"
color = "#FF6600"
/obj/item/projectile/beam/wormhole/OnFired()
gun = shot_from
/obj/item/projectile/beam/wormhole/on_hit(atom/target)
if(ismob(target))
var/turf/portal_destination = pick(orange(6, src))
do_teleport(target, portal_destination)
return ..()
if(!gun)
qdel(src)
gun.create_portal(src)
+4 -4
View File
@@ -133,17 +133,17 @@ datum/reagent/honey/reaction_turf(var/turf/T, var/volume)
reagent_state = LIQUID
color = "#2E2418"
datum/reagent/chocolate/on_mob_life(var/mob/living/M as mob)
/datum/reagent/chocolate/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.reagents.add_reagent("sugar", 0.8)
..()
return
datum/reagent/chocolate/reaction_turf(var/turf/T, var/volume)
/datum/reagent/chocolate/reaction_turf(var/turf/T, var/volume)
src = null
if(volume >= 5)
new /obj/item/weapon/reagent_containers/food/snacks/reagentchocolatebar(T)
return
new /obj/item/weapon/reagent_containers/food/snacks/cocoa_pile(T)
return
/datum/reagent/mugwort
name = "Mugwort"
@@ -405,16 +405,15 @@
reagents.add_reagent("coco", 2)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/reagentchocolatebar //for reagent chocolate
name = "Chocolate Bar"
desc = "A plain chocolate bar. Is it dark chocolate, milk chocolate? Who knows!"
icon_state = "chocolatebar"
/obj/item/weapon/reagent_containers/food/snacks/cocoa_pile //for reagent chocolate being spilled on turfs
name = "Pile of Cocoa Powder"
desc = "A pile of pure cocoa powder."
icon_state = "cocoa"
filling_color = "#7D5F46"
New()
..()
reagents.add_reagent("sugar", 10)
reagents.add_reagent("chocolate",10)
reagents.add_reagent("chocolate",5) //no longer can be used to generate the reagent infinitely
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/chocolateegg
@@ -10,6 +10,7 @@
/obj/item/weapon/reagent_containers/food/snacks/candy/
name = "generic candy"
desc = "It's placeholder flavored. This shouldn't be seen."
icon = 'icons/obj/food/candy.dmi'
icon_state = "candy"
New()
..()
+1
View File
@@ -44,6 +44,7 @@ other types of metals and chemistry for reagents).
var/construction_time //Amount of time required for building the object
var/build_path = "" //The file path of the object that gets created
var/locked = 0 //If true it will spawn inside a lockbox with currently sec access
var/access_requirement = list(access_armory) //What special access requirements will the lockbox have? Defaults to armory.
var/category = null //Primarily used for Mech Fabricators, but can be used for anything
var/list/reagents = list() //List of reagents. Format: "id" = amount.
@@ -60,6 +60,18 @@
locked = 1
category = list("Weapons")
/datum/design/wormhole_projector
name = "Bluespace Wormhole Projector"
desc = "A projector that emits high density quantum-coupled bluespace beams."
id = "wormholeprojector"
req_tech = list("combat" = 6, "materials" = 6, "bluespace" = 4)
build_type = PROTOLATHE
materials = list(MAT_SILVER = 1000, MAT_METAL = 5000, MAT_DIAMOND = 3000)
build_path = /obj/item/weapon/gun/energy/wormhole_projector
locked = 1
access_requirement = list(access_rd) //screw you, HoS, this aint yours; this is only for a man of science---and trouble.
category = list("Weapons")
/datum/design/large_grenade
name = "Large Grenade"
desc = "A grenade that affects a larger area and use larger containers."
@@ -133,7 +145,7 @@
materials = list(MAT_METAL = 2000)
build_path = /obj/item/ammo_box/magazine/smgm9mm
category = list("Weapons")
/datum/design/mag_smg/ap_mag
name = "Saber Submachine Gun Magazine (9mmAP)"
desc = "A 30-round armour piercing magazine for the Saber submachine gun. Deals slightly less damage but bypasses most armor."
+15 -11
View File
@@ -324,12 +324,6 @@ proc/CallMaterialName(ID)
use_power(250)
updateUsrDialog()
else if(href_list["lock"]) //Lock the console from use by anyone without access.
if(src.allowed(usr))
screen = text2num(href_list["lock"])
else
usr << "Unauthorized Access."
else if(href_list["sync"]) //Sync the research holder with all the R&D consoles in the game that aren't sync protected.
screen = 0.0
if(!sync)
@@ -437,6 +431,11 @@ proc/CallMaterialName(ID)
new_item.loc = L
L.name += " ([new_item.name])"
L.origin_tech = new_item.origin_tech
L.req_access = being_built.access_requirement
var/list/lockbox_access
for(var/A in L.req_access)
lockbox_access += "[get_access_desc(A)] "
L.desc = "A locked box. It is locked to [lockbox_access]access."
else
new_item.loc = linked_lathe.loc
linked_lathe.busy = 0
@@ -656,10 +655,6 @@ proc/CallMaterialName(ID)
if(0.1) dat += "<div class='statusDisplay'>Processing and Updating Database...</div>"
if(0.2)
dat += "<div class='statusDisplay'>SYSTEM LOCKED</div>"
dat += "<A href='?src=\ref[src];lock=1.6'>Unlock</A>"
if(0.3)
dat += "<div class='statusDisplay'>Constructing Prototype. Please Wait...</div>"
@@ -772,7 +767,6 @@ proc/CallMaterialName(ID)
dat += "<A href='?src=\ref[src];togglesync=1'>Connect to Research Network</A><BR>"
dat += "<span class='linkOn'>Disconnect from Research Network</span><BR>"
dat += "<A href='?src=\ref[src];menu=1.7'>Device Linkage Menu</A><BR>"
dat += "<A href='?src=\ref[src];lock=0.2'>Lock Console</A><BR>"
if(check_rights(R_ADMIN,0))
dat += "<A href='?src=\ref[src];maxresearch=1'>\[ADMIN\] Maximize Research Levels</A><BR>"
dat += "<A href='?src=\ref[src];reset=1'>Reset R&D Database</A></div>"
@@ -1164,14 +1158,24 @@ proc/CallMaterialName(ID)
desc = "A console used to interface with R&D tools."
id = 2
req_access = list(access_robotics)
circuit = /obj/item/weapon/circuitboard/rdconsole/robotics
/obj/machinery/computer/rdconsole/experiment
name = "\improper E.X.P.E.R.I-MENTOR R&D console"
desc = "A console used to interface with R&D tools."
id = 3
circuit = /obj/item/weapon/circuitboard/rdconsole/experiment
/obj/machinery/computer/rdconsole/mechanics
name = "mechanics R&D console"
desc = "A console used to interface with R&D tools."
id = 4
req_access = list(access_mechanic)
circuit = /obj/item/weapon/circuitboard/rdconsole/mechanics
/obj/machinery/computer/rdconsole/public
name = "public R&D console"
desc = "A console used to interface with R&D tools."
id = 5
req_access = list()
circuit = /obj/item/weapon/circuitboard/rdconsole/public
@@ -5,7 +5,6 @@
icon_state = "samak"
icon_living = "samak"
icon_dead = "samak_dead"
icon = 'code/modules/jungle/jungle.dmi'
move_to_delay = 2
maxHealth = 125
health = 125
@@ -26,7 +25,6 @@
icon_state = "diyaab"
icon_living = "diyaab"
icon_dead = "diyaab_dead"
icon = 'code/modules/jungle/jungle.dmi'
move_to_delay = 1
maxHealth = 25
health = 25
@@ -47,7 +45,6 @@
icon_state = "shantak"
icon_living = "shantak"
icon_dead = "shantak_dead"
icon = 'code/modules/jungle/jungle.dmi'
move_to_delay = 1
maxHealth = 75
health = 75
@@ -66,7 +63,6 @@
icon_state = "yithian"
icon_living = "yithian"
icon_dead = "yithian_dead"
icon = 'code/modules/jungle/jungle.dmi'
/mob/living/simple_animal/tindalos
name = "tindalos"
@@ -74,4 +70,3 @@
icon_state = "tindalos"
icon_living = "tindalos"
icon_dead = "tindalos_dead"
icon = 'code/modules/jungle/jungle.dmi'
+1 -1
View File
@@ -389,7 +389,7 @@
if (istype(AM,/obj))
var/obj/O = AM
if(O.invisibility >= 101)
if(istype(O, /obj/docking_port/stationary))
continue
O.loc = T1
+14 -2
View File
@@ -79,24 +79,28 @@
switch(stage)
if(0)
if(istype(W,/obj/item/weapon/scalpel))
spread_germs_to_organ(src,user)
user.visible_message("<span class='danger'><b>[user]</b> cuts [src] open with [W]!")
stage++
return
if(1)
if(istype(W,/obj/item/weapon/retractor))
spread_germs_to_organ(src,user)
user.visible_message("<span class='danger'><b>[user]</b> cracks [src] open like an egg with [W]!")
stage++
return
if(2)
if(istype(W,/obj/item/weapon/hemostat))
spread_germs_to_organ(src,user)
if(contents.len)
var/obj/item/removing = pick(contents)
removing.loc = get_turf(user.loc)
var/obj/item/organ/O = removing
if(istype(O))
O.status |= ORGAN_CUT_AWAY
spread_germs_to_organ(O,user) // This wouldn't be any cleaner than the actual surgery
O.removed(user)
else if(!(user.l_hand && user.r_hand))
if(!(user.l_hand && user.r_hand))
user.put_in_hands(removing)
user.visible_message("<span class='danger'><b>[user]</b> extracts [removing] from [src] with [W]!")
else
@@ -855,7 +859,8 @@ Note that amputating the affected organ does in fact remove the infection from t
release_restraints(victim)
victim.organs -= src
victim.organs_by_name[limb_name] = null // Remove from owner's vars.
if(is_primary_organ(victim))
victim.organs_by_name[limb_name] = null // Remove from owner's vars.
//Robotic limbs explode if sabotaged.
if(is_robotic && sabotaged)
@@ -885,3 +890,10 @@ Note that amputating the affected organ does in fact remove the infection from t
"\red <b>Your [name] melts away!</b>", \
"\red You hear a sickening sizzle.")
disfigured = 1
/obj/item/organ/external/is_primary_organ(var/mob/living/carbon/human/O = null)
if (isnull(O))
O = owner
if (!istype(O)) // You're not the primary organ of ANYTHING, bucko
return 0
return src == O.organs_by_name[limb_name]
@@ -137,7 +137,9 @@
/obj/item/organ/external/head/removed()
if(owner)
name = "[owner.real_name]'s head"
if(!istype(dna))
dna = owner.dna.Clone()
name = "[dna.real_name]'s head"
owner.unEquip(owner.glasses)
owner.unEquip(owner.head)
owner.unEquip(owner.l_ear)
+2 -1
View File
@@ -66,7 +66,7 @@
/datum/surgery_step/proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return null
/proc/spread_germs_to_organ(obj/item/organ/external/E, mob/living/carbon/human/user)
/proc/spread_germs_to_organ(obj/item/organ/E, mob/living/carbon/human/user)
if(!istype(user) || !istype(E)) return
var/germ_level = user.germ_level
@@ -131,4 +131,5 @@
var/ribcage = 0
var/head_reattach = 0
var/current_organ = "organ"
var/obj/item/organ/organ_ref = null
var/list/in_progress = list()