mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Merge pull request #41549 from tralezab/patch-12
[READY FOR REAL] New Spell: Soul Tap!
This commit is contained in:
@@ -1,56 +1,56 @@
|
||||
// This component is for forcing strange things into your pocket that fall out if you fall down
|
||||
// Yes this exists purely for the spaghetti meme
|
||||
|
||||
/datum/component/spill
|
||||
var/preexisting_item_flags
|
||||
|
||||
var/list/droptext
|
||||
var/list/dropsound
|
||||
|
||||
// droptext is an arglist for visible_message
|
||||
// dropsound is a list of potential sounds that gets picked from
|
||||
/datum/component/spill/Initialize(list/_droptext, list/_dropsound)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
if(_droptext && !islist(_droptext))
|
||||
_droptext = list(_droptext)
|
||||
droptext = _droptext
|
||||
|
||||
if(_dropsound && !islist(_dropsound))
|
||||
_dropsound = list(_dropsound)
|
||||
dropsound = _dropsound
|
||||
|
||||
/datum/component/spill/PostTransfer()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
/datum/component/spill/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/equip_react)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/drop_react)
|
||||
var/obj/item/master = parent
|
||||
preexisting_item_flags = master.item_flags
|
||||
master.item_flags |= ITEM_SLOT_POCKET
|
||||
|
||||
/datum/component/spill/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
|
||||
var/obj/item/master = parent
|
||||
if(!(preexisting_item_flags & ITEM_SLOT_POCKET))
|
||||
master.item_flags &= ~ITEM_SLOT_POCKET
|
||||
|
||||
/datum/component/spill/proc/equip_react(obj/item/source, mob/equipper, slot)
|
||||
if(slot == SLOT_L_STORE || slot == SLOT_R_STORE)
|
||||
RegisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN, .proc/knockdown_react, TRUE)
|
||||
else
|
||||
UnregisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN)
|
||||
|
||||
/datum/component/spill/proc/drop_react(obj/item/source, mob/dropper)
|
||||
UnregisterSignal(dropper, COMSIG_LIVING_STATUS_KNOCKDOWN)
|
||||
|
||||
/datum/component/spill/proc/knockdown_react(mob/living/fool)
|
||||
var/obj/item/master = parent
|
||||
fool.dropItemToGround(master)
|
||||
if(droptext)
|
||||
fool.visible_message(arglist(droptext))
|
||||
if(dropsound)
|
||||
// This component is for forcing strange things into your pocket that fall out if you fall down
|
||||
// Yes this exists purely for the spaghetti meme
|
||||
|
||||
/datum/component/spill
|
||||
var/preexisting_item_flags
|
||||
|
||||
var/list/droptext
|
||||
var/list/dropsound
|
||||
|
||||
// droptext is an arglist for visible_message
|
||||
// dropsound is a list of potential sounds that gets picked from
|
||||
/datum/component/spill/Initialize(list/_droptext, list/_dropsound)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
if(_droptext && !islist(_droptext))
|
||||
_droptext = list(_droptext)
|
||||
droptext = _droptext
|
||||
|
||||
if(_dropsound && !islist(_dropsound))
|
||||
_dropsound = list(_dropsound)
|
||||
dropsound = _dropsound
|
||||
|
||||
/datum/component/spill/PostTransfer()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
/datum/component/spill/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/equip_react)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/drop_react)
|
||||
var/obj/item/master = parent
|
||||
preexisting_item_flags = master.item_flags
|
||||
master.item_flags |= ITEM_SLOT_POCKET
|
||||
|
||||
/datum/component/spill/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
|
||||
var/obj/item/master = parent
|
||||
if(!(preexisting_item_flags & ITEM_SLOT_POCKET))
|
||||
master.item_flags &= ~ITEM_SLOT_POCKET
|
||||
|
||||
/datum/component/spill/proc/equip_react(obj/item/source, mob/equipper, slot)
|
||||
if(slot == SLOT_L_STORE || slot == SLOT_R_STORE)
|
||||
RegisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN, .proc/knockdown_react, TRUE)
|
||||
else
|
||||
UnregisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN)
|
||||
|
||||
/datum/component/spill/proc/drop_react(obj/item/source, mob/dropper)
|
||||
UnregisterSignal(dropper, COMSIG_LIVING_STATUS_KNOCKDOWN)
|
||||
|
||||
/datum/component/spill/proc/knockdown_react(mob/living/fool)
|
||||
var/obj/item/master = parent
|
||||
fool.dropItemToGround(master)
|
||||
if(droptext)
|
||||
fool.visible_message(arglist(droptext))
|
||||
if(dropsound)
|
||||
playsound(master, pick(dropsound), 30)
|
||||
+98
-98
@@ -1,99 +1,99 @@
|
||||
/datum/component/footstep
|
||||
var/steps = 0
|
||||
var/volume
|
||||
var/e_range
|
||||
|
||||
/datum/component/footstep/Initialize(volume_ = 0.5, e_range_ = -1)
|
||||
if(!isliving(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
volume = volume_
|
||||
e_range = e_range_
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/play_footstep)
|
||||
|
||||
/datum/component/footstep/proc/play_footstep()
|
||||
var/turf/open/T = get_turf(parent)
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
var/mob/living/LM = parent
|
||||
var/v = volume
|
||||
var/e = e_range
|
||||
if(!T.footstep || LM.buckled || !CHECK_MULTIPLE_BITFIELDS(LM.mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING) || (LM.stat != CONSCIOUS) || LM.incapacitated() || LM.IsStun() || LM.IsParalyzed())
|
||||
return
|
||||
|
||||
if(iscarbon(LM))
|
||||
var/mob/living/carbon/C = LM
|
||||
if(!C.get_bodypart(BODY_ZONE_L_LEG) && !C.get_bodypart(BODY_ZONE_R_LEG))
|
||||
return
|
||||
if(ishuman(C) && C.m_intent == MOVE_INTENT_WALK)
|
||||
v /= 2
|
||||
e -= 5
|
||||
steps++
|
||||
|
||||
if(steps >= 6)
|
||||
steps = 0
|
||||
|
||||
if(steps % 2)
|
||||
return
|
||||
|
||||
if(!LM.has_gravity(T) && steps != 0) // don't need to step as often when you hop around
|
||||
return
|
||||
|
||||
//begin playsound shenanigans//
|
||||
|
||||
//for barefooted non-clawed mobs like monkeys
|
||||
if(isbarefoot(LM))
|
||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.barefootstep[T.barefootstep][3] + e)
|
||||
return
|
||||
|
||||
//for xenomorphs, dogs, and other clawed mobs
|
||||
if(isclawfoot(LM))
|
||||
if(isalienadult(LM)) //xenos are stealthy and get quieter footsteps
|
||||
v /= 3
|
||||
e -= 3
|
||||
|
||||
playsound(T, pick(GLOB.clawfootstep[T.clawfootstep][1]),
|
||||
GLOB.clawfootstep[T.clawfootstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.clawfootstep[T.clawfootstep][3] + e)
|
||||
return
|
||||
|
||||
//for megafauna and other large and imtimidating mobs such as the bloodminer
|
||||
if(isheavyfoot(LM))
|
||||
playsound(T, pick(GLOB.heavyfootstep[T.heavyfootstep][1]),
|
||||
GLOB.heavyfootstep[T.heavyfootstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.heavyfootstep[T.heavyfootstep][3] + e)
|
||||
return
|
||||
|
||||
//for slimes
|
||||
if(isslime(LM))
|
||||
playsound(T, 'sound/effects/footstep/slime1.ogg', 15 * v)
|
||||
return
|
||||
|
||||
//for (simple) humanoid mobs (clowns, russians, pirates, etc.)
|
||||
if(isshoefoot(LM))
|
||||
if(!ishuman(LM))
|
||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||
GLOB.footstep[T.footstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.footstep[T.footstep][3] + e)
|
||||
return
|
||||
if(ishuman(LM)) //for proper humans, they're special
|
||||
var/mob/living/carbon/human/H = LM
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
||||
|
||||
if(H.shoes || feetCover) //are we wearing shoes
|
||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||
GLOB.footstep[T.footstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.footstep[T.footstep][3] + e)
|
||||
|
||||
if((!H.shoes && !feetCover) || !(H.mobility_flags & MOBILITY_STAND)) //are we NOT wearing shoes or are we lying/crawling (using hands to move around)?
|
||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||
TRUE,
|
||||
/datum/component/footstep
|
||||
var/steps = 0
|
||||
var/volume
|
||||
var/e_range
|
||||
|
||||
/datum/component/footstep/Initialize(volume_ = 0.5, e_range_ = -1)
|
||||
if(!isliving(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
volume = volume_
|
||||
e_range = e_range_
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/play_footstep)
|
||||
|
||||
/datum/component/footstep/proc/play_footstep()
|
||||
var/turf/open/T = get_turf(parent)
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
var/mob/living/LM = parent
|
||||
var/v = volume
|
||||
var/e = e_range
|
||||
if(!T.footstep || LM.buckled || !CHECK_MULTIPLE_BITFIELDS(LM.mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING) || (LM.stat != CONSCIOUS) || LM.incapacitated() || LM.IsStun() || LM.IsParalyzed())
|
||||
return
|
||||
|
||||
if(iscarbon(LM))
|
||||
var/mob/living/carbon/C = LM
|
||||
if(!C.get_bodypart(BODY_ZONE_L_LEG) && !C.get_bodypart(BODY_ZONE_R_LEG))
|
||||
return
|
||||
if(ishuman(C) && C.m_intent == MOVE_INTENT_WALK)
|
||||
v /= 2
|
||||
e -= 5
|
||||
steps++
|
||||
|
||||
if(steps >= 6)
|
||||
steps = 0
|
||||
|
||||
if(steps % 2)
|
||||
return
|
||||
|
||||
if(!LM.has_gravity(T) && steps != 0) // don't need to step as often when you hop around
|
||||
return
|
||||
|
||||
//begin playsound shenanigans//
|
||||
|
||||
//for barefooted non-clawed mobs like monkeys
|
||||
if(isbarefoot(LM))
|
||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.barefootstep[T.barefootstep][3] + e)
|
||||
return
|
||||
|
||||
//for xenomorphs, dogs, and other clawed mobs
|
||||
if(isclawfoot(LM))
|
||||
if(isalienadult(LM)) //xenos are stealthy and get quieter footsteps
|
||||
v /= 3
|
||||
e -= 3
|
||||
|
||||
playsound(T, pick(GLOB.clawfootstep[T.clawfootstep][1]),
|
||||
GLOB.clawfootstep[T.clawfootstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.clawfootstep[T.clawfootstep][3] + e)
|
||||
return
|
||||
|
||||
//for megafauna and other large and imtimidating mobs such as the bloodminer
|
||||
if(isheavyfoot(LM))
|
||||
playsound(T, pick(GLOB.heavyfootstep[T.heavyfootstep][1]),
|
||||
GLOB.heavyfootstep[T.heavyfootstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.heavyfootstep[T.heavyfootstep][3] + e)
|
||||
return
|
||||
|
||||
//for slimes
|
||||
if(isslime(LM))
|
||||
playsound(T, 'sound/effects/footstep/slime1.ogg', 15 * v)
|
||||
return
|
||||
|
||||
//for (simple) humanoid mobs (clowns, russians, pirates, etc.)
|
||||
if(isshoefoot(LM))
|
||||
if(!ishuman(LM))
|
||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||
GLOB.footstep[T.footstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.footstep[T.footstep][3] + e)
|
||||
return
|
||||
if(ishuman(LM)) //for proper humans, they're special
|
||||
var/mob/living/carbon/human/H = LM
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
||||
|
||||
if(H.shoes || feetCover) //are we wearing shoes
|
||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||
GLOB.footstep[T.footstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.footstep[T.footstep][3] + e)
|
||||
|
||||
if((!H.shoes && !feetCover) || !(H.mobility_flags & MOBILITY_STAND)) //are we NOT wearing shoes or are we lying/crawling (using hands to move around)?
|
||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.barefootstep[T.barefootstep][3] + e)
|
||||
@@ -1,206 +1,206 @@
|
||||
/* Types of tanks!
|
||||
* Contains:
|
||||
* Oxygen
|
||||
* Anesthetic
|
||||
* Air
|
||||
* Plasma
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
|
||||
/*
|
||||
* Oxygen
|
||||
*/
|
||||
/obj/item/tank/internals/oxygen
|
||||
name = "oxygen tank"
|
||||
desc = "A tank of oxygen."
|
||||
icon_state = "oxygen"
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
|
||||
/obj/item/tank/internals/oxygen/New()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/oxygen)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tank/internals/oxygen/yellow
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
icon_state = "oxygen_f"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/tank/internals/oxygen/red
|
||||
desc = "A tank of oxygen, this one is red."
|
||||
icon_state = "oxygen_fr"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/tank/internals/oxygen/empty/New()
|
||||
..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
return
|
||||
|
||||
/*
|
||||
* Anesthetic
|
||||
*/
|
||||
/obj/item/tank/internals/anesthetic
|
||||
name = "anesthetic tank"
|
||||
desc = "A tank with an N2O/O2 gas mix."
|
||||
icon_state = "anesthetic"
|
||||
item_state = "an_tank"
|
||||
force = 10
|
||||
|
||||
/obj/item/tank/internals/anesthetic/New()
|
||||
..()
|
||||
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrous_oxide)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases[/datum/gas/nitrous_oxide][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
/*
|
||||
* Air
|
||||
*/
|
||||
/obj/item/tank/internals/air
|
||||
name = "air tank"
|
||||
desc = "Mixed anyone?"
|
||||
icon_state = "air"
|
||||
item_state = "air"
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
/obj/item/tank/internals/air/New()
|
||||
..()
|
||||
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases[/datum/gas/nitrogen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
/obj/item/tank/internals/plasma
|
||||
name = "plasma tank"
|
||||
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
|
||||
icon_state = "plasma"
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = null //they have no straps!
|
||||
force = 8
|
||||
|
||||
|
||||
/obj/item/tank/internals/plasma/New()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/plasma)
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (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))
|
||||
var/obj/item/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank))
|
||||
return
|
||||
if(!user.transferItemToLoc(src, F))
|
||||
return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
F.update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/tank/internals/plasma/full/New()
|
||||
..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasma/empty/New()
|
||||
..()
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = 0
|
||||
return
|
||||
|
||||
/*
|
||||
* Plasmaman Plasma Tank
|
||||
*/
|
||||
|
||||
/obj/item/tank/internals/plasmaman
|
||||
name = "plasma internals tank"
|
||||
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
|
||||
icon_state = "plasmaman_tank"
|
||||
item_state = "plasmaman_tank"
|
||||
force = 10
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
|
||||
/obj/item/tank/internals/plasmaman/New()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/plasma)
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasmaman/full/New()
|
||||
..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt
|
||||
icon_state = "plasmaman_tank_belt"
|
||||
item_state = "plasmaman_tank_belt"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 5
|
||||
volume = 6
|
||||
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt/full/New()
|
||||
..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt/empty/Initialize()
|
||||
. = ..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = 0
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
/obj/item/tank/internals/emergency_oxygen
|
||||
name = "emergency oxygen tank"
|
||||
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
|
||||
icon_state = "emergency"
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 4
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
volume = 1 //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()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/oxygen)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/empty/Initialize()
|
||||
. = ..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/engi
|
||||
name = "extended-capacity emergency oxygen tank"
|
||||
icon_state = "emergency_engi"
|
||||
volume = 2 // should last a bit over 30 minutes if full
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/engi/empty/Initialize()
|
||||
. = ..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/double
|
||||
name = "double emergency oxygen tank"
|
||||
icon_state = "emergency_double"
|
||||
volume = 8
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/double/empty/Initialize()
|
||||
. = ..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
|
||||
/* Types of tanks!
|
||||
* Contains:
|
||||
* Oxygen
|
||||
* Anesthetic
|
||||
* Air
|
||||
* Plasma
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
|
||||
/*
|
||||
* Oxygen
|
||||
*/
|
||||
/obj/item/tank/internals/oxygen
|
||||
name = "oxygen tank"
|
||||
desc = "A tank of oxygen."
|
||||
icon_state = "oxygen"
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
|
||||
/obj/item/tank/internals/oxygen/New()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/oxygen)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tank/internals/oxygen/yellow
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
icon_state = "oxygen_f"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/tank/internals/oxygen/red
|
||||
desc = "A tank of oxygen, this one is red."
|
||||
icon_state = "oxygen_fr"
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/tank/internals/oxygen/empty/New()
|
||||
..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
return
|
||||
|
||||
/*
|
||||
* Anesthetic
|
||||
*/
|
||||
/obj/item/tank/internals/anesthetic
|
||||
name = "anesthetic tank"
|
||||
desc = "A tank with an N2O/O2 gas mix."
|
||||
icon_state = "anesthetic"
|
||||
item_state = "an_tank"
|
||||
force = 10
|
||||
|
||||
/obj/item/tank/internals/anesthetic/New()
|
||||
..()
|
||||
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrous_oxide)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases[/datum/gas/nitrous_oxide][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
/*
|
||||
* Air
|
||||
*/
|
||||
/obj/item/tank/internals/air
|
||||
name = "air tank"
|
||||
desc = "Mixed anyone?"
|
||||
icon_state = "air"
|
||||
item_state = "air"
|
||||
force = 10
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
/obj/item/tank/internals/air/New()
|
||||
..()
|
||||
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gases[/datum/gas/nitrogen][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
/obj/item/tank/internals/plasma
|
||||
name = "plasma tank"
|
||||
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
|
||||
icon_state = "plasma"
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = null //they have no straps!
|
||||
force = 8
|
||||
|
||||
|
||||
/obj/item/tank/internals/plasma/New()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/plasma)
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (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))
|
||||
var/obj/item/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank))
|
||||
return
|
||||
if(!user.transferItemToLoc(src, F))
|
||||
return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
F.update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/tank/internals/plasma/full/New()
|
||||
..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasma/empty/New()
|
||||
..()
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = 0
|
||||
return
|
||||
|
||||
/*
|
||||
* Plasmaman Plasma Tank
|
||||
*/
|
||||
|
||||
/obj/item/tank/internals/plasmaman
|
||||
name = "plasma internals tank"
|
||||
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
|
||||
icon_state = "plasmaman_tank"
|
||||
item_state = "plasmaman_tank"
|
||||
force = 10
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
|
||||
/obj/item/tank/internals/plasmaman/New()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/plasma)
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasmaman/full/New()
|
||||
..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt
|
||||
icon_state = "plasmaman_tank_belt"
|
||||
item_state = "plasmaman_tank_belt"
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 5
|
||||
volume = 6
|
||||
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt/full/New()
|
||||
..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt/empty/Initialize()
|
||||
. = ..() // Plasma asserted in parent
|
||||
air_contents.gases[/datum/gas/plasma][MOLES] = 0
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
/obj/item/tank/internals/emergency_oxygen
|
||||
name = "emergency oxygen tank"
|
||||
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
|
||||
icon_state = "emergency"
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 4
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
volume = 1 //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()
|
||||
..()
|
||||
air_contents.assert_gas(/datum/gas/oxygen)
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/empty/Initialize()
|
||||
. = ..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/engi
|
||||
name = "extended-capacity emergency oxygen tank"
|
||||
icon_state = "emergency_engi"
|
||||
volume = 2 // should last a bit over 30 minutes if full
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/engi/empty/Initialize()
|
||||
. = ..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/double
|
||||
name = "double emergency oxygen tank"
|
||||
icon_state = "emergency_double"
|
||||
volume = 8
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/double/empty/Initialize()
|
||||
. = ..()
|
||||
air_contents.gases[/datum/gas/oxygen][MOLES] = 0
|
||||
|
||||
|
||||
@@ -247,6 +247,12 @@
|
||||
category = "Assistance"
|
||||
cost = 1
|
||||
|
||||
/datum/spellbook_entry/tap
|
||||
name = "Soul Tap"
|
||||
spell_type = /obj/effect/proc_holder/spell/self/tap
|
||||
category = "Assistance"
|
||||
cost = 3
|
||||
|
||||
/datum/spellbook_entry/spacetime_dist
|
||||
name = "Spacetime Distortion"
|
||||
spell_type = /obj/effect/proc_holder/spell/spacetime_dist
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
if(!hand_items.len)
|
||||
to_chat(M, "<span class='caution'>You must hold an item you wish to make your phylactery...</span>")
|
||||
return
|
||||
if(!M.mind.hasSoul)
|
||||
to_chat(user, "<span class='caution'>You do not possess a soul.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/marked_item
|
||||
|
||||
@@ -57,6 +60,7 @@
|
||||
new /obj/item/phylactery(marked_item, M.mind)
|
||||
|
||||
to_chat(M, "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>")
|
||||
M.mind.hasSoul = FALSE
|
||||
M.set_species(/datum/species/skeleton)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#define HEALTH_LOST_PER_SOUL_TAP 20
|
||||
|
||||
//SOUL TAP!//
|
||||
//Trades 20 max health for a refresh on all of your spells. I was considering making it depend on the cooldowns of your spells, but I want to support "Big spell wizard" with this loadout.
|
||||
//the two spells that sound most problematic with this is mindswap and lichdom, but soul tap requires clothes for mindswap and lichdom takes your soul.
|
||||
|
||||
/obj/effect/proc_holder/spell/self/tap
|
||||
name = "Soul Tap"
|
||||
desc = "Fuel your spells using your own soul!"
|
||||
school = "necromancy" //i could see why this wouldn't be necromancy but messing with souls or whatever. ectomancy?
|
||||
charge_max = 10
|
||||
invocation = "AT ANY COST!"
|
||||
invocation_type = "shout"
|
||||
level_max = 0
|
||||
cooldown_min = 10
|
||||
|
||||
action_icon = 'icons/mob/actions/actions_spells.dmi'
|
||||
action_icon_state = "soultap"
|
||||
|
||||
/obj/effect/proc_holder/spell/self/tap/cast(mob/living/user = usr)
|
||||
if(!user.mind.hasSoul)
|
||||
to_chat(user, "<span class='warning'>You do not possess a soul to tap into!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='danger'>Your body feels drained and there is a burning pain in your chest.</span>")
|
||||
user.maxHealth -= HEALTH_LOST_PER_SOUL_TAP
|
||||
user.health = min(user.health, user.maxHealth)
|
||||
if(user.maxHealth <= 0)
|
||||
to_chat(user, "<span class='userdanger'>Your weakened soul is completely consumed by the tap!</span>")
|
||||
user.mind.hasSoul = FALSE
|
||||
for(var/obj/effect/proc_holder/spell/spell in user.mind.spell_list)
|
||||
spell.charge_counter = spell.charge_max
|
||||
spell.recharging = FALSE
|
||||
spell.update_icon()
|
||||
@@ -1,12 +1,12 @@
|
||||
/datum/unit_test/component_duping/Run()
|
||||
var/list/bad_dms = list()
|
||||
var/list/bad_dts = list()
|
||||
for(var/t in typesof(/datum/component))
|
||||
var/datum/component/comp = t
|
||||
if(!isnum(initial(comp.dupe_mode)))
|
||||
bad_dms += t
|
||||
var/dupe_type = initial(comp.dupe_type)
|
||||
if(dupe_type && !ispath(dupe_type))
|
||||
bad_dts += t
|
||||
if(length(bad_dms) || length(bad_dts))
|
||||
/datum/unit_test/component_duping/Run()
|
||||
var/list/bad_dms = list()
|
||||
var/list/bad_dts = list()
|
||||
for(var/t in typesof(/datum/component))
|
||||
var/datum/component/comp = t
|
||||
if(!isnum(initial(comp.dupe_mode)))
|
||||
bad_dms += t
|
||||
var/dupe_type = initial(comp.dupe_type)
|
||||
if(dupe_type && !ispath(dupe_type))
|
||||
bad_dts += t
|
||||
if(length(bad_dms) || length(bad_dts))
|
||||
Fail("Components with invalid dupe modes: ([bad_dms.Join(",")]) ||| Components with invalid dupe types: ([bad_dts.Join(",")])")
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
@@ -2592,6 +2592,7 @@
|
||||
#include "code\modules\spells\spell_types\santa.dm"
|
||||
#include "code\modules\spells\spell_types\shadow_walk.dm"
|
||||
#include "code\modules\spells\spell_types\shapeshift.dm"
|
||||
#include "code\modules\spells\spell_types\soultap.dm"
|
||||
#include "code\modules\spells\spell_types\spacetime_distortion.dm"
|
||||
#include "code\modules\spells\spell_types\summonitem.dm"
|
||||
#include "code\modules\spells\spell_types\telepathy.dm"
|
||||
|
||||
Reference in New Issue
Block a user