From 8cce41bf845ff31fc9aa729db5d6d0d3f61c25b1 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Thu, 12 May 2016 14:14:01 -0400 Subject: [PATCH] Adds anti-tamper to crates and adds anti-tamper 1 to abandoned ones. Also fixes a minor thing they did to species, renamed a flag. --- .../structures/crates_lockers/crates_vr.dm | 41 +++++++++++++++++++ code/modules/mining/abandonedcrates_vr.dm | 2 + .../human/species/station/station_vr.dm | 6 +-- vorestation.dme | 4 +- 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 code/game/objects/structures/crates_lockers/crates_vr.dm create mode 100644 code/modules/mining/abandonedcrates_vr.dm diff --git a/code/game/objects/structures/crates_lockers/crates_vr.dm b/code/game/objects/structures/crates_lockers/crates_vr.dm new file mode 100644 index 0000000000..35ec2d41cd --- /dev/null +++ b/code/game/objects/structures/crates_lockers/crates_vr.dm @@ -0,0 +1,41 @@ +/obj/structure/closet/crate/secure + var/tamper_proof = 0 + +/obj/structure/closet/crate/secure/bullet_act(var/obj/item/projectile/Proj) + if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) + return + + health -= Proj.damage + + ..() + + if(locked && tamper_proof && health <= 0) + if(tamper_proof == 2) // Mainly used for events to prevent any chance of opening the box improperly. + visible_message("The anti-tamper mechanism of [src] triggers an explosion!") + var/turf/T = get_turf(src.loc) + explosion(T, 0, 0, 0, 1) // Non-damaging, but it'll alert security. + qdel(src) + return + var/open_chance = rand(1,5) + switch(open_chance) + if(1) + visible_message("The anti-tamper mechanism of [src] causes an explosion!") + var/turf/T = get_turf(src.loc) + explosion(T, 0, 0, 0, 1) // Non-damaging, but it'll alert security. + qdel(src) + if(2 to 4) + visible_message("The anti-tamper mechanism of [src] causes a small fire!") + for(var/atom/movable/A as mob|obj in src) // For every item in the box, we spawn a pile of ash. + new /obj/effect/decal/cleanable/ash(src.loc) + new /obj/fire(src.loc) + qdel(src) + if(5) + visible_message("The anti-tamper mechanism of [src] fails!") + return + + if(health <= 0) + for(var/atom/movable/A as mob|obj in src) + A.loc = src.loc + qdel(src) + + return \ No newline at end of file diff --git a/code/modules/mining/abandonedcrates_vr.dm b/code/modules/mining/abandonedcrates_vr.dm new file mode 100644 index 0000000000..983a078b87 --- /dev/null +++ b/code/modules/mining/abandonedcrates_vr.dm @@ -0,0 +1,2 @@ +/obj/structure/closet/crate/secure/loot + tamper_proof = 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index 72f9e65823..b58b30e885 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -30,7 +30,7 @@ primitive_form = "Farwa" //POLARISTODO - Add other monkeytypes - spawn_flags = CAN_JOIN + spawn_flags = SPECIES_CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" @@ -75,7 +75,7 @@ primitive_form = "Farwa" //POLARISTODO - Add other monkeytypes - spawn_flags = CAN_JOIN + spawn_flags = SPECIES_CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" @@ -108,7 +108,7 @@ primitive_form = "Farwa" //POLARISTODO - Add other monkeytypes - spawn_flags = CAN_JOIN + spawn_flags = SPECIES_CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" diff --git a/vorestation.dme b/vorestation.dme index 9520d6fa1b..031ee233b2 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -807,6 +807,7 @@ #include "code\game\objects\structures\window_spawner.dm" #include "code\game\objects\structures\crates_lockers\closets.dm" #include "code\game\objects\structures\crates_lockers\crates.dm" +#include "code\game\objects\structures\crates_lockers\crates_vr.dm" #include "code\game\objects\structures\crates_lockers\largecrate.dm" #include "code\game\objects\structures\crates_lockers\closets\coffin.dm" #include "code\game\objects\structures\crates_lockers\closets\crittercrate.dm" @@ -1239,6 +1240,7 @@ #include "code\modules\materials\material_synth.dm" #include "code\modules\materials\materials.dm" #include "code\modules\mining\abandonedcrates.dm" +#include "code\modules\mining\abandonedcrates_vr.dm" #include "code\modules\mining\alloys.dm" #include "code\modules\mining\coins.dm" #include "code\modules\mining\machine_input_output_plates.dm" @@ -1385,8 +1387,8 @@ #include "code\modules\mob\living\carbon\human\species\species_getters.dm" #include "code\modules\mob\living\carbon\human\species\species_helpers.dm" #include "code\modules\mob\living\carbon\human\species\species_hud.dm" -#include "code\modules\mob\living\carbon\human\species\species_vr.dm" #include "code\modules\mob\living\carbon\human\species\species_shapeshift.dm" +#include "code\modules\mob\living\carbon\human\species\species_vr.dm" #include "code\modules\mob\living\carbon\human\species\outsider\shadow.dm" #include "code\modules\mob\living\carbon\human\species\station\golem.dm" #include "code\modules\mob\living\carbon\human\species\station\monkey.dm"