Skip to content

Commit

Permalink
Checkpoint Patch (DO NOT MERGE)
Browse files Browse the repository at this point in the history
This is so I can go back to a point where they were semi-usable if it breaks again, but still needs further work. Not ready for merging yet.
  • Loading branch information
Necbro committed Jan 20, 2025
1 parent 02e02b0 commit 3e176c3
Show file tree
Hide file tree
Showing 17 changed files with 1,562 additions and 359 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/components.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
/// Arguments given here are packaged in a list and given to _SendSignal
#define SEND_SIGNAL(target, sigtype, arguments...) ( !target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)) )

#define SIGNAL_HANDLER SHOULD_NOT_SLEEP(TRUE); SHOULD_NOT_OVERRIDE(TRUE)

#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )

/// Return this from `/datum/component/Initialize` or `datum/component/OnTransfer` to have the component be deleted if it's applied to an incorrect type.
Expand Down
4 changes: 0 additions & 4 deletions code/__DEFINES/dcs/helpers.dm
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
/// Signifies that this proc is used to handle signals.
/// Every proc you pass to RegisterSignal must have this.
#define SIGNAL_HANDLER SHOULD_NOT_SLEEP(TRUE)

13 changes: 13 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#define COMSIG_MOB_ATTACK "mob_attack"
#define COMSIG_MOB_SAY "mob_say"
#define COMSIG_MOB_CLICKON "mob_clickon"
#define COMSIG_LIVING_TRY_ATTACK "living_try_attack"
#define COMSIG_MOB_EMOTE "mob_emote"

// Item signals
#define COMSIG_ITEM_PRE_UNEQUIP "item_pre_unequip"
Expand All @@ -10,6 +12,7 @@
#define COMPONENT_CANCEL_ATTACK (1<<0)
#define COMPONENT_CANCEL_SAY (1<<0)
#define COMPONENT_ITEM_BLOCK_UNEQUIP (1<<0)
#define COMPONENT_CANCEL_EMOTE (1<<1)

// Collar signals
#define COMSIG_CARBON_GAIN_COLLAR "carbon_gain_collar"
Expand All @@ -20,3 +23,13 @@

// Living revive signal
#define COMSIG_LIVING_REVIVE "mob_revive"

// Sex Controller Signals
#define COMSIG_SEXCONTROLLER_CLIMAX "sex_controller_climax"
#define COMSIG_SEXCONTROLLER_AROUSAL_CHANGE "sex_controller_arousal_change"

// Sex Controller Return Values
#define COMPONENT_CANCEL_CLIMAX (1<<0)

// Emote return values
#define COMPONENT_EMOTE_MESSAGE_CHANGED (1<<0)
2 changes: 2 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -519,3 +519,5 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

#define TRAIT_SLAVEBOURNE "slavebourne"
#define TRAIT_SLAVEBOURNE_EXAMINE "trait_slavebourne_examine"

#define TRAIT_LOVESTRUCK "lovestruck" // For collar master's force love effect
7 changes: 6 additions & 1 deletion code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
blend_mode = BLEND_ADD
show_when_dead = TRUE

/atom/movable/screen/fullscreen/maniac
/atom/movable/screen/fullscreen/maniac
icon = 'icons/roguetown/maniac/fullscreen.dmi'
icon_state = "hall0"
alpha = 0
Expand All @@ -289,3 +289,8 @@

/atom/movable/screen/fullscreen/dreaming/waking_up
icon_state = "wake_up"

/atom/movable/screen/fullscreen/arousal
icon = 'icons/mob/screen_full.dmi'
icon_state = "love"
layer = FULLSCREEN_LAYER
74 changes: 20 additions & 54 deletions code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -629,67 +629,31 @@

/datum/quirk/slavebourne
name = "Slavebourne"
desc = "You have an innate need to be collared and controlled. Without a master, your abilities are diminished."
desc = "You want to rid yourself of the pain and harshness of choice. You hid a cursed collar..."
value = -6
mob_trait = TRAIT_SLAVEBOURNE
gain_text = span_notice("You want to rid yourself of the pain and harshness of choice..")
lose_text = span_notice("You feel more independent.")
gain_text = span_danger("You feel an overwhelming need to be controlled...")
lose_text = span_notice("You feel more independent!")
medical_record_text = "Patient exhibits strong submissive tendencies and a psychological need for authority."
var/debuff_active = FALSE
var/debuff_active = TRUE
var/master_dead = FALSE
var/obj/item/clothing/neck/roguetown/cursed_collar/my_collar

/datum/quirk/slavebourne/add()
. = ..()
var/mob/living/carbon/human/H = quirk_holder
if(!H)
if(!istype(H))
return

apply_debuff()
ADD_TRAIT(H, TRAIT_SLAVEBOURNE_EXAMINE, TRAIT_GENERIC)
ADD_TRAIT(H, TRAIT_SLAVEBOURNE, QUIRK_TRAIT)
RegisterSignal(H, COMSIG_CARBON_GAIN_COLLAR, .proc/on_collared)
RegisterSignal(H, COMSIG_CARBON_LOSE_COLLAR, .proc/on_uncollared)

// Add a delayed check for collar status
addtimer(CALLBACK(src, .proc/check_initial_collar_status), 5 SECONDS)

/datum/quirk/slavebourne/proc/check_initial_collar_status()
var/mob/living/carbon/human/H = quirk_holder
if(!H)
return

var/obj/item/clothing/neck/collar = H.get_item_by_slot(SLOT_NECK)
if(!istype(collar, /obj/item/clothing/neck/roguetown/cursed_collar))
debuff_active = TRUE
apply_debuff()
to_chat(H, span_warning("Without a master to serve, your abilities are diminished..."))
return

var/obj/item/clothing/neck/roguetown/cursed_collar/cursed = collar
if(!cursed.collar_master || cursed.collar_master == H)
debuff_active = TRUE
apply_debuff()
to_chat(H, span_warning("Without a master to serve, your abilities are diminished..."))

/datum/quirk/slavebourne/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
if(!H)
return

my_collar = new /obj/item/clothing/neck/roguetown/cursed_collar(get_turf(H))
to_chat(H, span_notice("A cursed collar materializes on the ground near you..."))

/datum/quirk/slavebourne/remove()
var/mob/living/carbon/human/H = quirk_holder
if(!H)
if(!istype(H))
return

REMOVE_TRAIT(H, TRAIT_SLAVEBOURNE_EXAMINE, TRAIT_GENERIC)
REMOVE_TRAIT(H, TRAIT_SLAVEBOURNE, QUIRK_TRAIT)
remove_debuff()
UnregisterSignal(H, COMSIG_CARBON_GAIN_COLLAR)
UnregisterSignal(H, COMSIG_CARBON_LOSE_COLLAR)
if(my_collar)
qdel(my_collar)
H.mind.special_items["Cursed Collar"] = /obj/item/clothing/neck/roguetown/cursed_collar
to_chat(H, span_notice("You remember where you hid your cursed collar..."))

/datum/quirk/slavebourne/proc/apply_debuff()
var/mob/living/carbon/human/H = quirk_holder
Expand Down Expand Up @@ -719,8 +683,10 @@
H.change_stat("endurance", 4)
H.change_stat("fortune", 4)

/datum/quirk/slavebourne/proc/on_collared(mob/living/carbon/human/source, obj/item/clothing/neck/roguetown/cursed_collar/collar)
/datum/quirk/slavebourne/proc/on_collared(mob/living/carbon/human/source)
SIGNAL_HANDLER
var/obj/item/clothing/neck/roguetown/cursed_collar/collar = source.get_item_by_slot(SLOT_NECK)

if(master_dead) // If master died, new collars won't help
to_chat(source, span_warning("The death of your previous master has left you permanently weakened. No new master can restore your abilities..."))
return
Expand All @@ -731,12 +697,14 @@
UnregisterSignal(collar.collar_master, COMSIG_LIVING_REVIVE)

// Register new signals
RegisterSignal(collar.collar_master, COMSIG_LIVING_DEATH, .proc/on_master_death)
RegisterSignal(collar.collar_master, COMSIG_LIVING_REVIVE, .proc/on_master_revive)
RegisterSignal(collar.collar_master, COMSIG_LIVING_DEATH, PROC_REF(on_master_death))
RegisterSignal(collar.collar_master, COMSIG_LIVING_REVIVE, PROC_REF(on_master_revive))

debuff_active = FALSE
remove_debuff()
to_chat(source, span_notice("Your master's control strengthens you!"))
// Ensure debuff is removed only once
if(debuff_active)
debuff_active = FALSE
remove_debuff()
to_chat(source, span_notice("Your master's control strengthens you!"))

/datum/quirk/slavebourne/proc/on_uncollared(mob/living/carbon/human/source)
SIGNAL_HANDLER
Expand Down Expand Up @@ -785,5 +753,3 @@
to_chat(H, span_notice("You feel your master's life force return! Your abilities are restored!"))
UnregisterSignal(master, COMSIG_LIVING_REVIVE)

/datum/quirk/slavebourne/proc/examine(mob/living/carbon/human/H)
return span_notice("[H.p_they(TRUE)] carries [H.p_them()]self with a submissive demeanor as if seeking direction.")
5 changes: 4 additions & 1 deletion code/modules/antagonists/_common/antag_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GLOBAL_LIST_EMPTY(antagonists)
var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
var/antagpanel_category = "Uncategorized" //Antagpanel will display these together, REQUIRED
var/show_name_in_check_antagonists = FALSE //Will append antagonist name in admin listings - use for categories that share more than one antag type

//RT: Whether or not this antag increases your votepwr in the end vote
var/increase_votepwr = TRUE
var/rogue_enabled = FALSE
Expand Down Expand Up @@ -279,3 +279,6 @@ GLOBAL_LIST_EMPTY(antagonists)
else
return
..()

/datum/antagonist/proc/get_preview_icon()
return null
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define COMSIG_LIVING_TOGGLE_LISTEN "living_toggle_listen"
Loading

0 comments on commit 3e176c3

Please sign in to comment.