Merge remote-tracking branch 'bay12-upstream/master' into development

This commit is contained in:
skull132
2016-10-07 00:58:39 +03:00
1594 changed files with 53994 additions and 48590 deletions
+11 -3
View File
@@ -2,12 +2,15 @@
var/name = "Generic Synthesizer"
var/max_energy = 60000
var/recharge_rate = 2000
var/max_energy_multiplied = 60000
var/multiplier = 1 // Robot may be upgraded with better matter bin to multiply capacity of it's synthetisers
var/energy
/datum/matter_synth/New(var/store = 0)
if(store)
max_energy = store
energy = max_energy
energy = max_energy_multiplied
set_multiplier(1)
return
/datum/matter_synth/proc/get_charge()
@@ -20,10 +23,15 @@
return 0
/datum/matter_synth/proc/add_charge(var/amount)
energy = min(energy + amount, max_energy)
energy = min(energy + amount, max_energy_multiplied)
/datum/matter_synth/proc/emp_act(var/severity)
use_charge(max_energy * 0.1 / severity)
use_charge(max_energy_multiplied * 0.1 / severity)
/datum/matter_synth/proc/set_multiplier(var/new_multiplier)
multiplier = new_multiplier
max_energy_multiplied = max_energy * multiplier
energy = min(max_energy_multiplied, energy)
/datum/matter_synth/medicine
name = "Medicine Synthesizer"
+89 -44
View File
@@ -12,12 +12,12 @@
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
user << "<span class='warning'>\The [src] cannot be applied to [M]!</span>"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon)) )
user << "\red You don't have the dexterity to do this!"
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 1
if (istype(M, /mob/living/carbon/human))
@@ -26,15 +26,15 @@
if(affecting.name == "head")
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
user << "\red You can't apply [src] through [H.head]!"
user << "<span class='warning'>You can't apply [src] through [H.head]!</span>"
return 1
else
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
user << "\red You can't apply [src] through [H.wear_suit]!"
user << "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>"
return 1
if(affecting.status & ORGAN_ROBOT)
user << "\red This isn't useful at all on a robotic limb.."
user << "<span class='warning'>This isn't useful at all on a robotic limb..</span>"
return 1
H.UpdateDamageIcon()
@@ -43,8 +43,8 @@
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
user.visible_message( \
"\blue [M] has been applied with [src] by [user].", \
"\blue You apply \the [src] to [M]." \
"<span class='notice'>[M] has been applied with [src] by [user].</span>", \
"<span class='notice'>You apply \the [src] to [M].</span>" \
)
use(1)
@@ -54,7 +54,7 @@
singular_name = "gauze length"
desc = "Some sterile gauze to wrap around bloody stumps."
icon_state = "brutepack"
origin_tech = "biotech=1"
origin_tech = list(TECH_BIO = 1)
/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
if(..())
@@ -65,24 +65,42 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.bandage())
user << "\red The wounds on [M]'s [affecting.name] have already been bandaged."
if(affecting.is_bandaged())
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>"
return 1
else
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
"<span class='notice'>You start treating [M]'s [affecting.name].</span>" )
var/used = 0
for (var/datum/wound/W in affecting.wounds)
if (W.internal)
continue
if(W.bandaged)
continue
if(used == amount)
break
if(!do_mob(user, M, W.damage/5))
user << "<span class='notice'>You must stand still to bandage wounds.</span>"
break
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] bandages [W.desc] on [M]'s [affecting.name].", \
"\blue You bandage [W.desc] on [M]'s [affecting.name]." )
user.visible_message("<span class='notice'>\The [user] bandages \a [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You bandage \a [W.desc] on [M]'s [affecting.name].</span>" )
//H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places bruise patch over [W.desc] on [M]'s [affecting.name].", \
"\blue You place bruise patch over [W.desc] on [M]'s [affecting.name]." )
user.visible_message("<span class='notice'>\The [user] places a bruise patch over \a [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You place a bruise patch over \a [W.desc] on [M]'s [affecting.name].</span>" )
else
user.visible_message( "\blue [user] places bandaid over [W.desc] on [M]'s [affecting.name].", \
"\blue You place bandaid over [W.desc] on [M]'s [affecting.name]." )
use(1)
user.visible_message("<span class='notice'>\The [user] places a bandaid over \a [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You place a bandaid over \a [W.desc] on [M]'s [affecting.name].</span>" )
W.bandage()
used++
affecting.update_damages()
if(used == amount)
if(affecting.is_bandaged())
user << "<span class='warning'>\The [src] is used up.</span>"
else
user << "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>"
use(used)
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src))
@@ -97,7 +115,7 @@
singular_name = "ointment"
icon_state = "ointment"
heal_burn = 1
origin_tech = "biotech=1"
origin_tech = list(TECH_BIO = 1)
/obj/item/stack/medical/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
if(..())
@@ -108,13 +126,19 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.salve())
user << "\red The wounds on [M]'s [affecting.name] have already been salved."
if(affecting.is_salved())
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>"
return 1
else
user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.name].", \
"\blue You salve wounds on [M]'s [affecting.name]." )
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
if(!do_mob(user, M, 10))
user << "<span class='notice'>You must stand still to salve wounds.</span>"
return 1
user.visible_message("<span class='notice'>[user] salved wounds on [M]'s [affecting.name].</span>", \
"<span class='notice'>You salved wounds on [M]'s [affecting.name].</span>" )
use(1)
affecting.salve()
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src))
@@ -127,8 +151,8 @@
singular_name = "advanced trauma kit"
desc = "An advanced trauma kit for severe injuries."
icon_state = "traumakit"
heal_brute = 12
origin_tech = "biotech=1"
heal_brute = 0
origin_tech = list(TECH_BIO = 1)
/obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
if(..())
@@ -139,29 +163,44 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
var/bandaged = affecting.bandage()
var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected))
user << "\red The wounds on [M]'s [affecting.name] have already been treated."
if(affecting.is_bandaged() && affecting.is_disinfected())
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>"
return 1
else
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
"<span class='notice'>You start treating [M]'s [affecting.name].</span>" )
var/used = 0
for (var/datum/wound/W in affecting.wounds)
if (W.internal)
continue
if (W.bandaged && W.disinfected)
continue
if(used == amount)
break
if(!do_mob(user, M, W.damage/5))
user << "<span class='notice'>You must stand still to bandage wounds.</span>"
break
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message( "\blue [user] cleans [W.desc] on [M]'s [affecting.name] and seals edges with bioglue.", \
"\blue You clean and seal [W.desc] on [M]'s [affecting.name]." )
user.visible_message("<span class='notice'>\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.</span>", \
"<span class='notice'>You clean and seal \a [W.desc] on [M]'s [affecting.name].</span>" )
//H.add_side_effect("Itch")
else if (istype(W,/datum/wound/bruise))
user.visible_message( "\blue [user] places medicine patch over [W.desc] on [M]'s [affecting.name].", \
"\blue You place medicine patch over [W.desc] on [M]'s [affecting.name]." )
user.visible_message("<span class='notice'>\The [user] places a medical patch over \a [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You place a medical patch over \a [W.desc] on [M]'s [affecting.name].</span>" )
else
user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \
"\blue You smear some bioglue over [W.desc] on [M]'s [affecting.name]." )
if (bandaged)
affecting.heal_damage(heal_brute,0)
use(1)
user.visible_message("<span class='notice'>\The [user] smears some bioglue over \a [W.desc] on [M]'s [affecting.name].</span>", \
"<span class='notice'>You smear some bioglue over \a [W.desc] on [M]'s [affecting.name].</span>" )
W.bandage()
W.disinfect()
W.heal_damage(heal_brute)
used++
affecting.update_damages()
if(used == amount)
if(affecting.is_bandaged())
user << "<span class='warning'>\The [src] is used up.</span>"
else
user << "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>"
use(used)
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src))
@@ -174,8 +213,8 @@
singular_name = "advanced burn kit"
desc = "An advanced treatment kit for severe burns."
icon_state = "burnkit"
heal_burn = 12
origin_tech = "biotech=1"
heal_burn = 0
origin_tech = list(TECH_BIO = 1)
/obj/item/stack/medical/advanced/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
@@ -187,14 +226,20 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.salve())
user << "\red The wounds on [M]'s [affecting.name] have already been salved."
if(affecting.is_salved())
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>"
return 1
else
user.visible_message( "\blue [user] covers wounds on [M]'s [affecting.name] with regenerative membrane.", \
"\blue You cover wounds on [M]'s [affecting.name] with regenerative membrane." )
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
if(!do_mob(user, M, 10))
user << "<span class='notice'>You must stand still to salve wounds.</span>"
return 1
user.visible_message( "<span class='notice'>[user] covers wounds on [M]'s [affecting.name] with regenerative membrane.</span>", \
"<span class='notice'>You cover wounds on [M]'s [affecting.name] with regenerative membrane.</span>" )
affecting.heal_damage(0,heal_burn)
use(1)
affecting.salve()
else
if (can_operate(H)) //Checks if mob is lying down on table for surgery
if (do_surgery(H,user,src))
+3 -1
View File
@@ -4,7 +4,7 @@
desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery."
icon = 'icons/obj/nanopaste.dmi'
icon_state = "tube"
origin_tech = "materials=4;engineering=3"
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
amount = 10
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 7000)
@@ -17,6 +17,7 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss() )
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
@@ -33,6 +34,7 @@
if(S.open == 1)
if (S && (S.status & ORGAN_ROBOT))
if(S.get_damage())
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
use(1)
+5 -5
View File
@@ -28,14 +28,14 @@
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 2)
user << "\red You need at least two rods to do this."
user << "<span class='warning'>You need at least two rods to do this.</span>"
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/material/steel/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2)
M.show_message("<span class='notice'>[src] is shaped into metal by [user.name] with the weldingtool.</span>", 3, "<span class='notice'>You hear welding.</span>", 2)
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
@@ -64,15 +64,15 @@
else if(!in_use)
if(get_amount() < 2)
user << "\blue You need at least two rods to do this."
user << "<span class='warning'>You need at least two rods to do this.</span>"
return
usr << "\blue Assembling grille..."
usr << "<span class='notice'>Assembling grille...</span>"
in_use = 1
if (!do_after(usr, 10))
in_use = 0
return
var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
usr << "\blue You assemble a grille"
usr << "<span class='notice'>You assemble a grille</span>"
in_use = 0
F.add_fingerprint(usr)
use(2)
@@ -0,0 +1,174 @@
/* 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 << "<span class='warning'>There are too many windows in this location.</span>"
return 1
directions-=win.dir
if(!(win.dir in cardinal))
user << "<span class='warning'>Can't let you do that.</span>"
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 << "<span class='warning'>You need more glass to do that.</span>"
return 1
if(locate(/obj/structure/window) in user.loc)
user << "<span class='warning'>There is a window in the way.</span>"
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 << "<span class='warning'>There is already a windoor assembly in that location.</span>"
return 1
if(isturf(user.loc) && locate(/obj/machinery/door/window/, user.loc))
user << "<span class='warning'>There is already a windoor in that location.</span>"
return 1
if(src.get_amount() < 5)
user << "<span class='warning'>You need more glass to do that.</span>"
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
@@ -3,42 +3,36 @@
desc = "The by-product of human farming."
singular_name = "human skin piece"
icon_state = "sheet-hide"
origin_tech = ""
/obj/item/stack/material/animalhide/corgi
name = "corgi hide"
desc = "The by-product of corgi farming."
singular_name = "corgi hide piece"
icon_state = "sheet-corgi"
origin_tech = ""
/obj/item/stack/material/animalhide/cat
name = "cat hide"
desc = "The by-product of cat farming."
singular_name = "cat hide piece"
icon_state = "sheet-cat"
origin_tech = ""
/obj/item/stack/material/animalhide/monkey
name = "monkey hide"
desc = "The by-product of monkey farming."
singular_name = "monkey hide piece"
icon_state = "sheet-monkey"
origin_tech = ""
/obj/item/stack/material/animalhide/lizard
name = "lizard skin"
desc = "Sssssss..."
singular_name = "lizard skin piece"
icon_state = "sheet-lizard"
origin_tech = ""
/obj/item/stack/material/animalhide/xeno
name = "alien hide"
desc = "The skin of a terrible creature."
singular_name = "alien hide piece"
icon_state = "sheet-xeno"
origin_tech = ""
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
/obj/item/stack/material/xenochitin
@@ -47,35 +41,30 @@
singular_name = "alien hide piece"
icon = 'icons/mob/alien.dmi'
icon_state = "chitin"
origin_tech = ""
/obj/item/xenos_claw
name = "alien claw"
desc = "The claw of a terrible creature."
icon = 'icons/mob/alien.dmi'
icon_state = "claw"
origin_tech = ""
/obj/item/weed_extract
name = "weed extract"
desc = "A piece of slimy, purplish weed."
icon = 'icons/mob/alien.dmi'
icon_state = "weed_extract"
origin_tech = ""
/obj/item/stack/material/hairlesshide
name = "hairless hide"
desc = "This hide was stripped of it's hair, but still needs tanning."
singular_name = "hairless hide piece"
icon_state = "sheet-hairlesshide"
origin_tech = ""
/obj/item/stack/material/wetleather
name = "wet leather"
desc = "This leather has been cleaned but still needs to be dried."
singular_name = "wet leather piece"
icon_state = "sheet-wetleather"
origin_tech = ""
var/wetness = 30 //Reduced when exposed to high temperautres
var/drying_threshold_temperature = 500 //Kelvin to start drying
@@ -87,9 +76,9 @@
istype(W, /obj/item/weapon/material/hatchet) )
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
usr.visible_message("\blue \the [usr] starts cutting hair off \the [src]", "\blue You start cutting the hair off \the [src]", "You hear the sound of a knife rubbing against flesh")
usr.visible_message("<span class='notice'>\The [usr] starts cutting hair off \the [src]</span>", "<span class='notice'>You start cutting the hair off \the [src]</span>", "You hear the sound of a knife rubbing against flesh")
if(do_after(user,50))
usr << "\blue You cut the hair from this [src.singular_name]"
usr << "<span class='notice'>You cut the hair from this [src.singular_name]</span>"
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/material/hairlesshide/HS in usr.loc)
if(HS.amount < 50)
@@ -1,33 +0,0 @@
/obj/item/stack/light_w
name = "wired glass tile"
singular_name = "wired glass floor tile"
desc = "A glass tile, which is wired, somehow."
icon_state = "glass_wire"
w_class = 3.0
force = 3.0
throwforce = 5.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if(istype(O,/obj/item/weapon/wirecutters))
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = 5
amount--
new/obj/item/stack/material/glass(user.loc)
if(amount <= 0)
user.drop_from_inventory(src)
qdel(src)
if(istype(O,/obj/item/stack/material) && O.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/M = O
if (M.use(1))
use(1)
new/obj/item/stack/tile/light(get_turf(user))
user << "<span class='notice'>You make a light tile.</span>"
else
user << "<span class='warning'>You need one metal sheet to finish the light tile.</span>"
return
+8 -7
View File
@@ -11,12 +11,13 @@
/obj/item/stack
gender = PLURAL
origin_tech = "materials=1"
origin_tech = list(TECH_MATERIAL = 1)
var/list/datum/stack_recipe/recipes
var/singular_name
var/amount = 1
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/stacktype //determines whether different stack types can merge
var/build_type = null //used when directly applied to a turf
var/uses_charge = 0
var/list/charge_costs = null
var/list/datum/matter_synth/synths = null
@@ -39,7 +40,7 @@
/obj/item/stack/examine(mob/user)
if(..(user, 1))
if(!uses_charge)
user << "There are [src.amount] [src.singular_name]\s in the stack."
user << "There [src.amount == 1 ? "is" : "are"] [src.amount] [src.singular_name]\s in the stack."
else
user << "There is enough charge for [get_amount()]."
@@ -107,21 +108,21 @@
if (!can_use(required))
if (produced>1)
user << "\red You haven't got enough [src] to build \the [produced] [recipe.title]\s!"
user << "<span class='warning'>You haven't got enough [src] to build \the [produced] [recipe.title]\s!</span>"
else
user << "\red You haven't got enough [src] to build \the [recipe.title]!"
user << "<span class='warning'>You haven't got enough [src] to build \the [recipe.title]!</span>"
return
if (recipe.one_per_turf && (locate(recipe.result_type) in user.loc))
user << "\red There is another [recipe.title] here!"
user << "<span class='warning'>There is another [recipe.title] here!</span>"
return
if (recipe.on_floor && !isfloor(user.loc))
user << "\red \The [recipe.title] must be constructed on the floor!"
user << "<span class='warning'>\The [recipe.title] must be constructed on the floor!</span>"
return
if (recipe.time)
user << "\blue Building [recipe.title] ..."
user << "<span class='notice'>Building [recipe.title] ...</span>"
if (!do_after(user, recipe.time))
return
@@ -0,0 +1,22 @@
/obj/item/stack/telecrystal
name = "telecrystal"
desc = "It seems to be pulsing with suspiciously enticing energies."
description_antag = "Telecrystals can be activated by utilizing them on devices with an actively running uplink. They will not activate on unactivated uplinks."
singular_name = "telecrystal"
icon = 'icons/obj/telescience.dmi'
icon_state = "telecrystal"
w_class = 1
max_amount = 50
flags = NOBLUDGEON
origin_tech = list(TECH_MATERIAL = 6, TECH_BLUESPACE = 4)
/obj/item/stack/telecrystal/afterattack(var/obj/item/I as obj, mob/user as mob, proximity)
if(!proximity)
return
if(istype(I, /obj/item))
if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
I.hidden_uplink.uses += amount
I.hidden_uplink.update_nano_data()
nanomanager.update_uis(I.hidden_uplink)
use(amount)
user << "<span class='notice'>You slot \the [src] into \the [I] and charge its internal uplink.</span>"
@@ -1,36 +0,0 @@
/obj/item/stack/tile/light
name = "light tile"
singular_name = "light floor tile"
desc = "A floor tile, made out off glass. It produces light."
icon_state = "tile_e"
w_class = 3.0
force = 3.0
throwforce = 5.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/on = 1
var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken
/obj/item/stack/tile/light/New(var/loc, var/amount=null)
..()
if(prob(5))
state = 3 //broken
else if(prob(5))
state = 2 //breaking
else if(prob(10))
state = 1 //flickering occasionally
else
state = 0 //fine
/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if(istype(O,/obj/item/weapon/crowbar))
new/obj/item/stack/material/steel(user.loc)
amount--
new/obj/item/stack/light_w(user.loc)
if(amount <= 0)
user.drop_from_inventory(src)
qdel(src)
@@ -1,53 +0,0 @@
/obj/item/stack/tile/steel
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon" //why?
icon_state = "tile"
force = 6.0
matter = list(DEFAULT_WALL_MATERIAL = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
/obj/item/stack/tile/steel/New(var/loc, var/amount=null)
..()
src.pixel_x = rand(1, 14)
src.pixel_y = rand(1, 14)
return
/obj/item/stack/tile/steel/cyborg
name = "floor tile synthesizer"
desc = "A device that makes floor tiles."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/steel
build_type = /obj/item/stack/tile/steel
/*
/obj/item/stack/tile/steel/attack_self(mob/user as mob)
if (usr.stat)
return
var/T = user.loc
if (!( istype(T, /turf) ))
user << "\red You must be on the ground!"
return
if (!( istype(T, /turf/space) ))
user << "\red You cannot build on or repair this turf!"
return
src.build(T)
src.add_fingerprint(user)
use(1)
return
*/
/obj/item/stack/tile/steel/proc/build(turf/S as turf)
if (istype(S,/turf/space))
S.ChangeTurf(/turf/simulated/floor/plating/airless)
else
S.ChangeTurf(/turf/simulated/floor/plating)
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
return
@@ -5,14 +5,18 @@
* Wood
* Carpet
*/
/obj/item/stack/tile
name = "tile"
singular_name = "tile"
desc = "A non-descript floor tile"
w_class = 3
max_amount = 60
var/build_type = null
/obj/item/stack/tile/New()
..()
pixel_x = rand(-7, 7)
pixel_y = rand(-7, 7)
/*
* Grass
@@ -27,7 +31,7 @@
throw_speed = 5
throw_range = 20
flags = 0
origin_tech = "biotech=1"
origin_tech = list(TECH_BIO = 1)
/*
* Wood
@@ -64,3 +68,61 @@
throw_speed = 5
throw_range = 20
flags = 0
/obj/item/stack/tile/floor
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon" //why?
icon_state = "tile"
force = 6.0
matter = list(DEFAULT_WALL_MATERIAL = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
/obj/item/stack/tile/floor_red
name = "red floor tile"
singular_name = "red floor tile"
color = COLOR_RED_GRAY
icon_state = "tile_white"
/obj/item/stack/tile/floor_steel
name = "steel floor tile"
singular_name = "steel floor tile"
icon_state = "tile_steel"
matter = list("plasteel" = 937.5)
/obj/item/stack/tile/floor_white
name = "white floor tile"
singular_name = "white floor tile"
icon_state = "tile_white"
matter = list("plastic" = 937.5)
/obj/item/stack/tile/floor_yellow
name = "yellow floor tile"
singular_name = "yellow floor tile"
color = COLOR_BROWN
icon_state = "tile_white"
/obj/item/stack/tile/floor_dark
name = "dark floor tile"
singular_name = "dark floor tile"
icon_state = "fr_tile"
matter = list("plasteel" = 937.5)
/obj/item/stack/tile/floor_freezer
name = "freezer floor tile"
singular_name = "freezer floor tile"
icon_state = "tile_freezer"
matter = list("plastic" = 937.5)
/obj/item/stack/tile/floor/cyborg
name = "floor tile synthesizer"
desc = "A device that makes floor tiles."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/floor
build_type = /obj/item/stack/tile/floor