Porting updates related to material datums. (#12317)

* Porting updates related to material datums.

* art_type

* oh oh
This commit is contained in:
Ghom
2020-05-25 23:21:00 +02:00
committed by GitHub
parent e11908a357
commit 85186a9714
64 changed files with 2542 additions and 208 deletions
+3 -2
View File
@@ -104,10 +104,10 @@
desc = "An occult looking dagger that is cold to the touch. Somehow, the flawless orb on the pommel is made entirely of liquid blood."
icon = 'icons/obj/ice_moon/artifacts.dmi'
icon_state = "bloodletter"
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_NORMAL
/// Bleed stacks applied when an organic mob target is hit
var/bleed_stacks_per_hit = 3
/obj/item/kitchen/knife/bloodletter/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!isliving(target) || !proximity_flag)
@@ -198,6 +198,7 @@
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 1.5)
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
custom_price = 200
+1 -1
View File
@@ -274,7 +274,7 @@ obj/item/shield/riot/bullet_proof
item_state = "buckler"
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
custom_materials = null
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 10)
resistance_flags = FLAMMABLE
repair_material = /obj/item/stack/sheet/mineral/wood
block_chance = 30
@@ -279,11 +279,13 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
icon_state = "sheet-wood"
item_state = "sheet-wood"
icon = 'icons/obj/stack_objects.dmi'
custom_materials = list(/datum/material/wood=MINERAL_MATERIAL_AMOUNT)
sheettype = "wood"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/mineral/wood
novariants = TRUE
material_type = /datum/material/wood
grind_results = list(/datum/reagent/carbon = 20)
/obj/item/stack/sheet/mineral/wood/attackby(obj/item/W, mob/user, params) // NOTE: sheet_types.dm is where the WOOD stack lives. Maybe move this over there.
+7 -5
View File
@@ -14,13 +14,15 @@
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
var/datum/effect_system/trail_follow/ion/ion_trail
/obj/item/tank/jetpack/New()
/obj/item/tank/jetpack/Initialize()
..()
ion_trail = new
ion_trail.set_up(src)
/obj/item/tank/jetpack/populate_gas()
if(gas_type)
air_contents.gases[gas_type] = ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
ion_trail = new
ion_trail.set_up(src)
/obj/item/tank/jetpack/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_jetpack))
@@ -188,8 +190,8 @@
var/obj/item/tank/internals/tank = null
var/mob/living/carbon/human/cur_user
/obj/item/tank/jetpack/suit/New()
..()
/obj/item/tank/jetpack/suit/Initialize()
. = ..()
STOP_PROCESSING(SSobj, src)
temp_air_contents = air_contents
+23 -26
View File
@@ -12,15 +12,13 @@
*/
/obj/item/tank/internals/oxygen
name = "oxygen tank"
desc = "A tank of oxygen."
desc = "A tank of oxygen, this one is blue."
icon_state = "oxygen"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/oxygen/New()
..()
/obj/item/tank/internals/oxygen/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -35,6 +33,8 @@
icon_state = "oxygen_fr"
dog_fashion = null
/obj/item/tank/internals/oxygen/empty/populate_gas()
return
/*
* Anesthetic
@@ -46,11 +46,9 @@
item_state = "an_tank"
force = 10
/obj/item/tank/internals/anesthetic/New()
..()
/obj/item/tank/internals/anesthetic/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrous_oxide] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Air
@@ -63,11 +61,9 @@
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/air/New()
..()
/obj/item/tank/internals/air/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrogen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
@@ -82,10 +78,8 @@
force = 8
/obj/item/tank/internals/plasma/New()
..()
/obj/item/tank/internals/plasma/populate_gas()
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/flamethrower))
@@ -100,10 +94,8 @@
else
return ..()
/obj/item/tank/internals/plasma/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasma/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/*
@@ -118,13 +110,10 @@
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/internals/plasmaman/New()
..()
/obj/item/tank/internals/plasmaman/populate_gas()
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasmaman/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -137,12 +126,12 @@
volume = 6
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/belt/empty/populate_gas()
return
/*
* Emergency Oxygen
@@ -159,17 +148,25 @@
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
/obj/item/tank/internals/emergency_oxygen/New()
..()
/obj/item/tank/internals/emergency_oxygen/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
volume = 6
/obj/item/tank/internals/emergency_oxygen/engi/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/double
name = "double emergency oxygen tank"
icon_state = "emergency_double"
volume = 10
/obj/item/tank/internals/emergency_oxygen/double/empty/populate_gas()
return
+9 -4
View File
@@ -60,14 +60,19 @@
H.update_action_buttons_icon()
/obj/item/tank/New()
..()
/obj/item/tank/Initialize()
. = ..()
air_contents = new(volume) //liters
air_contents.temperature = T20C
populate_gas()
START_PROCESSING(SSobj, src)
/obj/item/tank/proc/populate_gas()
return
/obj/item/tank/Destroy()
if(air_contents)
qdel(air_contents)
@@ -78,9 +83,9 @@
/obj/item/tank/examine(mob/user)
var/obj/icon = src
. = ..()
if (istype(src.loc, /obj/item/assembly))
if(istype(src.loc, /obj/item/assembly))
icon = src.loc
if(!in_range(src, user))
if(!in_range(src, user) && !isobserver(user))
if (icon == src)
. += "<span class='notice'>If you want any more information you'll need to get closer.</span>"
return
+5 -12
View File
@@ -477,20 +477,12 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
throw_speed = 5
throw_range = 2
attack_verb = list("busted")
var/impressiveness = 45
/obj/item/statuebust/attack_self(mob/living/user)
add_fingerprint(user)
user.examinate(src)
/obj/item/statuebust/examine(mob/living/user)
/obj/item/statuebust/Initialize()
. = ..()
if(.)
return
if (!isliving(user))
return
user.visible_message("[user] stops to admire [src].", \
"<span class='notice'>You take in [src], admiring its fine craftsmanship.</span>")
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artgood", /datum/mood_event/artgood)
AddElement(/datum/element/art, impressiveness)
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 1000)), 0)
/obj/item/tailclub
name = "tail club"
@@ -566,6 +558,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 10
throwforce = 12
attack_verb = list("beat", "smacked")
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 3.5)
w_class = WEIGHT_CLASS_BULKY
var/homerun_ready = 0
var/homerun_able = 0