Skip to content

Commit

Permalink
Merge pull request #33 from Stutternov/home-of-the-sexual
Browse files Browse the repository at this point in the history
Ports Changes to Marriage
  • Loading branch information
Noightmare authored Aug 7, 2024
2 parents 0ae5c51 + 4304de0 commit a3a764a
Showing 1 changed file with 73 additions and 56 deletions.
129 changes: 73 additions & 56 deletions code/game/objects/structures/fluff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1051,78 +1051,95 @@
return FALSE
var/marriage
var/obj/item/reagent_containers/food/snacks/grown/apple/A = W
//The MARRIAGE TEST BEGINS
if(A.bitten_names.len)
if(A.bitten_names.len == 2)
var/list/found_mobs = list()
//Groom provides the surname that the bride will take
var/mob/living/carbon/human/thegroom
var/mob/living/carbon/human/thebride
//Did anyone get cold feet on the wedding?
for(var/mob/M in viewers(src, 7))
testing("check [M]")
if(found_mobs.len >= 2)
if(thegroom && thebride)
break
if(!ishuman(M))
continue
var/mob/living/carbon/human/C = M
/*
* This is for making the first biters name
* always be applied to the groom.
* second. This seems to be the best way
* to use the least amount of variables.
*/
var/name_placement = 1
for(var/X in A.bitten_names)
//I think that guy is dead.
if(C.stat == DEAD)
continue
//That person is not a player or afk.
if(!C.client)
continue
//Gotta get a divorce first
if(C.marriedto)
continue
if(C.real_name == X)
//I know this is very sloppy but its alot less code.
switch(name_placement)
if(1)
if(thegroom)
continue
thegroom = C
if(2)
if(thebride)
continue
thebride = C
testing("foundbiter [C.real_name]")
found_mobs += C
testing("foundmobslen [found_mobs.len]")
if(found_mobs.len == 2)
var/mob/living/carbon/human/theman
var/mob/living/carbon/human/thewoman
for(var/mob/living/carbon/human/M in found_mobs) //first find man
if(M.marriedto)
continue
if(M.gender == MALE)
if(theman)
testing("fail64")
A.burn()
return
theman = M
else
if(thewoman)
A.burn()
testing("fai33")
return
thewoman = M
if(!theman || !thewoman)
testing("fail22")
return
var/surname2use
var/index = findtext(theman.real_name, " ")
var/womanfirst
theman.original_name = theman.real_name
thewoman.original_name = thewoman.real_name
if(!index)
surname2use = theman.dna.species.random_surname()
name_placement++

//WE FOUND THEM LETS GET THIS SHOW ON THE ROAD!
if(!thegroom || !thebride)
testing("fail22")
return
//Alright now for the boring surname formatting.
var/surname2use
var/index = findtext(thegroom.real_name, " ")
var/bridefirst
thegroom.original_name = thegroom.real_name
thebride.original_name = thebride.real_name
if(!index)
surname2use = thegroom.dna.species.random_surname()
else
/*
* This code prevents inheriting the last name of
* " of wolves" or " the wolf"
* remove this if you want "Skibbins of wolves" to
* have his bride become "Sarah of wolves".
*/
if(findtext(thegroom.real_name, " of ") || findtext(thegroom.real_name, " the "))
surname2use = thegroom.dna.species.random_surname()
thegroom.change_name(copytext(thegroom.real_name, 1,index))
else
if(findtext(theman.real_name, " of ") || findtext(theman.real_name, " the "))
surname2use = theman.dna.species.random_surname()
theman.change_name(copytext(theman.real_name, 1,index))
else
surname2use = copytext(theman.real_name, index)
theman.change_name(copytext(theman.real_name, 1,index))
index = findtext(thewoman.real_name, " ")
if(index)
thewoman.change_name(copytext(thewoman.real_name, 1,index))
womanfirst = thewoman.real_name
theman.change_name(theman.real_name + surname2use)
thewoman.change_name(thewoman.real_name + surname2use)
theman.marriedto = thewoman.real_name
thewoman.marriedto = theman.real_name
theman.adjust_triumphs(1)
thewoman.adjust_triumphs(1)
priority_announce("[theman.real_name] has married [womanfirst]!", title = "Holy Union!", sound = 'sound/misc/bell.ogg')
marriage = TRUE
qdel(A)
// if(theman.has_stress(/datum/stressevent/nobel))
// thewoman.add_stress(/datum/stressevent/nobel)
// if(thewoman.has_stress(/datum/stressevent/nobel))
// theman.add_stress(/datum/stressevent/nobel)
surname2use = copytext(thegroom.real_name, index)
thegroom.change_name(copytext(thegroom.real_name, 1,index))
index = findtext(thebride.real_name, " ")
if(index)
thebride.change_name(copytext(thebride.real_name, 1,index))
bridefirst = thebride.real_name
thegroom.change_name(thegroom.real_name + surname2use)
thebride.change_name(thebride.real_name + surname2use)
thegroom.marriedto = thebride.real_name
thebride.marriedto = thegroom.real_name
thegroom.adjust_triumphs(1)
thebride.adjust_triumphs(1)
//Bite the apple first if you want to be the groom.
priority_announce("[thegroom.real_name] has married [bridefirst]!", title = "Holy Union!", sound = 'sound/misc/bell.ogg')
marriage = TRUE
qdel(A)

if(!marriage)
A.burn()
return
. = ..()
return ..()

/obj/structure/fluff/psycross/proc/check_prayer(mob/living/L,message)
if(!L || !message)
Expand Down

0 comments on commit a3a764a

Please sign in to comment.