mirror of
https://github.com/KabKebab/GS13.git
synced 2026-05-30 02:59:08 +01:00
Merge pull request #623 from ArchieBeepBoop/numbertwo
Ports: GetComponent macros removal, and few other updates.
This commit is contained in:
@@ -175,7 +175,7 @@
|
||||
data["chosenPillStyle"] = chosenPillStyle
|
||||
data["isPillBottleLoaded"] = bottle ? 1 : 0
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage)
|
||||
data["pillBotContent"] = bottle.contents.len
|
||||
data["pillBotMaxContent"] = STRB.max_items
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
var/target_loc = bottle ? bottle : drop_location()
|
||||
var/drop_threshold = INFINITY
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
var/datum/component/storage/STRB = bottle.GetComponent(/datum/component/storage)
|
||||
if(STRB)
|
||||
drop_threshold = STRB.max_items - bottle.contents.len
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
|
||||
mood.setSanity(min(mood.sanity, SANITY_DISTURBED))
|
||||
M.Jitter(5)
|
||||
if(prob(20))
|
||||
@@ -431,7 +431,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
|
||||
mood.setSanity(min(mood.sanity, SANITY_UNSTABLE))
|
||||
M.Jitter(10)
|
||||
if(prob(30))
|
||||
@@ -439,7 +439,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
|
||||
mood.setSanity(min(mood.sanity, SANITY_CRAZY))
|
||||
M.Jitter(15)
|
||||
if(prob(40))
|
||||
@@ -447,7 +447,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
|
||||
mood.setSanity(SANITY_INSANE)
|
||||
M.Jitter(20)
|
||||
if(prob(50))
|
||||
|
||||
@@ -1444,7 +1444,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
M.dizziness = max(0, M.dizziness-6)
|
||||
M.confused = max(0, M.confused-6)
|
||||
M.disgust = max(0, M.disgust-6)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
|
||||
if(mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then...
|
||||
mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user