Skip to content

Commit

Permalink
Merge pull request Civ13#2434 from savethetreez/branch
Browse files Browse the repository at this point in the history
AOTD: Fixes cocaine briefcase, adds pure carbon + extends dog sniffing
  • Loading branch information
savethetreez authored Oct 24, 2023
2 parents fbea2c0 + c1d11aa commit ad37c2a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
31 changes: 21 additions & 10 deletions code/game/objects/map_metadata/the_art_of_the_deal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@
var/maxpoints = 4000
grace_wall_timer = 3000
availablefactions = list("Goldstein Solutions", "Kogama Kraftsmen", "Rednikov Industries", "Giovanni Blu Stocks")
var/list/heat = list(
"Rednikov Industries" = 0,
"Giovanni Blu Stocks" = 0,
"Kogama Kraftsmen" = 0,
"Goldstein Solutions" = 0,)
var/list/heat = list("Rednikov Industries" = 0, "Giovanni Blu Stocks" = 0, "Kogama Kraftsmen" = 0, "Goldstein Solutions" = 0)

/obj/map_metadata/art_of_the_deal/update_win_condition()
if (win_condition_spam_check)
Expand Down Expand Up @@ -99,6 +95,7 @@
map.globalmarketplace += list("gio1" = list("Giovanni Blu Stocks",null,1,1000+scores["Giovanni Blu Stocks"],"bank","gio1",1))
map.globalmarketplace += list("green1" = list("Kogama Kraftsmen",null,1,1000+scores["Kogama Krafsmen"],"bank","green1",1))
map.globalmarketplace += list("yellow1" = list("Goldstein Solutions",null,1,1000+scores["Goldstein Solutions"],"bank","yellow1",1))

/obj/map_metadata/art_of_the_deal/proc/assign_delivery_zones()
for(var/turf/floor/delivery/D in turfs)
var/list/tlist = list(list(D.name,D.x,D.y,D.get_coded_loc()))
Expand Down Expand Up @@ -1205,6 +1202,10 @@
var/obj/item/weapon/reagent_containers/pill/cocaine/one_g = new /obj/item/weapon/reagent_containers/pill/cocaine(null)
user.put_in_hands(one_g)
reputation[user.civilization] += 1
if (prob(30))
if (map && map.ID == MAP_THE_ART_OF_THE_DEAL)
var/obj/map_metadata/art_of_the_deal/AD = map
AD.heat[user.civilization] += 1
else
user << "\icon[src] Not enough money, maricon."
else if (choice == "10 grams")
Expand All @@ -1215,12 +1216,12 @@
M.amount-=600/5
if (M.amount <= 0)
qdel(M)
var/obj/item/weapon/reagent_containers/pill/cocaine/one_g = new /obj/item/weapon/reagent_containers/pill/cocaine(null)
var/obj/item/weapon/storage/briefcase/briefcase = new /obj/item/weapon/storage/briefcase(null)
for (var/i = 1; i<=10;i++)
new one_g(briefcase)
var/obj/item/weapon/storage/briefcase/cocaine_10/briefcase = new /obj/item/weapon/storage/briefcase/cocaine_10(null)
user.put_in_hands(briefcase)
reputation[user.civilization] += 2
if (map && map.ID == MAP_THE_ART_OF_THE_DEAL)
var/obj/map_metadata/art_of_the_deal/AD = map
AD.heat[user.civilization] += 5
else
user << "\icon[src] Not enough money, maricon."
else if (choice == "a block")
Expand All @@ -1230,12 +1231,20 @@
qdel(M)
var/obj/item/weapon/reagent_containers/cocaineblock/block = new /obj/item/weapon/reagent_containers/cocaineblock/(null)
user.put_in_hands(block)
if (map && map.ID == MAP_THE_ART_OF_THE_DEAL)
var/obj/map_metadata/art_of_the_deal/AD = map
AD.heat[user.civilization] += 10
else
user << "\icon[src] Not enough money, maricon."
return
else
return

/obj/item/weapon/storage/briefcase/cocaine_10/New()
..()
for (var/i = 1; i<=10;i++)
new /obj/item/weapon/reagent_containers/pill/cocaine(src)

// Mr. White (Chemicals and explosives)

/obj/structure/npc_vendor/walter
Expand All @@ -1250,7 +1259,7 @@
"Kogama Kraftsmen" = 0,
"Goldstein Solutions" = 0,)
var/list/option_list = list("Cancel","Buy chemicals","Buy explosives")
var/list/chemical_list = list("Cancel","Diethylamine","Acetone","Potassium Chloride")
var/list/chemical_list = list("Cancel","Diethylamine","Acetone","Potassium Chloride","Carbon")

/obj/structure/npc_vendor/walter/attack_hand(mob/living/human/user as mob)
if (reputation[user.civilization] < 0)
Expand Down Expand Up @@ -1287,6 +1296,8 @@
new /obj/item/weapon/reagent_containers/glass/bottle/acetone(user.loc)
if ("Potassium Chloride")
new /obj/item/weapon/reagent_containers/glass/bottle/potassium_chloride(user.loc)
if ("Carbon")
new /obj/item/weapon/reagent_containers/glass/bottle/carbon(user.loc)
M.amount -= chemical_price/5
if (M.amount <= 0)
qdel(M)
Expand Down
4 changes: 3 additions & 1 deletion code/modules/1713/complex_animal/dog.dm
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ s

/mob/living/simple_animal/complex_animal/dog/proc/CheckForContraband(var/obj/item/I)
var/message = "It smells contraband nearby"
if (I.is_contraband)
if (!I)
return
if (I.is_contraband || (istype(I,/obj/item/weapon/reagent_containers) && (I.reagents.has_reagent("methamphetamine") || I.reagents.has_reagent("cocaine"))))
if (prob(20) && world.time >= next_bork)
visible_message("<span class='warning'>\The [src] starts barking! [message]!</span>")
playsound(src.loc, 'sound/animals/dog/dogbark3.ogg', 95, TRUE, 3)
Expand Down
11 changes: 11 additions & 0 deletions code/modules/reagents/reagent_containers/glass/bottle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,17 @@
reagents.add_reagent("potassium_chloride", 60)
update_icon()

/obj/item/weapon/reagent_containers/glass/bottle/carbon
name = "carbon bottle"
desc = "A small bottle."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle-3"

New()
..()
reagents.add_reagent("carbon", 60)
update_icon()

/obj/item/weapon/reagent_containers/glass/bottle/pacid
name = "Polytrinic Acid Bottle"
desc = "A small bottle. Contains a small amount of Polytrinic Acid"
Expand Down

0 comments on commit ad37c2a

Please sign in to comment.