Skip to content

Commit

Permalink
Merge pull request Baystation12#19041 from Kearel/deityShmeity
Browse files Browse the repository at this point in the history
Small Deity HUD update and tweaks.
  • Loading branch information
comma authored Oct 17, 2017
2 parents 89b399b + a4c8063 commit 53dc988
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 9 deletions.
52 changes: 47 additions & 5 deletions code/_onclick/hud/deity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,53 @@
src.adding = list()
src.other = list()

var/obj/screen/using
var/obj/screen/intent/deity/D = new()

using = new /obj/screen/intent()
src.adding += using
action_intent = using
src.adding += D
action_intent = D

mymob.client.screen = list()
mymob.client.screen += src.adding
mymob.client.screen += src.adding
D.sync_to_mob(mymob)


/obj/screen/intent/deity
var/list/desc_screens = list()
screen_loc = "EAST-5:122,SOUTH:8"

/obj/screen/intent/deity/New()
..()
overlays += image('icons/mob/screen_phenomena.dmi', icon_state = "hud", pixel_x = -138, pixel_y = -1)

/obj/screen/intent/deity/proc/sync_to_mob(var/mob)
var/mob/living/deity/D = mob
for(var/i in 1 to D.control_types.len)
var/obj/screen/S = new()
S.name = null //Don't want them to be able to actually right click it.
S.mouse_opacity = 0
S.icon_state = "blank"
desc_screens[D.control_types[i]] = S
S.maptext_width = 128
S.screen_loc = screen_loc
//This sets it up right. Trust me.
S.maptext_y = 33/2*i - i*i/2 - 10
D.client.screen += S
S.maptext_x = -125

update_text()

/obj/screen/intent/deity/proc/update_text()
if(!istype(usr, /mob/living/deity))
return
var/mob/living/deity/D = usr
for(var/i in D.control_types)
var/obj/screen/S = desc_screens[i]
var/datum/phenomena/P = D.intent_phenomenas[intent][i]
if(P)
S.maptext = "<span style='font-size:7pt;font-family:Impact'><font color='#3C3612'>[P.name]</font></span>"
else
S.maptext = null

/obj/screen/intent/deity/Click(var/location, var/control, var/params)
..()
update_text()
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/cult_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")

/obj/item/weapon/melee/cultblade/attack(mob/living/M, mob/living/user, var/target_zone)
if(iscultist(user))
if(iscultist(user) || (user.mind in godcult.current_antagonists))
return ..()

var/zone = (user.hand ? BP_L_ARM : BP_R_ARM)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/deity/deity_phenomena.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/mob/living/deity
var/list/phenomenas = list()
var/list/intent_phenomenas = list()
var/static/list/control_types = list("control", "controlshift", "shift")


/mob/living/deity/New()
Expand Down Expand Up @@ -45,7 +46,7 @@
/mob/living/deity/proc/populate_intent(var/intent)
if(!intent_phenomenas[intent])
intent_phenomenas[intent] = list()
intent_phenomenas[intent] |= list("shift", "control", "controlshift")
intent_phenomenas[intent] |= control_types

/mob/living/deity/proc/set_phenomena(var/datum/phenomena/phenomena, var/intent, var/modifiers)
if(!intent_phenomenas[intent])
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/deity/deity_sources.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/mob/living/deity/proc/adjust_power(var/amount, var/silent = 0, var/msg)
if(feats[DEITY_POWER_BONUS])
amount += amount * feats[DEITY_POWER_BONUS]
mob_uplink.uses += amount
mob_uplink.uses = max(0, mob_uplink.uses + amount)
if(!silent)
var/feel = ""
if(abs(amount) > 100)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/deity/forms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Each plays slightly different and has different challenges/benefits
starting_feats = list(DEITY_FORM_DARK_ART, DEITY_FORM_BLOOD_SAC, DEITY_FORM_DARK_MINION, DEITY_FORM_BLOOD_FORGE)

/datum/god_form/narsie/take_charge(var/mob/living/user, var/charge)
charge *= 0.5
charge = min(100, charge * 0.25)
if(prob(charge))
to_chat(user, "<span class='warning'>You feel drained...</span>")
var/mob/living/carbon/human/H = user
Expand Down
8 changes: 8 additions & 0 deletions html/changelogs/TheWelp - deityShmeity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
author: TheWelp

delete-after: True

changes:
- rscadd: "Added a deity hud element that shows your current phenomenas."
- tweak: "Reduced D-Nar's blood costs to half."
- tweak: "Made it so that a deity's power can never go below 0."
Binary file added icons/mob/screen_phenomena.dmi
Binary file not shown.

0 comments on commit 53dc988

Please sign in to comment.