diff --git a/__DEFINES/setup.dm b/__DEFINES/setup.dm index a220756da46..36e5b820270 100644 --- a/__DEFINES/setup.dm +++ b/__DEFINES/setup.dm @@ -280,6 +280,8 @@ var/MAX_EXPLOSION_RANGE = 14 #define OPENCONTAINER 8192 // is an open container for chemistry purposes #define NOREACT 16384 // Reagents don't react inside this container. +#define TIMELESS 32768 // Immune to time manipulation. + #define ALL ~0 #define NONE 0 diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 1dc55a3b8e1..afc4b2dd1ee 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -359,7 +359,7 @@ var/global/list/PDA_Manifest = list() src.theworld = theworld /obj/effect/stop/sleeping/Crossed(atom/movable/A) - if(sleeptime > world.time) + if(!(A.flags & TIMELESS) && sleeptime > world.time) if(ismob(A)) var/mob/living/L = A if(L.mind != owner) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c290dbb5c57..e4183f7d35b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -804,3 +804,7 @@ its easier to just keep the beam vertical. //Called when loaded by the map loader /atom/proc/spawned_by_map_element(datum/map_element/ME, list/objects) return + +/atom/proc/toggle_timeless() + flags ^= TIMELESS + return flags & TIMELESS diff --git a/code/game/objects/items/weapons/grenades/chronogrenade.dm b/code/game/objects/items/weapons/grenades/chronogrenade.dm new file mode 100644 index 00000000000..2b5e9cfb781 --- /dev/null +++ b/code/game/objects/items/weapons/grenades/chronogrenade.dm @@ -0,0 +1,13 @@ +/obj/item/weapon/grenade/chronogrenade + name = "chrono grenade" + desc = "This experimental weapon will halt the progression of time in the local area for ten seconds." + icon = 'icons/obj/grenade.dmi' + icon_state = "chrono_grenade" + item_state = "flashbang" + flags = FPRINT | TIMELESS + var/duration = 10 SECONDS + var/radius = 5 //in tiles + +/obj/item/weapon/grenade/chronogrenade/prime() + timestop(src, duration, radius) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 95ba7c04f00..bbab990c18d 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -99,16 +99,16 @@ /obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob) if(isscrewdriver(W)) switch(det_time) - if ("1") + if (1) det_time = 10 to_chat(user, "You set the [name] for 1 second detonation time.") - if ("10") + if (10) det_time = 30 to_chat(user, "You set the [name] for 3 second detonation time.") - if ("30") + if (30) det_time = 50 to_chat(user, "You set the [name] for 5 second detonation time.") - if ("50") + if (50) det_time = 1 to_chat(user, "You set the [name] for instant detonation.") add_fingerprint(user) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index ced9c732dd9..d4129a579a2 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -712,3 +712,12 @@ var/randomsprite = pick("a","b") icon_state = "wizbox-[randomsprite]" +/obj/item/weapon/storage/box/chrono_grenades + name = "box of chrono grenades" + desc = "A box of seven experimental chrono grenades." + icon_state = "chrono_grenade" + +/obj/item/weapon/storage/box/chrono_grenades/New() + ..() + for(var/i = 1 to 7) + new /obj/item/weapon/grenade/chronogrenade(src) diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 747e7e7e586..9cb464c0d80 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -1,68 +1,68 @@ -//Captain's Spacesuit -/obj/item/clothing/head/helmet/space/capspace - name = "space helmet" - icon_state = "capspace_0" - item_state = "capspacehelmet" - desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads." - body_parts_covered = HEAD|EARS|EYES - permeability_coefficient = 0.01 - pressure_resistance = 200 * ONE_ATMOSPHERE - armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50) - allowed = list(/obj/item/device/flashlight) - light_power = 1.7 - var/brightness_on = 4 - var/on = 0 - var/no_light = 0 - action_button_name = "Toggle Helmet Light" - species_fit = list(VOX_SHAPED) - -/obj/item/clothing/head/helmet/space/capspace/attack_self(mob/user) - on = !on - icon_state = "capspace_[on]" - user.update_inv_head() - - if(on) - set_light(brightness_on) - else - set_light(0) - -//Captain's space suit This is not the proper path but I don't currently know enough about how this all works to mess with it. -/obj/item/clothing/suit/armor/captain - name = "Captain's armor" - desc = "A bulky, heavy-duty piece of exclusive Nanotrasen armor. YOU are in charge!" - icon_state = "caparmor" - item_state = "capspacesuit" - species_fit = list(VOX_SHAPED) - w_class = W_CLASS_LARGE - gas_transfer_coefficient = 0.01 - permeability_coefficient = 0.02 - clothing_flags = ONESIZEFITSALL - pressure_resistance = 200 * ONE_ATMOSPHERE - body_parts_covered = ARMS|LEGS|FULL_TORSO|FEET - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_storage, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_nitrogen) - slowdown = 1.5 - armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) - siemens_coefficient = 0.7 - heat_conductivity = SPACESUIT_HEAT_CONDUCTIVITY - -/obj/item/clothing/suit/armor/captain/old - icon_state = "oldcaparmor" - -/obj/item/clothing/suit/armor/centcomm - name = "Cent. Com. armor" - desc = "This bulky armor is the property of Nanotrasen's supreme leader. Witness and behold!" - icon_state = "centcom" - item_state = "centcom" - w_class = W_CLASS_LARGE - gas_transfer_coefficient = 0.01 - permeability_coefficient = 0.02 - clothing_flags = ONESIZEFITSALL | PLASMAGUARD - body_parts_covered = ARMS|LEGS|FULL_TORSO|FEET - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_storage, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_nitrogen) - armor = list(melee = 65, bullet = 55, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 60) - max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE - heat_conductivity = SPACESUIT_HEAT_CONDUCTIVITY - siemens_coefficient = 0 - -/obj/item/clothing/suit/armor/centcomm/old - icon_state = "oldcentcom" +//Captain's Spacesuit +/obj/item/clothing/head/helmet/space/capspace + name = "space helmet" + icon_state = "capspace_0" + item_state = "capspacehelmet" + desc = "A special helmet designed for work in a hazardous, low-pressure environment. Only for the most fashionable of military figureheads." + body_parts_covered = HEAD|EARS|EYES + permeability_coefficient = 0.01 + pressure_resistance = 200 * ONE_ATMOSPHERE + armor = list(melee = 65, bullet = 50, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 50) + allowed = list(/obj/item/device/flashlight) + light_power = 1.7 + var/brightness_on = 4 + var/on = 0 + var/no_light = 0 + action_button_name = "Toggle Helmet Light" + species_fit = list(VOX_SHAPED) + +/obj/item/clothing/head/helmet/space/capspace/attack_self(mob/user) + on = !on + icon_state = "capspace_[on]" + user.update_inv_head() + + if(on) + set_light(brightness_on) + else + set_light(0) + +//Captain's space suit This is not the proper path but I don't currently know enough about how this all works to mess with it. +/obj/item/clothing/suit/armor/captain + name = "Captain's armor" + desc = "A bulky, heavy-duty piece of exclusive Nanotrasen armor. YOU are in charge!" + icon_state = "caparmor" + item_state = "capspacesuit" + species_fit = list(VOX_SHAPED) + w_class = W_CLASS_LARGE + gas_transfer_coefficient = 0.01 + permeability_coefficient = 0.02 + clothing_flags = ONESIZEFITSALL + pressure_resistance = 200 * ONE_ATMOSPHERE + body_parts_covered = ARMS|LEGS|FULL_TORSO|FEET + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_storage, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_nitrogen) + slowdown = 1.5 + armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) + siemens_coefficient = 0.7 + heat_conductivity = SPACESUIT_HEAT_CONDUCTIVITY + +/obj/item/clothing/suit/armor/captain/old + icon_state = "oldcaparmor" + +/obj/item/clothing/suit/armor/centcomm + name = "Cent. Com. armor" + desc = "This bulky armor is the property of Nanotrasen's supreme leader. Witness and behold!" + icon_state = "centcom" + item_state = "centcom" + w_class = W_CLASS_LARGE + gas_transfer_coefficient = 0.01 + permeability_coefficient = 0.02 + clothing_flags = ONESIZEFITSALL | PLASMAGUARD + body_parts_covered = ARMS|LEGS|FULL_TORSO|FEET + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_storage, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_nitrogen) + armor = list(melee = 65, bullet = 55, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 60) + max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE + heat_conductivity = SPACESUIT_HEAT_CONDUCTIVITY + siemens_coefficient = 0 + +/obj/item/clothing/suit/armor/centcomm/old + icon_state = "oldcentcom" diff --git a/code/modules/spells/aoe_turf/fall.dm b/code/modules/spells/aoe_turf/fall.dm index 0700b1a3f6a..8b11435cc39 100644 --- a/code/modules/spells/aoe_turf/fall.dm +++ b/code/modules/spells/aoe_turf/fall.dm @@ -125,13 +125,15 @@ var/global/list/falltempoverlays = list() for(var/atom/movable/everything in T) if(isliving(everything)) var/mob/living/L = everything - if(L == holder) + if(L == holder || L.flags & TIMELESS) continue affected += L invertcolor(L) spawn() recursive_timestop(L) L.playsound_local(L, invocation == "ZA WARUDO" ? 'sound/effects/theworld2.ogg' : 'sound/effects/fall2.ogg', 100, 0, 0, 0, 0) else + if(everything.flags & TIMELESS) + continue spawn() recursive_timestop(everything) if(everything.ignoreinvert) continue @@ -154,7 +156,8 @@ var/global/list/falltempoverlays = list() affected |= A if(A != holder) - A.timestopped = 1 + if(!(A.flags & TIMELESS)) + A.timestopped = 1 for (var/atom/B in A) if (!processed_list[B]) @@ -214,3 +217,23 @@ var/global/list/falltempoverlays = list() 0,-1,0, 0,0,-1, 1,1,1) + +/proc/timestop(atom/A, var/duration, var/range) + if(!A || !duration) + return + var/mob/caster = new + var/spell/aoe_turf/fall/fall = new /spell/aoe_turf/fall + caster.invisibility = 101 + caster.density = 0 + caster.anchored = 1 + caster.flags = INVULNERABLE + caster.add_spell(fall) + fall.spell_flags = 0 + fall.invocation_type = SpI_NONE + fall.the_world_chance = 0 + fall.range = range ? range : 7 //how big + fall.sleeptime = duration //for how long + caster.forceMove(get_turf(A)) + spawn() + fall.perform(caster, skipcharge = 1) + qdel(caster) \ No newline at end of file diff --git a/icons/obj/grenade.dmi b/icons/obj/grenade.dmi index a24a06ffc3d..0fb29b536b7 100644 Binary files a/icons/obj/grenade.dmi and b/icons/obj/grenade.dmi differ diff --git a/icons/obj/storage/smallboxes.dmi b/icons/obj/storage/smallboxes.dmi index 4a24c001c6d..fd2dc2bfbf2 100644 Binary files a/icons/obj/storage/smallboxes.dmi and b/icons/obj/storage/smallboxes.dmi differ diff --git a/vgstation13.dme b/vgstation13.dme index 3672193513c..ced5b623c02 100644 --- a/vgstation13.dme +++ b/vgstation13.dme @@ -771,6 +771,7 @@ #include "code\game\objects\items\weapons\ai_modules\standard.dm" #include "code\game\objects\items\weapons\ai_modules\targetted.dm" #include "code\game\objects\items\weapons\grenades\chem_grenade.dm" +#include "code\game\objects\items\weapons\grenades\chronogrenade.dm" #include "code\game\objects\items\weapons\grenades\clowngrenade.dm" #include "code\game\objects\items\weapons\grenades\emgrenade.dm" #include "code\game\objects\items\weapons\grenades\flashbang.dm"