Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Чемоданчик #11398

Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions code/game/objects/items/weapons/grenades/chem_grenade.dm
Expand Up @@ -359,3 +359,23 @@
beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"

///Drugs
/obj/item/weapon/grenade/chem_grenade/mine
name = "Satchel mine"
desc = "Привет от синдиката."
path = 1
stage = 2

/obj/item/weapon/grenade/chem_grenade/mine/atom_init()
. = ..()
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("potassium", 50)
LudwigVonChesterfield marked this conversation as resolved.
Show resolved Hide resolved
B2.reagents.add_reagent("water", 50)

detonator = new/obj/item/device/assembly_holder/mousetrap_igniter(src)

beakers += B1
beakers += B2
icon_state = initial(icon_state) +"_locked"
2 changes: 2 additions & 0 deletions code/game/objects/items/weapons/storage/storage.dm
Expand Up @@ -88,6 +88,7 @@
if(M.a_intent == INTENT_HELP)
var/dir_target = get_dir(M.loc, over_location)
M.SetNextMove(CLICK_CD_MELEE)
try_open(usr)
for(var/obj/item/I in contents)
if(M.is_busy())
return
Expand Down Expand Up @@ -423,6 +424,7 @@
//Clicking on itself will empty it, if it has the verb to do that.
if(user.get_active_hand() == src)
if(verbs.Find(/obj/item/weapon/storage/proc/quick_empty))
try_open(user)
quick_empty()
return

Expand Down
129 changes: 129 additions & 0 deletions code/game/objects/random/random_misc.dm
Expand Up @@ -161,3 +161,132 @@
prob(10);/obj/item/weapon/disk/research_points/rare,\
prob(100);pick(typesof(/obj/item/weapon/disk/smartlight_programm))
)

/obj/random/misc/mine/wallet
name = "Random Wallet"
desc = "Кошелёк с миной или обычными деньгами."
icon = 'icons/obj/storage.dmi'
icon_state = "wallet"

/obj/random/misc/mine/wallet/item_to_spawn()
return /obj/item/weapon/storage/wallet

/obj/random/misc/mine/wallet/spawn_item()
var/obj/item/weapon/storage/Bag = ..()

Check failure on line 175 in code/game/objects/random/random_misc.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

proc has no parent: /obj/random/misc/mine/wallet/proc/spawn_item

if(prob(30))
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в чем прикол больше одной гранаты

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 гранат по 30 ломают человека но не ломают тайлы.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а 1 граната не ломает?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ну и в любом случае заменить на

for(var/i in 1 to количество)
    new граната

new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
else
spawn_money(300, Bag)

/obj/random/misc/mine/box_pouch
name = "Random Box"
desc = "Случайная коробка с миной или обычными предметами."
icon = 'icons/obj/storage.dmi'
icon_state = "box"

/obj/random/misc/mine/box_pouch/item_to_spawn()
return pick(\
prob(20);/obj/item/weapon/storage/pouch/medium_generic,\
prob(100);/obj/item/weapon/storage/box,
)

/obj/random/misc/mine/box_pouch/spawn_item()
var/obj/item/weapon/storage/Bag = ..()

Check failure on line 199 in code/game/objects/random/random_misc.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

proc has no parent: /obj/random/misc/mine/box_pouch/proc/spawn_item

if(prob(30))
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
else
for(var/i = 0, i < 4, i++)
var/itemtype = pick(\
prob(25);/obj/random/foods/food_snack,\
prob(25);/obj/random/foods/drink_can,\
prob(25);/obj/random/misc/cigarettes,\
prob(25);/obj/random/misc/lightsource,\
prob(25);/obj/random/misc/lighters,\
prob(25);/obj/random/meds/pills,\
prob(25);pick(typesof(/obj/item/device/camera) - /obj/item/device/camera/siliconcam),\
prob(20);/obj/item/weapon/storage/wallet/random,\
prob(15);/obj/item/weapon/reagent_containers/spray/pepper,\
prob(10);/obj/item/device/flash,
)
new itemtype(Bag)

/obj/random/misc/mine/backpack_satchel
name = "Random Bag/Case"
desc = "Случайная сумка с миной или обычными предметами."
icon = 'icons/obj/storage.dmi'
icon_state = "briefcase"

/obj/random/misc/mine/backpack_satchel/item_to_spawn()
return pick(\
prob(30);/obj/item/weapon/storage/briefcase,\
prob(30);/obj/item/weapon/storage/backpack/alt,\
prob(30);/obj/item/weapon/storage/backpack,\
prob(30);/obj/item/weapon/storage/backpack/satchel,\
prob(100);/obj/item/weapon/storage/backpack/satchel/norm,
)

/obj/random/misc/mine/backpack_satchel/spawn_item()
var/obj/item/weapon/storage/Bag = ..()

Check failure on line 239 in code/game/objects/random/random_misc.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

proc has no parent: /obj/random/misc/mine/backpack_satchel/proc/spawn_item
LudwigVonChesterfield marked this conversation as resolved.
Show resolved Hide resolved

if(prob(30))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут и везде переписать на вид

if(prob(30))
    ...
    return

for ...
    ...

(т.н. "ранний возврат")

new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
else
for(var/i = 0, i < 4, i++)
var/itemtype = pick(\
prob(25);/obj/random/foods/food_snack,\
prob(25);/obj/random/foods/drink_can,\
prob(25);/obj/random/misc/cigarettes,\
prob(25);/obj/random/misc/lightsource,\
prob(25);/obj/random/misc/book,\
prob(25);/obj/random/misc/lighters,\
prob(25);/obj/random/meds/pills,\
prob(25);/obj/item/weapon/storage/box/survival,\
prob(25);/obj/item/weapon/storage/box/donkpockets,\
prob(25);pick(typesof(/obj/item/device/camera) - /obj/item/device/camera/siliconcam),\
prob(20);/obj/item/weapon/storage/wallet/random,\
prob(15);/obj/item/weapon/reagent_containers/spray/pepper,\
prob(10);/obj/item/device/flash,\
prob(5);/obj/item/weapon/gun/projectile/automatic/glock

Check failure on line 263 in code/game/objects/random/random_misc.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

failed to resolve path /obj/item/weapon/gun/projectile/automatic/glock
)
new itemtype(Bag)

/obj/random/misc/mine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

выглядит будто это рандомная мина а не коробка с миной

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

так на картинке с ней будет сумка. так что явно будет понятно что это рандомная коробка с миной

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

названия важны. в названии написано что это мина а не сумка с миной. напиши что это сумка с миной

name = "Random Bag/Box/Case with mine"
desc = "Случайная сумка с миной."
icon = 'icons/obj/storage.dmi'
icon_state = "secure"

/obj/random/misc/storage/mine/item_to_spawn()
return pick(\
prob(30);/obj/item/weapon/storage/briefcase,\
prob(30);/obj/item/weapon/storage/backpack/alt,\
prob(30);/obj/item/weapon/storage/backpack,\
prob(30);/obj/item/weapon/storage/backpack/satchel,\
prob(30);/obj/item/weapon/storage/backpack/satchel/norm,\
prob(20);/obj/item/weapon/storage/pouch/medium_generic,\
prob(10);/obj/item/weapon/storage/box,\
prob(5);/obj/item/weapon/storage/wallet,
)

/obj/random/misc/storage/mine/spawn_item()
var/obj/item/weapon/storage/Bag = ..()

Check failure on line 286 in code/game/objects/random/random_misc.dm

View workflow job for this annotation

GitHub Actions / DreamChecker

proc has no parent: /obj/random/misc/storage/mine/proc/spawn_item

new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
new /obj/item/weapon/grenade/chem_grenade/mine(Bag)
19 changes: 19 additions & 0 deletions code/modules/assembly/holder.dm
Expand Up @@ -239,3 +239,22 @@
to_chat(usr, "<span class='notice'>Timer can't be [ntime<=0?"negative":"more than 1000 seconds"].</span>")
else
to_chat(usr, "<span class='notice'>You cannot do this while [usr.stat?"unconscious/dead":"restrained"].</span>")

//********-Mousetrap
/obj/item/device/assembly_holder/mousetrap_igniter
LudwigVonChesterfield marked this conversation as resolved.
Show resolved Hide resolved
name = "mousetrap-igniter assembly"

/obj/item/device/assembly_holder/mousetrap_igniter/atom_init()
. = ..()

var/obj/item/device/assembly/igniter/ign = new(src)
ign.secured = 1
ign.holder = src
var/obj/item/device/assembly/mousetrap/mous = new(src)
mous.armed = TRUE
mous.secured = 1
mous.holder = src
a_left = mous
a_right = ign
secured = 1
update_icon()
1 change: 1 addition & 0 deletions code/modules/events/_event_container.dm
Expand Up @@ -139,6 +139,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_FEATURE = "RoundStart", EV
new /datum/event_meta(EVENT_LEVEL_FEATURE, "Roundstart Nothing", /datum/event/nothing, 1500),
new /datum/event_meta(EVENT_LEVEL_FEATURE, "Break Light", /datum/event/feature/area/break_light, 50, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_JANITOR = 40)),
new /datum/event_meta(EVENT_LEVEL_FEATURE, "Dirt Bay", /datum/event/feature/area/dirt, 10, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_FEATURE, "Satchel Mine", /datum/event/feature/area/satchelmine, 25, list(ASSIGNMENT_SECURITY = 100)),
new /datum/event_meta(EVENT_LEVEL_FEATURE, "Randomize Cargo Storage", /datum/event/feature/area/cargo_storage, 10),
new /datum/event_meta(EVENT_LEVEL_FEATURE, "Armory Mess", /datum/event/feature/area/mess/armory, 10),
new /datum/event_meta(EVENT_LEVEL_FEATURE, "Bridge Mess", /datum/event/feature/area/mess/bridge, 10),
Expand Down
20 changes: 20 additions & 0 deletions code/modules/events/roundstart_events/area/satchelmine.dm
@@ -0,0 +1,20 @@
/datum/event/feature/area/satchelmine
special_area_types = list(/area/station/hallway, /area/station/civilian)

/datum/event/feature/area/satchelmine/start()
var/number_of_satchels = rand(1, 3)
for(var/i = 0, i < number_of_satchels, i++)
var/area/target_area = pick(targeted_areas - special_area_types)
message_admins("RoundStart Event: Satchelmine appears in [target_area]")
var/list/tables = list()
for(var/obj/structure/table/Table in target_area)
tables += Table
var/Mine = pick(/obj/random/misc/mine/wallet, /obj/random/misc/mine/box_pouch, /obj/random/misc/mine/backpack_satchel)
if(tables.len)
var/obj/structure/table/Table = pick(tables)
var/turf/T = get_turf(Table)
new Mine(T)
else
var/list/turf/all_turfs = get_area_turfs(target_area, TRUE, black_list=list(/turf/simulated/wall, /turf/simulated/wall/r_wall))
var/turf/T = pick(all_turfs)
new Mine(T)
1 change: 1 addition & 0 deletions taucetistation.dme
Expand Up @@ -1618,6 +1618,7 @@
#include "code\modules\events\roundstart_events\area\maintenance.dm"
#include "code\modules\events\roundstart_events\area\mess.dm"
#include "code\modules\events\roundstart_events\area\minefield.dm"
#include "code\modules\events\roundstart_events\area\satchelmine.dm"
#include "code\modules\events\roundstart_events\area\replace\deathly_sec.dm"
#include "code\modules\events\roundstart_events\area\replace\del_cable.dm"
#include "code\modules\events\roundstart_events\area\replace\del_surgeon_tools.dm"
Expand Down