-
Notifications
You must be signed in to change notification settings - Fork 52
The Gangening, New Drug Trafficking Gang in San Fang #85
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
base: master
Are you sure you want to change the base?
Changes from 28 commits
0b6d5c8
0e0281e
b5fb90f
877abdf
14052fa
c340cb8
04d4164
86ffcc6
96741fa
2cc7260
ccb2ccb
49b6311
0e7a0ed
4f63f48
e4686ef
085d110
6396c65
c380b40
7d88230
dd16a8e
c4f8816
800cb29
249efda
10fc984
dcbd2fb
996c381
2755119
ecf30d5
1607295
2177cff
03962d2
e753db0
7399d4f
7151eef
24f6bcf
7d99a8d
d5fbfc5
96e595e
fc86269
2e7c135
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,16 @@ | ||
| #define BANDIT_TYPE_NPC /mob/living/carbon/human/npc/bandit | ||
| #define POLICE_TYPE_NPC /mob/living/carbon/human/npc/police | ||
|
|
||
| #define NPC_DRUG_SALE_DIFFICULTY 6 | ||
| #define NPC_DRUG_SALE_BOTCH_PENALTY 0.5 | ||
| #define NPC_DRUG_LINE_COOLDOWN 3 SECONDS | ||
|
|
||
| /datum/storyteller_roll/npc_drug_sale | ||
| bumper_text = "dealing" | ||
| applicable_stats = list(STAT_STREETWISE, STAT_CHARISMA) | ||
|
sylvia-from-fulp-station marked this conversation as resolved.
Outdated
|
||
| difficulty = NPC_DRUG_SALE_DIFFICULTY | ||
|
sylvia-from-fulp-station marked this conversation as resolved.
Outdated
|
||
| numerical = TRUE | ||
|
|
||
| /mob/living/carbon/human/npc | ||
| name = "NPC" | ||
|
|
||
|
|
@@ -32,12 +42,14 @@ | |
|
|
||
| var/is_talking = FALSE | ||
| COOLDOWN_DECLARE(annoyed_cooldown) | ||
| COOLDOWN_DECLARE(drug_line_cooldown) | ||
| COOLDOWN_DECLARE(car_dodge) | ||
| var/hostile = FALSE | ||
| var/aggressive = FALSE | ||
| var/last_antagonised = 0 | ||
| var/mob/living/danger_source | ||
| var/obj/effect/abstract/turf_fire/afraid_of_fire | ||
| var/mob/living/fleeing_from | ||
| var/mob/living/last_attacker | ||
| var/last_health = 100 | ||
| var/mob/living/last_damager | ||
|
|
@@ -78,6 +90,16 @@ | |
|
|
||
| var/list/drop_on_death_list = null | ||
|
|
||
| var/drug_price = 0 | ||
| var/drug_purchase_limit = 3 // so you can't just keep an NPC next to a weed farm | ||
| var/drug_purchases = 0 | ||
| var/datum/storyteller_roll/npc_drug_sale/drug_sell_roll | ||
| var/static/list/npc_buyable_categories = list( | ||
| "weed", | ||
| "meth", | ||
| "cocaine", | ||
| ) | ||
|
|
||
| /mob/living/carbon/human/npc/Initialize(mapload) | ||
| . = ..() | ||
|
|
||
|
|
@@ -269,3 +291,78 @@ | |
|
|
||
| /mob/living/carbon/human/npc/proc/ghoul_player_controlled(mob/owner) | ||
| message_admins("[key_name_admin(src)] has became a ghoul by [key_name_admin(owner)].") | ||
|
|
||
| //drug dealing | ||
| /mob/living/carbon/human/npc/proc/announce_drug_line(list/phrases) | ||
| if(!LAZYLEN(phrases)) | ||
| return | ||
| if(!COOLDOWN_FINISHED(src, drug_line_cooldown)) | ||
| return | ||
| COOLDOWN_START(src, drug_line_cooldown, NPC_DRUG_LINE_COOLDOWN) | ||
| say(pick(phrases)) | ||
|
|
||
| /mob/living/carbon/human/npc/item_interaction(mob/living/user, obj/item/tool, list/modifiers) | ||
| . = ..() | ||
| if(.) | ||
| return | ||
|
|
||
| if(user.combat_mode) | ||
| return NONE | ||
|
|
||
| var/datum/component/selling/selling_comp = tool.GetComponent(/datum/component/selling) | ||
| if(!selling_comp || !selling_comp.illegal || !(selling_comp.object_category in npc_buyable_categories)) | ||
|
sylvia-from-fulp-station marked this conversation as resolved.
Outdated
|
||
| return NONE | ||
| // dont deal drugs to cops | ||
| if(istype(src, /mob/living/carbon/human/npc/police)) | ||
| announce_drug_line(socialrole?.drug_witness_phrases) | ||
| last_antagonised = world.time | ||
| Aggro(user, TRUE) | ||
| SEND_SIGNAL(SSdcs, COMSIG_GLOB_REPORT_CRIME, CRIME_DRUG_SALE, get_turf(src)) | ||
| return ITEM_INTERACT_SUCCESS | ||
| // dont deal drugs to drug dealers | ||
| if(istype(src, /mob/living/carbon/human/npc/bandit) && prob(50)) | ||
| announce_drug_line(socialrole?.drug_turf_phrases) | ||
| last_antagonised = world.time | ||
| Aggro(user, TRUE) | ||
| return ITEM_INTERACT_SUCCESS | ||
|
|
||
| if(danger_source == user) | ||
| return ITEM_INTERACT_SUCCESS | ||
|
|
||
| if(drug_price <= 0 || drug_purchases >= drug_purchase_limit) | ||
| realistic_say(pick(socialrole?.drug_refusal_phrases)) | ||
| return ITEM_INTERACT_SUCCESS | ||
|
|
||
| drug_purchases++ | ||
|
|
||
| if(!drug_sell_roll) | ||
| drug_sell_roll = new() | ||
| var/success_count = drug_sell_roll.st_roll(user, src) | ||
| var/stack_multiplier = 1 | ||
| if(istype(tool, /obj/item/stack)) | ||
| var/obj/item/stack/stack_item = tool | ||
| stack_multiplier = stack_item.amount | ||
| var/sale_price = round(selling_comp.cost * stack_multiplier * drug_price * (success_count > 0 ? success_count : NPC_DRUG_SALE_BOTCH_PENALTY)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol - this is gonna be nuts. we will have to balance this. keep for now.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it uses the same value as black market so if that's nerfed this will be nerfed too |
||
|
|
||
| var/obj/item/stack/dollar/cash = new(get_turf(src), sale_price) | ||
| user.put_in_hands(cash) | ||
|
|
||
| // dont deal drugs infront of cops | ||
| for(var/mob/living/carbon/human/npc/police/witness in oviewers(DEFAULT_SIGHT_DISTANCE, src)) | ||
| witness.announce_drug_line(witness.socialrole?.drug_witness_phrases) | ||
| witness.last_antagonised = world.time | ||
| witness.Aggro(user, TRUE) | ||
| fleeing_from = witness | ||
|
|
||
| if(!fleeing_from) | ||
| realistic_say(pick(socialrole?.drug_purchase_phrases)) | ||
|
|
||
| SEND_SIGNAL(SSdcs, COMSIG_GLOB_REPORT_CRIME, CRIME_DRUG_SALE, get_turf(src)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sidenote - pretty sure the crime always gets 'reported' even no matter if there are no witnesses. have to check tho.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this only runs if a cop sees it (or should) |
||
|
|
||
| log_game("[key_name(user)] sold [tool] to [src] for $[sale_price]") | ||
| qdel(tool) | ||
| return ITEM_INTERACT_SUCCESS | ||
|
|
||
| #undef NPC_DRUG_SALE_DIFFICULTY | ||
| #undef NPC_DRUG_SALE_BOTCH_PENALTY | ||
| #undef NPC_DRUG_LINE_COOLDOWN | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /mob/living/carbon/human/npc/walkby/club | ||
| staying = TRUE | ||
| drug_price = 1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be increased. socialites go skiing all the time. |
||
|
|
||
| /mob/living/carbon/human/npc/walkby/club/Life() | ||
| . = ..() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /mob/living/carbon/human/npc/stripper | ||
| staying = TRUE | ||
| drug_price = 1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be increased |
||
|
|
||
| /mob/living/carbon/human/npc/stripper/Initialize(mapload) | ||
| . = ..() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,6 +135,13 @@ | |
| "Uhmm... Cool I guess", | ||
| "Had some good food over at gummaguts, stomach hurts though..." | ||
| ) | ||
| drug_turf_phrases = list( | ||
| "I'll beat your ass punk!", | ||
| "Scram you fuckin' rat!", | ||
| "Find your own corner bitch!", | ||
| "You're pushin' weight on my block?", | ||
| "Someone's about to learn some respect!", | ||
| ) | ||
| help_phrases = list( | ||
| "God, not again!", | ||
| "Fucking FREAK!", | ||
|
|
@@ -143,3 +150,8 @@ | |
| "Check yo' self, fool!", | ||
| "We got shit, shit that'll shut you up for good!" | ||
| ) | ||
| drug_purchase_phrases = list( | ||
| "You know what kid? I'm feeling generous.", | ||
| "Yeah, that's about as much as that junk is worth.", | ||
| "Take that and take a hike if you know what's good for ya." | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds like the tunnel snakes |
||
| ) | ||
Uh oh!
There was an error while loading. Please reload this page.